179 Commits

Author SHA1 Message Date
Sidharth Vinod
e0cd76e6fd
chore(split): Pie 2022-11-18 16:10:25 +05:30
Sidharth Vinod
f03364f328
chore(split): Info 2022-11-18 16:10:15 +05:30
Sidharth Vinod
25bc381361
chore(split): gitGraph 2022-11-18 16:10:06 +05:30
Sidharth Vinod
38e5c3a81e
chore(split): Gantt 2022-11-18 16:09:56 +05:30
Sidharth Vinod
43aa831dd2
chore(split): ER 2022-11-18 16:09:45 +05:30
Sidharth Vinod
4492c5ed4e
chore(split): classDiagram 2022-11-18 16:09:36 +05:30
Sidharth Vinod
5dec9eb2f5
fix: C4 type 2022-11-18 16:09:10 +05:30
Sidharth Vinod
02903be558
feat: Split C4 & Flow 2022-11-18 14:28:28 +05:30
Sidharth Vinod
e9f8ba6915
doc: Add mindmap integration docs 2022-11-18 11:28:29 +05:30
Sidharth Vinod
d05fd25339
Fix #3799: Remove type from package.json 2022-11-15 23:59:17 +05:30
Sidharth Vinod
ab92b5c100
chore: Cleanup pakage.json, fix jisonLint 2022-11-11 01:54:29 +05:30
Sidharth Vinod
0af36f12b7
feat: Switch CDN 2022-11-09 22:38:21 +05:30
Per Brolin
ccfaea8e3f Updated README-files 2022-11-09 16:34:31 +01:00
Per Brolin
526113517b Updated release 2022-11-09 16:20:28 +01:00
Per Brolin
9bb0ed2040 Added registerExternalDiagram for Mindmap 2022-11-09 15:54:39 +01:00
Sidharth Vinod
ecc51d7cb8
fix: Remove registerDiagram export 2022-11-09 11:27:36 +05:30
Sidharth Vinod
c309e3e3d6
Merge branch 'sidv/fixLL' of https://github.com/mermaid-js/mermaid into sidv/fixLL
* 'sidv/fixLL' of https://github.com/mermaid-js/mermaid:
  Apply suggestions from code review
2022-11-09 09:55:09 +05:30
Sidharth Vinod
f52df3037f
fix versions 2022-11-09 09:55:05 +05:30
Sidharth Vinod
649ab17806
feat: Add config validator MVP 2022-11-09 09:54:52 +05:30
Sidharth Vinod
89da6ea31a
Apply suggestions from code review
Co-authored-by: Alois Klink <alois@aloisklink.com>
2022-11-09 09:54:06 +05:30
Sidharth Vinod
c7f7ff39ce
fix: Import path in viewer.js 2022-11-09 00:43:19 +05:30
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
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
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
Knut Sveidqvist
e78ac9b92a Updated version 2022-11-01 15:27:20 +01:00
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
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
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
Sidharth Vinod
d17aa6ecdd
Merge branch 'release_9.2.0_buggfixes' into release/9.2.0
* release_9.2.0_buggfixes:
  fix: Add default arg to options
  fix: Build types
  chore: Update creation date
  fix: getElementById type issue.
2022-10-19 19:21:19 +05:30
Sidharth Vinod
5192608f7c
Merge branch 'release_9.2.0_buggfixes' into sidv/TSMindmap
* release_9.2.0_buggfixes:
  fix: Add default arg to options
2022-10-19 19:13:46 +05:30
Sidharth Vinod
77f5e0d5f3
fix: Add default arg to options 2022-10-19 19:13:05 +05:30
Sidharth Vinod
4c311ea4b1
fix: TS errors 2022-10-19 19:03:29 +05:30
Sidharth Vinod
bbb3712284
Merge branch 'release_9.2.0_buggfixes' into sidv/TSMindmap
* release_9.2.0_buggfixes:
  Color fix for default nodes in mindmap, line uses inv color
2022-10-19 18:42:13 +05:30