Commit Graph

618 Commits

Author SHA1 Message Date
Sidharth Vinod 612f9327e9
Merge branch 'master' into develop
* master:
  Add CNAME
2022-12-17 00:34:07 +05:30
Alois Klink 1e3d76a0aa docs(README.zh-CN): fix book image src
Copied from ec026eaf82
2022-12-16 18:31:25 +00:00
Sidharth Vinod 7670ada9ac
Add CNAME 2022-12-16 21:59:44 +05:30
Knut Sveidqvist bb9b0b015e #815 Styling subgraphs with color shades 2022-12-16 16:28:24 +01:00
Knut Sveidqvist 3e64b439ce
Merge pull request #3917 from tomperr/feature/3910_er_unique_key
feat(er): add unique key
2022-12-16 13:03:30 +01:00
Knut Sveidqvist 1bf636d697
Merge pull request #3892 from mahomedalid/feature/3771_string_length
Adding support for parenthesis in the er diagram attribute types.
2022-12-16 12:58:30 +01:00
Sidharth Vinod f019250494
Merge pull request #3916 from aloisklink/fix/use-determenistic-uuids-for-er-diagrams
fix(er): switch to deterministic UUIDs in ER
2022-12-16 12:44:12 +05:30
steph 528facf88d minor syntax update 2022-12-15 13:11:07 -08:00
Alois Klink 7855edae6b
perf(er): pre-calculcate er UUID namespace
Pre-calculate the entity-relationship diagram namespace UUID.

This UUID is always constant, so we can pre-calculate it to save a
bit of processing power on the client.

Co-authored-by: "Ashley Engelund (weedySeaDragon @ github)" <ashley.engelund@gmail.com>
Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
2022-12-15 20:22:39 +00:00
Sidharth Vinod 33f78a5429
Merge branch 'master' into develop
* master:
  Fix book link
  Add book landing page back
2022-12-16 01:28:42 +05:30
Sidharth Vinod 60d0185698
Fix book link 2022-12-16 01:27:15 +05:30
Sidharth Vinod 2743b72a87
Add book landing page back 2022-12-16 01:12:50 +05:30
Sidharth Vinod 7b13b489c2
Merge branch 'master' into develop
* master: (23 commits)
  Update vitepress
  fix: Add icon css
  fix Top level await
  v9.3.0
  bump dagre-es 7.0.6
  Bump mermaid version
  Update dagre-es
  Bump mermaid version
  fix: Incorrect removal of existing elements
  fix: add .js to external imports.
  fix: add .js to external imports.
  Bump mermaid version
  fix: add .js to external imports.
  Bump mermaid version
  fix: Throw correct errors when parsing diagrams with errors
  Update url snapshot test for external diagrams
  Update url snapshot test for external diagrams
  Updated package number
  Updated package number
  Updated package number to 9.3.0-rc1
  ...
2022-12-16 00:51:16 +05:30
Sidharth Vinod d6ddf9568e
Fix theming doc 2022-12-16 00:49:35 +05:30
Sidharth Vinod ec026eaf82
Fix book link 2022-12-16 00:37:37 +05:30
Tom PERRILLAT-COLLOMB c7f085a138 doc(er): add documentation on UK constraint 2022-12-15 19:03:00 +00:00
Tom PERRILLAT-COLLOMB 32a8061cc2 feat(er): add UK attribute constraint
Any attribute can now be PK, FK or UK
2022-12-15 18:55:08 +00:00
BD103 1495baac2c
Merge branch 'develop' into patch-1 2022-12-15 13:20:45 -05:00
Alois Klink ac5a1b4501
fix(er): switch to deterministic uuids in ER
The entity relation diagram uses uuid v4, which is randomly generated.

uuid v5 uses a SHA-1 hash, which makes the uuid deterministic.

