1503 Commits

Author SHA1 Message Date
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
sidharthv96
0409c5ac27 Update docs 2023-02-24 08:34:38 +00:00
Billiam
15231924cd Regenerate mermaid docs 2023-02-21 21:50:02 -06:00
Sidharth Vinod
0df8c149f9
Merge branch 'master' into develop
* master:
  docs: Fix changelog
  docs: v10 breaking changes
  Remove `null` from diagrams before render
  fix docs diagram
2023-02-21 21:40:29 +05:30
Sidharth Vinod
b868777184
docs: v10 breaking changes 2023-02-21 21:35:54 +05:30
Per Brolin
6b251de227 Merge branch 'master' into develop 2023-02-21 10:29:21 +01:00
Sidharth Vinod
555d4f2cdc
Fix spellings 2023-02-21 13:27:37 +05:30
pbrolin47
22b18a4320
Merge pull request #4113 from mermaid-js/3192_invisible_edges
Adding the ability to use invisible edges
2023-02-20 14:40:43 +01:00
Sidharth Vinod
68cdc759a7
Minor cleanup
Co-authored-by: Per Brolin <per@mermaidchart.com>
2023-02-20 17:53:07 +05:30
knsv
eb04d80df0 Update docs 2023-02-20 10:23:13 +00:00
sidharthv96
e51817b735 Update docs 2023-02-19 16:46:20 +00:00
sidharthv96
92cd5ed133 Update docs 2023-02-19 15:06:09 +00:00
sidharthv96
83f3ceb7f5 Update docs 2023-02-19 10:43:49 +00:00
Sidharth Vinod
4ea7294eeb
fix(#3406, #3394): Remove init & initThrowsErrors
New run function added as replacement.
2023-02-19 16:10:08 +05:30
Sidharth Vinod
8c64a90721
Fix docs 2023-02-19 14:21:15 +05:30
Sidharth Vinod
735aceb37a
Fix E2E Tests 2023-02-19 14:03:11 +05:30
Sidharth Vinod
eaa84d2d91
feat: Break render and parse types
Both render and parse are async now.
Return type of render contains svg and bindFunctions.
Parse will not throw error if parseOptions.silent is passed.
2023-02-19 13:08:13 +05:30
Oliver THEBAULT
ae36586b58
docs(flowchart): duplicated hexagon node example 2023-02-18 22:29:35 +01:00
Sidharth Vinod
d22e8d92c6
chore: Remove all non async render/parse/init 2023-02-19 01:10:15 +05:30
Sidharth Vinod
45adc5fb6b
Remove CJS builds from docs 2023-02-19 00:58:36 +05:30
Sidharth Vinod
c1aad5975c
Merge branch 'release/9.4.2' into release/10.0.0
* release/9.4.2:
  RC version
  Revert #4034
  Revert #4034
  fix: Vite, D3, Vitest Types
  fix(api): tree shaking package.json import
2023-02-19 00:55:23 +05:30
Sidharth Vinod
2c062d648a
Merge branch 'develop' into release/9.4.2
* develop:
  Add highlight tag info in contributing.md
  chore(deps): update dependency cypress to v12
  docs: fix links
  Fix types
  chore(deps): update dependency vite to v4
2023-02-19 00:04:44 +05:30
Sidharth Vinod
3c4a6a19bb
fix: Vite, D3, Vitest Types 2023-02-18 22:35:14 +05:30
Sidharth Vinod
4ed6ec1a4d
Add highlight tag info in contributing.md 2023-02-16 18:00:41 +05:30
Sidharth Vinod
b22978dfb2
Fix timeline and mindmap 2023-02-16 16:52:15 +05:30
Knut Sveidqvist
71e4f1152b Updating integration instructions for timeline and mindmap 2023-02-16 12:05:38 +01:00
Sidharth Vinod
8c7043ffaf
Revert "Remove text hint"
This reverts commit ec6ef35d2136bdc33b8e6d8342600997fd3bac34.
2023-02-16 15:27:43 +05:30
Sidharth Vinod
ec6ef35d21
Remove text hint 2023-02-16 15:07:55 +05:30
Sidharth Vinod
b89b90dbb9
Fix links to integrations.md 2023-02-16 12:35:43 +05:30
Per Brolin
98bec36f81 Merge branch 'release/9.4.0' 2023-02-15 16:20:22 +01:00
Sidharth Vinod
d562a81019
Merge branch 'develop' into timeline
* develop: (45 commits)
  Showcase section to the docs - keepings docs up to date (#4055)
  bugfix: add missing d3 curves to flowchart and docs
  fix(deps): update dependency dagre-d3-es to v7.0.8
  build(pre-commit): cache eslint in pre-commit
  build(lint): cache eslint with strategy content
  Update cypress/integration/rendering/sequencediagram.spec.js
  feat(er): allow leading underscore for attributes name
  ci(lint): show nice error on lint failure
  chore: add moment to dependencies
  Update docs
  Update mindmap.md
  chore: remove moment-mini
  docs(readme-ch): fix twitter link
  build(lint): cache prettier on `pnpm run lint`
  fix: moment-mini default exporter
  docs(readme): update broken twitter badge
  test(er): improve tests on multiple key constraints
  Fixes Typo, remove console.log
  doc(er): add documentation on multiple key constraints
  feat(er): allow multiple constraints on attributes
  ...
2023-02-08 15:57:09 +05:30
Omer Rosenbaum
73ee9e9a92
Showcase section to the docs - keepings docs up to date (#4055)
* Add a Showcase section to the docs with Swimm

* Build docs

* Move FAQ to Config

* Create showcases page

* Build docs

* Prettier

* feat: Redirect old docs URLs

---------

Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
2023-02-07 23:15:48 +05:30
Sidharth Vinod
923ddc8309
Merge pull request #4038 from natasha-jarus/bug/missing-flowchart-curves
bugfix: add missing d3 curves to flowchart and docs
2023-02-07 14:00:53 +05:30
Sidharth Vinod
64096b22dc
Merge pull request #3965 from oleveau/feature/AddBoxForSeqDiagrams
Add Box support in Sequence Diagrams
2023-02-07 13:58:32 +05:30
Natasha Jarus
84d563584f bugfix: add missing d3 curves to flowchart and docs 2023-02-06 13:28:40 -08:00
sidharthv96
b9bed14cda Update docs 2023-01-28 19:46:10 +00:00
ashishjain0512
003997372e Update docs 2023-01-26 11:48:25 +00:00
ashishj
61f33567ae Making timeline diagram lazy-loaded internal, removing separate package 2023-01-26 10:29:35 +01:00
Olivier Leveau
9fb6f1998f Merge branch 'develop' into feature/AddBoxForSeqDiagrams 2023-01-26 09:14:18 +01:00
Sidharth Vinod
c51f6df82c
Merge pull request #4030 from tomperr/feature/4009_er_multiple_constraints
feat(er): add multiple key constraints
2023-01-26 00:16:58 +05:30
Tom PERRILLAT-COLLOMB
dc0a46f742 test(er): improve tests on multiple key constraints 2023-01-25 19:40:40 +01:00
ashishjain0512
5e6aac4377 Update docs 2023-01-25 17:06:30 +00:00
Olivier Leveau
f7756ccc00 Fixes Typo, remove console.log 2023-01-25 17:02:10 +01:00
Tom PERRILLAT-COLLOMB
3066a4b43a doc(er): add documentation on multiple key constraints 2023-01-25 15:13:58 +01:00
sidharthv96
e4491136c3 Update docs 2023-01-24 07:02:14 +00:00
ashishj
ca22e85e55 Merge branch 'release/9.4.0' into timeline 2023-01-19 19:20:29 +01:00
Olivier Leveau
250f1f9687 Merge branch 'develop' into feature/AddBoxForSeqDiagrams 2023-01-18 11:35:39 +01:00
sidharthv96
01a535b8e0 Update docs 2023-01-16 09:52:48 +00:00
sidharthv96
874f4c0641 Update docs 2023-01-13 14:17:17 +00:00
sidharthv96
9ca2e0c5fc Update docs 2023-01-12 07:21:20 +00:00