324 Commits

Author SHA1 Message Date
Sidharth Vinod
12ed81855a
Add zenuml 2023-04-23 00:34:59 +05:30
renovate[bot]
f597f15f82
chore(deps): update dependency rimraf to v5 2023-04-22 18:53:56 +00:00
renovate[bot]
909c063a67
chore(deps): update dependency eslint-plugin-unicorn to v46 2023-04-22 18:51:50 +00:00
renovate[bot]
8cb3318d94 chore(deps): update dependency eslint-plugin-jsdoc to v43 2023-04-22 18:46:44 +00:00
renovate[bot]
ddde451915
fix(deps): update dependency dompurify to v3 2023-04-22 08:28:31 +00:00
renovate[bot]
93eb72248a
chore(deps): update dependency concurrently to v8 2023-04-20 04:15:28 +00:00
Sidharth Vinod
2fe0a1360f
Upgrade vitepress 2023-04-20 09:35:28 +05:30
Remco Haszing
aa5c1a5f78
Merge branch 'develop' into fix-node16-module-resolution 2023-04-13 14:58:17 +02:00
Alois Klink
b4164b6ab5 test: test that styles and themes return valid CSS
Test that `src/diagrams/*/styles.ts` module returns a valid
CSS stylesheet that can be parsed via [stylis][1] and then
becomes a valid CSS that [csstree-validator][2] validates.

We test this for every diagram and for every theme, because
many of the invalid CSS bugs are caused by missing theme vars.

There are some CSS errors that I couldn't easily fix, so I've written
the tests to ignore the following CSS errors:
  - 'Unknown property `rx`' (Valid in SVG2 draft and in some browsers)
  - 'Unknown property `ry`' (Valid in SVG2 draft and in some browsers)
  - 'Unknown property `dy`'
    - This doesn't seem to be valid CSS in any SVG version, but maybe
      some browsers support it 🤷 I feel like we should probably change
      this though.

[1]: https://github.com/thysultan/stylis
[2]: https://github.com/csstree/validator
2023-04-13 08:27:32 +01:00
Sidharth Vinod
d1e369e68d
revert pnpm changes 2023-04-05 16:32:48 +05:30
chriskim-au1
3b861ab91f doc update 2023-04-05 13:11:22 +10:00
Knut Sveidqvist
89193d7360 Simple markdown in lock file 2023-03-29 09:35:42 +02:00
Knut Sveidqvist
89eec225ce Merge branch 'develop' into 4220-string-synax-and-features 2023-03-29 09:34:49 +02:00
Knut Sveidqvist
a1c50b8079 #4220 Parsing the text as markdown and rendering accordingly 2023-03-20 14:15:26 +01:00
renovate[bot]
8b37ceffe1 chore(deps): update pnpm to v7.30.0 2023-03-20 04:21:23 +00:00
Remco Haszing
f3bebf25ea
Merge branch 'develop' into fix-node16-module-resolution 2023-03-17 20:52:50 +01:00
Remco Haszing
8c69ecd5ac
Update @types/lodash-es
This adds support for the TypeScript `"moduleResolution": "node16"`.
2023-03-17 12:26:41 +01:00
renovate[bot]
f3a9f81bfb fix(deps): update all non-major dependencies 2023-03-13 09:45:30 +00:00
renovate[bot]
4b462d717c chore(deps): update node.js to v18.15.0 2023-03-13 04:42:20 +00:00
Remco Haszing
b7d31adda4
Support node16 module resolution
The `node16` module resolution requires imports to use the `.js` file
extension in type definitions.

`@rollup/plugin-typescript` is needed to make this work with the Vite
setup used by Mermaid.

The module option for Mermaid internally is set to `nodenext`. This is
needed to support `.json` imports. Note that setting `module` to
`node16` or `nodenext` implies a matching `moduleResolution` value.
2023-03-11 14:54:21 +01:00
Sidharth Vinod
4e4f2fcfc5
Merge branch 'master' into develop
* master:
  Updated import of cytoscape for consistent behavior
  v9.4.3
  fix: dayjs import extension
  9.4.2
  Fix mindmap demo
  9.4.2-rc.2
  chore: Rename diagram-definitions with specific names
  Use cytoscape esm
  Revert "chore: Defer elk loading"
  Revert "Split cytoscape"
  test(gantt): test daylight savings in ganttdb
  refactor(deps): replace `moment` with `dayjs`
  fix(E2E): Add cors package
  fix Server
  Fix lockfile
  Remove Readme