The input strings are unique for each diagram, so this should be
okay.
2022-12-15 18:00:48 +00:00
Sidharth Vinod 01039c574c
Merge pull request #3914 from tommoor/patch-1
fix: Typescript error in usage
2022-12-15 21:45:06 +05:30
Sidharth Vinod 4e70f327c4
Merge pull request #3897 from weedySeaDragon/feat/3896_a11y-svg-role-graphics-doc-doc
feat: Set svg role to 'graphics-document document'
2022-12-15 21:42:08 +05:30
Tom Moor 78dd03dcdb lint 2022-12-15 09:29:30 -05:00
Tom Moor 9f2d29b68b
fix typescript error 2022-12-15 06:09:22 -08:00
Sidharth Vinod d841ad8f3e
Update vitepress 2022-12-15 17:09:24 +05:30
Sidharth Vinod 3fb0b2792e
fix: Add icon css 2022-12-15 15:33:51 +05:30
Sidharth Vinod bbc4e90c89
fix Top level await 2022-12-15 14:57:08 +05:30
Sidharth Vinod 774512df57
v9.3.0 2022-12-15 14:18:54 +05:30
Sidharth Vinod 152994047e
bump dagre-es 7.0.6 2022-12-15 09:12:08 +05:30
Sidharth Vinod d194e78677
Bump mermaid version 2022-12-14 09:45:34 +05:30
Sidharth Vinod 16b51800d0
Update dagre-es 2022-12-14 09:45:18 +05:30
Sidharth Vinod 2176bef537
Bump mermaid version 2022-12-13 13:44:03 +05:30
Sidharth Vinod 9f9c95b0b3
fix: Incorrect removal of existing elements 2022-12-13 13:42:07 +05:30
Sidharth Vinod 3f0b13a131
fix: add .js to external imports. 2022-12-13 00:38:54 +05:30
Sidharth Vinod 3c44379af9
fix: add .js to external imports. 2022-12-13 00:34:31 +05:30
Sidharth Vinod 1d529d80d1
Bump mermaid version 2022-12-13 00:23:41 +05:30
Sidharth Vinod 89451ca640
fix: add .js to external imports. 2022-12-13 00:22:57 +05:30
Sidharth Vinod fac3a4d29b
Bump mermaid version 2022-12-12 23:52:48 +05:30
Sidharth Vinod d7610dda8f
fix: Throw correct errors when parsing diagrams with errors 2022-12-12 23:51:46 +05:30
Jesper Hasselquist 32fcea3bdd
fix(docs): remove duplicate section
Remove duplicate `Return Type` section
2022-12-12 21:39:19 +09:00
steph e4622ba06e fix text overflow 2022-12-11 20:53:14 -08:00
Maho Pacheco 6fb9b3b353 Adding UTs for attributes with variable length in er diagram 2022-12-11 19:45:05 -08:00
steph 1b0ea981f9 update navbar 2022-12-11 18:59:01 -08:00
Knut Sveidqvist 14f7756fdb #815 Adding labels to edges 2022-12-11 09:24:05 +01:00
Ashley Engelund 76e9e07370
Add links to github atom add-ons
Co-authored-by: Alois Klink <alois@aloisklink.com>
2022-12-10 13:46:24 -08:00
Ashley Engelund (weedySeaDragon @ github) de795a915e remove links from atom.io; add note Atom has been archived 2022-12-09 04:56:55 -08:00
Ashley Engelund (weedySeaDragon @ github) e59b830d74 set svg role to 'graphics-document document' 2022-12-08 11:25:04 -08:00
Knut Sveidqvist 0b01c3376d #815 Adding labels to subgraphs 2022-12-08 19:41:17 +01:00
Per Brolin 4f169dd2b8 Updated package number 2022-12-08 15:16:13 +01:00
Per Brolin 23a44952ac Updated package number 2022-12-08 15:09:49 +01:00
Knut Sveidqvist 9b27396344 Small fix 2022-12-08 13:21:56 +01:00
Ashley Engelund (weedySeaDragon @ github) 1c9a559362 common function for a11y; add to renderAsync; + renderAsync spec 2022-12-07 10:19:30 -08:00
Ashley Engelund (weedySeaDragon @ github) b1dd0008bc Merge remote-tracking branch 'MERMAID/develop' into feat/3626-aria-descBy-roledescription-mocks 2022-12-07 09:31:20 -08:00
Knut Sveidqvist ebf76e3d1f #815 Using elk for flowchart layouts 2022-12-07 09:37:27 +01:00
Knut Sveidqvist 033201ff1f
Merge pull request #3889 from huynhicode/docs/theming
docs: refactor Theming doc
2022-12-07 08:55:00 +01:00
Sidharth Vinod f2a85eafac
Merge remote-tracking branch 'origin/develop' into pr/BD103/3890
* origin/develop:
  chore: Update cspell
  Update docs
  fix: docs build command
  chore: Rebuild docs if linting fails
  chore: Format Mermaid.vue
  Made mermaidConfig a local variable so that it cannot be shared cross rendering.
  Fixed an issue that diagrams disappear from docs pages when switching themes or reloading pages
  Fixed the issue that theme-switch does not work on docs.
  Get base sha from PR
  Run doc lint only if files changed
  Run doc lint only if files changed
  Run doc lint only if files changed
  split lint docs action
  split lint docs action
  fix: File location
  fix(docs): Test auto commit
  fix(docs): Test auto commit
  fix(docs): Test auto commit
  chore: Update docs path
  chore: Auto build docs if only src/docs is changed
