7465 Commits

Author SHA1 Message Date
Justin Greywolf
5b0eb702e5 Merge branch 'develop' into MultipleUpdatesToClassDiagram 2023-04-17 06:51:51 -07:00
Justin Greywolf
62870597d6 Fixed failing tests 2023-04-17 06:51:08 -07:00
Sidharth Vinod
01de155e3c
Merge pull request #4278 from lishid/patch-2
Fix git graph css bracket leak
2023-04-17 17:29:27 +05:30
Sidharth Vinod
0485999636
Merge pull request #4299 from eitsupi/patch-1
docs(integrations): list quarto
2023-04-17 17:26:53 +05:30
Sidharth Vinod
f638082ab4
Merge pull request #4297 from bish0polis/develop
Update bug_report.yml
2023-04-17 17:26:18 +05:30
Justin Greywolf
59a85a7dfd Multiple Fixes to classes 2023-04-16 19:42:51 -07:00
Kazuki Tsunemi
204baa4586 Merge branch 'develop' into feature/class-namespace 2023-04-17 11:27:10 +09:00
eitsupi
432e8d6535
docs: reflect source changes 2023-04-15 17:01:51 +09:00
eitsupi
8c4fb6c753
docs(integrations): list quarto 2023-04-15 16:49:32 +09:00
Justin Greywolf
ac63788a9c organized and fixed tests 2023-04-14 10:13:21 -07:00
Alois Klink
32538b5b03 Merge branch 'develop' into lishid/patch-2
The E2E tests are failing, but will probably be fixed by commit
9bb0cef8 (fix: wait for image rendering in nodes, 2023-03-30)
on the `develop` branch.
2023-04-14 02:09:22 +01:00
Bishop Clark
8aa51cf3e7
Update bug_report.yml
correct adjective order
2023-04-13 16:59:13 -07:00
Will-Low
e3ca003127 Rebuilding docs 2023-04-13 09:59:11 -07:00
Will-Low
19363965ad
Updating documentation on notes for classes
I was confused by the documentation on notes for a specific class. Updated the wording slightly and added an example for clarity.
2023-04-13 09:08:48 -07:00
Sidharth Vinod
32d553a28f
Merge pull request #4213 from remcohaszing/fix-node16-module-resolution
Support node16 module resolution
2023-04-13 21:03:27 +05:30
Remco Haszing
e84c5ec4c9
Fix broken tests 2023-04-13 15:13:52 +02:00
Remco Haszing
aa5c1a5f78
Merge branch 'develop' into fix-node16-module-resolution 2023-04-13 14:58:17 +02:00
Sidharth Vinod
d9ebb0d492
Merge pull request #4295 from aloisklink/test/test-styles
Fix and test a bunch of invalid CSS issues
2023-04-13 18:08:11 +05:30
Sidharth Vinod
634d6602b9
Merge pull request #4272 from slab/develop
Add Slab to the list of integrations
2023-04-13 18:05:24 +05:30
Sidharth Vinod
ea6f9c2d59
Merge pull request #4286 from legonigel/4195_arrow_end_size
Fix #4195 start and end arrow have different sizes
2023-04-13 15:05:56 +05:30
Sidharth Vinod
dda2c25d52
Merge pull request #4294 from onayiga/Documentation-edits
Update index.md
2023-04-13 15:04:28 +05:30
Zihua Li
d13b58bec8
Merge branch 'mermaid-js:develop' into develop 2023-04-13 16:00:01 +08: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
Alois Klink
aee18ca018 fix: fix scaleLabelColor in theme forest/neutral
The `scaleLabelColor` variable in `theme-forest` and `theme-neutral`
was set to `"calculated"`, as it defaults to `this.labelTextColor`
**before** `this.labelTextColor` was set.

Moving the `this.labelTextColor` assignments before `scaleLabelColor`
is calculated fixes this.

Fixes mindmap and timeline invalid CSS in theme forest and neutral.
2023-04-13 07:32:18 +01:00
Alois Klink
cd976871f0 fix: define gitBranchLabel* in theme forest/dark
Define `gitBranchLabel[0-7]` in `theme-dark` and `theme-forest` to fix
invalid CSS for gitgraphs.

The values have been copied from [`theme-default`][1]).

[1]: 727bf30824/packages/mermaid/src/themes/theme-default.js (L296-L303)
2023-04-13 07:32:18 +01:00
Alois Klink
4f9c4548bf fix: define excludeBkgColor for theme-dark
Define `excludeBkgColor` for `theme-dark` to fix invalid CSS
for gantt diagrams.

All the other themes defined this to '#eeeeee', but I thought that
was a bit too bright in a dark theme, so instead I set it to
`darken(this.sectionBkgColor, 10);`.
2023-04-13 07:32:18 +01:00
Alois Klink
720408e143 fix: define border2 for theme-base
`border2` is a theme variable used by the CSS for flowcharts and
user-journey.