2023-03-08 00:13:54 +05:30
renovate[bot]
e9d49e6b98
fix(deps): update all non-major dependencies 2023-03-06 06:25:39 +00:00
renovate[bot]
6c2c28940b chore(deps): update all non-major dependencies 2023-03-06 06:22:18 +00:00
Alois Klink
704506835f
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

Co-authored-by: Alois Klink <alois@aloisklink.com>
2023-02-28 19:54:27 +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
Sidharth Vinod
fa8a887ae1
chore: dagre-d3-es@7.0.9 2023-02-25 08:56:18 +05:30
Sidharth Vinod
00a14ee811
WIP: Contributors 2023-02-24 23:03:51 +05:30
Sidharth Vinod
d688f1fe94
fix lockfile 2023-02-24 21:16:09 +05:30
Sidharth Vinod
8c2dbafdb5
Merge branch 'develop' into sidv/contributors
* develop: (309 commits)
  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
  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
  ...
2023-02-24 21:14:55 +05:30
Sidharth Vinod
067b6adc20
fix(E2E): Add cors package 2023-02-20 21:23:06 +05:30
Sidharth Vinod
6ded32880d
Fix lockfile 2023-02-20 18:24:24 +05:30
Sidharth Vinod
638362baea
Merge branch 'release/10.0.0' into sidv/splitDiagrams
* release/10.0.0: (333 commits)
  10.0.0-rc.3
  Export more types
  no side effects
  10.0.0-rc.2
  skip failing elk test
  Cleanup
  Update docs
  fix(#3406, #3394): Remove init & initThrowsErrors
  chore: Rename lazy loaded diagram definitions
  Skip flowchart-elk failing test
  Fix docs
  fix Server
  Fix lint
  Remove Readme
  Fix E2E Tests
  Fix tests
  feat: Break render and parse types
  chore: Remove all non async render/parse/init
  Remove CJS builds from docs
  chore: Remove cjs from build
  ...
2023-02-19 20:18:26 +05:30
Sidharth Vinod
735aceb37a
Fix E2E Tests 2023-02-19 14:03:11 +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
0f36bbf3e1
Revert #4034 2023-02-18 23:45:45 +05:30
Sidharth Vinod
3c4a6a19bb
fix: Vite, D3, Vitest Types 2023-02-18 22:35:14 +05:30
renovate[bot]
ccaa99937f
chore(deps): update dependency cypress to v12 2023-02-16 12:27:04 +00:00
Sidharth Vinod
17238c0326
Merge branch 'master' into develop
* master: (24 commits)
  docs: fix links
  Skip precommit hooks on CI
  Fix release-publish
  Fix timeline and mindmap
  Updating integration instructions for timeline and mindmap
  Remove node heap
  Revert "chore: Set node heap size"
  Revert "Remove text hint"
  Split cytoscape
  Linear build
  Remove text hint
  Fix elk import
  Dynamic elk import
  Remove heap option
  elk web-worker
  Test publish docs
  chore: Add file extension for dynamic import
  chore: Defer elk loading
  Update vitepress
  Fix links to integrations.md
  ...
2023-02-16 17:52:07 +05:30
Sidharth Vinod
ac231949f0
Merge pull request #4071 from mermaid-js/renovate/vite-4.x
chore(deps): update dependency vite to v4
2023-02-16 17:50:08 +05:30
Sidharth Vinod
83797eef38
elk web-worker 2023-02-16 14:21:33 +05:30
Sidharth Vinod
a1a252cc29
Merge branch 'master' into release/9.4.1
* master:
  Update vitepress
  Fix links to integrations.md
  chore: Set node heap size
2023-02-16 13:01:10 +05:30
Sidharth Vinod
62f7fb082e
Update vitepress 2023-02-16 12:47:00 +05:30
Knut Sveidqvist
25da0c6c8e Merge branch 'master' into develop 2023-02-15 16:31:44 +01:00
Per Brolin
a956be7bbf Release candidate 2023-02-10 11:03:25 +01:00
renovate[bot]
08ac41113f
chore(deps): update dependency vite to v4 2023-02-09 05:54:04 +00:00
Sidharth Vinod
07764348eb
Merge pull request #4069 from mermaid-js/renovate/jsdom-21.x
chore(deps): update dependency jsdom to v21
2023-02-09 11:13:03 +05:30
renovate[bot]
72e8b7fb38
chore(deps): update dependency rimraf to v4 2023-02-09 00:49:20 +00:00
renovate[bot]
3a89cc7993
chore(deps): update dependency jsdom to v21 2023-02-09 00:47:08 +00:00
renovate[bot]
d45eda1c60 chore(deps): update dependency @types/uuid to v9 2023-02-09 00:41:24 +00:00