2022-12-07 11:50:45 +05:30
Sidharth Vinod 963a1f1eb1
Merge remote-tracking branch 'origin/develop' into sidv/autoBuildDocs
* origin/develop: (564 commits)
  chore: Format Mermaid.vue
  Made mermaidConfig a local variable so that it cannot be shared cross rendering.
  Fix for issue #3882 moving the label when the path has been modified
  Small fix for issue #3881
  Fixed an issue that diagrams disappear from docs pages when switching themes or reloading pages
  Fixed the issue that theme-switch does not work on docs.
  chore: Fix mindmap link
  chore: Switch back from unpkg to jsdelivr
  delete functions not used in diagrams/c4 code (dead code)
  Minor change
  feat: Add @include support to docs
  feat: Add @include example to docs
  feat: Add @include support to docs
  cleanup
  fix lines
  fix Async rendering
  Revert "sync"
  chore(deps): update pnpm to v7.17.1
  chore(deps): remove dependency on `graphlib`
  test(e2e): make gitgraph snapshots consistent
  ...
2022-12-07 11:11:45 +05:30
Maho Pacheco 4dadf8a72d Adding support for parentheses 2022-12-06 10:38:21 -08:00
Sidharth Vinod fdf261bda3
chore: Format Mermaid.vue 2022-12-06 15:53:36 +05:30
Sidharth Vinod f2ee20fdf5
Merge pull request #3880 from ZenUml/defects/issue-3878
Defects/issue 3878
2022-12-06 15:52:15 +05:30
MrCoder 7a086890fd Made mermaidConfig a local variable so that it cannot be shared cross rendering. 2022-12-06 19:44:14 +11:00
BD103 49ca2e3588
feat: add links to theme listing 2022-12-05 17:41:30 -05:00
steph f0aea0e6af fix cspell 2022-12-04 22:04:20 -08:00
steph 24560b7d13 fix lint 2022-12-04 21:51:29 -08:00
steph d451a0c508 refactor theming doc 2022-12-04 21:20:09 -08:00
Ashley Engelund (weedySeaDragon @ github) 96996d0fba Merge remote-tracking branch 'MERMAID/develop' into feat/3626-aria-descBy-roledescription-mocks 2022-12-03 12:13:12 -08:00
Knut Sveidqvist 4124d186d0 Fix for issue #3882 moving the label when the path has been modified 2022-12-03 13:21:10 +01:00
Knut Sveidqvist b68fee7e65 Small fix for issue #3881 2022-12-03 11:41:29 +01:00
Knut Sveidqvist 4863d0d29d Adding new flowchart renderer using elk 2022-12-03 09:47:01 +01:00
MrCoder a1e4ffb3f0 Fixed an issue that diagrams disappear from docs pages when switching themes or reloading pages 2022-12-03 19:30:09 +11:00
MrCoder c7471f1755 Fixed the issue that theme-switch does not work on docs. 2022-12-03 19:10:05 +11:00
Sidharth Vinod abc6ee049d
Merge pull request #3873 from mermaid-js/sidv/jsdelivr
Switch back to jsdelivr
2022-12-02 13:31:22 +05:30
Knut Sveidqvist 4f1b26fd76 Adding new flowchart renderer using cytoscape 2022-12-02 08:06:16 +01:00
Alois Klink accba3f408 chore: improve errors for bad YAML frontmatter
Adds a custom error message for any mermaid diagram that starts with
a `---`. Normally, these are expected to be part of a YAML front-matter
block, but indentation issues or a missing closing `---` may cause
these to be not parsed correctly.
2022-12-01 22:43:03 +00:00
Ashley Engelund (weedySeaDragon @ github) bfe3f309d2 remove typeof 2022-12-01 10:09:43 -08:00
Ashley Engelund (weedySeaDragon @ github) f036d58ec3 Merge remote-tracking branch 'MERMAID/develop' into feat/3626-aria-descBy-roledescription-mocks
# Conflicts:
#	cypress/integration/rendering/gantt.spec.js
#	cypress/integration/rendering/requirement.spec.js
#	docs/config/setup/modules/mermaidAPI.md
#	packages/mermaid/src/accessibility.js
2022-12-01 10:08:44 -08:00
Sidharth Vinod bcbf68b7e1
Merge pull request #3871 from weedySeaDragon/chore/c4-remove-unused-code
chore: delete functions not used in diagrams/c4 code (dead code)
2022-12-01 23:07:29 +05:30
Sidharth Vinod 1e30e33ad3
chore: Fix mindmap link 2022-12-01 13:51:50 +05:30
Sidharth Vinod 41033008ec
Merge branch 'master' into develop
* master:
  doc: Add mindmap integration docs
  fix: Fetch depth
  fix: Fetch depth
  fix: Fetch depth
  fix: Add commit count to release preview
  fix: Add commit count to release preview
  chore: Add working directory
  fix: release-preview-publish.yml
  Fix #3799: Remove `type` from package.json
