57 Commits

Author SHA1 Message Date
Sidharth Vinod
6faf54cf6f
fix lock 2022-11-23 16:04:38 +05:30
Sidharth Vinod
ab81b508ce
Merge branch 'develop' into sidv/mermaidDocs
* develop: (79 commits)
  chore: docs:build
  chore: docs:build
  tiny fix and change: "The/y cannot" -> "Cannot..."
  remove 'horz' from  cSpell.json
  update demos/state.html to includ examples; formatting
  add 'horz' to cSpell (in pieDetector.ts commented out barChart work)
  refine - what is not done yet
  remove 'horz' from  cSpell.json
  Revert "Added pie"
  chore: Fix cSpell in pieRenderer
  update demos/state.html to includ examples; formatting
  add 'horz' to cSpell (in pieDetector.ts commented out barChart work)
  refine - what is not done yet
  remove console stmt
  #3831 Re-enabling themes for er diagrams
  #3835 Adding path to list of elements to be styled
  #3882 fix for issues with mindmaps  with only a single node
  chore(deps): update pnpm to v7.17.0
  docs: Remove warning in readme
  chore(deps): update lycheeverse/lychee-action action to v1.5.4
  ...
2022-11-23 15:57:06 +05:30
Knut Sveidqvist
ffb95b4fa9
Merge pull request #3823 from mermaid-js/sidv/viz
Add package visualizations
2022-11-21 13:32:19 +01:00
Knut Sveidqvist
29a02d1ab5
Merge pull request #3809 from aloisklink/use-dagre-d3-es
Replace `dagre`/`dagre-d3` with `dagre-d3-es`
2022-11-21 13:31:35 +01:00
Sidharth Vinod
49a931f712
feat: Add bundle visualization 2022-11-20 12:13:00 +05:30
Mason Malone
70f024735b Add title support using YAML frontmatter 2022-11-18 20:42:54 -08:00
Alois Klink
fd76e0e270 chore: replace dagre/dagre-d3 with dagre-d3-es
Replace the dagre and dagre-d3 libraries with dagre-d3-es.

Both dagre and dagre-d3 are deprecated and unmaintained,
and haven't been updated for more than 3 years.

Since dagre-d3 still requires an old version of d3, this causes
a bunch of security warnings,
e.g. https://github.com/advisories/GHSA-36jr-mh4h-2g58

