Sidharth Vinod
6d2552ea6e
fix: Filenames
2022-11-08 19:26:02 +05:30
Sidharth Vinod
20b4358c0e
fix: Make options in registerExternalDiagrams optional
2022-11-08 19:21:49 +05:30
Sidharth Vinod
7ca525622b
fix #3757 : Remove dynamic imports for lazy load.
2022-11-08 19:12:37 +05:30
Sidharth Vinod
aab8f9273f
Merge branch 'feat/3701-expose-registerDiagram' into sidv/fixLL
...
* feat/3701-expose-registerDiagram:
feat: add `mermaidAPI.registerDiagram()`
refactor(mermaid): remove registerDiagram cb func
fix(mermaid): fix DiagramDefinition types
2022-11-08 13:50:54 +05:30
Sidharth Vinod
166dca4924
webpack test
2022-11-08 12:51:59 +05:30
Sidharth Vinod
75d276e19e
Merge branch 'release_9.2.1_bugfixes' into sidv/webpackTest
...
* release_9.2.1_bugfixes:
fix(mermaid): default mermaid back to CommonJS
fix(mermaid): fix mermaid.render types
2022-11-07 14:32:35 +05:30
Sidharth Vinod
2243af1871
Merge pull request #3767 from aloisklink/fix/convert-package-back-to-commonjs
...
[9.2] fix(mermaid): default mermaid back to CommonJS
2022-11-07 14:31:45 +05:30
Sidharth Vinod
41dbf0fa96
Merge pull request #3768 from aloisklink/fix/fix-mermaid.render-types
...
[9.2] fix(mermaid): fix `mermaid.render` types
2022-11-07 14:01:37 +05:30
Alois Klink
1a5e7315c0
fix(mermaid): default mermaid back to CommonJS
...
Default mermaid back to being a CommonJS module.
Improrting Mermaid as CommonJS (e.g. using `require("mermaid")`)
is normally broken (since v8), due to it's dependency on d3,
which is now ESM only.
However, it looks like some software
(e.g. TypeScript, in the docusaurus project)
could still handle the CommonJS version of Mermaid.
This commit now means that older versions of Node/build-tools
should now default to using the CommonJS version of Mermaid.
Newer tools should still see that the `"module"` field points to ESM,
or use the `exports["."]["import"]` field to load ESM.
2022-11-06 23:41:09 +00:00
Alois Klink
da6bb9498a
fix(mermaid): fix mermaid.render types
...
The cb param of mermaid.render should be optional,
and mermaid.render returns an SVG string instead of `void`.
2022-11-06 22:46:57 +00:00
Sidharth Vinod
1e417833f4
Basic webpack
2022-11-04 11:29:24 +05:30
Sidharth Vinod
97a7f1fd71
Merge pull request #2739 from Andre601/feature/issue-templates
...
Use issue templates and add diagram, theme and syntax proposal issue forms
2022-11-03 11:07:00 +05:30
Sidharth Vinod
c86d46eb8a
Add Security Policy
2022-11-03 11:06:21 +05:30
Sidharth Vinod
361dd6a96e
Add Security Policy
2022-11-03 10:59:57 +05:30
Sidharth Vinod
17adec38af
chore: lint
2022-11-03 10:59:56 +05:30
Andre_601
638b9d9aae
Discussions are now available
2022-11-03 10:59:56 +05:30
Andre_601
c8f6994895
Make colors required
2022-11-03 10:59:55 +05:30
Andre_601
1117a80500
make setup not required
2022-11-03 10:59:55 +05:30
Andre_601
5d83ec6fa2
Update theme_proposal.yml
2022-11-03 10:59:54 +05:30
Andre_601
bab5937426
Update syntaxt_proposal.yml
2022-11-03 10:59:54 +05:30
Andre_601
099a26977a
Update diagram_proposal.yml
2022-11-03 10:59:53 +05:30
Andre_601
0b834485a8
Update bug_report.yml
2022-11-03 10:59:52 +05:30
Andre_601
41f21d4f72
Delete question.md
2022-11-03 10:59:50 +05:30
Andre_601
312e5f3d96
Create syntaxt_proposal.yml
2022-11-03 10:59:35 +05:30
Andre_601
6ef3e7f536
Create theme_proposal.yml
2022-11-03 10:59:34 +05:30
Andre_601
4f5228aec4
Create diagram_proposal.yml
2022-11-03 10:59:32 +05:30
Andre_601
b9daa35558
Switch to bug_report.yml
2022-11-03 10:59:10 +05:30
Andre_601
21304a9677
Create config.yml
2022-11-03 10:57:57 +05:30
Knut Sveidqvist
3f6613ea9f
Updated mermaid version for the docs
2022-11-01 15:52:35 +01:00
Knut Sveidqvist
c8635c0b9b
Merge branch 'release/9.2.0'
...
Conflicts:
.github/ISSUE_TEMPLATE/bug_report.md
2022-11-01 15:37:00 +01:00
Knut Sveidqvist
e78ac9b92a
Updated version
v9.2.0
2022-11-01 15:27:20 +01:00
Sidharth Vinod
7a47fcfcbc
Merge pull request #3727 from gibson042/2022-10-issue-template
...
chore: Update bug report template
2022-10-29 23:44:02 +05:30
Knut Sveidqvist
d4c19ffa59
Merge branch 'release/9.2.0' of github.com:mermaid-js/mermaid into release/9.2.0
2022-10-28 09:34:36 +02:00
Knut Sveidqvist
120940f9f4
Merge pull request #3731 from aloisklink/fix/load-lazy-loaded-diagrams-in-initThrowsErrors
...
[9.2.0] Support `lazyLoadedDiagrams` when calling `initThrowsErrorsAsync`
2022-10-28 09:33:58 +02:00
Alois Klink
48b1f489fc
fix(mermaid): error if lazyLoadedDiagrams fails
...
Throws and logs a warning if lazyLoadedDiagrams fails to load properly.
Rendering is still performed, even on a lazyLoadedDiagrams failure.
2022-10-27 17:48:21 +01:00
Alois Klink
e62dd255bc
feat: expose initThrowsErrorsAsync publicly
...
Expose the function `initThrowsErrorsAsync()` publicly
as `mermaid.initThrowsErrorsAsync()`.
It has the TSDoc `@alpha` and `@deprecated` tags, so people should
be warned that it might be modified in Mermaid v10 or earlier.
Needed for `mermaid-cli` to handle `lazyLoadedDiagrams`.
2022-10-27 17:48:12 +01:00
Alois Klink
13110c4ed9
docs(mermaid): document initThrowsErrorsAsync
...
Add some basic tsdoc for initThrowsErrorsAsync.
2022-10-27 17:02:50 +01:00
Alois Klink
327fcbf902
fix: lazy load diagrams in initThrowsErrorsAsync
...
Previously, calling initThrowsErrorsAsync would not
load any of the lazyLoadedDiagrams entries.
Adaptated from reverted commit 4601c90904fb57f54ed91e31ea235b24de5add45
2022-10-27 16:50:57 +01:00
Alois Klink
81924f72c8
Revert "Merge branch 'release_9.2.0_buggfixes'"
...
This reverts commit 1a0309fb8758518b9f99dbdc406094db85e3885a, reversing
changes made to 56a8068a7f0cc9784f875a6d385bf9414eeab98b.
This is because the PR https://github.com/mermaid-js/mermaid/pull/3702
worked fine on the `develop` and `release_9.2.0_buggfixes` branches,
but had a bunch of git merge conflicts on the `release/9.2.0` branch.
2022-10-27 16:43:09 +01:00
Richard Gibson
5d048ce21e
chore: Update bug report template
...
Add common pattern for reproduction with https://mermaid.live/
2022-10-26 23:17:15 -04:00
Knut Sveidqvist
1a0309fb87
Merge branch 'release_9.2.0_buggfixes'
...
Conflicts:
packages/mermaid/src/mermaid.ts
2022-10-24 10:28:27 +02:00
Knut Sveidqvist
e793aae0ec
Merge pull request #3702 from aloisklink/fix/initThrowErrors-support-lazyLoadedDiagrams
...
Support `lazyLoadedDiagrams` when calling `initThrowsErrors`
2022-10-24 08:28:50 +02:00
Alois Klink
f41e34e61a
feat: add mermaidAPI.registerDiagram()
...
Exposes the registerDiagram() function publically as
`mermaid.mermaidAPI.registerDiagram` so that users can add their
own diagrams at bundle-time.
This is instead of using the lazyLoadedDiagrams config setting.
2022-10-23 16:53:25 +01:00
Alois Klink
89d3d297b7
refactor(mermaid): remove registerDiagram cb func
...
Remove the callback function parameter from registerDiagram.
Instead, we can just load the callback function from the `injectUtils`
diagram definition, if it exists.
2022-10-23 16:34:18 +01:00
Alois Klink
41249fd064
fix(mermaid): fix DiagramDefinition types
...
The `injectUtils` function takes the utils as multiple parameters,
not an object.
2022-10-23 14:23:30 +01:00
Alois Klink
3a2669e634
fix(mermaid): error if lazyLoadedDiagrams fails
...
Throw an error if lazyLoadedDiagrams fails to load properly.
Rendering is still performed, even on a lazyLoadedDiagrams failure.
2022-10-23 13:19:40 +01:00
Alois Klink
895a5eb78a
docs(mermaid): document initThrowsErrors
...
Add some basic tsdoc for initThrowsErrors
2022-10-23 13:19:33 +01:00
Alois Klink
4601c90904
fix: load lazyLoadedDiagrams in initThrowsErrors
...
Previously, calling initThrowsErrors would not
load any of the lazyLoadedDiagrams entries.
2022-10-23 13:19:26 +01:00
Knut Sveidqvist
8ad8d39fe4
Versions for latest rcs
2022-10-20 12:57:29 +02:00
Sidharth Vinod
56a8068a7f
fix: Error handling
2022-10-19 20:30:07 +05:30