2022-12-01 11:39:28 +05:30
Sidharth Vinod cd0eae2807
chore: Switch back from unpkg to jsdelivr 2022-12-01 11:23:50 +05:30
Sidharth Vinod 8cb6fbfab0
Merge branch 'master' into sidv/jsdelivr
* master:
  doc: Add mindmap integration docs
  fix: Fetch depth
  fix: Fetch depth
  fix: Fetch depth
  fix: Add commit count to release preview
  fix: Add commit count to release preview
  chore: Add working directory
  fix: release-preview-publish.yml
  Fix #3799: Remove `type` from package.json
2022-12-01 11:20:16 +05:30
Alois Klink f884b745dc Merge branch 'develop' into fix/3706_support-indented-yaml-only-in-html
Conflicts:
 - pnpm-lock.yaml
2022-11-30 21:11:48 +00:00
Ashley Engelund (weedySeaDragon @ github) 6f2b0c43cb delete functions not used in diagrams/c4 code (dead code) 2022-11-30 12:43:27 -08:00
Knut Sveidqvist 650ee31cd1
Merge pull request #3845 from mermaid-js/sidv/eslintCleanup
Housekeeping with eslint-unicorn
2022-11-30 11:53:16 +01:00
Sidharth Vinod 36cf7e0601
Merge pull request #3863 from mermaid-js/sidv/includeMD
Add support for @include in docs
2022-11-30 00:51:29 +05:30
Knut Sveidqvist ff1d56e9b5
Merge pull request #3846 from mermaid-js/sidv/mermaidDocs
Use current mermaid version in docs.
2022-11-29 17:13:52 +01:00
Knut Sveidqvist 5e98e99f86
Merge pull request #3829 from DanInProgress/fix/stylis-add-idselector
Use stylis to prepend idSelector
2022-11-29 17:10:27 +01:00
Sidharth Vinod 316f612bde
feat: Add @include support to docs 2022-11-29 00:54:01 +05:30
Sidharth Vinod 2a5c2b58de
feat: Add @include example to docs 2022-11-29 00:34:57 +05:30
Sidharth Vinod e8703a59ec
feat: Add @include support to docs 2022-11-29 00:34:29 +05:30
Sidharth Vinod 3a6dd61f65
cleanup 2022-11-28 16:26:10 +05:30
Sidharth Vinod 1f147b6b63
Merge branch 'develop' into sidv/mermaidDocs
* develop:
  chore(deps): update pnpm to v7.17.1
  chore(deps): remove dependency on `graphlib`
  test(e2e): make gitgraph snapshots consistent
2022-11-28 16:13:27 +05:30
Sidharth Vinod e302ee383a
fix Async rendering 2022-11-28 16:11:24 +05:30
Sidharth Vinod 527a3df083
Revert "sync"
This reverts commit a88a467d45.
2022-11-28 15:44:19 +05:30
Ashley Engelund (weedySeaDragon @ github) 2bf753a769 use camelCase 2022-11-27 19:17:37 -08:00
Ashley Engelund (weedySeaDragon @ github) 6044e9e9e8 make test title clearer 2022-11-27 19:17:17 -08:00
Ashley Engelund (weedySeaDragon @ github) e9d4372c41 Merge remote-tracking branch 'MERMAID/develop' into feat/3626-aria-descBy-roledescription-mocks 2022-11-27 19:10:28 -08:00
Alois Klink 05b25db5eb chore(deps): remove dependency on `graphlib`
`graphlib` has recently been replaced with the ESM version of
graphlib bundled with
[`dagre-d3-es`](https://www.npmjs.com/package/dagre-d3-es), in commit
f687abb1 (chore: Use `graphlib` from `dagre-d3-es`, 2022-11-20)

This means we can safely remove it from our dependencies list.

Fixes: f687abb165
2022-11-27 19:13:53 +00:00
Ashley Engelund (weedySeaDragon @ github) 6e486d3c49 add test for multi-line accDescr 2022-11-27 10:32:25 -08:00
Alois Klink 5cfa919672 fix: support parsing indented mmd YAML from HTML
In order to parse the YAML front-matter in a Mermaid diagram, the
YAML seperators **MUST NOT** be indented, e.g.:

````markdown
```mermaid
---
title: This is fine.
---
```

```mermaid
  ---
  title: This is not fine, because the `---` are indented.
  ---
```
````

However, this makes it very difficult to write nice Mermaid diagrams in
HTML code-blocks.

This commit uses [`ts-dedent`](https://www.npmjs.com/package/ts-dedent)
to automatically remove the indentation from Mermaid diagrams when
parsed from HTML. Mermaid diagrams from mermaidAPI.render() are **NOT**
dedented, as that API is called from JavaScript code, and therefore
users can easily `dedent` their own diagrams.
2022-11-27 18:19:13 +00:00
Ashley Engelund (weedySeaDragon @ github) f1bc2deafd use MockedD3, spies in util insertTitle spec (remove MockD3) 2022-11-27 10:14:11 -08:00