The [dagre-d3-es](https://github.com/tbo47/dagre-es) package is a fork
that contains support for `"d3": "^7.6.1"`. Also, it's ESM, so we will
hopefully get smaller bundle sizes too. The only issue is that this
fork isn't very well used (only has 3000 weekly downloads),
compared to `dagre-d3`'s 250,000 weekly downloads.

(although to be fair, a large proportion of dagre-d3's downloads
 probably come from mermaid)

Since it's is a less popular package,
**I've pinned `dagre-d3-es` to `"7.0.2"` instead of `"^7.0.2"`**.
This does mean if there is a bug in `dagre-d3-es`, we will have to
manually bump it ourselves, but it also means we won't accidentally
be sending a buggy version of `dagre-d3-es` out to users in cases
something changes (it might be worth disabling renovate for this
if we're feeling paranoid!)
2022-11-18 18:33:05 +00:00
Alois Klink
6da6edfc01
refactor(docs): use default vitepress highlighter
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
2022-11-17 19:05:38 +00:00
Alois Klink
476917bda9 Revert "chore(deps): pin dependencies"
This reverts commit 17b72d565de595c94c1e339da37fc81676c4b200.
2022-11-16 20:00:16 +00:00
Sidharth Vinod
beab2278d8
feat: Async mermaid docs 2022-11-14 22:06:26 +05:30
Sidharth Vinod
eae88c51d2
Cleanup 2022-11-14 16:42:08 +05:30
Sidharth Vinod
77a326dedf
Merge Master 2022-11-14 14:51:23 +05:30
Sidharth Vinod
2d9bdedaf5
Merge branch 'develop' into sidv/mergeMaster
* 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
2022-11-14 13:57:09 +05:30
renovate[bot]
a1e2df8466
chore(deps): update all non-major dependencies 2022-11-14 05:28:23 +00:00
renovate[bot]
20613beb8a fix(deps): update all non-major dependencies 2022-11-14 05:25:07 +00:00
Sidharth Vinod
a83f88bdf1
chore: Merge master to develop 2022-11-10 13:51:53 +05:30
Sidharth Vinod
c6287b640d
Merge remote-tracking branch 'origin/develop' into sidv/docsDev
* origin/develop:
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  docs: Fix relative links to documentation files
  docs: Update references to default config in directives page
  Fixing applitools batches
  chore: Sync docs
  Fix link to CSS classes
2022-11-07 14:11:06 +05:30
renovate[bot]
603b537ee1 chore(deps): update all non-major dependencies 2022-11-07 07:48:40 +00:00
renovate[bot]
2a45d71efd chore(deps): update all non-major dependencies 2022-11-07 05:36:39 +00:00
Sidharth Vinod
015e22acf8
feat: Add live updates to docs. 2022-11-01 12:04:34 +05:30
Sidharth Vinod
24198ed63e
Merge remote-tracking branch 'origin/develop' into pr/emersonbottero/3678
* origin/develop:
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore: Update bug report template
2022-10-31 19:43:53 +05:30
renovate[bot]
77782fdbc7 chore(deps): update all non-major dependencies 2022-10-31 12:56:18 +00:00
renovate[bot]
a15b228d3f chore(deps): update all non-major dependencies 2022-10-31 06:48:56 +00:00
Emerson Bottero
f87d1630d1 chore: fix most of aloisklink reviews 2022-10-30 21:22:38 -03:00
Emerson Bottero
ec5568b943 chore: more revision fixes 2022-10-27 19:58:39 -03:00
Emerson Bottero
b62873a195 sync last changes 2022-10-25 17:54:07 -03:00
renovate[bot]
728d022f52 chore(deps): update all non-major dependencies 2022-10-24 07:36:58 +00:00
renovate[bot]
663edabb14 chore(deps): pin dependencies 2022-10-24 04:32:21 +00:00
Alois Klink
e6f19ff461 style: lint typescript with eslint-plugin-tsdoc 2022-10-20 20:23:28 +01:00
Santosh Viswanatham
c71b6e31f7
Merge branch 'develop' into feat/3601-cspell-configuration 2022-10-18 21:02:38 +05:30
Sidharth Vinod
f2571e9930
fix: Live editor links 2022-10-18 12:28:48 +05:30
Dima Kurilo
20751a6496 fix cypress tests for erDiagram, add eslint-plugin-no-only-tests plugin because of this comment: https://github.com/mermaid-js/mermaid/pull/3647#issuecomment-1281163858 2022-10-17 13:20:17 -04:00
devcer
aad53f9e61 merged with master 2022-10-17 09:27:42 +05:30
renovate[bot]
17b72d565d chore(deps): pin dependencies 2022-10-17 03:12:28 +00:00
renovate[bot]
541de12690
chore(deps): update all non-major dependencies (#3671)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-16 22:58:11 +02:00
Emerson Bottero
cbcf7f8a11 docs: new Documentation 2022-10-15 00:50:11 -03:00
renovate[bot]
9ac3992fd2
chore(deps): update all non-major dependencies (minor) (#3632)
* chore(deps): update all non-major dependencies

* chore: add `auto-install-peers` to `.npmrc`

* chore: Update lockfile

* Update docs/index.html

Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update packages/mermaid/src/docs/index.html

Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Define integrity, crossorigin and referrerpolicy

* Define integrity, crossorigin and referrerpolicy

* chore: format

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2022-10-14 13:18:19 +02:00
devcer
4d0da7fba0 Added and configured cspell plugin to eslint 2022-10-08 14:38:41 +05:30
Sidharth Vinod
6029bdeee9
Merge branch 'develop' into sidv/fixImportDoc
* develop:
  Fix for broken test
  fix: build npm-script
  Fix for issue in classdiagram-v2 from the typescript updates
  fix: build npm-script
  chore: Cleanup
  chore: cleanup
  fix: dynamic import
  fix: module import in pie chart demo
  fix: use async in render-after-error
2022-10-08 09:41:11 +08:00
Knut Sveidqvist
646f76d343 Fix for broken test 2022-10-07 14:36:25 +02:00
Sidharth Vinod
5865c890b5
docs: Add mermaid version to script URL 2022-10-07 15:52:32 +08:00
Sidharth Vinod
803ea863fd
fix: pnpm not found 2022-10-06 22:58:54 +08:00
Alois Klink
1f39fde230 build(test): remove vitest from subpackages
Removes vitest from all subpackages so that vitest/`pnpm run test`
are only in the root mono-repo.

This is required, because otherwise the root vitest and the subpackage
vitest versions can otherwise be slightly different, which causes
issues when running unit tests:

```Snapshot cannot be used outside of test```

In the future, we may want to consider moving package specific
tests into `packages/*/test`, and instead running these tests
with `pnpm run --recursive`, so that tests are run in each package by
their own version of vitest. This is the way that most projects
do things (e.g. https://github.com/vitest-dev/vitest).
2022-10-06 00:56:54 +01:00
Knut Sveidqvist
1528c03f85 Updated lockfile 2022-10-04 08:51:12 +02:00
Knut Sveidqvist
ef91b4fa0e
Merge pull request #3559 from mermaid-js/minmaps
Mindmaps replacing rendering algoritm with cose-bilkent
2022-10-04 08:26:11 +02:00
Knut Sveidqvist
9468bffcbb Merge branch 'develop' of github.com:emersonbottero/mermaid into emersonbottero-develop 2022-10-04 08:23:36 +02:00
Knut Sveidqvist
5079fa93b4 Using cose-bilkent layout algorithm for mindmaps 2022-10-03 10:05:12 +02:00
Knut Sveidqvist
56add0756f Lazy loading fix for example-diagram and mindmaps 2022-10-03 07:01:56 +02:00
Knut Sveidqvist
96cde8a15a updated pnpm-lock file 2022-09-29 19:35:54 +02:00
Knut Sveidqvist
f46f8752ca Adding example diagram as a template for a new diagram 2022-09-28 17:49:47 +02:00