I've defined this to default to `tertiaryBorderColor` in theme-base,
as other themes tend to set `border2` to the same value as
`clusterBorder`, which in theme-base is `tertiaryBorderColor`.
2023-04-13 07:32:18 +01:00
Alois Klink
54f827d850 fix: define arrowheadColor for theme-base
Define `arrowheadColor` as `invert(this.background)` in
`theme-base.js`, as it's currently `undefined`, which causes CSS
issues when using `theme-base`.

I've picked `invert(this.background)` so that it matches
the default value of `lineColor`.
2023-04-13 07:32:18 +01:00
Alois Klink
7566b5620e fix: fix requirementBorderSize theme variable
Currently, `requirementBorderSize` defaults to `primaryBorderColor`,
which is a color, not a valid SVG `stroke-width`.

Instead, I've made it default to `1`.
2023-04-13 07:32:18 +01:00
Alois Klink
9cb7a4a3f5 fix: fix invalid CSS fill-opacity value
Fix an invalid value for the CSS `fill-opacity` value.

Percentage values for `fill-opacity` are only supported in the SVG 2.0
draft, so according to [MDN][1]:

> it is not widely supported yet, […] as a consequence, it is best
> practices [sic] to set opacity with a value in the range `[0-1]`.

[1]: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-opacity
2023-04-13 07:32:18 +01:00
Alois Klink
616d370a51 fix: fix personBorder/Bkg C4 diagram theme vars
The current `personBorder`/`personBkg` theme variables for C4 diagrams
are set to the string `'calculated'`.

However, despite being `'calculated'`, they never seem to change to
anything else, and so become invalid CSS variables.

I've instead changed these to just default to base theme vars,
as that's what they do in [`these-base.js`][1].

[1]: 727bf30824/packages/mermaid/src/themes/theme-base.js (L106-L107)
2023-04-13 07:32:18 +01:00
Alois Klink
83d7d6c48f fix: fix invalid CSS for class diagram
`.divider` had a `stroke` property of `1` that was invalid.

This looks like a typo from PR
https://github.com/mermaid-js/mermaid/pull/1567,
as the `src/theme/class.scss` file's `.divider` section correctly
shows `stroke-width: 1;`.

Fixes: https://github.com/mermaid-js/mermaid/pull/1567
2023-04-13 07:32:18 +01:00
onayiga
1c98621cf4 Update index.md
Minor grammatical and editorial changes; Updated Mermaid API section to make use of active voice for enhanced readability and comprehension.
2023-04-12 23:12:16 -04:00
Justin Greywolf
727bf30824
Merge pull request #4268 from Valentine14th/bug/4023-image-rendering
fix: image rendering in nodes
2023-04-10 10:09:40 -07:00
legonigel
aa3c0023f4 Fix #4195 start and end arrow have different sizes
In #3938, it appears that the marker sizes for pointEnd was
unintentionally changed. This reverts the change in marker size.

It is also possible that the intention was to change the viewBox size
for both start and end, but I doubt this since it makes the arrows
significantly smaller than other markers.
2023-04-09 20:56:00 -07:00
Sidharth Vinod
f08778d0c7
Merge pull request #4285 from emersonbottero/dayjs-esm
fix: really import esm version of dayjs
2023-04-09 11:19:42 +05:30
Emerson Bottero
37eb100bb2 chore: add files to imports 2023-04-08 23:50:10 -03:00
Laura Valentine Tscharner
9bb0cef82b fix: wait for image rendering in nodes 2023-04-08 16:28:58 +01:00
Emerson Bottero
4643bb1c00 fix: really import esm version of dayjs 2023-04-07 23:38:05 -03:00
Knut Sveidqvist
d132d26246 Merge branch 'master' into develop 2023-04-06 08:33:18 +02:00
Sidharth Vinod
24c9506935
fix version 2023-04-05 22:07:46 +05:30
Sidharth Vinod
ca8ce8201c
Merge branch 'develop' into sidv/addUMD
* develop: (81 commits)
  revert pnpm changes
  doc update
  auto generated from pnpm run
  auto generated from pnpm run
  linting
  added example of Bar chart
  Update docs
  Adding rendering tests and unit tests
  Syntax for markdown strings is a single backtick.
  updated labels in the chart
  Update docs
  updated example data smaller
  Bar chart
  fix: Remove comment line completely
  fix: trimStart to text
  test: add space before init
  fix uncaughexception in tests
  fix(#4256): Keep error diagram on screen
  fix(#4137): Cleanup comments before parsing
  Update docs
  ...
2023-04-05 22:04:53 +05:30
Sidharth Vinod
777a781052
Merge pull request #4261 from karistom/develop
Bar chart (using gantt chart)
2023-04-05 16:37:06 +05:30
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
Ch K
721208e981
auto generated from pnpm run 2023-04-05 11:31:44 +10:00
Ch K
ee455c1edb
auto generated from pnpm run 2023-04-05 11:26:28 +10:00
Ch K
43137fbdb2
Merge branch 'mermaid-js:develop' into develop 2023-04-05 10:12:12 +10:00
Ch K
7ac84fb9af
linting 2023-04-05 09:18:11 +10:00
Ch K
efc4062721
added example of Bar chart 2023-04-05 09:07:01 +10:00