7082 Commits

Author SHA1 Message Date
Sidharth Vinod
43762c4d7f
fix(#1066): Return true if parse is success. 2023-03-05 00:22:02 +05:30
Knut Sveidqvist
c7bcd74d56 Merge branch 'release/10.0.2' 2023-03-02 13:47:19 +01:00
Knut Sveidqvist
20298d243a v10.0.2 v10.0.2 2023-03-02 13:45:56 +01:00
Sidharth Vinod
6f3077c856
fix: dayjs import extension 2023-03-01 23:16:24 +05:30
Knut Sveidqvist
4a9d96aaba Setting version to 10.0.1 v10.0.1 2023-03-01 14:04:03 +01:00
Knut Sveidqvist
4275aa613c
Merge pull request #4169 from mermaid-js/4168_elk_diamon_subgraph
Elk layout for flowcharts: Incorrect placement of edges when using diamonds in subgraphs
2023-03-01 13:44:08 +01:00
Knut Sveidqvist
a65fb3b979 #4168 Adding the correct offset for the edges 2023-03-01 13:38:26 +01:00
Knut Sveidqvist
c0dba713c5 Updated import of cytoscape for consistent behavior 2023-03-01 09:29:59 +01:00
Sidharth Vinod
807e1f303d
Use cytoscape esm 2023-02-28 20:40:56 +05:30
Sidharth Vinod
65f5f9dc45
Revert "chore: Defer elk loading"
This reverts commit 037504785c26dd18ee797cfdf93a5e9f5f551f6a.
2023-02-28 20:39:06 +05:30
Sidharth Vinod
b8b8c4740a
Revert "Split cytoscape"
This reverts commit f81f9f7c958848758d26e1e2bf05a98808152a25.
2023-02-28 20:31:03 +05:30
Sidharth Vinod
f8f7d94d5a
fix: Class with members and styles 2023-02-28 19:34:54 +05:30
Knut Sveidqvist
114ab87816
Merge pull request #4160 from mermaid-js/sidv/fix4157
fix #4157: Inject only fontFamily without replacing themeVariables
2023-02-28 13:38:52 +01:00
Sidharth Vinod
4a6056b558
typo 2023-02-28 18:01:46 +05:30
knsv
3a56af9633 Update docs 2023-02-28 12:24:04 +00:00
Knut Sveidqvist
fda0c8d0a9
Merge branch 'develop' into sidv/fix4157 2023-02-28 13:20:37 +01:00
Knut Sveidqvist
b932cd0930
Merge pull request #4128 from kshitijsaksena/bug/3949_erdiagram_attribute_comment
Added grammar to skip comment in attribute block
2023-02-28 13:14:50 +01:00
Knut Sveidqvist
2f06b41f5f
Merge pull request #4142 from mermaid-js/sidv/fixRunAsync
Fix(#4140): Async bug in mermaid.run
2023-02-28 13:12:14 +01:00
Sidharth Vinod
1ab3ed1a1a
chore: Add vitest imports 2023-02-28 16:58:41 +05:30
Sidharth Vinod
1981f12976
chore: Fix snapshots 2023-02-28 16:58:04 +05:30
Sidharth Vinod
733967f65a
fix #4157: Inject only fontFamily without replacing themeVariables 2023-02-28 16:55:25 +05:30
Sidharth Vinod
56d27d555b
Merge branch 'sidv/fixRunAsync' of https://github.com/mermaid-js/mermaid into sidv/fixRunAsync
* 'sidv/fixRunAsync' of https://github.com/mermaid-js/mermaid:
  Update packages/mermaid/src/mermaid.ts
2023-02-28 16:49:02 +05:30
Sidharth Vinod
7cee8cb6dc
Merge branch 'develop' into sidv/fixRunAsync
* develop: (23 commits)
  Fix test
  refactor(deps): replace `moment` with `dayjs`
  test(gantt): test daylight savings in ganttdb
  Update .lycheeignore
  chore: dagre-d3-es@7.0.9
  chore: Add tsdoc for registerLazyLoadedDiagrams
  feat: Ensure proper detection for flowcharts
  fix: Class label not visible if class is already defined
  Update import
  fix TS errors
  fix TS errors
  feat: Match timeline section width to tasks
  chore: TimelineRenderer in TS
  Fix types
  fix: Detector order
  Lint
  Cleanup nodes.js
  docs: Update classdiagram docs
  classLabel tests
  Formatting
  ...
2023-02-28 16:48:54 +05:30
Knut Sveidqvist
c91fa192aa
Update packages/mermaid/src/mermaid.ts
Co-authored-by: Alois Klink <alois@aloisklink.com>
2023-02-28 12:14:35 +01:00
Knut Sveidqvist
3f93edaaf3
Merge pull request #4086 from sidharthv96/sidv/classDiagramLabels
feat: Add support for classDiagram labels
2023-02-28 12:03:22 +01:00
Knut Sveidqvist
0bed5d717b
Merge pull request #4126 from mermaid-js/sidv/timelineSectionWidth
💄 section width now covers all tasks - Timeline
2023-02-28 11:59:14 +01:00
Knut Sveidqvist
1b56071eb3
Merge pull request #4124 from mermaid-js/sidv/fixDetectorOrder
fix: Detector order
2023-02-28 11:49:08 +01:00
Sidharth Vinod
e050a5aaa1
Fix test 2023-02-28 15:40:59 +05:30
Sidharth Vinod
9b2f503dc7
Merge branch 'develop' into sidv/classDiagramLabels
* develop:
  refactor(deps): replace `moment` with `dayjs`
  test(gantt): test daylight savings in ganttdb
  Update .lycheeignore
  chore: dagre-d3-es@7.0.9
  Update docs
  Doc (typo): remove duplicate "be"
  💄 section width now covers all tasks
2023-02-28 14:20:11 +05:30
Sidharth Vinod
c7bdc6ad92
Merge pull request #4153 from aloisklink/chore/switch-to-dayjs
Replace `moment-mini`/`moment` date library with `dayjs`
2023-02-28 10:33:21 +05:30
Alois Klink
a5db04b01c refactor(deps): replace moment with dayjs
Replace Mermaid's dependency on `moment` with `dayjs`.

[Moment is now in maintenance mode][1], and they don't recommend
using it.

[Dayjs][2] has almost exactly the same API as moment, and is still
curently being maintained. Unlike moment, dayjs objects are immutable,
which makes our life much easier, but we need to do
`a = a.add(1, "day")` instead of just `a.add(1, "day")`.

We can't use `dayjs.duration`, because unlike `moment.duration`,
[dayjs durations always degrade to ms][3].
This causes issues with daylight savings, since it assumes that each
day is 24 hours, when some days have 23/25 hours with daylight savings.
(it also assumes that each month is 30 days).

However, `dayjs.add(1, "d");` correctly adds 1 days, even when that
day is only 23 hours long, so we can use that instead.

[1]: https://momentjs.com/docs/#/-project-status/
[2]: https://day.js.org/
[3]: https://day.js.org/docs/en/durations/durations
2023-02-26 22:31:12 +00:00
Alois Klink
06640aba06 test(gantt): test daylight savings in ganttdb
Add a quick test that ensures `ganttDb` correctly adds `1d` (1 day),
even on days with 25 hours.

This test only runs if the test PC has the TZ='America/Los_Angeles'
set (California has daylight savings).

I've added a test to the GitHub Actions `test.yml` action too for this.
It should only add about 5 seconds to each test, so it isn't too bad.
2023-02-26 06:43:14 +00:00
Sidharth Vinod
8b5cb75ef7
Update .lycheeignore 2023-02-25 10:02:07 +05:30
Sidharth Vinod
50db9dcf8e
Merge pull request #4147 from mermaid-js/sidv/dagre-d3-es
chore: dagre-d3-es@7.0.9
2023-02-25 09:37:09 +05:30
Sidharth Vinod
fa8a887ae1
chore: dagre-d3-es@7.0.9 2023-02-25 08:56:18 +05:30
Sidharth Vinod
275a54a562
core: Fix render tsdoc
Co-authored-by:  Dmitry Stratiychuk  <dmstrati@microsoft.com>
2023-02-24 23:10:01 +05:30
Sidharth Vinod
1bace23cea
Merge branch 'develop' into sidv/fixRunAsync
* develop:
  Update docs
  fix: fix exports
  Doc (typo): remove duplicate "be"
  💄 section width now covers all tasks
2023-02-24 20:54:55 +05:30
Sidharth Vinod
f62c4831ad
Merge pull request #4074 from l2fprod/feature/user_journey_expand_section
💄 section width now covers all tasks
2023-02-24 20:00:17 +05:30
Sidharth Vinod
7b4ce7c6ea
chore: Add tsdoc for registerLazyLoadedDiagrams
Co-authored-by: Alois Klink <alois@aloisklink.com>
2023-02-24 17:32:39 +05:30
Sidharth Vinod
dda0d00fb9
Merge branch 'develop' into sidv/fixDetectorOrder
* develop:
  Update docs
  fix Lint
  Update CHANGELOG.md
  Update CHANGELOG.md
  fix: fix exports
  Doc (typo): remove duplicate "be"
  Fix readme link
  Regenerate mermaid docs
  Add deepdwn to cspell
  Add Deepdwn to native integrations list
2023-02-24 17:27:47 +05:30
Sidharth Vinod
4bf5c9f3d8
feat: Ensure proper detection for flowcharts 2023-02-24 17:27:24 +05:30
sidharthv96
0409c5ac27 Update docs 2023-02-24 08:34:38 +00:00
Sidharth Vinod
19e5ccfdda
Merge pull request #4133 from Julez404/patch-1
Doc (typo): remove duplicate "be"
2023-02-24 14:00:20 +05:30
Sidharth Vinod
b13707fa7b
fix: Class label not visible if class is already defined 2023-02-24 13:46:56 +05:30
Sidharth Vinod
716a4d2cbc
Update import 2023-02-24 13:29:34 +05:30
Sidharth Vinod
3b2d55efec
Merge branch 'develop' into sidv/classDiagramLabels
* develop: (85 commits)
  fix Lint
  Update CHANGELOG.md
  Update CHANGELOG.md
  fix: fix exports
  Fix readme link
  Regenerate mermaid docs
  Add deepdwn to cspell
  Add Deepdwn to native integrations list
  docs: Fix changelog
  docs: v10 breaking changes
  Remove `null` from diagrams before render
  fix docs diagram
  Updated version
  Minor cleanup to trigger build.
  Fix spellings
  Wrap option working in test case
  Fix typos
  Minor cleanup
  Removed the deprecated use of mindmap in Demo
  Minor cleanup
  ...
2023-02-24 13:28:28 +05:30
Sidharth Vinod
870550bd7e
Merge pull request #4135 from Mister-Hope/develop
fix: fix exports
2023-02-24 12:38:47 +05:30
Sidharth Vinod
89f1ea49ba
Merge branch 'develop' into sidv/fixRunAsync
* develop:
  fix Lint
2023-02-24 12:31:48 +05:30
Sidharth Vinod
7372d7d6c5
fix Lint 2023-02-24 12:31:29 +05:30
Sidharth Vinod
0206ff540a
fix(#4140): Deprecate mermaidAPI.render 2023-02-24 12:20:31 +05:30