Compare commits

...
976 Commits
Author SHA1 Message Date
Steph ff88a247f2 update tests 2023-11-07 06:58:57 -08:00
Steph 269c4e4deb fix docs paths 2023-10-29 21:35:29 -07:00
Sidharth VinodandGitHub 02adac1adf Merge pull request #1307 from mermaid-js/release-promotion
Release live editor
2023-10-06 11:04:33 +05:30
Sidharth Vinod 414c5bb59b Update mermaid 2023-10-06 11:02:43 +05:30
Sidharth VinodandGitHub 9ef8105ab1 Merge pull request #1311 from mermaid-js/browserslist-update
build: update Browserslist db
2023-10-06 10:55:03 +05:30
Sidharth VinodandGitHub 18ed1c9695 Merge pull request #1303 from Yokozuna59/feat/support-sankey-highlighting
feat: support `sankey` diagram highlighting
2023-10-06 10:54:42 +05:30
GitHub Action 173c7260c1 build: update Browserslist db 2023-10-01 02:20:39 +00:00
Sidharth VinodandGitHub 83382901cd Merge pull request #1304 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-09-21 14:42:35 +00:00
renovate[bot]andGitHub 580e6657e1 chore(deps): update all non-major dependencies 2023-09-20 22:29:28 +00:00
Reda Al Sulais d0dcbf37e1 feat: support sankey diagram highlighting 2023-09-16 15:02:06 +03:00
Sidharth VinodandGitHub 675ecccbf6 Merge pull request #1301 from mermaid-js/release-promotion
Release live editor
2023-09-15 13:32:54 +05:30
Sidharth Vinod e504f25680 Mermaid 10.4.0 2023-09-15 13:31:44 +05:30
Sidharth VinodandGitHub 2cf66be68f Merge pull request #1297 from mermaid-js/release-promotion
Release live editor
2023-09-15 10:17:02 +05:30
Sidharth VinodandGitHub 75ad46bdb6 Merge pull request #1298 from mermaid-js/browserslist-update
build: update Browserslist db
2023-09-15 09:02:43 +05:30
GitHub Action bde9b1b7c7 build: update Browserslist db 2023-09-15 02:15:23 +00:00
Sidharth VinodandGitHub d4ebb23232 Merge pull request #1280 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-09-14 20:29:22 +00:00
Sidharth Vinod b0b13c2d1e Fix tests 2023-09-15 01:53:46 +05:30
Sidharth VinodandGitHub 3a6abf5128 Merge pull request #1278 from mermaid-js/release-promotion
Release live editor
2023-09-15 01:40:08 +05:30
Sidharth Vinod 67ceb7ad77 fix cypress 2023-09-15 01:35:54 +05:30
Sidharth VinodandGitHub 8bba1ade92 Merge branch 'master' into release-promotion 2023-09-15 01:26:36 +05:30
renovate[bot]andGitHub 6e09fa34fe chore(deps): update all non-major dependencies 2023-09-14 19:56:17 +00:00
Sidharth VinodandGitHub cf58bb1bb5 Merge pull request #1296 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-09-14 19:55:28 +00:00
renovate[bot]andGitHub aa660c838b chore(deps): update all non-major dependencies 2023-09-14 16:48:03 +00:00
Sidharth Vinod d34706f1c8 Group mermaid release separately 2023-09-14 13:26:19 +05:30
Sidharth VinodandGitHub 39eba2673f Merge pull request #1283 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-09-06 06:58:29 +00:00
Sidharth VinodandGitHub ca4afee296 Merge pull request #1293 from mermaid-js/dependabot/npm_and_yarn/adobe/css-tools-4.3.1
Bump @adobe/css-tools from 4.3.0 to 4.3.1
2023-09-06 06:58:16 +00:00
renovate[bot]andGitHub 60273f59a1 chore(deps): update all non-major dependencies 2023-09-05 15:13:03 +00:00
Sidharth VinodandGitHub 62d81d33b2 Merge pull request #1285 from mermaid-js/browserslist-update
build: update Browserslist db
2023-09-05 13:12:41 +00:00
Sidharth VinodandGitHub 7261334c85 Merge pull request #1292 from Yokozuna59/fix/add-missing-keywords-to-pie
fix: add missing and remove duplicate keywords in `pie`
2023-09-05 13:12:25 +00:00
GitHub Action 6b46fe4a2b build: update Browserslist db 2023-09-01 02:17:51 +00:00
GitHub Action 1698f2f5c0 build: update Browserslist db 2023-09-01 02:17:07 +00:00
dependabot[bot]andGitHub 8362b3e265 Bump @adobe/css-tools from 4.3.0 to 4.3.1
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.0 to 4.3.1.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 09:02:04 +00:00
Reda Al Sulais 557e54e82b fix: add missing and remove duplicate keywords in pie 2023-08-28 13:57:37 +03:00
Sidharth VinodandGitHub 1c8201a204 Add --platform linux/amd64 to run command 2023-08-17 04:31:15 +00:00
Sidharth VinodandGitHub 3e2d35a5ae Merge pull request #1279 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-08-12 14:15:58 +00:00
renovate[bot]andGitHub c73f22c947 chore(deps): update all non-major dependencies 2023-08-11 17:28:03 +00:00
Sidharth VinodandGitHub f23b8b00fa Merge pull request #1274 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-08-02 18:49:31 +00:00
renovate[bot]andGitHub 98d9045555 chore(deps): update all non-major dependencies 2023-08-02 18:48:10 +00:00
Sidharth VinodandGitHub ca874162fc Merge pull request #1275 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-08-02 18:47:10 +00:00
Sidharth VinodandGitHub 18d20550fd Merge pull request #1277 from mermaid-js/browserslist-update
build: update Browserslist db
2023-08-02 18:47:02 +00:00
renovate[bot]andGitHub 0bc4e098b5 chore(deps): update all non-major dependencies 2023-08-01 16:03:11 +00:00
GitHub Action f607ab4564 build: update Browserslist db 2023-08-01 02:32:24 +00:00
Sidharth VinodandGitHub 8194a3ff86 Merge pull request #1272 from mermaid-js/release-promotion
Release live editor
2023-07-28 16:59:23 +05:30
Sidharth VinodandGitHub 281af4a242 Merge pull request #1264 from mermaid-js/dependabot/npm_and_yarn/semver-5.7.2
Bump semver from 5.7.1 to 5.7.2
2023-07-27 09:29:46 +00:00
Sidharth VinodandGitHub ad86f4b678 Merge pull request #1263 from mermaid-js/release-promotion
Release live editor
2023-07-27 14:57:28 +05:30
dependabot[bot]andGitHub 9e5323c9a1 Bump semver from 5.7.1 to 5.7.2
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-27 09:22:17 +00:00
Sidharth VinodandGitHub 6829b98854 Merge pull request #1267 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-07-27 09:20:25 +00:00
Sidharth Vinod 62a5012efd Fix node version 2023-07-27 14:46:13 +05:30
renovate[bot]andGitHub 49bf28b1a2 chore(deps): update all non-major dependencies 2023-07-26 10:02:11 +00:00
Sidharth VinodandGitHub 047ba5228b Merge pull request #1269 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-07-25 13:16:44 +00:00
renovate[bot]andGitHub 4bd3c35bc0 chore(deps): update all non-major dependencies 2023-07-24 22:22:29 +00:00
Sidharth VinodandGitHub b789053031 Merge pull request #1268 from mermaid-js/dependabot/npm_and_yarn/word-wrap-1.2.4
Bump word-wrap from 1.2.3 to 1.2.4
2023-07-19 07:05:02 +00:00
dependabot[bot]andGitHub 9478ef0184 Bump word-wrap from 1.2.3 to 1.2.4
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 02:45:04 +00:00
Sidharth VinodandGitHub e3b7a31a6b Merge pull request #1265 from mermaid-js/browserslist-update
build: update Browserslist db
2023-07-18 16:41:09 +00:00
Sidharth VinodandGitHub 157c82ba81 Merge pull request #1266 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-07-17 09:05:40 +00:00
renovate[bot]andGitHub 3510ed3e63 chore(deps): update all non-major dependencies 2023-07-17 00:24:27 +00:00
GitHub Action e8d970102b build: update Browserslist db 2023-07-15 02:56:04 +00:00
Sidharth VinodandGitHub 0e5030e95d Merge pull request #1262 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-07-10 18:21:55 +00:00
renovate[bot]andGitHub 88be72cee5 chore(deps): update all non-major dependencies 2023-07-10 01:46:31 +00:00
Sidharth VinodandGitHub 0e5c4c4f5d Merge pull request #1257 from mermaid-js/release-promotion
Release live editor
2023-07-07 16:15:59 +05:30
Sidharth VinodandGitHub 1a7cbab88f Merge pull request #1256 from nirname/fix-docker-ports
Fixed docker ports for local development
2023-07-07 07:00:42 +00:00
Sidharth VinodandGitHub 30817c53f1 Merge pull request #1259 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-07-07 06:59:54 +00:00
renovate[bot]andGitHub 90f1dbf176 chore(deps): update all non-major dependencies 2023-07-06 12:03:30 +00:00
Sidharth VinodandGitHub d24a9e7fda Merge pull request #1255 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-07-02 06:14:12 +00:00
Sidharth VinodandGitHub 257dab1407 Merge pull request #1258 from mermaid-js/browserslist-update
build: update Browserslist db
2023-07-02 06:13:49 +00:00
renovate[bot]andGitHub 5ebb0d2883 chore(deps): update all non-major dependencies 2023-07-01 03:53:47 +00:00
GitHub Action b8015c3a23 build: update Browserslist db 2023-07-01 03:01:01 +00:00
Sidharth VinodandGitHub 336422bd48 Merge pull request #1254 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-06-28 15:12:17 +05:30
Sidharth VinodandGitHub bc03fa4ef8 Merge pull request #1253 from mermaid-js/browserslist-update
build: update Browserslist db
2023-06-28 15:12:05 +05:30
renovate[bot]andGitHub abcbd6a698 chore(deps): update all non-major dependencies 2023-06-28 07:49:02 +00:00
Nikolay Rozhkov ea0669a62b Fixed docker ports for local development 2023-06-20 03:57:09 +03:00
GitHub Action d2adcd1429 build: update Browserslist db 2023-06-15 02:35:39 +00:00
Sidharth Vinod a3c4c79788 Revert "Outbound link tracking"
This reverts commit 094f451a82.
2023-06-14 23:02:26 +05:30
Sidharth VinodandGitHub ac569f8eca Merge pull request #1252 from mermaid-js/release-promotion
Release live editor
2023-06-14 22:56:33 +05:30
Sidharth VinodandGitHub 6a1d24f2e7 Merge pull request #1251 from mermaid-js/sidv/save
Outbound link tracking
2023-06-14 22:56:02 +05:30
Sidharth Vinod f63c416a3d Update links 2023-06-14 22:55:23 +05:30
Sidharth Vinod 094f451a82 Outbound link tracking 2023-06-14 22:50:08 +05:30
Knut SveidqvistandGitHub c68ffa8cb1 Merge pull request #1250 from mermaid-js/release-promotion
Release live editor
2023-06-14 18:20:43 +02:00
Knut SveidqvistandGitHub 8e15941c35 Merge branch 'master' into release-promotion 2023-06-14 18:12:59 +02:00
Knut SveidqvistandGitHub 3444b895b1 Merge pull request #1249 from mermaid-js/sidv/save
Add save to mermaidchart button
2023-06-14 15:59:34 +00:00
Sidharth Vinod a95d02427f Add save to mermaidchart button 2023-06-14 16:25:57 +05:30
Sidharth VinodandGitHub 59f76003b3 Merge pull request #1248 from mermaid-js/release-promotion
Release live editor
2023-06-13 10:16:59 +05:30
Sidharth Vinod 68e2aa4437 Fix error alignment 2023-06-13 10:05:07 +05:30
Sidharth VinodandGitHub 471c0504c6 Merge pull request #1247 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-06-12 11:27:39 +05:30
Sidharth VinodandGitHub 6930f3e4cc Merge pull request #1246 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-06-12 11:27:19 +05:30
renovate[bot]andGitHub 9344ad88dd chore(deps): update all non-major dependencies 2023-06-12 01:14:09 +00:00
renovate[bot]andGitHub 0ce87fab09 chore(deps): update all non-major dependencies 2023-06-12 01:13:57 +00:00
Sidharth VinodandGitHub aa2a2a2dd1 Merge pull request #1245 from mermaid-js/release-promotion
Release live editor
2023-06-10 23:51:21 +05:30
Sidharth VinodandGitHub 925a0acd82 Merge branch 'master' into release-promotion 2023-06-10 23:46:02 +05:30
Sidharth Vinod 2e784599b1 chore: mermaid@10.2.3 2023-06-10 23:45:19 +05:30
Sidharth VinodandGitHub a5383887ee Merge pull request #1241 from mermaid-js/release-promotion
Release live editor
2023-06-10 02:38:28 +05:30
Sidharth Vinod 6f123d6026 Add analytics comment. 2023-06-10 01:51:11 +05:30
Sidharth Vinod 78fec6411c Merge branch 'master' into develop
* master:
  Add lengthBucket
  Add QuardantChart and Mindmap to diagram types
  Update plausible
  Update license
2023-06-10 01:50:27 +05:30
Sidharth Vinod dc735e2d08 Add lengthBucket 2023-06-09 23:29:06 +05:30
Sidharth Vinod ca5610ab79 Add QuardantChart and Mindmap to diagram types 2023-06-09 23:18:52 +05:30
Sidharth Vinod 7db475acb2 Update plausible 2023-06-09 18:42:30 +05:30
Sidharth VinodandGitHub 8c9bf1ace3 Merge pull request #1242 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-06-07 17:54:55 +00:00
renovate[bot]andGitHub fb54fabd1e chore(deps): update all non-major dependencies 2023-06-06 19:45:45 +00:00
Sidharth VinodandGitHub 0c690fcd0e Merge pull request #1232 from ztec/bug/1230updateDockerPort
Fix #1230 Docker: use 8080 port instead of 80 to reduce privilege requirements
2023-06-04 11:56:56 +05:30
Sidharth VinodandGitHub bb98ba3456 Merge pull request #1240 from mermaid-js/release-promotion
Release live editor
2023-06-03 15:59:18 +05:30
Sidharth VinodandGitHub fce17b96cc Merge branch 'master' into release-promotion 2023-06-03 15:52:38 +05:30
Sidharth VinodandGitHub d64f6c1a1b Merge pull request #1228 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-06-03 10:21:43 +00:00
renovate[bot]andGitHub 51fe584fb3 chore(deps): update all non-major dependencies 2023-06-03 02:10:07 +00:00
Sidharth VinodandGitHub 01b79503c9 Merge pull request #1234 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-06-03 00:21:24 +05:30
Sidharth VinodandGitHub 38ca72ce84 Merge pull request #1233 from mermaid-js/release-promotion
Release live editor
2023-06-02 18:38:14 +05:30
renovate[bot]andGitHub c1542619e9 chore(deps): update all non-major dependencies 2023-06-02 13:07:45 +00:00
Sidharth VinodandGitHub 082c9f725b Merge branch 'master' into release-promotion 2023-06-02 18:37:39 +05:30
Sidharth VinodandGitHub fdbd25ca65 Merge pull request #1231 from mermaid-js/release/10.2.0
Release 10.2.0
2023-06-02 18:37:04 +05:30
Sidharth Vinod a355922f25 Merge branch 'develop' into release/10.2.0
* develop:
  build: update Browserslist db
2023-06-02 18:23:07 +05:30
Sidharth VinodandGitHub 5d6e2c71b0 Merge pull request #1239 from mermaid-js/browserslist-update
build: update Browserslist db
2023-06-02 18:22:50 +05:30
Sidharth Vinod cbafaf6cc4 Upgrade mermaid 10.2.2 2023-06-02 18:22:22 +05:30
Sidharth Vinod 28272e985d Merge branch 'develop' into release/10.2.0
* develop:
  Added quadrantChart in the live editor with sample
  chore(deps): update all non-major dependencies
2023-06-02 12:38:54 +05:30
Sidharth Vinod 87ad2d68c6 Upgrade mermaid 10.2.1 2023-06-02 12:36:46 +05:30
GitHub Action 8b1a2899cc build: update Browserslist db 2023-06-01 03:06:04 +00:00
Sidharth VinodandGitHub b1538f6bad Merge pull request #1237 from amsubhash/add-quadrantchart-to-mermaid-live-editor
Added quadrantChart in the live editor with sample
2023-05-31 08:58:45 +05:30
Subhash Halder b2b284c118 Added quadrantChart in the live editor with sample 2023-05-30 21:42:17 +05:30
Sidharth VinodandGitHub 8e2f8b6804 Merge pull request #1227 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-05-26 12:17:07 +00:00
ztec c3b711c5cd Fix #1230 Docker: use 8080 port instead of 80 to reduce privilege requirements 2023-05-26 11:01:45 +02:00
renovate[bot]andGitHub e1926f0e83 chore(deps): update all non-major dependencies 2023-05-26 08:48:04 +00:00
Sidharth Vinod d2d2f4bc43 Release 10.2.0 2023-05-26 12:15:55 +05:30
Sidharth VinodandGitHub 9a46b199cf Merge pull request #1218 from mermaid-js/release-promotion
Release live editor
2023-05-17 00:43:30 +05:30
Sidharth Vinod 16ac30da7c Update license 2023-05-16 23:52:33 +05:30
Sidharth VinodandGitHub b06fd02dcb Merge pull request #1222 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-05-16 18:15:51 +00:00
renovate[bot]andGitHub 84c7f4e837 chore(deps): update all non-major dependencies 2023-05-16 17:37:06 +00:00
Sidharth VinodandGitHub bf0700853e Merge pull request #1221 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-05-16 17:36:22 +00:00
Sidharth VinodandGitHub bf90c3c0e3 Merge pull request #1224 from mermaid-js/browserslist-update
build: update Browserslist db
2023-05-16 17:36:09 +00:00
renovate[bot]andGitHub d19fbd1b5b chore(deps): update all non-major dependencies 2023-05-16 07:49:38 +00:00
GitHub Action d9bc26cd59 build: update Browserslist db 2023-05-15 02:29:41 +00:00
Sidharth VinodandGitHub b1bcc5a20f Merge pull request #1220 from enchant97-forks/develop
Use nginx-unprivileged
2023-05-09 06:18:36 +00:00
Leo Spratt a8c0fb111c Use nginx-unprivileged
This allows the Docker image to run as an unprivileged user, due to
changes in Docker; the port remains as 80.
2023-05-07 18:03:19 +01:00
Sidharth VinodandGitHub 635345ea66 Merge pull request #1213 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-05-02 07:59:22 +00:00
renovate[bot]andGitHub 5c4cc9a3f9 chore(deps): update all non-major dependencies 2023-05-02 05:32:20 +00:00
Sidharth VinodandGitHub dd58ac8146 Merge pull request #1217 from mermaid-js/renovate/node-20.x
chore(deps): update node.js to v20
2023-05-02 05:30:59 +00:00
renovate[bot]andGitHub f3beacfae1 chore(deps): update node.js to v20 2023-05-01 06:32:50 +00:00
Sidharth VinodandGitHub ea13b2a54f Merge pull request #1216 from mermaid-js/release-promotion
Release live editor
2023-05-01 12:01:23 +05:30
Sidharth Vinod 448b47a8e3 Fix title 2023-05-01 12:00:53 +05:30
Sidharth Vinod 90407fe0d1 Change branch 2023-05-01 11:59:52 +05:30
Sidharth Vinod 85c3ddd365 change release branch name 2023-05-01 11:57:59 +05:30
Sidharth Vinod 6655a2c320 Update release-pr 2023-05-01 11:56:47 +05:30
Sidharth Vinod 52523ca6c2 Change branch 2023-05-01 11:54:30 +05:30
Sidharth Vinod 68496371f9 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  build: update Browserslist db
2023-05-01 11:53:10 +05:30
Sidharth Vinod 4994bba729 Release PR 2023-05-01 11:53:05 +05:30
Sidharth VinodandGitHub d8581aca56 Merge pull request #1214 from mermaid-js/browserslist-update
build: update Browserslist db
2023-05-01 06:16:02 +00:00
GitHub Action 2d5aa85b36 build: update Browserslist db 2023-05-01 02:27:53 +00:00
Sidharth VinodandGitHub 94f8f5087f Merge pull request #1208 from mermaid-js/develop
Remove suggestions in editor
2023-04-30 22:13:52 +05:30
Sidharth VinodandGitHub 37085cce55 Merge pull request #1206 from mermaid-js/renovate/patch-all-minor-patch
Update all non-major dependencies (patch)
2023-04-29 17:24:35 +00:00
Sidharth VinodandGitHub e81a6a4eab Merge pull request #1207 from mermaid-js/renovate/all-minor-patch
Update all non-major dependencies (minor)
2023-04-29 17:24:26 +00:00
renovate[bot]andGitHub f7380ab331 Update all non-major dependencies 2023-04-28 15:53:18 +00:00
renovate[bot]andGitHub 72dfdf7a9a Update all non-major dependencies 2023-04-27 07:26:41 +00:00
Sidharth Vinod f209011795 Remove unnecessary completions 2023-04-27 11:31:54 +05:30
Sidharth Vinod ebbd7f252c Merge branch 'master' into develop
* master:
2023-04-25 13:42:48 +05:30
Sidharth Vinod 5f99efa611 Remove suggestions 2023-04-25 13:42:27 +05:30
Sidharth Vinod 677a00f69f Update vite 2023-04-21 23:53:45 +05:30
Sidharth VinodandGitHub 0192b86128 Merge pull request #1204 from mermaid-js/develop
Release
2023-04-20 13:01:38 +05:30
Sidharth Vinod 8e02db8e19 update sk 2023-04-20 12:55:27 +05:30
Sidharth VinodandGitHub 1d8b1221a1 Merge pull request #1205 from mermaid-js/fix/monaco
Fix/monaco
2023-04-20 07:23:36 +00:00
Sidharth Vinod 5a5ec855a9 fix Test 2023-04-20 12:47:48 +05:30
Sidharth Vinod d63e1a0356 Merge branch 'develop' into fix/monaco
* develop:
  Revert "Fix editor"
  Add loading test
  Revert "Fix/monaco (#865)"
  Fix editor
  Fix/monaco (#865)
  Fix editor broken moving between code and config
2023-04-20 12:21:49 +05:30
Sidharth Vinod 79fe5a79cd Properly load monaco workers 2023-04-20 12:20:46 +05:30
Sidharth Vinod ab0bdf1780 Properly load monaco workers 2023-04-20 12:20:31 +05:30
Sidharth VinodandGitHub b798a62d97 Merge branch 'master' into develop 2023-04-19 20:55:27 +05:30
Sidharth Vinod eea17f31dd Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  Revert "Fix/monaco (#865)"
2023-04-19 20:54:04 +05:30
Sidharth Vinod 7887854068 Revert "Fix editor"
This reverts commit 6448cbf19d.
2023-04-19 20:54:00 +05:30
Sidharth Vinod adb82e7da0 Add loading test 2023-04-19 20:53:32 +05:30
Sidharth Vinod 1efb5aa62e Revert "Fix/monaco (#865)"
This reverts commit 6e9453da0e.
2023-04-19 20:41:34 +05:30
Sidharth VinodandGitHub 5348de04b9 Merge pull request #1203 from mermaid-js/develop
Release
2023-04-19 19:49:57 +05:30
Sidharth Vinod 6448cbf19d Fix editor 2023-04-19 19:42:57 +05:30
Sidharth Vinod a928f99165 Merge branch 'master' into develop
* master:
  Fix/monaco (#865)
2023-04-19 19:05:57 +05:30
Sidharth VinodandGitHub 943b45849d Merge pull request #1200 from dlitsman/develop
Fix editor broken moving between code and config
2023-04-19 13:16:53 +00:00
Sidharth VinodGitHubGitHub Actionrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>github-merge-queue[bot] <118344674+github-merge-queue[bot]@users.noreply.github.com>
6e9453da0e Fix/monaco (#865)
* Fix monaco import

* Cleanup monaco

* Test fix

* Test fix

* build: update Browserslist db

* chore(deps): update all non-major dependencies

* Fix editor

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-merge-queue[bot] <118344674+github-merge-queue[bot]@users.noreply.github.com>
2023-04-19 18:46:20 +05:30
Sidharth Vinod b8fe37f782 Fix editor 2023-04-19 18:38:32 +05:30
Sidharth Vinod 38975c9a32 Merge branch 'develop' into fix/monaco
* develop: (356 commits)
  chore(deps): update all non-major dependencies
  build: update Browserslist db
  fix Test
  chore(deps): update all non-major dependencies
  chore(deps): update node.js to v19
  chore(deps): update dependency jsdom to v21
  chore(deps): update actions/stale action to v8
  chore(deps): update all non-major dependencies
  Bump d3-color from 3.0.1 to 3.1.0
  Did it really work??
  Reduce timeouts
  Splitup tests
  cacheBust loadSite
  Reduce timeout & retries
  Update typeInEditor
  Fix commenting test
  Fix commenting test
  Fix loadSite ?
  Fix commenting test
  Fix branch test
  ...
2023-04-19 18:33:09 +05:30
github-merge-queue[bot]andGitHub fd189c2dfe Merge pull request #1199 from mermaid-js/browserslist-update
build: update Browserslist db
2023-04-19 06:51:01 +00:00
github-merge-queue[bot]andGitHub 335c19d04e Merge pull request #1201 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-04-19 06:48:43 +00:00
renovate[bot]andGitHub ae0e1059dd chore(deps): update all non-major dependencies 2023-04-18 13:29:28 +00:00
Dmitry Litsman a0ccc8f94a Fix editor broken moving between code and config 2023-04-16 15:07:33 +01:00
GitHub Action 12cbbd3567 build: update Browserslist db 2023-04-15 02:25:15 +00:00
Sidharth VinodandGitHub d3f2b81639 Merge pull request #1197 from mermaid-js/develop
Deps
2023-04-13 17:57:14 +05:30
Sidharth Vinod b770dd46d5 fix Test 2023-04-13 17:51:47 +05:30
Sidharth VinodandGitHub b5ae544932 Merge pull request #1155 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-04-13 12:05:57 +00:00
Sidharth VinodandGitHub 222d1f2f01 Merge branch 'master' into develop 2023-04-13 17:35:33 +05:30
renovate[bot]andGitHub c74d604bac chore(deps): update all non-major dependencies 2023-04-13 12:03:30 +00:00
Sidharth VinodandGitHub d688544fc5 Merge pull request #1196 from mermaid-js/renovate/node-19.x
chore(deps): update node.js to v19
2023-04-13 12:02:27 +00:00
Sidharth VinodandGitHub aeff048783 Merge pull request #1195 from mermaid-js/renovate/jsdom-21.x
chore(deps): update dependency jsdom to v21
2023-04-13 12:02:20 +00:00
Sidharth VinodandGitHub 4b2b36bbae Merge pull request #1194 from mermaid-js/renovate/actions-stale-8.x
chore(deps): update actions/stale action to v8
2023-04-13 12:02:13 +00:00
renovate[bot]andGitHub 6282001d9b chore(deps): update node.js to v19 2023-04-13 12:02:06 +00:00
Sidharth VinodandGitHub 6ad555fbd8 Merge pull request #1170 from mermaid-js/dependabot/npm_and_yarn/d3-color-3.1.0
Bump d3-color from 3.0.1 to 3.1.0
2023-04-13 12:02:03 +00:00
renovate[bot]andGitHub 506ead98fc chore(deps): update dependency jsdom to v21 2023-04-13 12:02:02 +00:00
Sidharth VinodandGitHub 23dba5aaac Merge pull request #1169 from mermaid-js/dependabot/npm_and_yarn/braintree/sanitize-url-6.0.2
Bump @braintree/sanitize-url from 6.0.0 to 6.0.2
2023-04-13 12:01:49 +00:00
renovate[bot]andGitHub 00ebee9438 chore(deps): update actions/stale action to v8 2023-04-13 12:01:46 +00:00
Sidharth VinodandGitHub 07d312c84c Merge pull request #1154 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-04-13 12:00:51 +00:00
Sidharth VinodandGitHub db5506077a Merge pull request #1193 from mermaid-js/develop
10.1.0
2023-04-13 17:30:01 +05:30
renovate[bot]andGitHub 172a9950b4 chore(deps): update all non-major dependencies 2023-04-13 11:54:14 +00:00
dependabot[bot]andGitHub 7e112c76c7 Bump d3-color from 3.0.1 to 3.1.0
Bumps [d3-color](https://github.com/d3/d3-color) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/d3/d3-color/releases)
- [Commits](https://github.com/d3/d3-color/compare/v3.0.1...v3.1.0)

---
updated-dependencies:
- dependency-name: d3-color
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-13 11:53:47 +00:00
Sidharth VinodandGitHub a12efbc4e7 Merge pull request #1192 from mermaid-js/release/10.1.0
"mermaid": "10.1.0"
2023-04-13 11:51:27 +00:00
Sidharth Vinod 3febc39331 Did it really work?? 2023-04-13 17:16:31 +05:30
Sidharth Vinod 1daca60eab Reduce timeouts 2023-04-13 17:10:52 +05:30
Sidharth Vinod c43c691070 Splitup tests 2023-04-13 17:09:37 +05:30
Sidharth Vinod 0301aa1a06 cacheBust loadSite 2023-04-13 17:01:57 +05:30
Sidharth Vinod 97472ca368 Reduce timeout & retries 2023-04-13 16:50:47 +05:30
Sidharth Vinod e789adf5f8 Update typeInEditor 2023-04-13 16:44:07 +05:30
Sidharth Vinod c821848b74 Fix commenting test 2023-04-13 16:42:12 +05:30
Sidharth Vinod 6fc44e06ed Fix commenting test 2023-04-13 16:38:32 +05:30
Sidharth Vinod 28452a8b7d Fix loadSite ? 2023-04-13 16:35:31 +05:30
Sidharth Vinod e5a4e7b997 Fix commenting test 2023-04-13 16:31:02 +05:30
Sidharth Vinod d364cdfd83 Fix branch test 2023-04-13 13:00:46 +05:30
Sidharth Vinod 982ef0377f Fix tests 2023-04-13 12:40:09 +05:30
Sidharth Vinod 8a13644b9a Merge branch 'develop' into release/10.1.0
* develop:
  build: update Browserslist db
2023-04-13 12:13:29 +05:30
Sidharth Vinod 5c19c117cf Update other deps 2023-04-13 12:08:01 +05:30
Sidharth VinodandGitHub 46907e5fa3 Merge pull request #1182 from mermaid-js/browserslist-update
build: update Browserslist db
2023-04-13 06:29:29 +00:00
dependabot[bot]andGitHub 61fb92ea68 Bump @braintree/sanitize-url from 6.0.0 to 6.0.2
Bumps [@braintree/sanitize-url](https://github.com/braintree/sanitize-url) from 6.0.0 to 6.0.2.
- [Release notes](https://github.com/braintree/sanitize-url/releases)
- [Changelog](https://github.com/braintree/sanitize-url/blob/main/CHANGELOG.md)
- [Commits](https://github.com/braintree/sanitize-url/compare/v6.0.0...v6.0.2)

---
updated-dependencies:
- dependency-name: "@braintree/sanitize-url"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-13 06:28:47 +00:00
Sidharth Vinod e5afb85239 "mermaid": "10.1.0" 2023-04-13 11:58:34 +05:30
Sidharth Vinod 8edce6a3c1 Revert ""mermaid": "10.1.0""
This reverts commit d4fadaff24.
2023-04-13 11:57:49 +05:30
Sidharth Vinod d4fadaff24 "mermaid": "10.1.0" 2023-04-13 00:00:40 +05:30
GitHub Action 19d7be1058 build: update Browserslist db 2023-04-01 02:25:11 +00:00
Sidharth Vinod bf6c54c00e Merge branch 'master' into develop
* master:
  feat: Add mermaidchart logo
2023-03-16 00:41:56 +05:30
Sidharth Vinod f6344341ef feat: Add mermaidchart logo 2023-03-16 00:39:36 +05:30
Sidharth VinodandGitHub 3874aa48fc Merge pull request #1177 from mermaid-js/browserslist-update
build: update Browserslist db
2023-03-15 11:31:54 +00:00
GitHub Action cb43694063 build: update Browserslist db 2023-03-15 02:33:54 +00:00
Sidharth VinodandGitHub 8215f56eba Merge pull request #1168 from mermaid-js/browserslist-update
build: update Browserslist db
2023-03-03 08:49:58 +00:00
GitHub Action 395e0a558b build: update Browserslist db 2023-03-01 02:54:27 +00:00
Sidharth VinodandGitHub 1605536f13 Merge pull request #1164 from mermaid-js/develop
Release v10
2023-02-24 10:51:07 +05:30
Sidharth VinodandGitHub 7dc59f1396 Merge pull request #1160 from mermaid-js/release/10.0.0
Release/10.0.0
2023-02-24 10:50:07 +05:30
Sidharth Vinod 59168d2437 fix: re enable uncompressed URL test 2023-02-24 10:37:29 +05:30
Sidharth Vinod 5a6dccb263 fix: Comment test caret location 2023-02-24 10:36:20 +05:30
Sidharth Vinod 6c16fa76ff fix: Adjust image size 2023-02-24 10:32:10 +05:30
Sidharth Vinod ccbb45a09c fix: E2e Tests 2023-02-24 10:10:52 +05:30
Sidharth Vinod 052665ef09 Actions, default closed 2023-02-22 10:01:16 +05:30
Sidharth Vinod ee1652e9f2 v10 2023-02-21 17:46:00 +05:30
Sidharth Vinod bbd6378065 v10 changes 2023-02-19 20:09:42 +05:30
Sidharth Vinod e93641e41f Release v10 2023-02-19 19:49:50 +05:30
Sidharth Vinod 5925448ca4 Replace moment with dayjs 2023-02-19 00:14:57 +05:30
Sidharth Vinod 5e930d19e7 Merge remote-tracking branch 'origin/develop' into release/9.4
* origin/develop:
  Fix browserlist base branch
  build: update Browserslist db
  Move browserlist update to cron
  Update Browserslist
  Update snapshots
  Fix Preset
  Update Browserslist
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore: Cleanup with eslint-unicorn
  Fix tests
  Fix tests
  Update loadSite.spec.ts
  Update snapshots.js
  Also changed 'graph' to 'flowchart' on state.ts
  Replacing "chart" with "flowchart"
2023-02-16 21:04:47 +05:30
Sidharth VinodandGitHub 131dd06cde Merge pull request #1158 from mermaid-js/develop
Release 9.4
2023-02-16 21:02:05 +05:30
Sidharth VinodandGitHub e96225dc69 Merge branch 'master' into develop 2023-02-16 18:02:16 +05:30
Sidharth VinodandGitHub 3a42afd102 Merge pull request #1156 from mermaid-js/browserslist-update
build: update Browserslist db
2023-02-16 17:34:26 +05:30
Sidharth Vinod 5394074ac5 Fix browserlist base branch 2023-02-16 17:33:42 +05:30
Sidharth Vinod 20358bc254 Remove mindmap 2023-02-16 15:56:30 +05:30
Sidharth Vinod 6ece0a8a94 comment out consoles 2023-02-16 15:55:07 +05:30
Sidharth Vinod 71f4097fa0 Log SVG code 2023-02-16 15:51:53 +05:30
Sidharth Vinod 308aec1580 Merge branch 'release/9.4' of https://github.com/mermaid-js/mermaid-live-editor into release/9.4
* 'release/9.4' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2023-02-16 15:48:06 +05:30
Sidharth Vinod 8c07649b10 Remove mindmap 2023-02-16 15:48:02 +05:30
sidharthv96 3a1b8f87c3 Update Browserslist 2023-02-16 10:02:52 +00:00
Sidharth Vinod af4f60874e 9.4.0 2023-02-16 15:31:31 +05:30
GitHub Action e5f303e6e2 build: update Browserslist db 2023-02-15 02:44:06 +00:00
Sidharth VinodandGitHub e461f108f1 Merge pull request #1106 from mermaid-js/sidv/eslint-unicorn
Cleanup with eslint-unicorn
2023-02-10 19:25:54 +00:00
Sidharth VinodandGitHub 64519ba8a1 Merge pull request #1153 from mermaid-js/sidv/browserlist
Move browserlist update to cron
2023-02-10 19:09:03 +00:00
Sidharth Vinod ec5937b4fb Move browserlist update to cron 2023-02-11 00:32:39 +05:30
sidharthv96 10a11cfc32 Update Browserslist 2023-02-10 18:53:40 +00:00
Sidharth Vinod 9ebbd3b36c Merge remote-tracking branch 'origin/develop' into sidv/eslint-unicorn
* origin/develop: (51 commits)
  Update snapshots
  Fix Preset
  Update Browserslist
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore(deps): update dependency eslint to v8.33.0
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore(deps): update dependency eslint to v8.30.0
  Fix links
  chore(deps): update all non-major dependencies
  SvelteKit 1.0!
  Update sveltekit
  Skip updatebrowserslit on renovate
  v9.3.0
  mermaid 9.3.0-rc.7
  Fix vite.config.js typing
  mermaid 9.3.0-rc.6
  ...
2023-02-11 00:22:23 +05:30
Sidharth VinodandGitHub 9e25c2d2c4 Merge pull request #654 from victorp13/patch-1
Replacing "graph" with "flowchart"
2023-02-08 12:43:51 +05:30
Sidharth Vinod 9853442201 Update snapshots 2023-02-08 00:16:46 +05:30
Sidharth VinodandGitHub ebca0ebe34 Merge pull request #1151 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-02-08 00:15:29 +05:30
Sidharth Vinod abb2405436 Merge branch 'patch-1' of https://github.com/victorp13/mermaid-live-editor into pr/victorp13/654
* 'patch-1' of https://github.com/victorp13/mermaid-live-editor:
  Update Browserslist
2023-02-08 00:09:31 +05:30
Sidharth Vinod a6b1254425 Fix Preset 2023-02-08 00:09:26 +05:30
sidharthv96 95bf41d3e6 Update Browserslist 2023-02-07 18:38:28 +00:00
Sidharth Vinod 68f81df59b Merge remote-tracking branch 'origin/develop' into pr/victorp13/654
* origin/develop: (509 commits)
  chore(deps): update all non-major dependencies
  chore(deps): update dependency eslint to v8.33.0
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore(deps): update dependency eslint to v8.30.0
  Fix links
  chore(deps): update all non-major dependencies
  SvelteKit 1.0!
  Update sveltekit
  Skip updatebrowserslit on renovate
  v9.3.0
  mermaid 9.3.0-rc.7
  Fix vite.config.js typing
  mermaid 9.3.0-rc.6
  rc.5
  fix: Adjust image size
  Update to rc.4
  Update to rc.3
  ...
2023-02-08 00:05:14 +05:30
renovate[bot]andGitHub d3b25e5cb8 chore(deps): update all non-major dependencies 2023-02-07 18:30:45 +00:00
Sidharth VinodandGitHub 65c1ea844c Merge pull request #1145 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-02-07 23:59:00 +05:30
renovate[bot]andGitHub 864988e24a chore(deps): update all non-major dependencies 2023-02-07 09:28:56 +00:00
sidharthv96 2fc032f58a Update Browserslist 2023-01-31 16:36:15 +00:00
Sidharth Vinod 2033e9002f 9.4.0-rc.1 2023-01-31 22:04:56 +05:30
Sidharth VinodandGitHub 651a5cb7ef Merge pull request #1146 from mermaid-js/renovate/all-minor-patch
chore(deps): update dependency eslint to v8.33.0
2023-01-30 09:20:01 +05:30
renovate[bot]andGitHub a7454aa8cb chore(deps): update dependency eslint to v8.33.0 2023-01-30 02:01:16 +00:00
Sidharth VinodandGitHub 43ff34178e Merge pull request #1142 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-01-29 01:19:45 +05:30
renovate[bot]andGitHub 703744ebf3 chore(deps): update all non-major dependencies 2023-01-27 20:34:14 +00:00
Sidharth VinodandGitHub 15eaee6e9b Merge pull request #1120 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2023-01-21 22:47:07 +05:30
renovate[bot]andGitHub fa9b0344f4 chore(deps): update all non-major dependencies 2023-01-21 14:29:26 +00:00
Sidharth VinodandGitHub 965b39c2f2 Merge pull request #1138 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2023-01-17 21:38:40 +05:30
renovate[bot]andGitHub 26908080cb chore(deps): update all non-major dependencies 2023-01-16 18:05:56 +00:00
Sidharth VinodandGitHub 7c64a65497 Merge pull request #1128 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-12-27 13:06:37 +05:30
renovate[bot]andGitHub be75d950bd chore(deps): update all non-major dependencies 2022-12-26 21:02:04 +00:00
Sidharth VinodandGitHub 4022d8d872 Merge pull request #1127 from mermaid-js/renovate/all-minor-patch
chore(deps): update dependency eslint to v8.30.0
2022-12-19 10:24:48 +05:30
renovate[bot]andGitHub ccb294e5df chore(deps): update dependency eslint to v8.30.0 2022-12-19 02:44:15 +00:00
Sidharth Vinod 8d1f3f08f8 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  chore(deps): update all non-major dependencies
2022-12-17 00:17:50 +05:30
Sidharth Vinod a12e9a3e6d Fix links 2022-12-17 00:17:44 +05:30
Sidharth VinodandGitHub c138e1dc94 Merge pull request #1121 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-12-17 00:15:30 +05:30
renovate[bot]andGitHub 74431cdc08 chore(deps): update all non-major dependencies 2022-12-15 15:09:41 +00:00
Sidharth VinodandGitHub 0812b84487 Merge pull request #1124 from mermaid-js/develop
Svelte Kit 1.0 🥳 🍾
2022-12-15 17:50:45 +05:30
Sidharth Vinod cfc5567980 SvelteKit 1.0! 2022-12-15 17:42:40 +05:30
Sidharth Vinod 096f005938 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  v9.3.0
  mermaid 9.3.0-rc.7
  Fix vite.config.js typing
  mermaid 9.3.0-rc.6
  rc.5
  fix: Adjust image size
  Update to rc.4
  Update to rc.3
  Remove card snapshot
  Update snapshot
  Update to rc.2
  Update Browserslist
  9.3.0-rc.1
2022-12-15 17:31:41 +05:30
Sidharth VinodandGitHub 37d96f9a87 Merge pull request #1123 from mermaid-js/develop
Release 9.3.0
2022-12-15 17:31:14 +05:30
Sidharth Vinod 8c4b7d52d1 Update sveltekit 2022-12-15 17:30:58 +05:30
Sidharth VinodandGitHub cc7411fef8 Merge pull request #1119 from mermaid-js/release/9.3
9.3.0
2022-12-15 17:23:26 +05:30
Sidharth Vinod 1382504456 Skip updatebrowserslit on renovate 2022-12-15 17:20:39 +05:30
Sidharth Vinod 860039a924 v9.3.0 2022-12-15 17:18:24 +05:30
Sidharth Vinod 33a4cbbf78 mermaid 9.3.0-rc.7 2022-12-15 09:15:35 +05:30
Sidharth Vinod 7be86b5fa7 Fix vite.config.js typing 2022-12-14 10:18:21 +05:30
Sidharth Vinod b835e0448d mermaid 9.3.0-rc.6 2022-12-14 09:46:51 +05:30
Sidharth Vinod 7c5f9f1661 rc.5 2022-12-13 13:46:35 +05:30
Sidharth Vinod 0a34cbe9c7 fix: Adjust image size 2022-12-13 12:19:02 +05:30
Sidharth Vinod a2146da8e1 Update to rc.4 2022-12-13 00:40:18 +05:30
Sidharth Vinod d23de5f9e0 Update to rc.3 2022-12-13 00:24:54 +05:30
Sidharth Vinod 7d18fa6b95 Remove card snapshot 2022-12-13 00:11:03 +05:30
Sidharth Vinod 8dbb011b98 Update snapshot 2022-12-13 00:08:20 +05:30
Sidharth Vinod 4c398ed8dd Merge branch 'release/9.3' of https://github.com/mermaid-js/mermaid-live-editor into release/9.3
* 'release/9.3' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-12-12 23:58:04 +05:30
Sidharth Vinod 532e7a6537 Update to rc.2 2022-12-12 23:57:59 +05:30
Sidharth Vinod 049635cf3a Update docs button title 2022-12-12 22:34:09 +05:30
sidharthv96 c06511f11f Update Browserslist 2022-12-09 07:14:05 +00:00
Sidharth Vinod e6adff074a 9.3.0-rc.1 2022-12-09 12:42:48 +05:30
Sidharth VinodandGitHub 55988eb750 Merge pull request #1115 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-12-06 23:05:09 +05:30
Sidharth VinodandGitHub e368a20b8d Merge pull request #1116 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-12-06 23:04:45 +05:30
Sidharth VinodandGitHub 3cc56a0348 Merge pull request #1117 from aswinthaikkat/updatereadme
docs: Improve installation steps
2022-12-06 22:34:29 +05:30
aswin 36b7aba2f4 docs: Add dependency install step 2022-12-06 22:33:16 +05:30
aswin 54485ac068 docs: Improve installation steps 2022-12-06 22:22:41 +05:30
renovate[bot] fc6cf1f014 Update Browserslist 2022-12-05 01:28:05 +00:00
renovate[bot] 048f280b8e Update Browserslist 2022-12-05 01:27:32 +00:00
renovate[bot]andGitHub 19f26ce4b9 chore(deps): update all non-major dependencies 2022-12-05 01:26:57 +00:00
renovate[bot]andGitHub 6f115d4ac2 chore(deps): update all non-major dependencies 2022-12-05 01:26:30 +00:00
Sidharth VinodandGitHub 347d669c9c Merge pull request #1109 from mermaid-js/develop
Release
2022-11-30 14:25:43 +05:30
Sidharth VinodandGitHub df7da711a9 Merge branch 'master' into develop 2022-11-30 14:19:16 +05:30
Sidharth VinodandGitHub 282dfcc701 Merge pull request #1114 from lagraham337/develop
Nav: Fixed broken tutorial link
2022-11-30 14:18:24 +05:30
Lauren Graham 998c5f7fd9 Nav: Fixed broken tutorial link 2022-11-29 20:54:26 -08:00
Sidharth VinodandGitHub 6c907c48c7 Merge pull request #1113 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-11-28 10:33:29 +05:30
renovate[bot]andGitHub fe981b7646 chore(deps): update all non-major dependencies 2022-11-28 01:03:14 +00:00
Sidharth Vinod e36b1d42e4 chore: Skip uncompressed URL test 2022-11-25 16:15:01 +05:30
Sidharth Vinod a62a65ea05 Try something 2022-11-25 14:33:49 +05:30
Sidharth Vinod d9cdab3528 test: Change test order 2022-11-25 14:28:45 +05:30
Sidharth VinodandGitHub 5b3b0a499e Merge pull request #1108 from mermaid-js/develop
Release
2022-11-25 14:19:21 +05:30
Sidharth VinodandGitHub 1b6a1910ce Merge pull request #1107 from mermaid-js/sidv/betterErrors
Show properly formatted error messages.
2022-11-25 13:32:58 +05:30
Sidharth Vinod f794fa9e0e chore: cleanup 2022-11-25 13:25:20 +05:30
Sidharth Vinod 17ca5f29d0 fix: Error type 2022-11-25 13:23:42 +05:30
Sidharth Vinod b7aae5f94f chore: Bump node 2022-11-25 13:19:12 +05:30
Sidharth Vinod 6888765e37 Merge branch 'master' into sidv/eslint-unicorn
* master:
2022-11-25 13:06:08 +05:30
Sidharth Vinod 25e186158d chore: Cleanup with eslint-unicorn 2022-11-25 13:05:57 +05:30
Sidharth Vinod ffd68c7551 Show good error messages. 2022-11-25 12:11:11 +05:30
Sidharth VinodandGitHub 909b95ba7b Merge pull request #1105 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-11-25 11:27:44 +05:30
Sidharth Vinod f4dd01c4fe chore: fix trailing slash 2022-11-25 11:17:30 +05:30
renovate[bot]andGitHub 7508a555d4 chore(deps): update all non-major dependencies 2022-11-24 22:05:13 +00:00
Sidharth VinodandGitHub 4453a04a05 Merge pull request #1104 from mermaid-js/develop
Release
2022-11-24 22:14:04 +05:30
Sidharth Vinod 9d3a33e593 Block only tests 2022-11-24 22:07:14 +05:30
Sidharth Vinod 0378cd4ba6 Merge branch 'sidv/fixEditorHang' into develop
* sidv/fixEditorHang:
  Remove it.only
2022-11-24 22:05:27 +05:30
Sidharth Vinod c518217ba7 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  fix #1103
  fix: Remove AsyncQueue
  Update Browserslist
2022-11-24 22:04:52 +05:30
Sidharth Vinod c9a2e6bf09 snapshot 2022-11-24 22:04:48 +05:30
Sidharth Vinod f136f7bd58 Remove it.only 2022-11-24 22:04:15 +05:30
Sidharth VinodandGitHub 03d2be91e6 Merge pull request #1099 from mermaid-js/sidv/fixEditorHang
Remove AsyncQueue
2022-11-24 22:03:50 +05:30
Sidharth Vinod 3e6c28f15a fix #1103 2022-11-24 21:56:20 +05:30
Sidharth Vinod 2b800e960d Merge branch 'develop' into sidv/fixEditorHang
* develop:
  chore(deps): update all non-major dependencies
  Update Browserslist
  chore: Update deps
2022-11-24 21:26:47 +05:30
Sidharth VinodandGitHub 06bd4cf176 Merge pull request #1101 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-11-24 21:16:10 +05:30
renovate[bot]andGitHub 42a55e10a6 chore(deps): update all non-major dependencies 2022-11-24 14:57:03 +00:00
Sidharth VinodandGitHub 996db3b198 Merge pull request #1100 from mermaid-js/sidv/updateDeps
chore: Update deps
2022-11-24 20:24:51 +05:30
sidharthv96 7a598f408c Update Browserslist 2022-11-24 10:56:27 +00:00
Sidharth Vinod 924d10aac3 chore: Update deps 2022-11-24 16:25:12 +05:30
Sidharth Vinod 22df217b44 Merge branch 'sidv/fixEditorHang' of https://github.com/mermaid-js/mermaid-live-editor into sidv/fixEditorHang
* 'sidv/fixEditorHang' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-11-24 16:20:08 +05:30
Sidharth Vinod 7c4c2a02f9 fix: Remove AsyncQueue 2022-11-24 16:20:01 +05:30
sidharthv96 20c6e9146c Update Browserslist 2022-11-24 10:30:12 +00:00
Sidharth VinodandGitHub afeb649833 Merge pull request #1095 from mermaid-js/develop
Release: Fix editor hang
2022-11-17 13:20:15 +05:30
Sidharth VinodandGitHub fcf53c98c2 Merge pull request #1094 from mermaid-js/sidv/fixEditorHang
Fix #1089: Update monaco-mermaid
2022-11-17 13:19:04 +05:30
Sidharth Vinod 749968e0f5 Fix #1089: Update monaco-mermaid 2022-11-17 11:21:21 +05:30
Sidharth VinodandGitHub ba56f08370 Merge pull request #1091 from mermaid-js/develop
Release
2022-11-15 20:43:45 +05:30
Sidharth VinodandGitHub d92bf85009 Merge pull request #1092 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-11-15 20:33:03 +05:30
renovate[bot]andGitHub 6936dc5755 chore(deps): update all non-major dependencies 2022-11-15 14:50:54 +00:00
Sidharth VinodandGitHub b41ff80d9d Merge pull request #1090 from mermaid-js/sidv/capitalizeSvelteComponents
chore: Capitalize components to be inline with svelte standards
2022-11-15 20:15:21 +05:30
Sidharth Vinod 68ab43ac5d fix lint 2022-11-15 19:59:13 +05:30
Sidharth Vinod 68b589a33a chore: Cleanup, fix theme 2022-11-15 19:51:00 +05:30
Sidharth Vinod 9eb39f31a0 fix: Snapshot, env types 2022-11-15 19:00:46 +05:30
Sidharth Vinod 08eaf725b9 chore: Cleanup potentially problematic code. 2022-11-15 18:57:33 +05:30
Sidharth Vinod 85ad89b915 chore: Cleanup potentially
problematic code.
2022-11-15 18:48:16 +05:30
Sidharth Vinod 60c352a849 Fix casing 2022-11-15 17:05:14 +05:30
Sidharth Vinod b0aa0a9cb2 fix: Type errors 2022-11-15 17:03:25 +05:30
Sidharth Vinod 34dafa13c9 test commit 2022-11-15 16:29:49 +05:30
Sidharth Vinod 684bd708de test commit 2022-11-15 16:29:05 +05:30
Sidharth Vinod d5ee6d4c02 Fix card.test.ts 2022-11-15 16:14:41 +05:30
Sidharth Vinod 233f1822d1 chore: Rename components 2022-11-15 16:04:36 +05:30
Sidharth Vinod 0c3ff0d367 Merge branch 'master' into develop
* master:
2022-11-14 12:01:31 +05:30
Sidharth VinodandGitHub 5bf5c4b0f0 Merge pull request #1086 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-11-14 11:48:39 +05:30
Sidharth VinodandGitHub bea78ae04e Merge pull request #1085 from mermaid-js/renovate/cypress-11.x
chore(deps): update dependency cypress to v11
2022-11-14 11:48:17 +05:30
Sidharth VinodandGitHub f661a14080 Merge pull request #1084 from mermaid-js/renovate/actions-stale-6.x
chore(deps): update actions/stale action to v6
2022-11-14 11:47:56 +05:30
renovate[bot]andGitHub a1ce7238b0 chore(deps): update all non-major dependencies 2022-11-14 01:45:41 +00:00
renovate[bot]andGitHub 393ce10bc2 chore(deps): update dependency cypress to v11 2022-11-10 06:52:03 +00:00
renovate[bot]andGitHub a35e00134e chore(deps): update actions/stale action to v6 2022-11-10 06:51:40 +00:00
Sidharth VinodandGitHub 6f2113f0cc Merge pull request #1082 from mermaid-js/develop
Release 9.2.2
2022-11-10 00:18:32 +05:30
Sidharth VinodandGitHub faa4834949 Merge pull request #1081 from mermaid-js/sidv/9.2.2-rc.2
9.2.2
2022-11-10 00:09:13 +05:30
sidharthv96 6c9e79f21d Update Browserslist 2022-11-09 18:34:49 +00:00
Sidharth Vinod af7fd3e413 Merge branch 'develop' into sidv/9.2.2-rc.2
* develop:
  Update Browserslist
  fix(deps): update all non-major dependencies
2022-11-10 00:03:34 +05:30
Sidharth Vinod dfcfdc5178 v9.2.2 2022-11-09 23:52:23 +05:30
Sidharth VinodandGitHub a5d3e93643 Merge pull request #1078 from mermaid-js/renovate/all-minor-patch
fix(deps): update all non-major dependencies (minor)
2022-11-09 15:16:42 +05:30
sidharthv96 091682548e Update Browserslist 2022-11-09 09:37:48 +00:00
Sidharth Vinod 59d305b4f9 9.2.2-rc.2 2022-11-09 15:06:31 +05:30
renovate[bot] 5f0c25ca3c Update Browserslist 2022-11-07 00:12:23 +00:00
renovate[bot]andGitHub 4a556e592c fix(deps): update all non-major dependencies 2022-11-07 00:11:21 +00:00
Sidharth VinodandGitHub 397bb646ae Merge pull request #1075 from mermaid-js/sidv/spaces
Sidv/spaces
2022-11-03 14:30:15 +05:30
Sidharth Vinod 70d68368d3 Skip errors on non git install 2022-11-03 14:26:26 +05:30
Sidharth Vinod f252ca5728 Add prettier pass 2022-11-03 14:20:55 +05:30
Sidharth Vinod 2fcf2eb262 Add .git-blame-ignore-revs 2022-11-03 14:17:33 +05:30
Sidharth Vinod 0ac606b8fb chore: Tabs -> Spaces
Github PR reviews will be formatted much better.
Inline with mermaid project.
2022-11-03 14:09:36 +05:30
Sidharth Vinod 7b254a67cc Add Funding.yml 2022-11-03 11:28:40 +05:30
Sidharth VinodandGitHub f6f75255b9 Merge pull request #1071 from mermaid-js/develop
Async Mermaid v9.2.0
2022-11-01 22:02:54 +05:30
Sidharth Vinod 8d20a66266 chore: Add loading message 2022-11-01 21:51:27 +05:30
Sidharth VinodandGitHub 8910b15886 Merge pull request #1067 from mermaid-js/sidv/async
Async Mermaid
2022-11-01 21:35:42 +05:30
Sidharth Vinod 0e08d19b6e Merge branch 'develop' into sidv/async
* develop:
2022-11-01 21:30:04 +05:30
Sidharth Vinod 754673f4e2 v9.2.0 2022-11-01 21:29:23 +05:30
Sidharth VinodandGitHub 436a19820e Merge pull request #1070 from mermaid-js/develop
Release
2022-11-01 19:23:24 +05:30
Sidharth Vinod 95c3de9111 Merge branch 'sidv/async' of https://github.com/mermaid-js/mermaid-live-editor into sidv/async
* 'sidv/async' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-11-01 19:11:28 +05:30
Sidharth Vinod 67377f0652 Merge branch 'develop' into sidv/async
* develop:
  Update Browserslist
  chore(deps): update all non-major dependencies
  Update Browserslist
  chore(deps): update all non-major dependencies
2022-11-01 19:11:23 +05:30
Sidharth VinodandGitHub 29161c8834 Merge pull request #1069 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-11-01 19:10:12 +05:30
renovate[bot] 0ed6f927ec Update Browserslist 2022-11-01 13:20:24 +00:00
renovate[bot]andGitHub c35bae1769 chore(deps): update all non-major dependencies 2022-11-01 13:19:18 +00:00
Sidharth VinodandGitHub 9e7bdade83 Merge pull request #1068 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-11-01 18:48:00 +05:30
sidharthv96 577c26bdf4 Update Browserslist 2022-11-01 13:14:04 +00:00
Sidharth Vinod fd79a65c45 rc10 2022-11-01 18:42:36 +05:30
renovate[bot] aa1811d387 Update Browserslist 2022-10-24 00:26:10 +00:00
renovate[bot]andGitHub 4e8d122437 chore(deps): update all non-major dependencies 2022-10-24 00:25:11 +00:00
Sidharth Vinod ea0aaddc7e Comments 2022-10-20 12:17:06 +05:30
Sidharth Vinod 797bac3370 Comments 2022-10-20 12:16:56 +05:30
Sidharth Vinod 80712d9190 enable Github tests 2022-10-19 18:11:18 +05:30
Sidharth Vinod d952258d0b fix Out of sync tests 2022-10-19 18:05:45 +05:30
Sidharth Vinod e52ad1f650 skip securityLevel test 2022-10-19 17:51:59 +05:30
Sidharth Vinod 6ed2acce75 fix Tests 2022-10-19 17:44:29 +05:30
Sidharth Vinod 4a8875027c fix Tests 2022-10-19 17:08:38 +05:30
Sidharth Vinod a364b5e1bb cleanup 2022-10-19 16:41:08 +05:30
Sidharth Vinod 40c03f7c9f editor flush 2022-10-19 15:58:48 +05:30
Sidharth Vinod 743b1a071c Merge branch 'sidv/async' of https://github.com/mermaid-js/mermaid-live-editor into sidv/async
* 'sidv/async' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-10-19 15:51:11 +05:30
Sidharth Vinod 739fdeb987 editor hack 2022-10-19 15:50:31 +05:30
sidharthv96 73d8647a9d Update Browserslist 2022-10-19 09:49:26 +00:00
Sidharth Vinod c967286dab derived 2022-10-19 15:18:00 +05:30
Sidharth Vinod 384e53d02e asyncable 2022-10-19 15:17:52 +05:30
Sidharth Vinod f7b3df9b76 Add tabindex 2022-10-18 14:33:43 +05:30
Sidharth Vinod 36997f6ac1 chore: A11y changes 2022-10-18 14:25:26 +05:30
Sidharth VinodandGitHub cfa60122a6 Merge pull request #1066 from mermaid-js/develop
Release
2022-10-18 11:52:22 +05:30
Sidharth VinodandGitHub ad74b62c23 Merge pull request #1062 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-10-18 10:56:52 +05:30
renovate[bot]andGitHub d26e235065 chore(deps): update all non-major dependencies 2022-10-18 05:18:48 +00:00
Sidharth VinodandGitHub 8c149728c5 Merge pull request #1063 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-10-18 10:47:46 +05:30
Sidharth VinodandGitHub 6c4196527e Merge pull request #1065 from mermaid-js/sidv/updateFavicon
chore: Update favicon
2022-10-18 10:47:30 +05:30
Sidharth Vinod aff4872ba3 Merge branch 'sidv/updateFavicon' of https://github.com/mermaid-js/mermaid-live-editor into sidv/updateFavicon
* 'sidv/updateFavicon' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-10-18 10:39:27 +05:30
Sidharth Vinod 0c06e767a5 fix: favicon size 2022-10-18 10:39:21 +05:30
sidharthv96 3ff15c9437 Update Browserslist 2022-10-18 05:06:35 +00:00
Sidharth Vinod a89eb12b8c chore: Update favicon 2022-10-18 10:35:12 +05:30
Sidharth VinodandGitHub 019542d1e8 Merge pull request #1061 from jihchi/patch-2
Fix an issue where the image is jpg format on mermaid.ink
2022-10-17 12:28:05 +05:30
renovate[bot] e4000c62e4 Update Browserslist 2022-10-17 00:54:31 +00:00
renovate[bot]andGitHub e02fd80d9a chore(deps): update all non-major dependencies 2022-10-17 00:53:30 +00:00
jihchi 988eba06d9 Update Browserslist 2022-10-15 08:55:19 +00:00
Jihchi Lee f3ab245ef1 Fix an issue where the image is jpg format on mermaid.ink 2022-10-15 11:54:10 +03:00
Sidharth VinodandGitHub 6b5aa2c277 Merge pull request #1059 from mermaid-js/develop
Release
2022-10-10 20:58:18 +08:00
Sidharth VinodandGitHub 1ea94189d1 Merge pull request #1058 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-10-10 20:48:03 +08:00
renovate[bot]andGitHub 68e5d1e53c chore(deps): update all non-major dependencies 2022-10-10 12:32:28 +00:00
Sidharth VinodandGitHub a7ee019c5d Merge pull request #1057 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-10-10 20:31:21 +08:00
renovate[bot]andGitHub 2c26f2dfd5 chore(deps): update all non-major dependencies 2022-10-10 10:39:06 +00:00
Sidharth VinodandGitHub 4c22921e4e Merge pull request #1056 from mermaid-js/develop
Release
2022-10-07 19:13:21 +08:00
Sidharth VinodandGitHub 8c562d18f2 Merge branch 'master' into develop 2022-10-07 19:07:54 +08:00
Sidharth VinodandGitHub 7a372eaf6b Merge pull request #1053 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-10-07 19:07:17 +08:00
Sidharth Vinod dbfcd13fc5 chore: Remove stability days from renovate 2022-10-07 19:04:05 +08:00
renovate[bot] 0325b5a99c Update Browserslist 2022-10-07 11:01:17 +00:00
renovate[bot]andGitHub d44d591601 chore(deps): update all non-major dependencies 2022-10-07 11:00:13 +00:00
Sidharth VinodandGitHub f3792a39da Merge pull request #1052 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-10-03 11:01:09 +08:00
renovate[bot] 86bed95297 Update Browserslist 2022-09-26 00:10:23 +00:00
renovate[bot]andGitHub 211af0b8ae chore(deps): update all non-major dependencies 2022-09-26 00:09:00 +00:00
Sidharth VinodandGitHub ecca96d26a Merge pull request #1048 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-09-21 16:49:58 +05:30
renovate[bot] 9c98144b71 Update Browserslist 2022-09-21 10:27:34 +00:00
renovate[bot]andGitHub 24070d9415 chore(deps): update all non-major dependencies 2022-09-21 10:26:31 +00:00
Sidharth VinodandGitHub 6f2df5e088 Merge pull request #1051 from mermaid-js/develop
Release
2022-09-20 13:32:30 +05:30
Sidharth VinodandGitHub 5fd3f32d6a Merge branch 'master' into develop 2022-09-20 13:25:41 +05:30
Sidharth VinodandGitHub 44f700e588 Merge pull request #1050 from mermaid-js/sidv/syncMessage
feat: Add out of sync message
2022-09-20 13:24:33 +05:30
sidharthv96 b74e63fa1d Update Browserslist 2022-09-20 07:16:54 +00:00
Sidharth Vinod 85ed4187e8 feat: Add out of sync message 2022-09-20 12:45:38 +05:30
Sidharth Vinod 3f3086dae5 chore(vscode): Ignore develop PRs 2022-09-20 12:20:23 +05:30
Sidharth VinodandGitHub b7140fb2aa Merge pull request #1045 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-09-18 21:20:56 +05:30
renovate[bot]andGitHub 5cb868f68e chore(deps): update all non-major dependencies 2022-09-18 10:12:16 +00:00
Sidharth VinodandGitHub 6d428c8734 Merge pull request #1047 from mermaid-js/sidv/browserList
Update Browserlist workflow
2022-09-18 15:40:55 +05:30
Sidharth VinodandGitHub e5bc61a294 Merge branch 'develop' into sidv/browserList 2022-09-18 10:00:40 +05:30
sidharthv96 ef73a1f24f Update Browserslist 2022-09-18 04:28:07 +00:00
Sidharth Vinod 4f1b54b2ab Update Browserlist 2022-09-18 09:56:58 +05:30
Sidharth VinodandGitHub e90c77efc1 Merge pull request #1046 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-09-18 09:55:56 +05:30
Sidharth VinodandGitHub 58516c0947 Merge pull request #1044 from mermaid-js/renovate/mermaid-9.x
chore(deps): update dependency @types/mermaid to v9
2022-09-18 09:55:30 +05:30
Sidharth VinodandGitHub 743c3f118d Merge pull request #1043 from mermaid-js/develop
Release
2022-09-18 09:54:58 +05:30
Sidharth Vinod 927e291bf5 Update Browserlist 2022-09-18 09:54:00 +05:30
renovate[bot]andGitHub a88e365f6d chore(deps): update all non-major dependencies 2022-09-18 04:19:00 +00:00
renovate[bot]andGitHub 9620888b08 chore(deps): update dependency @types/mermaid to v9 2022-09-18 04:17:42 +00:00
Sidharth VinodandGitHub 342b29c704 Merge branch 'master' into develop 2022-09-18 09:45:48 +05:30
Sidharth VinodandGitHub 53feec5701 Merge pull request #1041 from aloisklink/chore/update-to-mermaid-v9.1.7
chore(deps): bump mermaid from 9.1.6 to 9.1.7
2022-09-18 09:45:13 +05:30
Sidharth VinodandGitHub cb73944f12 Merge branch 'develop' into chore/update-to-mermaid-v9.1.7 2022-09-18 09:34:03 +05:30
Alois Klink 96cfb4755c chore(deps): bump mermaid from 9.1.6 to 9.1.7
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 9.1.6 to 9.1.7.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Commits](mermaid-js/mermaid@v9.1.6...v9.1.7)
2022-09-17 22:51:20 +01:00
Sidharth VinodandGitHub a7f99c641a Merge pull request #1040 from mermaid-js/develop
Release
2022-09-15 12:50:41 +05:30
Sidharth VinodandGitHub b86b229aff Merge branch 'master' into develop 2022-09-15 12:15:06 +05:30
Sidharth VinodandGitHub a9b50f462b Merge pull request #1039 from mermaid-js/sidv/removeGA
Reduce analytics calls
2022-09-15 12:14:22 +05:30
Sidharth Vinod 5f3b8ddba0 Merge branch 'sidv/removeGA' of https://github.com/mermaid-js/mermaid-live-editor into sidv/removeGA
* 'sidv/removeGA' of https://github.com/mermaid-js/mermaid-live-editor:
2022-09-15 12:11:55 +05:30
Sidharth Vinod 3bef3ba7fd Only log valid diagrams 2022-09-15 12:11:49 +05:30
Sidharth VinodandGitHub 3328e35cfa Merge branch 'develop' into sidv/removeGA 2022-09-15 12:09:19 +05:30
Sidharth Vinod 1b1ed01156 Reduce analytics calls 2022-09-15 12:04:46 +05:30
Sidharth VinodandGitHub ca41deab2a Merge pull request #989 from mermaid-js/sidv/removeGA
Remove Google Analytics
2022-09-14 14:40:56 +05:30
Sidharth Vinod bff3c95c7c Merge branch 'develop' into sidv/removeGA
* develop: (58 commits)
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies
  chore(deps): update all non-major dependencies to v0.23.2
  chore: Remove commented code
  Apply suggestions from code review
  fix: Error marker bug
  Simplify debounce handling
  chore: Slight CSS spacing adjustments
  chore(deps): update all non-major dependencies
  chore(deps): update dependency node-html-parser to v6
  chore(deps): update dependency font-awesome to v6
  chore(deps): update actions/setup-node action to v3
  fix(deps): pin dependency analytics-plugin-plausible to 0.0.6
  chore(deps): update all non-major dependencies
  chore(deps): update dependency @types/pako to v2
  Disable dependabot for renovate
  chore: Update deps
  Update Browserslist
  chore: Update svelte
  Update svelte
  ...
2022-09-14 14:39:36 +05:30
Sidharth VinodandGitHub 610502502a Merge pull request #1035 from mermaid-js/renovate/all-minor-patch
chore(deps): update all non-major dependencies (minor)
2022-09-13 19:47:07 +05:30
renovate[bot]andGitHub 7c4376b0d0 chore(deps): update all non-major dependencies 2022-09-13 12:18:16 +00:00
Sidharth VinodandGitHub 0ae679ec12 Merge pull request #1034 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-09-13 17:47:22 +05:30
renovate[bot]andGitHub e8a3de759d chore(deps): update all non-major dependencies 2022-09-13 07:01:16 +00:00
Sidharth VinodandGitHub ca74cc169b Merge pull request #1032 from mermaid-js/develop
Develop
2022-09-12 10:03:18 +05:30
Sidharth VinodandGitHub 08c27a2500 Merge pull request #1033 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies to v0.23.2 (patch)
2022-09-11 00:40:09 +05:30
renovate[bot]andGitHub 330f02f81b chore(deps): update all non-major dependencies to v0.23.2 2022-09-10 18:52:03 +00:00
Sidharth VinodandGitHub 9f27cb4b65 Merge pull request #1031 from mermaid-js/sidv/optimizeDebounce
Simplify debounce handling
2022-09-11 00:19:53 +05:30
Sidharth Vinod b596c58ca7 chore: Remove commented code 2022-09-10 20:53:34 +05:30
fc533d8e11 Apply suggestions from code review
Co-authored-by: Alois Klink <alois@aloisklink.com>
2022-09-10 20:51:21 +05:30
Sidharth Vinod 01483420c9 Merge branch 'master' into sidv/optimizeDebounce
* master:
  fix: Error marker bug
2022-09-10 14:54:31 +05:30
Sidharth VinodandGitHub 8ded1dc1cb Merge pull request #1030 from mermaid-js/develop
chore: Slight CSS spacing adjustments
2022-09-10 14:30:31 +05:30
Sidharth Vinod 62c760fc70 fix: Error marker bug 2022-09-10 14:24:56 +05:30
Sidharth Vinod 90445dbf46 Simplify debounce handling
Previously events were debounced at source of generation.
Now they are debounced only at effected areas where necessary.
2022-09-10 13:53:03 +05:30
Sidharth VinodandGitHub 21f7e25cc1 Merge branch 'master' into develop 2022-09-09 23:30:58 +05:30
Sidharth Vinod ff9f9b7cf9 chore: Slight CSS spacing adjustments 2022-09-09 23:18:39 +05:30
Sidharth VinodandGitHub c085723530 Merge pull request #1027 from mermaid-js/renovate/patch-all-minor-patch
chore(deps): update all non-major dependencies (patch)
2022-09-09 20:44:35 +05:30
renovate[bot]andGitHub 9846bd7b4c chore(deps): update all non-major dependencies 2022-09-09 14:03:07 +00:00
Sidharth VinodandGitHub 5b34b1921d Merge pull request #1024 from mermaid-js/renovate/font-awesome-6.x
chore(deps): update dependency font-awesome to v6
2022-09-09 19:32:08 +05:30
Sidharth VinodandGitHub 1aa4bff8f8 Merge pull request #1021 from mermaid-js/renovate/actions-setup-node-3.x
chore(deps): update actions/setup-node action to v3
2022-09-09 19:31:37 +05:30
Sidharth VinodandGitHub 77501eee1c Merge pull request #1026 from mermaid-js/renovate/pin-dependencies
fix(deps): pin dependency analytics-plugin-plausible to 0.0.6
2022-09-09 19:31:27 +05:30
Sidharth VinodandGitHub 106d68efd4 Merge pull request #1025 from mermaid-js/renovate/node-html-parser-6.x
chore(deps): update dependency node-html-parser to v6
2022-09-09 19:31:11 +05:30
renovate[bot]andGitHub 4d534ddabb chore(deps): update dependency node-html-parser to v6 2022-09-09 13:18:39 +00:00
renovate[bot]andGitHub 86d212c659 chore(deps): update dependency font-awesome to v6 2022-09-09 13:18:18 +00:00
renovate[bot]andGitHub 9176448e17 chore(deps): update actions/setup-node action to v3 2022-09-09 13:18:12 +00:00
renovate[bot]andGitHub c0b4e37267 fix(deps): pin dependency analytics-plugin-plausible to 0.0.6 2022-09-09 13:17:41 +00:00
renovate[bot] fa634ad25a chore(deps): update all non-major dependencies 2022-09-09 13:16:21 +00:00
renovate[bot] 0d13a451de chore(deps): update dependency @types/pako to v2 2022-09-09 13:10:48 +00:00
Sidharth VinodandGitHub 7c358b5c5b Merge pull request #1022 from mermaid-js/develop
Disable dependabot for renovate
2022-09-09 18:40:43 +05:30
Sidharth Vinod 8f7209de11 Disable dependabot for renovate 2022-09-09 18:39:34 +05:30
Sidharth VinodandGitHub be42ce5f7f Merge pull request #1013 from mermaid-js/develop
Develop
2022-09-09 10:51:52 +05:30
Sidharth Vinod dc2c2a2b13 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-09-09 10:22:45 +05:30
Sidharth Vinod 9cc1503940 chore: Update deps 2022-09-09 10:22:22 +05:30
sidharthv96 55e3d0219b Update Browserslist 2022-09-09 04:50:00 +00:00
Sidharth Vinod 4825d4a5c4 chore: Update svelte 2022-09-09 10:18:32 +05:30
Sidharth Vinod 45d6efac4b Merge branch 'master' into develop
* master:
2022-09-06 12:33:22 +05:30
Sidharth Vinod e4703dfd2d Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-09-06 12:33:13 +05:30
Sidharth Vinod 93a86ba7f6 Update svelte 2022-09-06 12:33:08 +05:30
sidharthv96 44cd7c2fe8 Update Browserslist 2022-09-06 07:02:35 +00:00
Sidharth VinodandGitHub 0c037e4505 Merge pull request #1003 from mermaid-js/sidv/fixEditorDataFlow
fixEditorDataFlow
2022-09-06 12:31:12 +05:30
Sidharth VinodandGitHub 28bae8cd9b Merge pull request #1011 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/eslint-plugin-5.36.1
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.35.1 to 5.36.1
2022-09-03 00:29:53 +05:30
dependabot[bot]andGitHub bdad74f19c chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.35.1 to 5.36.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.36.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 18:23:55 +00:00
Sidharth VinodandGitHub 243d720c25 Merge pull request #1007 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-localstorage-commands-2.2.1
chore(deps-dev): bump cypress-localstorage-commands from 2.2.0 to 2.2.1
2022-09-02 23:50:30 +05:30
Sidharth VinodandGitHub e8ba2f1e6d Merge pull request #1012 from mermaid-js/develop
Develop
2022-09-02 23:50:17 +05:30
Sidharth Vinod 83ca1c5438 Disable debounce removal 2022-09-02 23:48:42 +05:30
dependabot[bot]andGitHub aeaf80d00c chore(deps-dev): bump cypress-localstorage-commands from 2.2.0 to 2.2.1
Bumps [cypress-localstorage-commands](https://github.com/javierbrea/cypress-localstorage-commands) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/javierbrea/cypress-localstorage-commands/releases)
- [Changelog](https://github.com/javierbrea/cypress-localstorage-commands/blob/master/CHANGELOG.md)
- [Commits](https://github.com/javierbrea/cypress-localstorage-commands/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: cypress-localstorage-commands
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 18:11:58 +00:00
Sidharth Vinod fee0addc6b Merge branch 'develop' into sidv/fixEditorDataFlow
* develop:
  Fix test
  Update SvelteKit
  Update SK
  SvelteKit 453
2022-09-02 23:41:04 +05:30
Sidharth VinodandGitHub d375b5cfea Merge pull request #1009 from mermaid-js/sidv/skUpdate
Update SvelteKit
2022-09-02 23:39:33 +05:30
Sidharth Vinod 0a19740b27 Fix test 2022-09-02 23:35:52 +05:30
Sidharth Vinod 973f1b7446 Update SvelteKit 2022-09-02 23:32:34 +05:30
Sidharth Vinod 4774a13446 Update Sveltekit 2022-09-02 22:54:01 +05:30
Sidharth Vinod 6c74a97a32 Update SK 2022-09-02 22:51:52 +05:30
Sidharth Vinod ce1dc1f3af Update snapshots 2022-09-02 22:32:12 +05:30
Sidharth Vinod 0f3ce99659 Merge branch 'develop' into sidv/fixEditorDataFlow
* develop:
  Fix test
  chore(deps-dev): bump eslint-plugin-tailwindcss from 3.6.0 to 3.6.1
  chore(deps-dev): bump cypress from 10.6.0 to 10.7.0
2022-09-02 22:24:12 +05:30
Sidharth VinodandGitHub 6f5d84c8b6 Merge pull request #1004 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-10.7.0
chore(deps-dev): bump cypress from 10.6.0 to 10.7.0
2022-09-02 22:23:37 +05:30
Sidharth VinodandGitHub 4da693cd87 Merge pull request #1006 from mermaid-js/dependabot/npm_and_yarn/develop/eslint-plugin-tailwindcss-3.6.1
chore(deps-dev): bump eslint-plugin-tailwindcss from 3.6.0 to 3.6.1
2022-09-02 22:23:28 +05:30
Sidharth VinodandGitHub da3b52454f Merge pull request #984 from mermaid-js/sidv/historyDownlod
Fix #968 : Ability to download and upload history
2022-09-02 22:23:17 +05:30
Sidharth Vinod 92d66da692 Fix test 2022-09-02 22:12:49 +05:30
Sidharth Vinod e6ab76a5d1 Remove updateEditor 2022-09-02 21:35:16 +05:30
Sidharth Vinod 40bd944597 Merge branch 'develop' into sidv/fixEditorDataFlow
* develop:
  chore(deps-dev): bump node-html-parser from 5.4.1 to 5.4.2
  chore(deps-dev): bump @typescript-eslint/parser from 5.34.0 to 5.36.1
  chore(deps-dev): bump eslint from 8.22.0 to 8.23.0
2022-09-02 21:21:02 +05:30
dependabot[bot]andGitHub 2dfe417220 chore(deps-dev): bump eslint-plugin-tailwindcss from 3.6.0 to 3.6.1
Bumps [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/francoismassart/eslint-plugin-tailwindcss/releases)
- [Commits](https://github.com/francoismassart/eslint-plugin-tailwindcss/compare/v3.6.0...v3.6.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 15:45:56 +00:00
dependabot[bot]andGitHub 3ffea6f168 chore(deps-dev): bump cypress from 10.6.0 to 10.7.0
Bumps [cypress](https://github.com/cypress-io/cypress) from 10.6.0 to 10.7.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v10.6.0...v10.7.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 15:45:12 +00:00
Sidharth VinodandGitHub 8ec68c1ab9 Merge pull request #997 from mermaid-js/dependabot/npm_and_yarn/develop/eslint-8.23.0
chore(deps-dev): bump eslint from 8.22.0 to 8.23.0
2022-09-02 21:12:44 +05:30
Sidharth VinodandGitHub 98a017806e Merge pull request #999 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/parser-5.36.1
chore(deps-dev): bump @typescript-eslint/parser from 5.34.0 to 5.36.1
2022-09-02 21:12:32 +05:30
Sidharth VinodandGitHub e3e8b921bc Merge pull request #1000 from mermaid-js/dependabot/npm_and_yarn/develop/node-html-parser-5.4.2
chore(deps-dev): bump node-html-parser from 5.4.1 to 5.4.2
2022-09-02 21:12:23 +05:30
Sidharth Vinod 831d1e384d Disable debounce in CI 2022-09-02 21:08:57 +05:30
Sidharth Vinod 4c86d95f21 Remove debounce 2022-09-02 21:04:42 +05:30
Sidharth Vinod 64e8ed09ba Fix race condition 2022-09-02 21:01:14 +05:30
Sidharth Vinod 70b67afb87 Optimize editor data flow 2022-09-02 19:41:51 +05:30
Sidharth Vinod 38824e8bab Merge branch 'master' into sidv/fixEditorDataFlow
* master:
  Update Browserslist
  Fix #1001 Diagram errors are not highlighted in editor
  chore(deps-dev): bump @sveltejs/kit
2022-09-02 18:38:59 +05:30
Sidharth VinodandGitHub 63869b8d11 Merge pull request #1002 from mermaid-js/develop
Fix #1001 Diagram errors are not highlighted in editor
2022-09-02 17:14:51 +05:30
sidharthv96 913b51e748 Update Browserslist 2022-09-02 09:10:45 +00:00
Sidharth Vinod 347192c5aa Fix #1001 Diagram errors are not highlighted in editor 2022-09-02 14:39:31 +05:30
dependabot[bot]andGitHub aafeb0a291 chore(deps-dev): bump node-html-parser from 5.4.1 to 5.4.2
Bumps [node-html-parser](https://github.com/taoqf/node-fast-html-parser) from 5.4.1 to 5.4.2.
- [Release notes](https://github.com/taoqf/node-fast-html-parser/releases)
- [Changelog](https://github.com/taoqf/node-html-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taoqf/node-fast-html-parser/compare/v5.4.1...v5.4.2)

---
updated-dependencies:
- dependency-name: node-html-parser
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 07:03:09 +00:00
dependabot[bot]andGitHub c47a0254ca chore(deps-dev): bump @typescript-eslint/parser from 5.34.0 to 5.36.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.34.0 to 5.36.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.36.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 07:02:56 +00:00
dependabot[bot]andGitHub a2b611011f chore(deps-dev): bump eslint from 8.22.0 to 8.23.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.22.0 to 8.23.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.22.0...v8.23.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 07:02:33 +00:00
Sidharth Vinod 5cb681c766 SvelteKit 453 2022-08-30 08:44:09 +05:30
Sidharth Vinod de3ce94bb4 Unit tests for history 2022-08-30 08:35:36 +05:30
Sidharth Vinod d966b23114 Unit tests for history 2022-08-29 21:56:26 +05:30
Sidharth Vinod 04b898ee54 Metrics 2022-08-28 23:10:40 +05:30
Sidharth Vinod 83175127b0 Merge branch 'master' into sidv/historyDownlod
* master:
  Increase retries
  Temp fix for vite bug
  Update sk
  Update Browserslist
  chore(deps): bump node from 18.7.0 to 18.8.0
  chore(deps-dev): bump @typescript-eslint/eslint-plugin
  chore(deps-dev): bump typescript from 4.7.4 to 4.8.2
  Update svelteKit
  chore(deps): bump daisyui from 2.22.0 to 2.24.0
2022-08-28 22:56:26 +05:30
Sidharth Vinod adc9dc7460 Tests 2022-08-28 22:55:47 +05:30
Sidharth VinodandGitHub 52dd52bfd4 Merge pull request #991 from mermaid-js/dependabot/npm_and_yarn/develop/sveltejs/kit-1.0.0-next.444
chore(deps-dev): bump @sveltejs/kit from 1.0.0-next.442 to 1.0.0-next.444
2022-08-27 14:14:01 +05:30
Sidharth VinodandGitHub 9e02aaf962 Merge pull request #990 from mermaid-js/develop
Develop
2022-08-27 13:32:34 +05:30
dependabot[bot]andGitHub 28bc6cf271 chore(deps-dev): bump @sveltejs/kit
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.442 to 1.0.0-next.444.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.444/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-27 07:55:04 +00:00
Sidharth VinodandGitHub 3a48e4e519 Merge pull request #983 from mermaid-js/sidv/upgradeSvelteKit
Upgrade SvelteKit
2022-08-27 13:23:19 +05:30
Sidharth Vinod 6987b6f3c6 Increase retries 2022-08-27 13:07:59 +05:30
Sidharth Vinod d2acfd5d36 Merge branch 'develop' into sidv/upgradeSvelteKit
* develop:
  Update Browserslist
  chore(deps): bump node from 18.7.0 to 18.8.0
  chore(deps-dev): bump @typescript-eslint/eslint-plugin
  chore(deps-dev): bump typescript from 4.7.4 to 4.8.2
  chore(deps): bump daisyui from 2.22.0 to 2.24.0
2022-08-27 12:57:39 +05:30
Sidharth Vinod b384e53d8b Merge branch 'sidv/upgradeSvelteKit' of https://github.com/mermaid-js/mermaid-live-editor into sidv/upgradeSvelteKit
* 'sidv/upgradeSvelteKit' of https://github.com/mermaid-js/mermaid-live-editor:
  Update sk
2022-08-27 12:57:28 +05:30
Sidharth Vinod a6dcabd4b7 Temp fix for vite bug 2022-08-27 12:57:22 +05:30
Sidharth Vinod 082e6dfffc Update sk 2022-08-27 00:22:09 +05:30
sidharthv96 20c23bb338 Update Browserslist 2022-08-26 18:50:24 +00:00
Sidharth VinodandGitHub 6ad4d415b2 Merge pull request #976 from mermaid-js/dependabot/npm_and_yarn/develop/daisyui-2.24.0
chore(deps): bump daisyui from 2.22.0 to 2.24.0
2022-08-27 00:19:03 +05:30
Sidharth VinodandGitHub e2c81de42e Merge pull request #985 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-4.8.2
chore(deps-dev): bump typescript from 4.7.4 to 4.8.2
2022-08-27 00:18:35 +05:30
Sidharth VinodandGitHub e8162c2004 Merge pull request #987 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/eslint-plugin-5.35.1
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.34.0 to 5.35.1
2022-08-27 00:17:57 +05:30
Sidharth VinodandGitHub 5ea615ae26 Merge pull request #988 from mermaid-js/dependabot/docker/develop/node-18.8.0
chore(deps): bump node from 18.7.0 to 18.8.0
2022-08-27 00:17:48 +05:30
Sidharth Vinod 4116956469 Remove GA 2022-08-26 23:27:15 +05:30
dependabot[bot]andGitHub 7c32365935 chore(deps): bump node from 18.7.0 to 18.8.0
Bumps node from 18.7.0 to 18.8.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 07:21:47 +00:00
dependabot[bot]andGitHub 6c209cddf1 chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.34.0 to 5.35.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.35.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 07:02:58 +00:00
dependabot[bot]andGitHub 810315ca10 chore(deps-dev): bump typescript from 4.7.4 to 4.8.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.4 to 4.8.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.4...v4.8.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 07:02:19 +00:00
Sidharth Vinod a1312fc095 Merge branch 'master' into sidv/upgradeSvelteKit
* master:
2022-08-25 10:11:58 +05:30
Sidharth VinodandGitHub 9395c1f154 Merge pull request #981 from mermaid-js/develop
Develop
2022-08-25 10:07:29 +05:30
Sidharth Vinod 5a880f3efe feat: Upload history 2022-08-25 10:05:27 +05:30
Sidharth Vinod d160e43eae Fix #968 : Ability to download and upload history 2022-08-25 10:05:19 +05:30
Sidharth Vinod 1a7a79d936 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  chore(deps-dev): bump eslint from 8.21.0 to 8.22.0
2022-08-24 20:21:33 +05:30
Sidharth Vinod 080b5673e7 Update svelteKit 2022-08-24 20:21:26 +05:30
Sidharth VinodandGitHub 5e06fd5df1 Merge pull request #980 from mermaid-js/dependabot/npm_and_yarn/develop/eslint-8.22.0
chore(deps-dev): bump eslint from 8.21.0 to 8.22.0
2022-08-24 13:29:50 +05:30
dependabot[bot]andGitHub bba7e55662 chore(deps-dev): bump eslint from 8.21.0 to 8.22.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.21.0 to 8.22.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.21.0...v8.22.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 07:32:29 +00:00
Sidharth VinodandGitHub 9b7015d2cb Merge pull request #977 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/parser-5.34.0
chore(deps-dev): bump @typescript-eslint/parser from 5.33.0 to 5.34.0
2022-08-24 13:00:16 +05:30
Sidharth VinodandGitHub 5531564265 Merge pull request #979 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-10.6.0
chore(deps-dev): bump cypress from 10.4.0 to 10.6.0
2022-08-24 13:00:07 +05:30
dependabot[bot]andGitHub b08856f42e chore(deps-dev): bump @typescript-eslint/parser from 5.33.0 to 5.34.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.33.0 to 5.34.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.34.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 07:20:41 +00:00
dependabot[bot]andGitHub f00095540b chore(deps-dev): bump cypress from 10.4.0 to 10.6.0
Bumps [cypress](https://github.com/cypress-io/cypress) from 10.4.0 to 10.6.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v10.4.0...v10.6.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 07:20:03 +00:00
Sidharth VinodandGitHub e07204b954 Merge pull request #975 from mermaid-js/dependabot/npm_and_yarn/develop/testing-library/svelte-3.2.1
chore(deps-dev): bump @testing-library/svelte from 3.1.3 to 3.2.1
2022-08-24 12:48:06 +05:30
dependabot[bot]andGitHub 1b4ddae110 chore(deps-dev): bump @testing-library/svelte from 3.1.3 to 3.2.1
Bumps [@testing-library/svelte](https://github.com/testing-library/svelte-testing-library) from 3.1.3 to 3.2.1.
- [Release notes](https://github.com/testing-library/svelte-testing-library/releases)
- [Changelog](https://github.com/testing-library/svelte-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/svelte-testing-library/compare/v3.1.3...v3.2.1)

---
updated-dependencies:
- dependency-name: "@testing-library/svelte"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 06:48:26 +00:00
dependabot[bot]andGitHub 7ede189894 chore(deps): bump daisyui from 2.22.0 to 2.24.0
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.22.0 to 2.24.0.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 06:48:06 +00:00
Sidharth VinodandGitHub 91c34554a9 Merge pull request #963 from mermaid-js/dependabot/npm_and_yarn/develop/vitest/ui-0.22.1
chore(deps-dev): bump @vitest/ui from 0.21.1 to 0.22.1
2022-08-24 12:14:17 +05:30
Sidharth VinodandGitHub 735527ae45 Merge pull request #965 from mermaid-js/dependabot/npm_and_yarn/develop/vitest-0.22.1
chore(deps-dev): bump vitest from 0.21.1 to 0.22.1
2022-08-24 12:13:42 +05:30
dependabot[bot]andGitHub c45b9079c2 chore(deps-dev): bump vitest from 0.21.1 to 0.22.1
Bumps [vitest](https://github.com/vitest-dev/vitest) from 0.21.1 to 0.22.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/compare/v0.21.1...v0.22.1)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 06:17:37 +00:00
dependabot[bot]andGitHub e7e9d81694 chore(deps-dev): bump @vitest/ui from 0.21.1 to 0.22.1
Bumps [@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui) from 0.21.1 to 0.22.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.22.1/packages/ui)

---
updated-dependencies:
- dependency-name: "@vitest/ui"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 06:17:34 +00:00
Sidharth VinodandGitHub a1c0f8512a Merge pull request #966 from mermaid-js/dependabot/npm_and_yarn/develop/cssnano-5.1.13
chore(deps-dev): bump cssnano from 5.1.12 to 5.1.13
2022-08-24 11:45:40 +05:30
Sidharth VinodandGitHub bdb35843bc Merge pull request #972 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/eslint-plugin-5.34.0
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.33.0 to 5.34.0
2022-08-24 11:45:28 +05:30
Sidharth VinodandGitHub b9e4ccfa1c Merge pull request #973 from mermaid-js/dependabot/npm_and_yarn/develop/vite-3.0.9
chore(deps-dev): bump vite from 3.0.6 to 3.0.9
2022-08-24 11:45:21 +05:30
Sidharth VinodandGitHub df01b89342 Merge pull request #971 from mermaid-js/develop
Update mermaid
2022-08-23 21:09:59 +05:30
dependabot[bot]andGitHub fe03ec9fcc chore(deps-dev): bump vite from 3.0.6 to 3.0.9
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.0.6 to 3.0.9.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.0.9/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 15:37:08 +00:00
dependabot[bot]andGitHub 585dc21d7a chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.33.0 to 5.34.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.34.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 15:36:03 +00:00
sidharthv96 7c627e626f Update Browserslist 2022-08-23 15:35:01 +00:00
Sidharth Vinod bc97a075dd Update mermaid 2022-08-23 21:03:55 +05:30
dependabot[bot]andGitHub 37c0c65cad chore(deps-dev): bump cssnano from 5.1.12 to 5.1.13
Bumps [cssnano](https://github.com/cssnano/cssnano) from 5.1.12 to 5.1.13.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano@5.1.12...cssnano@5.1.13)

---
updated-dependencies:
- dependency-name: cssnano
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 07:03:17 +00:00
Sidharth VinodandGitHub 69349ba3f4 Merge pull request #961 from mermaid-js/develop
Develop
2022-08-18 12:47:26 +05:30
Sidharth Vinod 0e07537969 Update download event 2022-08-18 12:40:37 +05:30
Sidharth Vinod 6055a147b0 Fix #959 2022-08-18 12:39:54 +05:30
Sidharth VinodandGitHub 1becc7183d Merge pull request #960 from mermaid-js/develop
Develop
2022-08-18 00:08:08 +05:30
Sidharth Vinod 8af7029a37 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-08-18 00:03:23 +05:30
Sidharth Vinod d90c414e3b Add Plausible, Fix GA 2022-08-18 00:03:17 +05:30
sidharthv96 ec527ddf67 Update Browserslist 2022-08-17 17:58:38 +00:00
Sidharth Vinod ea6e45ff18 Remove log 2022-08-17 23:27:27 +05:30
Sidharth VinodandGitHub 1daa67c932 Update stale.yml 2022-08-17 23:09:06 +05:30
Sidharth VinodandGitHub 1290a07ddb Merge pull request #958 from mermaid-js/sidv/analytics
Track events
2022-08-16 11:46:01 +05:30
Sidharth VinodandGitHub 63e978576c Merge pull request #957 from mermaid-js/sidv/panzoom
Add PanZoom
2022-08-16 00:50:54 +05:30
Sidharth Vinod 20348cc97c Track events 2022-08-16 00:50:24 +05:30
Sidharth Vinod d092716a93 Extract handlePanZoom out 2022-08-15 23:47:09 +05:30
Sidharth Vinod ec4afcc184 Add Pan Zoom toggle test 2022-08-15 12:56:59 +05:30
Sidharth Vinod a713f34354 Add toggle for pan & zoom 2022-08-15 11:33:20 +05:30
Sidharth Vinod 285da3f63d Fix specPattern 2022-08-13 13:46:01 +05:30
Sidharth Vinod 16ff107b6e Add test retries 2022-08-13 13:41:20 +05:30
Sidharth Vinod cf4cbc4299 Fix flashes 2022-08-13 13:19:23 +05:30
Sidharth Vinod 856bc1ebe3 Add unit tests 2022-08-13 12:58:56 +05:30
Sidharth Vinod 7a785f59be Fix flashes 2022-08-13 12:58:47 +05:30
Sidharth Vinod 32b8bbd3c3 Support hashchange event 2022-08-13 12:52:20 +05:30
Sidharth Vinod cb89087240 Fix tests 2022-08-13 12:39:57 +05:30
Sidharth Vinod da8cdef241 Fix tests 2022-08-13 12:31:55 +05:30
Sidharth Vinod 8c3e92a535 Update snapshots 2022-08-13 11:30:49 +05:30
Sidharth Vinod 20b97490a4 Merge branch 'sidv/panzoom' of https://github.com/mermaid-js/mermaid-live-editor into sidv/panzoom
* 'sidv/panzoom' of https://github.com/mermaid-js/mermaid-live-editor:
  Update snapshots
2022-08-13 11:20:42 +05:30
Sidharth Vinod 27d664c514 Disable debounce in localstorage 2022-08-13 11:20:34 +05:30
Sidharth Vinod 6b6defb3c8 Update snapshots 2022-08-13 00:20:29 +05:30
Sidharth Vinod 06b430b0b8 Disable debounce for tests 2022-08-13 00:11:30 +05:30
Sidharth Vinod 0602dd2027 Disable debounce for tests 2022-08-13 00:02:55 +05:30
Sidharth Vinod 21c9257b92 Cypress parallel 2022-08-12 23:26:52 +05:30
Sidharth Vinod 1505a5e496 Fix editor binding 2022-08-12 23:20:08 +05:30
Sidharth Vinod 1bc0718901 Persist pan & zoom in state 2022-08-12 22:15:36 +05:30
Sidharth Vinod 4441102c66 Add PanZoom 2022-08-12 20:41:27 +05:30
Sidharth VinodandGitHub 69dff7ea08 Merge pull request #956 from mermaid-js/develop
Develop
2022-08-12 15:25:08 +05:30
Sidharth VinodandGitHub c662b35fb3 Merge pull request #953 from mermaid-js/dependabot/npm_and_yarn/develop/vite-3.0.6
chore(deps-dev): bump vite from 3.0.5 to 3.0.6
2022-08-12 14:43:33 +05:30
Sidharth VinodandGitHub fac0817e27 Merge pull request #952 from mermaid-js/dependabot/npm_and_yarn/develop/node-html-parser-5.4.1
chore(deps-dev): bump node-html-parser from 5.3.3 to 5.4.1
2022-08-12 14:43:26 +05:30
Sidharth VinodandGitHub df9ebea1da Merge pull request #954 from mermaid-js/sidv/renderShortcut
fix #914 Add render diagram keyboard shortcut
2022-08-12 14:43:15 +05:30
Sidharth Vinod aaa69216a6 Fix import 2022-08-12 14:42:09 +05:30
Sidharth Vinod 0086ba9f2a Add message in popup 2022-08-12 13:54:35 +05:30
Sidharth Vinod 736dd46831 fix #914 Add render diagram keyboard shortcut 2022-08-12 13:36:24 +05:30
dependabot[bot]andGitHub fc1121e287 chore(deps-dev): bump vite from 3.0.5 to 3.0.6
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.0.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 07:02:27 +00:00
dependabot[bot]andGitHub d554791df4 chore(deps-dev): bump node-html-parser from 5.3.3 to 5.4.1
Bumps [node-html-parser](https://github.com/taoqf/node-fast-html-parser) from 5.3.3 to 5.4.1.
- [Release notes](https://github.com/taoqf/node-fast-html-parser/releases)
- [Changelog](https://github.com/taoqf/node-html-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taoqf/node-fast-html-parser/compare/v5.3.3...v5.4.1)

---
updated-dependencies:
- dependency-name: node-html-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 07:02:12 +00:00
Sidharth VinodandGitHub 2b5ddb9891 Merge pull request #928 from mermaid-js/develop
Develop
2022-08-12 11:49:59 +05:30
Sidharth Vinod 2d5dfee074 fix Image test 2022-08-12 11:44:44 +05:30
sidharthv96 a33b93529a Update Browserslist 2022-08-12 05:59:20 +00:00
Sidharth Vinod c29fd69426 Update mermaid 2022-08-12 11:28:06 +05:30
Sidharth Vinod 798f04e030 Update deps 2022-08-09 23:58:14 +05:30
Sidharth Vinod 8212ff450b Update deps 2022-08-09 23:44:55 +05:30
Sidharth Vinod afaaa92c48 Update deps 2022-08-09 23:39:44 +05:30
Sidharth VinodandGitHub 742bc02c0d Merge pull request #939 from mermaid-js/dependabot/npm_and_yarn/develop/tailwindcss-3.1.8
chore(deps-dev): bump tailwindcss from 3.1.6 to 3.1.8
2022-08-09 23:29:11 +05:30
Sidharth VinodandGitHub 5032281ff1 Merge pull request #940 from mermaid-js/dependabot/npm_and_yarn/develop/vitest/ui-0.21.0
chore(deps-dev): bump @vitest/ui from 0.19.1 to 0.21.0
2022-08-09 23:28:51 +05:30
dependabot[bot]andGitHub 9d7572aaa0 chore(deps-dev): bump @vitest/ui from 0.19.1 to 0.21.0
Bumps [@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui) from 0.19.1 to 0.21.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.21.0/packages/ui)

---
updated-dependencies:
- dependency-name: "@vitest/ui"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 17:20:13 +00:00
dependabot[bot]andGitHub fbb0c25c9e chore(deps-dev): bump tailwindcss from 3.1.6 to 3.1.8
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.1.6 to 3.1.8.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.1.6...v3.1.8)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 17:20:12 +00:00
Sidharth VinodandGitHub b4a5722cf3 Merge pull request #936 from mermaid-js/dependabot/npm_and_yarn/develop/autoprefixer-10.4.8
chore(deps-dev): bump autoprefixer from 10.4.7 to 10.4.8
2022-08-08 22:47:30 +05:30
dependabot[bot]andGitHub 6df26f605a chore(deps-dev): bump autoprefixer from 10.4.7 to 10.4.8
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.7 to 10.4.8.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.7...10.4.8)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 07:31:11 +00:00
Sidharth VinodandGitHub 89234bc69a Merge pull request #930 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/eslint-plugin-5.32.0
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.31.0 to 5.32.0
2022-08-08 12:58:33 +05:30
Sidharth VinodandGitHub 5cb1aae17c Merge pull request #929 from mermaid-js/dependabot/npm_and_yarn/develop/vite-3.0.4
chore(deps-dev): bump vite from 3.0.3 to 3.0.4
2022-08-05 18:44:24 +05:30
dependabot[bot]andGitHub d8284c999c chore(deps-dev): bump vite from 3.0.3 to 3.0.4
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.0.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-05 09:39:08 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
168190343b chore(deps-dev): bump @sveltejs/kit (#932)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.396 to 1.0.0-next.403.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.403/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-05 11:36:54 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2ff8a5ceb6 chore(deps): bump daisyui from 2.20.0 to 2.22.0 (#934)
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.20.0 to 2.22.0.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-05 11:36:41 +02:00
sidharthv96 61bbaca001 Update Browserslist 2022-08-05 07:31:18 +00:00
Sidharth VinodandGitHub faa841964b Merge pull request #933 from mermaid-js/dependabot/npm_and_yarn/develop/testing-library/jest-dom-5.16.5
chore(deps-dev): bump @testing-library/jest-dom from 5.16.4 to 5.16.5
2022-08-05 13:00:14 +05:30
dependabot[bot]andGitHub d99ef77083 chore(deps-dev): bump @testing-library/jest-dom from 5.16.4 to 5.16.5
Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.16.4 to 5.16.5.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v5.16.4...v5.16.5)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-05 07:03:23 +00:00
dependabot[bot]andGitHub a7f87c4e25 chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.31.0 to 5.32.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.32.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-05 07:02:48 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4352077821 chore(deps-dev): bump cypress-localstorage-commands from 2.1.0 to 2.2.0 (#920)
Bumps [cypress-localstorage-commands](https://github.com/javierbrea/cypress-localstorage-commands) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/javierbrea/cypress-localstorage-commands/releases)
- [Changelog](https://github.com/javierbrea/cypress-localstorage-commands/blob/master/CHANGELOG.md)
- [Commits](https://github.com/javierbrea/cypress-localstorage-commands/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: cypress-localstorage-commands
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 13:14:09 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
288a7d71ec chore(deps): bump node from 18.6.0 to 18.7.0 (#923)
Bumps node from 18.6.0 to 18.7.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 13:11:20 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
aeed0fb800 chore(deps-dev): bump vitest from 0.18.1 to 0.19.1 (#924)
Bumps [vitest](https://github.com/vitest-dev/vitest) from 0.18.1 to 0.19.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/compare/v0.18.1...v0.19.1)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 13:04:59 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
be23fbf2db chore(deps-dev): bump @vitest/ui from 0.18.1 to 0.19.1 (#926)
Bumps [@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui) from 0.18.1 to 0.19.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.19.1/packages/ui)

---
updated-dependencies:
- dependency-name: "@vitest/ui"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 13:04:52 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9ec55ae4dc chore(deps-dev): bump @typescript-eslint/eslint-plugin (#927)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.30.7 to 5.31.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.31.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 12:50:05 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
813b2f0019 chore(deps-dev): bump @sveltejs/kit (#925)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.390 to 1.0.0-next.396.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.396/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 10:18:34 +02:00
mmorel-35 eb0de971c5 Update Browserslist 2022-07-29 07:17:30 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9a82443868 chore(deps): bump @analytics/google-analytics from 1.0.2 to 1.0.3 (#921)
Bumps [@analytics/google-analytics](https://github.com/DavidWells/analytics) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/DavidWells/analytics/releases)
- [Commits](https://github.com/DavidWells/analytics/compare/@analytics/google-analytics@1.0.2...@analytics/google-analytics@1.0.3)

---
updated-dependencies:
- dependency-name: "@analytics/google-analytics"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 09:16:33 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5901871c62 chore(deps-dev): bump @typescript-eslint/parser from 5.30.7 to 5.31.0 (#918)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.30.7 to 5.31.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.31.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 09:16:19 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2ea77c0791 chore(deps-dev): bump vite from 3.0.2 to 3.0.3 (#919)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.0.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 09:16:00 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7ea6b9105d chore(deps): bump daisyui from 2.19.1 to 2.20.0 (#922)
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.19.1 to 2.20.0.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-29 09:15:42 +02:00
sidharthv96 cd84c14f8b Update Browserslist 2022-07-26 10:39:17 +00:00
Sidharth VinodandGitHub 70a5a6ec25 Merge pull request #915 from mermaid-js/develop
Develop
2022-07-22 18:18:24 +05:30
Sidharth VinodandGitHub 9ff9404d87 Merge pull request #913 from mermaid-js/dependabot/npm_and_yarn/develop/sveltejs/kit-1.0.0-next.390
chore(deps-dev): bump @sveltejs/kit from 1.0.0-next.377 to 1.0.0-next.390
2022-07-22 17:51:20 +05:30
dependabot[bot]andGitHub 4aaae7fced chore(deps-dev): bump @sveltejs/kit
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.377 to 1.0.0-next.390.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.390/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 09:09:01 +00:00
Sidharth VinodandGitHub 022292fd42 Merge pull request #912 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/parser-5.30.7
chore(deps-dev): bump @typescript-eslint/parser from 5.30.6 to 5.30.7
2022-07-22 14:37:16 +05:30
dependabot[bot]andGitHub e44415c0d1 chore(deps-dev): bump @typescript-eslint/parser from 5.30.6 to 5.30.7
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.30.6 to 5.30.7.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.7/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 08:59:38 +00:00
Sidharth VinodandGitHub 7f47896e6e Merge pull request #906 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-10.3.1
chore(deps-dev): bump cypress from 10.3.0 to 10.3.1
2022-07-22 14:27:48 +05:30
Sidharth VinodandGitHub 3dd35fdf71 Merge pull request #909 from mermaid-js/dependabot/npm_and_yarn/develop/eslint-8.20.0
chore(deps-dev): bump eslint from 8.19.0 to 8.20.0
2022-07-22 14:27:43 +05:30
Sidharth VinodandGitHub 885928ac5c Merge pull request #910 from mermaid-js/dependabot/npm_and_yarn/develop/daisyui-2.19.1
chore(deps): bump daisyui from 2.19.0 to 2.19.1
2022-07-22 14:27:38 +05:30
Sidharth VinodandGitHub ea757c8f20 Merge pull request #911 from mermaid-js/dependabot/npm_and_yarn/develop/vite-3.0.2
chore(deps-dev): bump vite from 3.0.0 to 3.0.2
2022-07-22 14:27:31 +05:30
dependabot[bot]andGitHub 7d53df2898 chore(deps-dev): bump cypress from 10.3.0 to 10.3.1
Bumps [cypress](https://github.com/cypress-io/cypress) from 10.3.0 to 10.3.1.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v10.3.0...v10.3.1)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:30:37 +00:00
dependabot[bot]andGitHub 6e7118734a chore(deps-dev): bump vite from 3.0.0 to 3.0.2
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.0.0 to 3.0.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.0.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:28:39 +00:00
dependabot[bot]andGitHub 197187e359 chore(deps): bump daisyui from 2.19.0 to 2.19.1
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.19.0 to 2.19.1.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:28:26 +00:00
dependabot[bot]andGitHub 50064ae34d chore(deps-dev): bump eslint from 8.19.0 to 8.20.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.19.0 to 8.20.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.19.0...v8.20.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:28:15 +00:00
sidharthv96 ae369a554e Update Browserslist 2022-07-22 07:27:51 +00:00
Sidharth VinodandGitHub ac3dce8fbb Merge pull request #904 from mermaid-js/dependabot/npm_and_yarn/develop/c8-7.12.0
chore(deps-dev): bump c8 from 7.11.3 to 7.12.0
2022-07-22 12:56:30 +05:30
Sidharth VinodandGitHub b08eefd35e Merge pull request #905 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/eslint-plugin-5.30.7
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.30.6 to 5.30.7
2022-07-22 12:56:24 +05:30
Sidharth VinodandGitHub 7dfed9e569 Merge pull request #908 from mermaid-js/dependabot/npm_and_yarn/develop/analytics/google-analytics-1.0.2
chore(deps): bump @analytics/google-analytics from 0.5.3 to 1.0.2
2022-07-22 12:56:17 +05:30
Sidharth VinodandGitHub a62877c4ea Merge pull request #907 from mermaid-js/dependabot/npm_and_yarn/develop/sveltejs/adapter-static-1.0.0-next.38
chore(deps-dev): bump @sveltejs/adapter-static from 1.0.0-next.36 to 1.0.0-next.38
2022-07-22 12:56:05 +05:30
dependabot[bot]andGitHub 3dcf2fc348 chore(deps): bump @analytics/google-analytics from 0.5.3 to 1.0.2
Bumps [@analytics/google-analytics](https://github.com/DavidWells/analytics) from 0.5.3 to 1.0.2.
- [Release notes](https://github.com/DavidWells/analytics/releases)
- [Commits](https://github.com/DavidWells/analytics/compare/@analytics/google-analytics@0.5.3...@analytics/google-analytics@1.0.2)

---
updated-dependencies:
- dependency-name: "@analytics/google-analytics"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:03:41 +00:00
dependabot[bot]andGitHub 56d464e18b chore(deps-dev): bump @sveltejs/adapter-static
Bumps [@sveltejs/adapter-static](https://github.com/sveltejs/kit/tree/HEAD/packages/adapter-static) from 1.0.0-next.36 to 1.0.0-next.38.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/adapter-static/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/adapter-static@1.0.0-next.38/packages/adapter-static)

---
updated-dependencies:
- dependency-name: "@sveltejs/adapter-static"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:03:26 +00:00
dependabot[bot]andGitHub 134fe719f3 chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.30.6 to 5.30.7.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.7/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:03:02 +00:00
dependabot[bot]andGitHub b74ff7d001 chore(deps-dev): bump c8 from 7.11.3 to 7.12.0
Bumps [c8](https://github.com/bcoe/c8) from 7.11.3 to 7.12.0.
- [Release notes](https://github.com/bcoe/c8/releases)
- [Changelog](https://github.com/bcoe/c8/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bcoe/c8/compare/v7.11.3...v7.12.0)

---
updated-dependencies:
- dependency-name: c8
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:02:41 +00:00
Sidharth VinodandGitHub 8d8386fabe Merge pull request #901 from mermaid-js/develop
Develop
2022-07-17 15:48:00 +05:30
Sidharth Vinod 3113b16b37 Update HTTP Verb casing 2022-07-16 23:39:12 +05:30
Sidharth Vinod a38d1077bd Add vite 2022-07-16 23:27:17 +05:30
Sidharth VinodandGitHub 3de578a28e Merge pull request #902 from mermaid-js/dependabot/npm_and_yarn/develop/vitest/ui-0.18.1
chore(deps-dev): bump @vitest/ui from 0.18.0 to 0.18.1
2022-07-16 23:25:43 +05:30
dependabot[bot]andGitHub 9c3e03d56c chore(deps-dev): bump @vitest/ui from 0.18.0 to 0.18.1
Bumps [@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui) from 0.18.0 to 0.18.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.18.1/packages/ui)

---
updated-dependencies:
- dependency-name: "@vitest/ui"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-16 16:30:25 +00:00
sidharthv96 6f7eb5c580 Update Browserslist 2022-07-16 16:27:58 +00:00
Sidharth Vinod f2e32b3c01 Update deps 2022-07-16 21:56:46 +05:30
Sidharth VinodandGitHub 4917d7ac88 Merge pull request #893 from mermaid-js/dependabot/npm_and_yarn/develop/vitest-0.18.0
chore(deps-dev): bump vitest from 0.17.1 to 0.18.0
2022-07-15 14:07:22 +05:30
Sidharth Vinod 50dd0a91d4 Update sveltekit 2022-07-15 14:06:28 +05:30
dependabot[bot]andGitHub 166ed3e29e chore(deps-dev): bump vitest from 0.17.1 to 0.18.0
Bumps [vitest](https://github.com/vitest-dev/vitest) from 0.17.1 to 0.18.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/compare/v0.17.1...v0.18.0)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-15 08:33:19 +00:00
Sidharth VinodandGitHub 0d09dfb11d Merge pull request #897 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/parser-5.30.6
chore(deps-dev): bump @typescript-eslint/parser from 5.30.5 to 5.30.6
2022-07-15 14:01:18 +05:30
Sidharth VinodandGitHub a93ddb48d0 Merge pull request #898 from mermaid-js/dependabot/npm_and_yarn/develop/tailwindcss-3.1.6
chore(deps-dev): bump tailwindcss from 3.1.5 to 3.1.6
2022-07-15 14:01:02 +05:30
Sidharth VinodandGitHub 94166fe0e7 Merge pull request #899 from mermaid-js/dependabot/docker/develop/node-18.6.0
chore(deps): bump node from 18.4.0 to 18.6.0
2022-07-15 14:00:45 +05:30
dependabot[bot]andGitHub 5933366bff chore(deps): bump node from 18.4.0 to 18.6.0
Bumps node from 18.4.0 to 18.6.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-15 07:15:31 +00:00
dependabot[bot]andGitHub 7a65759a8b chore(deps-dev): bump @typescript-eslint/parser from 5.30.5 to 5.30.6
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.30.5 to 5.30.6.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.6/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-15 07:15:09 +00:00
dependabot[bot]andGitHub 920759d2be chore(deps-dev): bump tailwindcss from 3.1.5 to 3.1.6
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.1.5...v3.1.6)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-15 07:13:05 +00:00
sidharthv96 de14de1e4a Update Browserslist 2022-07-15 07:11:37 +00:00
Sidharth VinodandGitHub 9f318675d4 Merge pull request #895 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-eslint/eslint-plugin-5.30.6
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.30.5 to 5.30.6
2022-07-15 12:40:23 +05:30
dependabot[bot]andGitHub 764fb9f461 chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.30.5 to 5.30.6.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.6/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-15 07:02:58 +00:00
Sidharth Vinod befe9f5b29 Merge branch 'master' into develop
* master:
2022-07-13 01:23:34 +05:30
Sidharth Vinod 1245a3756f Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
  chore(deps): bump daisyui from 2.17.0 to 2.19.0
2022-07-13 01:23:11 +05:30
Sidharth VinodandGitHub cc8111fdb7 Merge pull request #890 from mermaid-js/develop
Develop
2022-07-13 01:16:19 +05:30
sidharthv96 58c6bb6628 Update Browserslist 2022-07-12 07:45:57 +00:00
Sidharth VinodandGitHub 3c8ab2ec32 Merge pull request #889 from mermaid-js/dependabot/npm_and_yarn/develop/daisyui-2.19.0
chore(deps): bump daisyui from 2.17.0 to 2.19.0
2022-07-12 13:15:00 +05:30
dependabot[bot]andGitHub 5cf08a2d54 chore(deps): bump daisyui from 2.17.0 to 2.19.0
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.17.0 to 2.19.0.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-12 07:36:28 +00:00
Sidharth VinodandGitHub 91c3564477 Merge pull request #888 from johannchopin/feature/improve-view-button
improve button to be link
2022-07-09 10:18:16 +05:30
johannchopin 950de30854 improve button to be link 2022-07-08 19:36:44 +02:00
Sidharth VinodandGitHub 57df1cfac1 Merge pull request #886 from mermaid-js/develop
Develop
2022-07-08 18:05:44 +05:30
Sidharth Vinod 67a4cff405 Install deps before updating monaco 2022-07-08 17:54:33 +05:30
Sidharth VinodandGitHub 185fd55b72 Merge pull request #869 from jonmbake/add-integrity-hash-sri
fix #783: Add sub-resource integrity (SRI) hash to all cdn resources
2022-07-08 13:53:42 +05:30
Sidharth Vinod d7388b0ccb Use 'node-html-parser' 2022-07-08 13:44:16 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
852d4260b9 chore(deps-dev): bump @vitest/ui from 0.17.0 to 0.17.1 (#883)
Bumps [@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui) from 0.17.0 to 0.17.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.17.1/packages/ui)

---
updated-dependencies:
- dependency-name: "@vitest/ui"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-08 09:59:42 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8c37a3b912 chore(deps-dev): bump svelte from 3.48.0 to 3.49.0 (#881)
Bumps [svelte](https://github.com/sveltejs/svelte) from 3.48.0 to 3.49.0.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/compare/v3.48.0...v3.49.0)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-08 09:36:08 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e39254deda chore(deps-dev): bump tailwindcss from 3.1.4 to 3.1.5 (#884)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-08 09:28:16 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e410f7744c chore(deps-dev): bump @sveltejs/kit (#882)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.359 to 1.0.0-next.361.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.361/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-08 09:28:02 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fb91377462 chore(deps-dev): bump vitest from 0.17.0 to 0.17.1 (#880)
Bumps [vitest](https://github.com/vitest-dev/vitest) from 0.17.0 to 0.17.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/compare/v0.17.0...v0.17.1)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-08 09:27:46 +02:00
Sidharth Vinod 6167503246 Merge branch 'develop' into fix/monaco
* develop: (23 commits)
  Fix test
  Fix test
  Fix test
  Fix security formatting.
  Fix cypress
  Pin versions; Fix svelte kit
  Cypress
  Remove mocha
  Add dom testing
  Add vitest
  Add check before typing
  Split vite config
  Update kit
  Update Browserslist
  Add license
  chore(deps): bump mermaid from 9.1.2 to 9.1.3 (#877)
  chore(deps-dev): bump lint-staged from 13.0.2 to 13.0.3 (#872)
  Update Browserslist
  chore(deps-dev): bump cypress from 10.2.0 to 10.3.0 (#873)
  chore(deps-dev): bump @sveltejs/kit (#871)
  ...
2022-07-07 11:59:58 +05:30
Sidharth VinodandGitHub 1ab98b5b9d Merge pull request #878 from mermaid-js/vitest
Add vitest
2022-07-07 10:53:52 +05:30
Sidharth Vinod e69b4def13 Fix test 2022-07-07 01:15:57 +05:30
Sidharth Vinod 10585650fd Fix test 2022-07-07 01:07:16 +05:30
Sidharth Vinod 861fd442c2 Fix test 2022-07-07 00:53:51 +05:30
Sidharth Vinod cab7ae5f65 Merge branch 'master' into vitest
* master:
2022-07-07 00:27:22 +05:30
Sidharth Vinod 31de1c79aa Fix security formatting. 2022-07-07 00:22:37 +05:30
Sidharth Vinod 0ea5d812b2 Fix cypress 2022-07-07 00:19:42 +05:30
Sidharth Vinod 79fb9d1cb1 Pin versions; Fix svelte kit 2022-07-06 23:49:04 +05:30
Sidharth Vinod 4c965fbe2e Cypress 2022-07-06 16:51:25 +05:30
Sidharth Vinod b4fe60d49c Remove mocha 2022-07-06 15:23:51 +05:30
Sidharth Vinod e04bb15c35 Add dom testing 2022-07-06 13:01:59 +05:30
Sidharth Vinod 1c6371cb8c Add vitest 2022-07-06 12:17:37 +05:30
Sidharth VinodandGitHub 0b89c8d7e8 Merge pull request #876 from mermaid-js/develop
Develop
2022-07-06 11:08:14 +05:30
Sidharth Vinod bb536e9c36 Add check before typing 2022-07-06 10:57:27 +05:30
Sidharth Vinod 76c421924c Merge branch 'master' into develop
* master:
  fix #796: Export SVG fix
  Fix loading tests
  Bind correct store
  add update test
  Fix #851: Simplify data flow and error handling
2022-07-06 10:44:49 +05:30
Sidharth Vinod 0e331a42d8 Split vite config 2022-07-06 10:34:35 +05:30
Sidharth Vinod 9cd19f2a81 Update kit 2022-07-06 10:27:51 +05:30
Sidharth Vinod a08d392b1b Update kit 2022-07-06 10:25:34 +05:30
sidharthv96 54cdae4f40 Update Browserslist 2022-07-06 04:46:29 +00:00
Sidharth Vinod caa536b781 Add license 2022-07-06 10:15:21 +05:30
Jon Bake 5b9823298e fix #783: Add sub-resource integrity (SRI) hash to all CDN resources
Also update update-monaco script to update SRI integrity hash when performing a monaco upgrade.
2022-07-02 14:56:00 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a2d95320b8 chore(deps): bump mermaid from 9.1.2 to 9.1.3 (#877)
Bumps [mermaid](https://github.com/knsv/mermaid) from 9.1.2 to 9.1.3.
- [Release notes](https://github.com/knsv/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/knsv/mermaid/compare/9.1.2...9.1.3)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-01 09:54:17 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3009619e79 chore(deps-dev): bump lint-staged from 13.0.2 to 13.0.3 (#872)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.0.2 to 13.0.3.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.0.2...v13.0.3)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-01 09:53:44 +02:00
mmorel-35 6977a3d4a3 Update Browserslist 2022-07-01 07:39:17 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e83e287546 chore(deps-dev): bump cypress from 10.2.0 to 10.3.0 (#873)
Bumps [cypress](https://github.com/cypress-io/cypress) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v10.2.0...v10.3.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-01 09:38:19 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
30d67e1d6f chore(deps-dev): bump @sveltejs/kit (#871)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.354 to 1.0.0-next.357.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.357/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-01 09:38:04 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5d66248c78 chore(deps-dev): bump typescript from 4.7.3 to 4.7.4 (#874)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.3 to 4.7.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.3...v4.7.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-01 09:37:47 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
754f80dd94 chore(deps-dev): bump eslint-plugin-tailwindcss from 3.5.2 to 3.6.0 (#875)
Bumps [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss) from 3.5.2 to 3.6.0.
- [Release notes](https://github.com/francoismassart/eslint-plugin-tailwindcss/releases)
- [Commits](https://github.com/francoismassart/eslint-plugin-tailwindcss/compare/v3.5.2...v3.6.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-01 09:37:29 +02:00
Sidharth VinodandGitHub 2cff54b33d Merge pull request #864 from mermaid-js/fix/dataFlow
Fix/data flow
2022-06-30 09:24:36 +05:30
Sidharth VinodandGitHub ddc1291d1b Merge pull request #867 from mermaid-js/fix/796
fix #796: Export SVG fix
2022-06-29 00:39:15 +05:30
Sidharth Vinod dd17fd7e3f fix #796: Export SVG fix 2022-06-29 00:25:25 +05:30
Sidharth Vinod f7544d0d9a Test fix 2022-06-28 17:59:23 +05:30
Sidharth Vinod 705f257cc1 Test fix 2022-06-28 16:30:22 +05:30
Sidharth Vinod d2b0ae012f Cleanup monaco 2022-06-28 15:51:05 +05:30
Sidharth Vinod 44c6e2848e Fix monaco import 2022-06-28 15:13:08 +05:30
Sidharth Vinod 33e27738af Fix loading tests 2022-06-28 14:43:12 +05:30
Sidharth Vinod a02bd4b3ba Bind correct store 2022-06-28 14:36:59 +05:30
Sidharth Vinod f95c42db1e add update test 2022-06-28 14:18:29 +05:30
Sidharth Vinod 457cd02cc4 Fix #851: Simplify data flow and error handling 2022-06-28 14:03:01 +05:30
Sidharth VinodandGitHub ac7cfbd286 Merge pull request #863 from mermaid-js/develop
Develop
2022-06-27 20:22:13 +05:30
Sidharth VinodandGitHub ed093e3917 Merge pull request #862 from mermaid-js/fixDownload
fix #861 : Verify file download
2022-06-27 20:14:44 +05:30
Sidharth Vinod aa31a2a095 fix #861 : Verify file download 2022-06-27 15:06:24 +05:30
Sidharth VinodandGitHub 19b1ca9b2e Merge pull request #860 from mermaid-js/develop
Develop
2022-06-24 14:27:45 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
16f032328d chore(deps-dev): bump cypress from 10.1.0 to 10.2.0 (#856)
Bumps [cypress](https://github.com/cypress-io/cypress) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v10.1.0...v10.2.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-24 09:26:49 +02:00
mmorel-35 3394941b99 Update Browserslist 2022-06-24 07:20:27 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d7e38368b1 chore(deps-dev): bump @sveltejs/kit (#855)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.350 to 1.0.0-next.354.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.354/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-24 09:19:38 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e7a777c525 chore(deps-dev): bump cssnano from 5.1.11 to 5.1.12 (#857)
Bumps [cssnano](https://github.com/cssnano/cssnano) from 5.1.11 to 5.1.12.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano@5.1.11...cssnano@5.1.12)

---
updated-dependencies:
- dependency-name: cssnano
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-24 09:19:14 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1393b9985e chore(deps-dev): bump tailwindcss from 3.1.3 to 3.1.4 (#858)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.1.3...v3.1.4)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-24 09:19:01 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
02f3700a36 chore(deps): bump daisyui from 2.15.4 to 2.17.0 (#859)
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.15.4 to 2.17.0.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-24 09:18:48 +02:00
Sidharth VinodandGitHub a4e10b936b Merge pull request #854 from mermaid-js/develop
Develop
2022-06-24 00:18:12 +05:30
sidharthv96 af5caacc1a Update Browserslist 2022-06-22 16:58:53 +00:00
Sidharth VinodandGitHub 4dba94c9e4 Merge pull request #849 from jonmbake/issue-681-fa-icons
Fixes #681 - Add font awesome CSS to exported SVG
2022-06-22 22:27:54 +05:30
Jon Bake bc55e97545 Fixes #681 - Add font awesome CSS to exported SVG 2022-06-21 19:18:48 -05:00
Sidharth VinodandGitHub 66a75e72ea Merge pull request #850 from mermaid-js/develop
Develop
2022-06-19 19:04:31 +05:30
mmorel-35 d77d87375f Update Browserslist 2022-06-19 11:11:29 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
92916e6f8b chore(deps-dev): bump lint-staged from 13.0.1 to 13.0.2 (#842)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.0.1...v13.0.2)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-19 13:10:23 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
29387519dc chore(deps): bump monaco-mermaid from 1.0.4 to 1.0.6 (#844)
Bumps monaco-mermaid from 1.0.4 to 1.0.6.

---
updated-dependencies:
- dependency-name: monaco-mermaid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-19 13:09:36 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e50678b530 chore(deps-dev): bump cypress from 10.0.3 to 10.1.0 (#845)
Bumps [cypress](https://github.com/cypress-io/cypress) from 10.0.3 to 10.1.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v10.0.3...v10.1.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-19 13:09:11 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0c48f390f1 chore(deps): bump node from 18.3.0 to 18.4.0 (#847)
Bumps node from 18.3.0 to 18.4.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-19 13:08:55 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Yash Singh
0d4ff007fc chore(deps-dev): bump prettier from 2.6.2 to 2.7.1 (#843)
* chore(deps-dev): bump prettier from 2.6.2 to 2.7.1

Bumps [prettier](https://github.com/prettier/prettier) from 2.6.2 to 2.7.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.2...2.7.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: use caching for prettier

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
2022-06-17 09:20:12 -05:00
dependabot[bot]andGitHub 6a91eb4a91 chore(deps-dev): bump tailwindcss from 3.1.1 to 3.1.3 (#848) 2022-06-17 07:07:58 -07:00
Yash-Singh1 8ed982e5d2 Update Browserslist 2022-06-17 13:40:06 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d401ece398 chore(deps): bump daisyui from 2.15.2 to 2.15.4 (#846)
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.15.2 to 2.15.4.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-17 08:38:49 -05:00
Sidharth VinodandGitHub a367bf6499 Merge pull request #840 from mermaid-js/develop
Update mermaid to 9.1.2
2022-06-16 11:16:01 +05:30
sidharthv96 01970da710 Update Browserslist 2022-06-16 05:31:22 +00:00
Sidharth Vinod 49b1ecdbfe Update mermaid to 9.1.2 2022-06-16 11:00:10 +05:30
Sidharth VinodandGitHub 9765dfb41a Merge pull request #838 from mermaid-js/develop
Develop
2022-06-12 23:49:57 +05:30
Sidharth VinodandGitHub 829c3df13a Merge pull request #835 from mermaid-js/dependabot/npm_and_yarn/develop/tailwindcss-3.1.1
chore(deps-dev): bump tailwindcss from 3.0.24 to 3.1.1
2022-06-10 16:01:31 +05:30
dependabot[bot]andGitHub c7129720f3 chore(deps-dev): bump tailwindcss from 3.0.24 to 3.1.1
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.0.24 to 3.1.1.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.0.24...v3.1.1)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 08:17:06 +00:00
sidharthv96 6fdef6b8c2 Update Browserslist 2022-06-10 08:14:32 +00:00
Sidharth VinodandGitHub bc77259228 Merge pull request #834 from mermaid-js/dependabot/npm_and_yarn/develop/lint-staged-13.0.1
chore(deps-dev): bump lint-staged from 13.0.0 to 13.0.1
2022-06-10 13:43:30 +05:30
Sidharth VinodandGitHub 408f362db4 Merge pull request #836 from mermaid-js/dependabot/npm_and_yarn/develop/eslint-plugin-tailwindcss-3.5.2
chore(deps-dev): bump eslint-plugin-tailwindcss from 3.5.0 to 3.5.2
2022-06-10 13:43:16 +05:30
Sidharth VinodandGitHub 4c846427a5 Merge pull request #837 from mermaid-js/dependabot/docker/develop/node-18.3.0
chore(deps): bump node from 18.2.0 to 18.3.0
2022-06-10 13:43:00 +05:30
dependabot[bot]andGitHub f0d14892da chore(deps): bump node from 18.2.0 to 18.3.0
Bumps node from 18.2.0 to 18.3.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 07:08:11 +00:00
dependabot[bot]andGitHub 32caebb23d chore(deps-dev): bump eslint-plugin-tailwindcss from 3.5.0 to 3.5.2
Bumps [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss) from 3.5.0 to 3.5.2.
- [Release notes](https://github.com/francoismassart/eslint-plugin-tailwindcss/releases)
- [Commits](https://github.com/francoismassart/eslint-plugin-tailwindcss/compare/v3.5.0...v3.5.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 07:02:55 +00:00
dependabot[bot]andGitHub 0923b6310b chore(deps-dev): bump lint-staged from 13.0.0 to 13.0.1
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.0.0...v13.0.1)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 07:02:05 +00:00
Sidharth VinodandGitHub 0eb8ba87fd Merge pull request #831 from mermaid-js/develop
Develop
2022-06-08 14:17:02 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9c717323ce chore(deps-dev): bump @sveltejs/adapter-static (#833)
Bumps [@sveltejs/adapter-static](https://github.com/sveltejs/kit/tree/HEAD/packages/adapter-static) from 1.0.0-next.32 to 1.0.0-next.34.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/adapter-static/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/adapter-static@1.0.0-next.34/packages/adapter-static)

---
updated-dependencies:
- dependency-name: "@sveltejs/adapter-static"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 09:38:36 +02:00
Sidharth Vinod 766082b2fc Update deps 2022-06-08 12:47:11 +05:30
Sidharth Vinod f7b2b57572 remove cypresss config from tsconfig 2022-06-08 12:41:27 +05:30
Sidharth Vinod cfdab5cef6 Update deps 2022-06-08 12:40:39 +05:30
Sidharth Vinod a40dfee01d Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-06-08 12:39:54 +05:30
Sidharth Vinod ff1557b74b Update deps 2022-06-08 12:39:48 +05:30
sidharthv96 cc3823a47b Update Browserslist 2022-06-08 07:09:00 +00:00
Sidharth Vinod 0956e6a5d8 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  Update Browserslist
2022-06-08 12:37:47 +05:30
Sidharth Vinod eb2f5872d4 Upgrade cypress 2022-06-08 12:37:28 +05:30
sidharthv96 7dbb937af6 Update Browserslist 2022-06-08 06:26:34 +00:00
Sidharth VinodandGitHub 8186dfd5d5 Merge pull request #820 from mermaid-js/dependabot/npm_and_yarn/develop/eslint-plugin-mocha-10.0.5
chore(deps-dev): bump eslint-plugin-mocha from 10.0.4 to 10.0.5
2022-06-08 11:55:30 +05:30
Sidharth VinodandGitHub 6f9e27759a Merge pull request #821 from mermaid-js/dependabot/npm_and_yarn/develop/postcss-load-config-4.0.1
chore(deps-dev): bump postcss-load-config from 4.0.0 to 4.0.1
2022-06-08 11:55:23 +05:30
Sidharth VinodandGitHub 42156e5d02 Merge pull request #823 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-localstorage-commands-2.1.0
chore(deps-dev): bump cypress-localstorage-commands from 1.7.0 to 2.1.0
2022-06-08 11:55:16 +05:30
Sidharth VinodandGitHub 3df829f9c9 Merge pull request #824 from mermaid-js/dependabot/npm_and_yarn/develop/husky-8.0.1
chore(deps-dev): bump husky from 7.0.4 to 8.0.1
2022-06-08 11:55:09 +05:30
dependabot[bot]andGitHub 5f43eeced5 chore(deps-dev): bump husky from 7.0.4 to 8.0.1
Bumps [husky](https://github.com/typicode/husky) from 7.0.4 to 8.0.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v7.0.4...v8.0.1)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 08:37:56 +00:00
dependabot[bot]andGitHub 3e3965b29f chore(deps-dev): bump cypress-localstorage-commands from 1.7.0 to 2.1.0
Bumps [cypress-localstorage-commands](https://github.com/javierbrea/cypress-localstorage-commands) from 1.7.0 to 2.1.0.
- [Release notes](https://github.com/javierbrea/cypress-localstorage-commands/releases)
- [Changelog](https://github.com/javierbrea/cypress-localstorage-commands/blob/master/CHANGELOG.md)
- [Commits](https://github.com/javierbrea/cypress-localstorage-commands/compare/v1.7.0...v2.1.0)

---
updated-dependencies:
- dependency-name: cypress-localstorage-commands
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 08:37:43 +00:00
dependabot[bot]andGitHub 19a6dbb016 chore(deps-dev): bump postcss-load-config from 4.0.0 to 4.0.1
Bumps [postcss-load-config](https://github.com/postcss/postcss-load-config) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/postcss/postcss-load-config/releases)
- [Changelog](https://github.com/postcss/postcss-load-config/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-load-config/compare/v4.0.0...v4.0.1)

---
updated-dependencies:
- dependency-name: postcss-load-config
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 08:37:07 +00:00
dependabot[bot]andGitHub f070239da0 chore(deps-dev): bump eslint-plugin-mocha from 10.0.4 to 10.0.5
Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 10.0.4 to 10.0.5.
- [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases)
- [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/10.0.4...10.0.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 08:36:49 +00:00
Sidharth VinodandGitHub b78322321a Merge pull request #819 from mermaid-js/develop
Fix link buttons
2022-06-02 13:23:35 +05:30
sidharthv96 52141a0c65 Update Browserslist 2022-06-02 07:39:23 +00:00
Sidharth Vinod aaec74c28a Merge branch 'master' into develop
* master:
2022-06-02 13:08:11 +05:30
Sidharth Vinod f246ce63a0 Fix action button 2022-06-02 13:07:57 +05:30
Sidharth VinodandGitHub 433be80d09 Merge pull request #816 from mermaid-js/develop
Develop
2022-05-27 15:59:19 +05:30
Sidharth Vinod 2667490bcb Update deps 2022-05-27 15:53:05 +05:30
Sidharth Vinod 7fe0df6b78 prerender 2022-05-27 15:24:44 +05:30
Sidharth Vinod 88079b09cf fix sveltekit 2022-05-27 15:21:01 +05:30
Sidharth Vinod f6c5cabdb3 Update deps 2022-05-27 15:16:37 +05:30
Sidharth VinodandGitHub a5563892fd Merge pull request #804 from mermaid-js/develop
Develop
2022-05-27 15:13:46 +05:30
Sidharth Vinod dc4409dbf9 Automate browserlist 2022-05-27 15:08:14 +05:30
Sidharth Vinod 778b020cbd Update deps 2022-05-27 15:04:21 +05:30
Sidharth Vinod 77a8bbd27d Add sudo 2022-05-27 14:58:44 +05:30
Sidharth Vinod 23bb0a83c0 Remove container 2022-05-27 14:57:36 +05:30
Sidharth Vinod de6e91075f cache 2022-05-27 14:51:19 +05:30
Sidharth Vinod 407ebc7d09 cache 2022-05-27 14:48:49 +05:30
Sidharth Vinod 9ec3309039 Add user 1001 2022-05-27 14:23:35 +05:30
Sidharth Vinod f7d256f285 Change node version 2022-05-27 14:17:55 +05:30
Sidharth Vinod 0965b6e20e Change node version 2022-05-27 14:14:41 +05:30
Sidharth Vinod c0025cfb50 Disable cache 2022-05-20 17:44:16 +05:30
Sidharth Vinod d59b2fae26 Update cypress action 2022-05-20 17:38:48 +05:30
Sidharth Vinod 08d71f4ff3 Update cypress 2022-05-20 17:36:57 +05:30
Sidharth Vinod 3137d9a3d6 Fix make issue 2022-05-20 17:29:54 +05:30
Sidharth Vinod 6be08c8505 Fix make issue 2022-05-20 17:24:17 +05:30
Sidharth Vinod bd324b3cd2 Merge branch 'master' into develop
* master:
  Create SECURITY.md
2022-05-20 17:21:57 +05:30
Sidharth Vinod 308f7fa55c Bump versions 2022-05-20 17:21:49 +05:30
Sidharth Vinod cd392912b3 Fix engine 2022-05-20 17:17:30 +05:30
Sidharth Vinod e9245efdae Revert "Use node 16"
This reverts commit 4b9da62f40.
2022-05-20 17:16:32 +05:30
Sidharth Vinod 4b9da62f40 Use node 16 2022-05-20 17:15:21 +05:30
Sidharth Vinod 7e993990e0 Update node 2022-05-20 17:13:38 +05:30
Sidharth Vinod b6c80b575b Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  chore(deps): bump mermaid from 9.0.1 to 9.1.1
  chore(deps-dev): bump @sveltejs/kit
  chore(deps-dev): bump @sveltejs/adapter-static
  chore(deps-dev): bump husky from 7.0.4 to 8.0.1
  chore(deps-dev): bump cypress from 9.6.0 to 9.6.1
  chore(deps-dev): bump @types/pako from 1.0.3 to 2.0.0
  chore(deps-dev): bump mocha from 9.2.2 to 10.0.0
2022-05-14 11:41:33 +05:30
Sidharth Vinod 9ea0d9ac31 Add node engine 2022-05-14 11:41:13 +05:30
Sidharth VinodandGitHub c15a0eb483 Merge pull request #793 from mermaid-js/develop
Develop
2022-05-13 16:56:08 +05:30
Sidharth VinodandGitHub 4c63c08c5b Merge pull request #792 from mermaid-js/dependabot/npm_and_yarn/develop/mermaid-9.1.1
chore(deps): bump mermaid from 9.0.1 to 9.1.1
2022-05-13 16:42:37 +05:30
dependabot[bot]andGitHub 16e4cd6a8f chore(deps): bump mermaid from 9.0.1 to 9.1.1
Bumps [mermaid](https://github.com/knsv/mermaid) from 9.0.1 to 9.1.1.
- [Release notes](https://github.com/knsv/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/knsv/mermaid/compare/9.0.1...9.1.1)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 11:01:04 +00:00
Sidharth VinodandGitHub da768131e6 Merge pull request #789 from mermaid-js/dependabot/npm_and_yarn/develop/sveltejs/kit-1.0.0-next.328
chore(deps-dev): bump @sveltejs/kit from 1.0.0-next.326 to 1.0.0-next.328
2022-05-13 16:28:34 +05:30
dependabot[bot]andGitHub a53ad07d19 chore(deps-dev): bump @sveltejs/kit
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.326 to 1.0.0-next.328.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.328/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 08:12:01 +00:00
Sidharth VinodandGitHub 927e0e3839 Merge pull request #788 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-9.6.1
chore(deps-dev): bump cypress from 9.6.0 to 9.6.1
2022-05-13 13:38:08 +05:30
Sidharth VinodandGitHub f30effcfcf Merge pull request #787 from mermaid-js/dependabot/npm_and_yarn/develop/types/pako-2.0.0
chore(deps-dev): bump @types/pako from 1.0.3 to 2.0.0
2022-05-13 13:37:51 +05:30
Sidharth VinodandGitHub 1272293f9f Merge pull request #790 from mermaid-js/dependabot/npm_and_yarn/develop/husky-8.0.1
chore(deps-dev): bump husky from 7.0.4 to 8.0.1
2022-05-13 13:37:33 +05:30
Sidharth VinodandGitHub 9970db811d Merge pull request #791 from mermaid-js/dependabot/npm_and_yarn/develop/sveltejs/adapter-static-1.0.0-next.30
chore(deps-dev): bump @sveltejs/adapter-static from 1.0.0-next.29 to 1.0.0-next.30
2022-05-13 13:37:20 +05:30
dependabot[bot]andGitHub b542f480f7 chore(deps-dev): bump @sveltejs/adapter-static
Bumps [@sveltejs/adapter-static](https://github.com/sveltejs/kit/tree/HEAD/packages/adapter-static) from 1.0.0-next.29 to 1.0.0-next.30.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/adapter-static/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/adapter-static@1.0.0-next.30/packages/adapter-static)

---
updated-dependencies:
- dependency-name: "@sveltejs/adapter-static"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 07:03:24 +00:00
dependabot[bot]andGitHub 849a7edaaf chore(deps-dev): bump husky from 7.0.4 to 8.0.1
Bumps [husky](https://github.com/typicode/husky) from 7.0.4 to 8.0.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v7.0.4...v8.0.1)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 07:02:43 +00:00
dependabot[bot]andGitHub 590722eea0 chore(deps-dev): bump cypress from 9.6.0 to 9.6.1
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.6.0 to 9.6.1.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v9.6.0...v9.6.1)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 07:02:24 +00:00
dependabot[bot]andGitHub b5eba6c82e chore(deps-dev): bump @types/pako from 1.0.3 to 2.0.0
Bumps [@types/pako](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/pako) from 1.0.3 to 2.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/pako)

---
updated-dependencies:
- dependency-name: "@types/pako"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 07:02:12 +00:00
Sidharth VinodandGitHub 02f0c8d8bd Merge pull request #782 from mermaid-js/develop
Develop
2022-05-09 12:35:16 +05:30
Sidharth VinodandGitHub c4caf7d7ba Create SECURITY.md 2022-05-06 23:48:23 +05:30
Sidharth VinodandGitHub a6cc9efdf2 Merge pull request #777 from mermaid-js/dependabot/npm_and_yarn/develop/mocha-10.0.0
chore(deps-dev): bump mocha from 9.2.2 to 10.0.0
2022-05-06 23:39:21 +05:30
dependabot[bot]andGitHub 003877d5d7 chore(deps-dev): bump mocha from 9.2.2 to 10.0.0
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.2 to 10.0.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.2...v10.0.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 18:02:51 +00:00
Sidharth VinodandGitHub 17d131452e Merge pull request #776 from mermaid-js/dependabot/npm_and_yarn/develop/svelte-3.48.0
chore(deps-dev): bump svelte from 3.47.0 to 3.48.0
2022-05-06 23:30:29 +05:30
Sidharth VinodandGitHub 801ee9f48a Merge pull request #778 from mermaid-js/dependabot/npm_and_yarn/develop/sveltejs/kit-1.0.0-next.326
chore(deps-dev): bump @sveltejs/kit from 1.0.0-next.324 to 1.0.0-next.326
2022-05-06 23:30:17 +05:30
Sidharth VinodandGitHub cccd0d7d66 Merge pull request #779 from mermaid-js/dependabot/npm_and_yarn/develop/daisyui-2.14.3
chore(deps): bump daisyui from 2.14.2 to 2.14.3
2022-05-06 23:30:12 +05:30
Sidharth VinodandGitHub 23af745224 Merge pull request #780 from mermaid-js/dependabot/npm_and_yarn/develop/postcss-8.4.13
chore(deps-dev): bump postcss from 8.4.12 to 8.4.13
2022-05-06 23:30:08 +05:30
Sidharth VinodandGitHub 65dd5a29de Merge pull request #781 from mermaid-js/dependabot/docker/develop/node-18.1.0
chore(deps): bump node from 18.0.0 to 18.1.0
2022-05-06 23:30:01 +05:30
dependabot[bot]andGitHub efafad1e87 chore(deps): bump node from 18.0.0 to 18.1.0
Bumps node from 18.0.0 to 18.1.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 07:11:47 +00:00
dependabot[bot]andGitHub 509dcb0572 chore(deps-dev): bump postcss from 8.4.12 to 8.4.13
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.12 to 8.4.13.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.12...8.4.13)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 07:03:40 +00:00
dependabot[bot]andGitHub 1e4f26001e chore(deps): bump daisyui from 2.14.2 to 2.14.3
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.14.2 to 2.14.3.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/compare/v2.14.2...v2.14.3)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 07:03:31 +00:00
dependabot[bot]andGitHub 5591c8ca07 chore(deps-dev): bump @sveltejs/kit
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.324 to 1.0.0-next.326.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.326/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 07:03:23 +00:00
dependabot[bot]andGitHub f49afdee7f chore(deps-dev): bump svelte from 3.47.0 to 3.48.0
Bumps [svelte](https://github.com/sveltejs/svelte) from 3.47.0 to 3.48.0.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/compare/v3.47.0...v3.48.0)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 07:02:42 +00:00
Sidharth VinodandGitHub 31aa127306 Merge pull request #770 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-9.6.0
chore(deps-dev): bump cypress from 9.5.4 to 9.6.0
2022-05-05 11:39:44 +05:30
Sidharth VinodandGitHub 57c57a2f75 Merge pull request #774 from mermaid-js/dependabot/npm_and_yarn/develop/autoprefixer-10.4.7
chore(deps-dev): bump autoprefixer from 10.4.4 to 10.4.7
2022-05-05 11:39:36 +05:30
dependabot[bot]andGitHub 81b1d286e7 chore(deps-dev): bump cypress from 9.5.4 to 9.6.0
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.5.4 to 9.6.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v9.5.4...v9.6.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-05 04:34:30 +00:00
dependabot[bot]andGitHub 73fbe280a4 chore(deps-dev): bump autoprefixer from 10.4.4 to 10.4.7
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.4 to 10.4.7.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.4...10.4.7)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-05 04:33:11 +00:00
Sidharth VinodandGitHub f04582dad1 Merge pull request #768 from mermaid-js/dependabot/github_actions/develop/github/codeql-action-2
chore(deps): bump github/codeql-action from 1 to 2
2022-05-05 10:03:02 +05:30
Sidharth VinodandGitHub 47668abc9b Merge pull request #766 from mermaid-js/dependabot/npm_and_yarn/develop/daisyui-2.14.2
chore(deps): bump daisyui from 2.14.1 to 2.14.2
2022-05-05 10:02:05 +05:30
Sidharth VinodandGitHub 70d0113046 Merge pull request #765 from mermaid-js/dependabot/npm_and_yarn/develop/sveltejs/kit-1.0.0-next.324
chore(deps-dev): bump @sveltejs/kit from 1.0.0-next.318 to 1.0.0-next.324
2022-05-05 10:00:47 +05:30
Sidharth VinodandGitHub de57e5a1d3 Merge pull request #764 from mermaid-js/dependabot/npm_and_yarn/develop/typescript-4.6.4
chore(deps-dev): bump typescript from 4.6.3 to 4.6.4
2022-05-05 10:00:41 +05:30
dependabot[bot]andGitHub 0d3566e7e8 chore(deps-dev): bump typescript from 4.6.3 to 4.6.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.3 to 4.6.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.3...v4.6.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 14:21:57 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d6af4ad7f2 chore(deps-dev): bump lint-staged from 12.4.0 to 12.4.1 (#763)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.4.0 to 12.4.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.4.0...v12.4.1)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 07:18:19 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4a8dc31e19 chore(deps-dev): bump tslib from 2.3.1 to 2.4.0 (#767)
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](https://github.com/Microsoft/tslib/compare/2.3.1...2.4.0)

---
updated-dependencies:
- dependency-name: tslib
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 07:17:41 -07:00
dependabot[bot]andGitHub fc6ad643e6 chore(deps): bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 07:12:38 +00:00
dependabot[bot]andGitHub 28d6a4f23e chore(deps): bump daisyui from 2.14.1 to 2.14.2
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.14.1 to 2.14.2.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/compare/v2.14.1...v2.14.2)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 07:02:55 +00:00
dependabot[bot]andGitHub 3022a9b2fa chore(deps-dev): bump @sveltejs/kit
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.318 to 1.0.0-next.324.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.324/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 07:02:48 +00:00
Sidharth Vinod 03507987f8 Update volta versions 2022-04-22 16:18:44 +05:30
Sidharth VinodandGitHub b5bd432509 Merge pull request #762 from mermaid-js/develop
Develop
2022-04-22 13:17:39 +05:30
Sidharth VinodandGitHub f7b367cc49 Merge pull request #761 from mermaid-js/dependabot/npm_and_yarn/develop/mermaid-9.0.1
chore(deps): bump mermaid from 9.0.0 to 9.0.1
2022-04-22 13:14:42 +05:30
dependabot[bot]andGitHub 19afb3404b chore(deps): bump mermaid from 9.0.0 to 9.0.1
Bumps [mermaid](https://github.com/knsv/mermaid) from 9.0.0 to 9.0.1.
- [Release notes](https://github.com/knsv/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/knsv/mermaid/compare/9.0.0...9.0.1)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:29:49 +00:00
Sidharth VinodandGitHub 5f2a78c8cb Merge pull request #757 from mermaid-js/dependabot/npm_and_yarn/develop/daisyui-2.14.1
chore(deps): bump daisyui from 2.13.6 to 2.14.1
2022-04-22 12:57:45 +05:30
Sidharth VinodandGitHub 465a167a82 Merge pull request #759 from mermaid-js/dependabot/npm_and_yarn/develop/monaco-mermaid-1.0.4
chore(deps): bump monaco-mermaid from 1.0.3 to 1.0.4
2022-04-22 12:57:36 +05:30
Sidharth Vinod b2ad0fcfc8 Merge branch 'develop' of https://github.com/mermaid-js/mermaid-live-editor into develop
* 'develop' of https://github.com/mermaid-js/mermaid-live-editor:
  chore(deps): bump node from 17.9.0 to 18.0.0
  chore(deps-dev): bump lint-staged from 12.3.7 to 12.4.0
2022-04-22 12:57:03 +05:30
Sidharth Vinod 8df074bdf1 Fix eslint, update svelte 2022-04-22 12:56:38 +05:30
Sidharth VinodandGitHub de0a45373c Merge pull request #760 from mermaid-js/dependabot/docker/develop/node-18.0.0
chore(deps): bump node from 17.9.0 to 18.0.0
2022-04-22 12:49:40 +05:30
Sidharth VinodandGitHub 41bc653f55 Merge pull request #758 from mermaid-js/dependabot/npm_and_yarn/develop/lint-staged-12.4.0
chore(deps-dev): bump lint-staged from 12.3.7 to 12.4.0
2022-04-22 12:49:28 +05:30
dependabot[bot]andGitHub 7e14561fa1 chore(deps): bump daisyui from 2.13.6 to 2.14.1
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.13.6 to 2.14.1.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/compare/v2.13.6...v2.14.1)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:12:56 +00:00
dependabot[bot]andGitHub 0fe3982693 chore(deps): bump monaco-mermaid from 1.0.3 to 1.0.4
Bumps monaco-mermaid from 1.0.3 to 1.0.4.

---
updated-dependencies:
- dependency-name: monaco-mermaid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:12:34 +00:00
Sidharth VinodandGitHub cdbcaa0045 Merge pull request #750 from mermaid-js/dependabot/npm_and_yarn/async-3.2.3
chore(deps): bump async from 3.2.0 to 3.2.3
2022-04-22 12:40:30 +05:30
Sidharth VinodandGitHub f18fbaf205 Merge pull request #756 from mermaid-js/dependabot/npm_and_yarn/develop/moment-2.29.3
chore(deps): bump moment from 2.29.2 to 2.29.3
2022-04-22 12:40:13 +05:30
dependabot[bot]andGitHub cbb238411a chore(deps): bump node from 17.9.0 to 18.0.0
Bumps node from 17.9.0 to 18.0.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:08:21 +00:00
dependabot[bot]andGitHub c00d4a917a chore(deps-dev): bump lint-staged from 12.3.7 to 12.4.0
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.7 to 12.4.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.3.7...v12.4.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:03:22 +00:00
dependabot[bot]andGitHub 0ff7de3cf8 chore(deps): bump moment from 2.29.2 to 2.29.3
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.3.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/2.29.3/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.3)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:02:40 +00:00
Yash SinghandGitHub 7c6dd2dd2d feat: sample diagram and docs for gitgraph (#751) 2022-04-19 13:30:31 -07:00
dependabot[bot]andGitHub 0cec2e8933 chore(deps): bump async from 3.2.0 to 3.2.3
Bumps [async](https://github.com/caolan/async) from 3.2.0 to 3.2.3.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v3.2.0...v3.2.3)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 08:13:23 +00:00
Sidharth VinodandGitHub fc18174abc Merge pull request #749 from mermaid-js/develop
Develop
2022-04-15 13:42:57 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
b661a4cff3 chore(deps-dev): bump svelte-preprocess from 4.10.5 to 4.10.6 (#744)
Bumps [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess) from 4.10.5 to 4.10.6.
- [Release notes](https://github.com/sveltejs/svelte-preprocess/releases)
- [Changelog](https://github.com/sveltejs/svelte-preprocess/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte-preprocess/commits)

---
updated-dependencies:
- dependency-name: svelte-preprocess
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-15 09:42:52 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8853cecf6e chore(deps-dev): bump cypress from 9.5.3 to 9.5.4 (#745)
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.5.3 to 9.5.4.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v9.5.3...v9.5.4)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-15 09:42:44 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
bc54e50b8c chore(deps-dev): bump @sveltejs/kit (#746)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.310 to 1.0.0-next.312.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.312/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-15 09:19:40 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9f9d7277d7 chore(deps): bump actions/stale from 4 to 5 (#747)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-15 09:19:26 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c966712987 chore(deps): bump node from 17.8.0 to 17.9.0 (#748)
Bumps node from 17.8.0 to 17.9.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-15 09:19:15 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f020a77710 chore(deps-dev): bump tailwindcss from 3.0.23 to 3.0.24 (#743)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.0.23 to 3.0.24.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.0.23...v3.0.24)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-15 09:18:59 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d20aa50c96 chore(deps-dev): bump eslint-plugin-mocha from 10.0.3 to 10.0.4 (#742)
Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 10.0.3 to 10.0.4.
- [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases)
- [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/10.0.3...10.0.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-15 09:18:48 +02:00
Sidharth VinodandGitHub d31c654704 Merge pull request #740 from mermaid-js/develop
Develop
2022-04-10 21:18:33 +05:30
Sidharth VinodandGitHub f6b34c7903 Merge branch 'master' into develop 2022-04-10 21:00:06 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
b9aa9cb2d9 chore(deps-dev): bump svelte from 3.46.6 to 3.47.0 (#738)
Bumps [svelte](https://github.com/sveltejs/svelte) from 3.46.6 to 3.47.0.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/compare/v3.46.6...v3.47.0)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-10 14:52:32 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
b593e9ba47 chore(deps-dev): bump prettier-plugin-svelte from 2.6.0 to 2.7.0 (#736)
Bumps [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/sveltejs/prettier-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/prettier-plugin-svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/prettier-plugin-svelte/compare/v2.6.0...v2.7.0)

---
updated-dependencies:
- dependency-name: prettier-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-10 13:58:50 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
12a8e332cf chore(deps-dev): bump @sveltejs/kit (#739)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.304 to 1.0.0-next.310.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.310/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-10 13:58:34 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2612727d07 chore(deps): bump mermaid from 8.14.0 to 9.0.0 (#735)
Bumps [mermaid](https://github.com/knsv/mermaid) from 8.14.0 to 9.0.0.
- [Release notes](https://github.com/knsv/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/knsv/mermaid/compare/8.14.0...9.0.0)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-10 13:58:19 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a81322e495 chore(deps-dev): bump svelte-preprocess from 4.10.4 to 4.10.5 (#737)
Bumps [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess) from 4.10.4 to 4.10.5.
- [Release notes](https://github.com/sveltejs/svelte-preprocess/releases)
- [Changelog](https://github.com/sveltejs/svelte-preprocess/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte-preprocess/compare/v4.10.4...v4.10.5)

---
updated-dependencies:
- dependency-name: svelte-preprocess
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-10 10:11:01 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7bdbcd57af chore(deps-dev): bump @sveltejs/kit (#732)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.304 to 1.0.0-next.308.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.308/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-09 15:11:42 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ae739ca0e8 chore(deps-dev): bump cssnano from 5.1.5 to 5.1.7 (#731)
Bumps [cssnano](https://github.com/cssnano/cssnano) from 5.1.5 to 5.1.7.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano@5.1.5...cssnano@5.1.7)

---
updated-dependencies:
- dependency-name: cssnano
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-09 15:11:26 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2cd6cc056f chore(deps): bump daisyui from 2.13.5 to 2.13.6 (#730)
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.13.5 to 2.13.6.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/compare/v2.13.5...v2.13.6)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-09 15:11:10 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5845ff1957 chore(deps): bump moment from 2.29.1 to 2.29.2 (#733)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-09 15:10:52 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
02d33d1d15 chore(deps): bump moment from 2.29.1 to 2.29.2 (#734)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-09 15:10:30 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8488517168 chore(deps-dev): bump prettier from 2.6.1 to 2.6.2 (#729)
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.1...2.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-09 15:10:12 +02:00
Sidharth VinodandGitHub bfa3a8a788 Merge pull request #728 from mermaid-js/develop
Develop
2022-04-01 14:35:12 +05:30
Sidharth Vinod 8e41cf1db6 Merge remote-tracking branch 'origin/master' into develop
* origin/master:
  Fix View does not work via building from Dockerfile #713
  chore(deps): bump minimist from 1.2.5 to 1.2.6 (#721)
  Update stale.yml
2022-04-01 14:26:02 +05:30
Sidharth VinodandGitHub 1f1ef5da64 Merge pull request #724 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-9.5.3
chore(deps-dev): bump cypress from 9.5.2 to 9.5.3
2022-04-01 13:20:14 +05:30
Sidharth VinodandGitHub 01b3b000db Merge pull request #725 from mermaid-js/dependabot/npm_and_yarn/develop/daisyui-2.13.5
chore(deps): bump daisyui from 2.13.0 to 2.13.5
2022-04-01 13:20:09 +05:30
Sidharth VinodandGitHub 3117665b10 Merge pull request #726 from mermaid-js/dependabot/npm_and_yarn/develop/svelte-3.46.6
chore(deps-dev): bump svelte from 3.46.4 to 3.46.6
2022-04-01 13:20:05 +05:30
Sidharth VinodandGitHub 02d4fb2847 Merge pull request #727 from mermaid-js/dependabot/npm_and_yarn/develop/sveltejs/kit-1.0.0-next.304
chore(deps-dev): bump @sveltejs/kit from 1.0.0-next.303 to 1.0.0-next.304
2022-04-01 13:20:00 +05:30
Sidharth VinodandGitHub d4a2b910b1 Merge pull request #723 from mermaid-js/dependabot/npm_and_yarn/develop/postcss-load-config-3.1.4
chore(deps-dev): bump postcss-load-config from 3.1.3 to 3.1.4
2022-04-01 13:19:47 +05:30
dependabot[bot]andGitHub f371ff7d57 chore(deps-dev): bump @sveltejs/kit
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.0.0-next.303 to 1.0.0-next.304.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.0.0-next.304/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 07:03:52 +00:00
dependabot[bot]andGitHub 4e0a2d69a4 chore(deps-dev): bump svelte from 3.46.4 to 3.46.6
Bumps [svelte](https://github.com/sveltejs/svelte) from 3.46.4 to 3.46.6.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/compare/v3.46.4...v3.46.6)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 07:03:11 +00:00
dependabot[bot]andGitHub 68feebce35 chore(deps): bump daisyui from 2.13.0 to 2.13.5
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 2.13.0 to 2.13.5.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v2.13.5)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 07:03:04 +00:00
dependabot[bot]andGitHub 54c770e979 chore(deps-dev): bump cypress from 9.5.2 to 9.5.3
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.5.2 to 9.5.3.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v9.5.2...v9.5.3)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 07:02:56 +00:00
dependabot[bot]andGitHub 5380e3abf3 chore(deps-dev): bump postcss-load-config from 3.1.3 to 3.1.4
Bumps [postcss-load-config](https://github.com/postcss/postcss-load-config) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/postcss/postcss-load-config/releases)
- [Changelog](https://github.com/postcss/postcss-load-config/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-load-config/compare/3.1.3...v3.1.4)

---
updated-dependencies:
- dependency-name: postcss-load-config
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 07:02:18 +00:00
Sidharth VinodandGitHub 3932e3f8f0 Merge pull request #722 from mermaid-js/fix/713
Fix View does not work via building from Dockerfile #713
2022-03-28 17:10:27 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8c7886802e chore(deps): bump minimist from 1.2.5 to 1.2.6 (#721)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 16:01:17 +01:00
Sidharth VinodandGitHub d0cee21b8d Merge pull request #720 from mermaid-js/develop
Develop
2022-03-26 18:51:48 +05:30
Sidharth VinodandGitHub d5f9e3dfe2 Merge pull request #712 from mermaid-js/develop
Develop
2022-03-22 10:53:28 +05:30
Sidharth VinodandGitHub d8eee74010 Update stale.yml 2022-03-15 16:17:47 +05:30
Sidharth VinodandGitHub 283a75502a Merge pull request #661 from mermaid-js/develop
Develop
2022-03-14 17:52:32 +05:30
Sidharth Vinod bf06bdf71a Fix tests 2022-02-22 23:05:18 +05:30
Sidharth Vinod 68a0d29320 Fix tests 2022-02-22 22:28:32 +05:30
Victor PikulaandGitHub 14ac5f23a5 Update loadSite.spec.ts 2022-02-22 15:17:57 +01:00
Victor PikulaandGitHub e7676cf4a8 Update snapshots.js 2022-02-22 15:17:19 +01:00
Victor PikulaandGitHub 0f34a76ded Also changed 'graph' to 'flowchart' on state.ts 2022-02-21 15:51:32 +01:00
Victor PikulaandGitHub ee934c60b4 Replacing "chart" with "flowchart"
Since the documentation mentions "flowchart" in the example pages, it makes more sense to also show a flowchart as the first example loaded in the editor. It looks to me like "graph" was deprecated? Not 100% sure.
2022-02-16 09:36:26 +01:00
124 changed files with 8651 additions and 4791 deletions
+8
View File
@@ -0,0 +1,8 @@
docs/**
.svelte-kit/**
static/**
build/**
node_modules/**
coverage/**
__snapshots__/**
snapshots.js
+98 -47
View File
@@ -1,49 +1,100 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier'
],
plugins: ['svelte3', 'tailwindcss', '@typescript-eslint', 'es'],
ignorePatterns: [
'docs/*',
'*.cjs',
'*.md',
'snapshots.js',
'svelte.config.js',
'renovate.json',
'package.json',
'tsconfig.json'
],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2019,
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
extraFileExtensions: ['.svelte'],
allowAutomaticSingleRunInference: true
},
env: {
browser: true,
es2017: true,
node: true
},
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'es/no-regexp-lookbehind-assertions': 'error'
}
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/strict',
'plugin:unicorn/recommended',
'prettier'
],
plugins: [
'svelte3',
'tailwindcss',
'@typescript-eslint',
'es',
'vitest',
'no-only-tests',
'unicorn'
],
ignorePatterns: [
'docs/*',
'*.cjs',
'*.js',
'*.md',
'snapshots.js',
'svelte.config.js',
'renovate.json',
'package.json',
'tsconfig.json'
],
overrides: [
{ files: ['*.svelte'], processor: 'svelte3/svelte3' },
{
files: ['*.ts'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/strict',
'prettier'
]
}
],
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
extraFileExtensions: ['.svelte'],
allowAutomaticSingleRunInference: true
},
env: {
browser: true,
es2020: true
},
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'es/no-regexp-lookbehind-assertions': 'error',
curly: ['error', 'all'],
'no-only-tests/no-only-tests': 'error',
'unicorn/no-null': 'off',
'unicorn/filename-case': [
'error',
{
case: 'camelCase'
}
],
'unicorn/prevent-abbreviations': [
'error',
{
allowList: {
ctx: true,
db: true,
doc: true,
env: true,
fn: true,
i: true,
param: true,
req: true,
res: true,
str: true,
searchParams: true,
temp: true,
ImportMetaEnv: true
}
}
]
}
};
+5
View File
@@ -0,0 +1,5 @@
# .git-blame-ignore-revs
# Prettier Pass
6fde9e22a3ba0b80879a1909fb233367ef20b738
# Tabs -> Spaces
0ac606b8fbf6f94215cbda1d4511e2dcd30e4655
+1
View File
@@ -0,0 +1 @@
github: [sidharthv96, knsv]
+2 -2
View File
@@ -39,7 +39,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql/config.yml
languages: ${{ matrix.language }}
@@ -65,4 +65,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
+1 -2
View File
@@ -16,12 +16,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 18
cache: yarn
- name: Build & Deploy
run: |
npm i -g yarn
export DEPLOY=true
[ "$GITHUB_EVENT_NAME" != "pull_request" ] && rm -rf docs/_app/
yarn install
+21
View File
@@ -0,0 +1,21 @@
name: Create release pull request
on:
push:
branches:
- develop
jobs:
productionPromotion:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: master
- name: Reset promotion branch
run: |
git fetch origin develop:develop
git reset --hard develop
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: release-promotion
title: Release live editor
+6 -3
View File
@@ -8,10 +8,13 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-issue-labels: 'retained'
exempt-pr-labels: 'retained'
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
stale-pr-message: 'This pr is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days'
stale-pr-message: 'This pr is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days'
days-before-stale: 90
days-before-close: 30
days-before-pr-close: -1
@@ -1,4 +1,4 @@
name: Cypress Tests
name: Tests
on:
pull_request:
@@ -9,8 +9,11 @@ on:
jobs:
cypress-run:
runs-on: ubuntu-latest
# Update after https://github.com/cypress-io/cypress-docker-images/issues/487
container: cypress/browsers:node14.16.0-chrome90-ff88
strategy:
fail-fast: false
matrix:
# run 3 copies of the current job in parallel
containers: [1, 2, 3]
steps:
- name: Checkout
@@ -27,20 +30,22 @@ jobs:
restore-keys: |
${{ runner.os }}-node_modules-build-
- name: Build & Lint
run: |
yarn install
yarn build
yarn lint
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v3
with:
build: yarn build
start: yarn preview
wait-on: 'http://localhost:3000'
record: true
headless: true
parallel: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_CI: true
+36
View File
@@ -0,0 +1,36 @@
name: Unit Tests
on:
pull_request:
branches:
- master
- develop
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/cache@v3
id: yarn-and-build-cache
with:
path: |
build
node_modules
key: ${{ runner.os }}-node_modules-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Lint & Test
run: |
yarn install
yarn lint
yarn test:unit
+26 -10
View File
@@ -1,16 +1,32 @@
name: Update Browserslist
name: Update Browserslist database
on:
workflow_dispatch:
schedule:
- cron: '0 2 1,15 * *'
permissions:
contents: write
pull-requests: write
jobs:
build:
update-browserslist-database:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npx browserslist@latest --update-db
- name: Commit changes
uses: EndBug/add-and-commit@v9
- name: Checkout repository
uses: actions/checkout@v3
with:
author_name: ${{ github.actor }}
author_email: ${{ github.actor }}@users.noreply.github.com
message: 'Update Browserslist'
fetch-depth: 0
- name: Configure git
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
- name: Update Browserslist database and create PR if applies
uses: c2corg/browserslist-update-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: browserslist-update
base_branch: develop
commit_message: 'build: update Browserslist db'
title: 'build: update Browserslist db'
body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/)
labels: 'chores, github action'
@@ -1,19 +0,0 @@
name: Update Monaco-editor
on:
workflow_dispatch:
push:
branches:
- 'dependabot/npm_and_yarn/develop/monaco-editor-**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./bin/update-monaco
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: ${{ github.actor }}
author_email: ${{ github.actor }}@users.noreply.github.com
message: 'Update Monaco-editor'
+1
View File
@@ -9,5 +9,6 @@ yarn-error.log
/build
/functions
/snapshots.js
/cypress/downloads
/cypress/videos
/cypress/screenshots
+2
View File
@@ -3,4 +3,6 @@ docs/**
static/**
build/**
node_modules/**
coverage/**
__snapshots__/**
snapshots.js
+5 -6
View File
@@ -1,8 +1,7 @@
{
"singleQuote": true,
"svelteSortOrder": "options-scripts-markup-styles",
"bracketSameLine": true,
"useTabs": true,
"trailingComma": "none",
"printWidth": 100
"singleQuote": true,
"svelteSortOrder": "options-scripts-markup-styles",
"bracketSameLine": true,
"trailingComma": "none",
"printWidth": 100
}
+15
View File
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
+25 -2
View File
@@ -1,4 +1,27 @@
{
"editor.formatOnSave": true,
"cSpell.words": ["pako", "Serde", "serdes"]
"editor.formatOnSave": true,
"cSpell.blockCheckingWhenLineLengthGreaterThan": 150,
"cSpell.words": [
"asyncable",
"Browserslist",
"ckppp",
"corg",
"cssnano",
"daisyui",
"esserializer",
"KROKI",
"localstorage",
"mermaidchart",
"mindmap",
"pako",
"Serde",
"serdes",
"tailwindcss",
"uparrow"
],
"vitest.commandLine": "yarn test:unit",
"vitest.enable": true,
"testing.autoRun.mode": "rerun",
"svelte.enable-ts-plugin": true,
"githubPullRequests.ignoredPullRequestBranches": ["develop"]
}
+3 -3
View File
@@ -1,17 +1,17 @@
# Two-stage docker container for mermaid-js/mermaid-live-editor
# Build : docker build -t mermaid-js/mermaid-live-editor .
# Run : docker run --name mermaid-live-editor --publish 8080:80 mermaid-js/mermaid-live-editor
# Run : docker run --name mermaid-live-editor --publish 8080:8080 mermaid-js/mermaid-live-editor
# Start : docker start mermaid-live-editor
# Use webbrowser : http://localhost:8080
# Stop : press ctrl + c
# or
# docker stop mermaid-live-editor
FROM node:17.8.0 as mermaid-live-editor-builder
FROM node:18.17.1 as mermaid-live-editor-builder
COPY --chown=node:node . /home
WORKDIR /home
RUN yarn install
RUN yarn build
FROM nginx:alpine as mermaid-live-editor-runner
FROM nginxinc/nginx-unprivileged:alpine as mermaid-live-editor-runner
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=mermaid-live-editor-builder --chown=nginx:nginx /home/docs /usr/share/nginx/html
+2 -2
View File
@@ -1,8 +1,8 @@
FROM node:17
FROM node:18.17.1
WORKDIR /app
COPY package.json .
COPY yarn.lock .
RUN npm install
COPY . .
RUN ls
CMD ["yarn", "dev"]
CMD ["yarn", "dev"]
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 - 2021 Knut Sveidqvist
Copyright (c) 2020 - 2023 Knut Sveidqvist
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+11 -8
View File
@@ -24,7 +24,7 @@ You can try out a live version [here](https://mermaid.live/).
### Run published image
```bash
docker run --publish 8000:80 ghcr.io/mermaid-js/mermaid-live-editor
docker run --platform linux/amd64 --publish 8000:8080 ghcr.io/mermaid-js/mermaid-live-editor
```
### To configure renderer URL
@@ -43,21 +43,24 @@ Default is `https://kroki.io`
docker compose up --build
```
Then open http://localhost:8000
Then open http://localhost:3000
## Setup
[Volta](https://volta.sh) is used for managing node and yarn versions.
Below link will help you making a copy of the repository in your local system.
This project is set up using [Yarn](https://classic.yarnpkg.com/en/docs/getting-started):
https://docs.github.com/en/get-started/quickstart/fork-a-repo
```
yarn install
```
## Requirements
- [volta](https://volta.sh/) to manage node versions.
- [Node.js](https://nodejs.org/en/). `volta install node`
- [yarn](https://yarnpkg.com/) package manager. `volta install yarn`
## Development
```
```sh
yarn install
yarn dev -- --open
```
+13
View File
@@ -0,0 +1,13 @@
# Security Policy
## Supported Versions
Live editor only has a single version, which will be maintained.
| Version | Supported |
| ------- | ------------------ |
| latest | :white_check_mark: |
## Reporting a Vulnerability
To report a vulnerability, please e-mail security@mermaid.live with a description of the issue, the steps you took to create the issue, affected versions, and if known, mitigations for the issue.
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
monacoVersion="$(jq -r '.dependencies."monaco-editor"' package.json)"
monacoVersion="${monacoVersion:1}"
if [[ $(uname) == "Darwin" ]];
then
sed -i '' -E "s/monaco-editor\/[^/]*/monaco-editor\/$monacoVersion/g" ./src/app.html
else
sed -i'' -E "s/monaco-editor\/[^/]*/monaco-editor\/$monacoVersion/g" ./src/app.html
fi
+45
View File
@@ -0,0 +1,45 @@
import fs from 'fs';
import path from 'path';
import { parse } from 'node-html-parser';
import prettier from 'prettier';
// parse monaco version out of package.json
const packageJson = JSON.parse(fs.readFileSync('package.json'));
const monacoVersion = packageJson.dependencies['monaco-editor'].replace('^', '');
// fetch monaco sri info from cdnjs api
const cdnjsAPIResp = await fetch(
`https://api.cdnjs.com/libraries/monaco-editor/${monacoVersion}?fields=sri`
);
if (cdnjsAPIResp.ok) {
const respJson = await cdnjsAPIResp.json();
const htmlPath = path.join('src', 'app.html');
const appHtml = fs
.readFileSync(htmlPath, 'utf8')
// update monaco version of every asset in app.html
.replaceAll(/[0-9.]+\/min\/vs/g, `${monacoVersion}/min/vs`);
const root = parse(appHtml);
const updateIntegrity = (tag, attr) => {
for (const node of root
.getElementsByTagName(tag)
.filter((node) => node.getAttribute(attr)?.includes('monaco-editor'))) {
const file = node.getAttribute(attr).split(`${monacoVersion}/`)[1];
node.setAttribute('integrity', respJson.sri[file]);
}
};
updateIntegrity('script', 'src');
updateIntegrity('link', 'href');
fs.writeFileSync(
htmlPath,
prettier.format(root.toString(), {
singleQuote: false,
parser: 'html',
bracketSameLine: true,
useTabs: true
})
);
} else {
throw Error('Unable to fetch monaco sri data from cdnjs api.');
}
+35
View File
@@ -0,0 +1,35 @@
import { defineConfig } from 'cypress';
import fs from 'fs';
import { isFileExist, findFiles } from 'cy-verify-downloads';
export default defineConfig({
projectId: '2ckppp',
viewportWidth: 1440,
viewportHeight: 768,
snapshotFileName: './cypress/snapshots.js',
defaultCommandTimeout: 5000,
requestTimeout: 5000,
retries: {
runMode: 2,
openMode: 0
},
e2e: {
setupNodeEvents(on, config) {
on('task', {
isFileExist,
findFiles,
deleteFile(path) {
fs.rmSync(path);
return null;
},
readFileMaybe(filename) {
if (fs.existsSync(filename)) {
return fs.readFileSync(filename, 'utf8');
}
return null;
}
});
},
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/**/*.spec.ts'
}
});
-11
View File
@@ -1,11 +0,0 @@
{
"projectId": "2ckppp",
"$schema": "https://on.cypress.io/cypress.schema.json",
"baseUrl": "http://localhost:3000",
"pluginsFile": "./cypress/plugins/index.cjs",
"viewportWidth": 1440,
"viewportHeight": 768,
"snapshotFileName": "./cypress/snapshots.js",
"defaultCommandTimeout": 16000,
"requestTimeout": 16000
}
+8 -10
View File
@@ -1,12 +1,10 @@
{
"plugins": ["cypress", "mocha"],
"extends": ["plugin:cypress/recommended", "plugin:mocha/recommended"],
"rules": {
"jest/expect-expect": "off",
"mocha/no-mocha-arrows": "off"
},
"env": {
"cypress/globals": true,
"mocha": true
}
"plugins": ["cypress"],
"extends": ["plugin:cypress/recommended"],
"rules": {
"jest/expect-expect": "off"
},
"env": {
"cypress/globals": true
}
}
+49
View File
@@ -0,0 +1,49 @@
import { typeInEditor, verifyFileSizeGreaterThan } from './util';
describe('Check actions', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit');
cy.contains('Actions').click();
});
it('should update markdown code', () => {
cy.get('#markdown')
.invoke('val')
.then((oldText) => {
typeInEditor('C --> HistoryTest', { bottom: true, newline: true });
cy.get('#markdown')
.invoke('val')
.then((newText) => {
expect(oldText).to.not.eq(newText);
});
});
});
it.skip('should load gists from URL', () => {
cy.get('#gist').type('https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a');
cy.contains('Load Gist').click();
cy.contains('Go shopping!!');
});
it('should download png and svg', () => {
cy.clock(new Date(2022, 0, 1).getTime());
cy.get(`#downloadPNG`).click();
verifyFileSizeGreaterThan('diagram', 'png', 34_000);
cy.get(`#downloadSVG`).click();
verifyFileSizeGreaterThan('diagram', 'svg', 10_000);
// Verify downloaded file is different for different diagrams
cy.contains('Sample Diagrams').click();
cy.contains('ER').click();
cy.get(`#downloadPNG`).click();
verifyFileSizeGreaterThan('diagram', 'png', 40_000);
cy.get(`#downloadSVG`).click();
verifyFileSizeGreaterThan('diagram', 'svg', 11_000);
cy.clock().invoke('restore');
});
});
+97
View File
@@ -0,0 +1,97 @@
import { typeInEditor, cmd } from './util';
describe('Auto sync tests', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/');
cy.url().should('contain', '/edit#pako');
cy.window().should('have.property', 'editorLoaded', true);
});
it('should dim diagram when code is edited', () => {
cy.contains('Auto sync').click();
cy.get('#view').should('not.have.class', 'outOfSync');
cy.get('#errorContainer').should('not.exist');
typeInEditor(' C --> Test', { bottom: true });
cy.get('#view').should('have.class', 'outOfSync');
cy.get('#errorContainer').should('contain.text', 'Diagram out of sync.');
cy.getLocalStorage('codeStore').snapshot();
});
it('should update diagram when shortcut is used', () => {
cy.contains('Auto sync').click();
cy.get('#view').should('not.have.class', 'outOfSync');
typeInEditor(' C --> Test');
cy.get('#view').should('have.class', 'outOfSync');
cy.get('#errorContainer').should('contain.text', 'Diagram out of sync.');
typeInEditor(`${cmd}{enter}`);
cy.get('#errorContainer').should('not.exist');
cy.get('#view').should('not.have.class', 'outOfSync');
});
it('should show/hide sync button with auto sync', () => {
cy.get('[data-cy=sync]').should('not.exist');
cy.contains('Auto sync').click();
cy.get('[data-cy=sync]').should('exist');
cy.get('#autoSync').check();
cy.get('[data-cy=sync]').should('not.exist');
});
it('should not dim diagram when code is in sync', () => {
cy.contains('Auto sync').click();
cy.get('#view').should('not.have.class', 'outOfSync');
typeInEditor(' C --> Test');
cy.get('#view').should('have.class', 'outOfSync');
cy.get('[data-cy=sync]').click();
cy.get('#view').should('not.have.class', 'outOfSync');
cy.get('#autoSync').check();
typeInEditor('ing');
cy.get('#view').should('not.have.class', 'outOfSync');
cy.getLocalStorage('codeStore').snapshot();
});
it('supports commenting code out/in', () => {
cy.get('#editor').contains('Car').click();
cy.get('#editor').get('textarea').type(`${cmd}/`, { force: true });
cy.get('#view').contains('Car').should('not.exist');
typeInEditor(`{uparrow}${cmd}/`);
cy.get('#view').contains('Car').should('exist');
});
it('supports editing code when code is incorrect', () => {
cy.visit(
'/edit#pako:eNpljjEKwzAMRa8SNOcEnlt6gK5eVFvYJsgOqkwpIXevg9smEE1PnyfxF3DFExgISW-CczQ2D21cYU7a-SGYXRwyvTp9jUhuKlVP-eHy7zA-leQsMEmg_QOM0BLG5FujZVMsaCQmC6ahR5ks2Lw2r84ela4-aREwKpVGwKrl_s7ut3fnkjAIcg_XDzuaUhs'
);
cy.get('#errorContainer').should('not.exist');
typeInEditor(`branch test`, { bottom: true, newline: true });
cy.get('#editor').contains('branch test').should('exist');
cy.get('#errorContainer')
.contains(
'Error: Trying to checkout branch which is not yet created. (Help try using "branch master")'
)
.should('exist');
});
it('should update diagram after entire text is removed', () => {
// https://github.com/mermaid-js/mermaid-live-editor/issues/1102
typeInEditor(`${cmd} a {backspace}`);
typeInEditor('graph LR');
typeInEditor(' {enter} A-->Car');
cy.get('#view').contains('Car').should('exist');
});
});
describe('Pan and Zoom', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/');
});
it('should toggle pan and zoom', () => {
cy.get('#svg-pan-zoom-reset-pan-zoom').should('not.exist');
cy.contains('Pan & Zoom').click();
cy.get('#svg-pan-zoom-reset-pan-zoom').should('exist');
cy.contains('Pan & Zoom').click();
cy.get('#svg-pan-zoom-reset-pan-zoom').should('not.exist');
});
});
+36
View File
@@ -0,0 +1,36 @@
describe('Editor docs tests', () => {
beforeEach(() => {
cy.on('uncaught:exception', () => {
return false;
});
cy.clearLocalStorage();
cy.visit('/edit');
cy.contains('Sample Diagrams').click();
});
it('Test default loading', () => {
cy.get(`[data-cy=docs][href^="https://mermaid-js.github.io/mermaid"]`).should('exist');
});
it('Test to see if the correct URL loads when changing from one diagram to other', () => {
cy.contains('Flow').click();
cy.get(`[data-cy=docs][href$="/syntax/flowchart"]`).should('exist');
cy.contains('Config').click();
cy.get(`[data-cy=docs][href$="/syntax/flowchart?id=configuration"]`).should('exist');
cy.contains('Sequence').click();
cy.get(`[data-cy=docs][href$="/syntax/sequenceDiagram?id=configuration"]`).should('exist');
cy.contains('Code').click();
cy.get(`[data-cy=docs][href$="/syntax/sequenceDiagram"]`).should('exist');
});
it("Test to check URLs for a case where config URL doesn't exist", () => {
cy.contains('State').click();
cy.get(`[data-cy=docs][href$="/syntax/stateDiagram"]`).should('exist');
cy.contains('Config').click();
cy.get(`[data-cy=docs][href$="/syntax/stateDiagram"]`).should('exist');
});
});
+103
View File
@@ -0,0 +1,103 @@
import { typeInEditor, verifyFileSnapshot } from './util';
describe('Save History', () => {
beforeEach(() => {
cy.clock(new Date(2022, 0, 1).getTime());
cy.clearLocalStorage();
cy.visit('/edit');
cy.contains('History').click();
});
afterEach(() => {
cy.clock().invoke('restore');
});
it('should load history from localstorage', () => {
cy.setLocalStorage(
'manualHistoryStore',
'[{"state":{"code":"graph TD\\n A[Halloween] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":false},"time":0,"type":"manual","id":"d7ea820e-21dd-418a-b984-fd58acde09df","name":"hollow-art"},{"state":{"code":"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":true},"time":0,"type":"manual","id":"b749ffc6-522b-4a44-86cf-7c1ffc3146b3","name":"helpful-ocean"}]'
);
cy.setLocalStorage(
'autoHistoryStore',
'[{"state":{"code":"graph TD\\n A[New Year] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":false},"time":0,"type":"auto","id":"69ea820e-522b-4a44-86cf-fd58acde09df","name":"barking-dog"},{"state":{"code":"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":true},"time":0,"type":"manual","id":"x749ffc6-21dd-418a-b984-7c1ffc3146b3","name":"needy-mosquito"}]'
);
cy.reload();
cy.contains('History').click();
cy.get('#historyList').find('li').should('have.length', 2);
cy.get('#historyList').find('No items in History').should('not.exist');
cy.get('#historyList').contains('helpful-ocean');
cy.get('#historyList').contains('hollow-art');
cy.contains('Restore').click();
cy.contains('Halloween');
cy.contains('Timeline').click();
cy.get('#historyList').find('li').should('have.length', 2);
cy.get('#historyList').find('No items in History').should('not.exist');
cy.get('#historyList').contains('needy-mosquito');
cy.get('#historyList').contains('barking-dog');
cy.contains('Restore').click();
cy.contains('New Year');
});
it('should save when clicked', () => {
cy.get('#historyList').find('li').should('have.length', 0);
cy.get('#historyList').contains('No items in History');
cy.get('#saveHistory').click();
cy.get('#historyList').find('No items in History').should('not.exist');
cy.get('#historyList').find('li').should('have.length', 1);
cy.get('#saveHistory').click();
cy.on('window:alert', (str) => {
expect(str).to.equal('State already saved.');
});
cy.on('window:confirm', () => true);
typeInEditor(' C --> HistoryTest');
cy.get('#saveHistory').click();
cy.get('#historyList').find('li').should('have.length', 2);
});
it('should be able to restore and delete', () => {
cy.get('#saveHistory').click();
typeInEditor(' C --> HistoryTest');
cy.get('#historyList').find('No items in History').should('not.exist');
cy.get('#historyList').find('li').should('have.length', 1);
cy.contains('HistoryTest');
cy.contains('Restore').click();
cy.contains('HistoryTest').should('not.exist');
cy.contains('Delete').click();
cy.get('#historyList').find('li').should('have.length', 0);
cy.get('#historyList').contains('No items in History');
cy.get('#saveHistory').click();
typeInEditor(' C --> HistoryTest');
cy.get('#saveHistory').click();
cy.get('#editor').type('ing');
cy.get('#clearHistory').click();
cy.on('window:alert', (str) => {
expect(str).to.equal('Clear all saved items?');
});
cy.on('window:confirm', () => true);
cy.get('#historyList').contains('No items in History');
});
// TODO: Fix #639
xit('should auto save history', () => {
typeInEditor(' C --> HistoryTest');
cy.tick(70_000);
cy.contains('Timeline').click();
cy.get('#historyList').find('li').should('have.length', 1);
cy.get('#editor').type('ing');
cy.tick(70_000);
cy.get('#historyList').find('li').should('have.length', 2);
for (let i = 0; i < 31; i++) {
cy.get('#editor').type('.');
cy.tick(70_000);
}
cy.get('#historyList').find('li').should('have.length', 30);
});
it('should download history', () => {
cy.get('#saveHistory').click();
cy.get(`#downloadHistory`).click();
verifyFileSnapshot('history', 'json', 'A[Christmas] -->|Get money| B(Go shopping)');
});
});
+136
View File
@@ -0,0 +1,136 @@
import { toBase64 } from 'js-base64';
describe('Site Loads', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/');
cy.url().should('include', '/edit#pako');
});
it('Check Home page load', () => {
cy.url().should('include', '/edit');
cy.contains('History').click();
cy.getLocalStorage('codeStore').snapshot();
});
it('should keep code after reload', () => {
cy.get('#editor').contains('Car');
cy.reload();
cy.get('#editor').contains('Car');
});
it('Check Redirect from old URL', () => {
cy.visit(
'/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbiAgICBBW0NocmlzdG1hc10gLS0-fEdldCBtb25leXwgQihHbyBzaG9wcGluZylcbiAgICBCIC0tPiBDe0xldCBtZSB0aGlua31cbiAgICBDIC0tPnxPbmV8IERbTGFwdG9wXVxuICAgIEMgLS0-fFR3b3wgRVtpUGhvbmVdXG4gICAgQyAtLT58VGhyZWV8IEZbZmE6ZmEtY2FyIENhcl0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ'
);
cy.url().should('include', '/edit#pako:eNp');
});
it('should load sample diagrams when clicked', () => {
cy.contains('Sample Diagrams').click();
cy.contains('Pie').click();
cy.contains('pie title Pets adopted by volunteers');
cy.contains('Class').click();
cy.contains('classDiagram');
});
(Cypress.env('CI') === 'true' ? describe : describe.skip)('github', () => {
it('should load diagram from gist', () => {
cy.visit(`/edit?gist=https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a`);
cy.contains('History').click();
cy.contains('Go shopping!!');
cy.contains('Revisions');
cy.contains('sidharthv96 v8f8f1e2');
cy.contains('sidharthv96 v7851e19');
cy.getLocalStorage('codeStore').snapshot();
});
it('should load diagram from gist revision', () => {
cy.visit(
'/edit?gist=https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/ec9b4ab0e41e4ff6287326cd3cb47affd7851e19'
);
cy.contains('History').click();
cy.contains('Party');
cy.contains('Revisions');
cy.contains('sidharthv96 v7851e19');
cy.getLocalStorage('codeStore').snapshot();
});
it('should load diagram from raw files', () => {
cy.visit(
'/edit?code=https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/code.mmd&config=https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/config.json'
);
cy.contains('Party');
cy.getLocalStorage('codeStore').snapshot();
});
});
// Disabled temporarily. Should be enabled after the issue is fixed in Mermaid.
// it('should prevent setting the "securityLevel" option via URL', () => {
// const b64State = toBase64(
// `{"code":"graph TD\\nA[\\"<img src='https://via.placeholder.com/64' width=64 />\\"]","mermaid":"{\\"securityLevel\\": \\"loose\\", \\"theme\\": \\"forest\\"}","autoSync":true,"updateDiagram":true}`,
// true
// );
// cy.on('window:confirm', () => true);
// cy.visit(`/edit#${b64State}`);
// cy.contains('Config').click();
// cy.contains('forest');
// cy.contains('securityLevel').should('not.exist');
// cy.get('#view').find('img').should('not.exist');
// cy.get('#view').contains('<img');
// cy.get('#view').contains(`src='https://via.placeholder.com/64'`);
// });
it.skip('should allow persisting "securityLevel" using confirm dialogue', () => {
const b64State = toBase64(
`{"code":"graph TD\\nA[\\"<img src='https://dummyimage.com/64' width=64/>\\"]","mermaid":"{\\"securityLevel\\": \\"loose\\", \\"theme\\": \\"forest\\"}","autoSync":true,"updateDiagram":true}`,
true
);
cy.on('window:confirm', () => false);
cy.visit(`/edit#${b64State}`);
cy.get('#editor').type(' ');
cy.contains('Config').click();
cy.contains('forest');
cy.contains('securityLevel');
cy.get('#view').find('img').should('be.visible');
});
it('should show troubleshooting steps if loading fails', () => {
cy.visit('/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbiAg');
cy.reload(true);
cy.contains('Please Click here to Raise an issue in github.');
});
});
describe('Verify types of URLs', () => {
it('should load compressed URL', () => {
cy.visit(
'/edit#pako:eNpVkM2KwkAQhF-l6dMK5gVyEDRxvYi7sF6WjIcm0zqDzg_jBJEk725Hd2G3Tw31VVFUj23QjCWeEkUD-1p5kFs2O77BN1M6QFEshg1ncMHzfYDV2ybA1YQYrT_NXvhqgqDqtxPGkI315_ElVU__h-cB6mZLMYd4-Kvsb2GAdWM_jcT_V0xicb03RyqPVLSUoJI-OEfHyZHV0rqfDAqzYccKS3k1pbNC5Ufhuqgp81rbHBJKxuXKc6Quh6-7b7HMqeNfqLYkC7gfanwAlW1ZvQ'
);
cy.contains('New Year');
cy.visit(
'/edit#pako:eNptkU1PwzAMhv9K5BOI9Q9EXBDbJA477YYqITcxndV8QD40weh_Jy1rGR0-OY_tV2_sEyivCSQogzGuGduAtnaixINji0bcf1WVWGfVXdMtx8M1faYm4B8sxR27JLClJd6nwK4VLTlN4bI4jMQd2pLe3C4KFhNNcLQ92jv9ADGLNoTdozc-zIV4ZDsNlud7RtVN7_5Sb_jYrFcN3iN_0pPbEqUZK3QbTP_Ojyv4NdR4bwTHlyMbPcOQ3WJ2CliBpWCRdbnLqFJDOpClGmRJNYauhtr1pS-_6bKMjebkA8hXNJFWgDn5_YdTIFPINDWdb3vu6r8BaWOZRQ'
);
cy.contains('Animal');
});
describe('Uncompressed URLs', () => {
it('should load URL without specifier', () => {
cy.visit(
'/edit/#eyJjb2RlIjoiZ3JhcGhcbiAgICBUZXN0TGFiZWwiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ'
);
cy.contains('TestLabel');
cy.visit(
'/edit#eyJjb2RlIjoiY2xhc3NEaWFncmFtXG4gICAgQW5pbWFsIDx8LS0gRHVja1xuICAgIEFuaW1hbCA8fC0tIEZpc2hcbiAgICBBbmltYWwgPHwtLSBaZWJyYVxuICAgIEFuaW1hbCA6ICtpbnQgYWdlXG4gICAgQW5pbWFsIDogK1N0cmluZyBnZW5kZXJcbiAgICBBbmltYWw6ICtpc01hbW1hbCgpXG4gICAgQW5pbWFsOiArbWF0ZSgpXG4gICAgY2xhc3MgRHVja3tcbiAgICAgICtTdHJpbmcgYmVha0NvbG9yXG4gICAgICArc3dpbSgpXG4gICAgICArcXVhY2soKVxuICAgIH1cbiAgICBjbGFzcyBGaXNoe1xuICAgICAgLWludCBzaXplSW5GZWV0XG4gICAgICAtY2FuRWF0KClcbiAgICB9XG4gICAgY2xhc3MgWmVicmF7XG4gICAgICArYm9vbCBpc193aWxkXG4gICAgICArcnVuKClcbiAgICB9XG4gICAgICAgICAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGFya1wiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ'
);
cy.contains('Animal');
});
it('should load URL with "base64" specifier', () => {
cy.visit(
'/edit/#base64:eyJjb2RlIjoiZ3JhcGhcbiAgICBUZXN0TGFiZWwiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ'
);
cy.contains('TestLabel');
});
});
});
+56
View File
@@ -0,0 +1,56 @@
describe('Test themes', () => {
describe('Test light themes', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit', {
onBeforeLoad(win) {
cy.stub(win, 'matchMedia')
.callThrough()
.withArgs('(prefers-color-scheme: dark)')
.returns({
matches: false
});
}
});
cy.contains('Theme').click();
});
it('should set light theme as default', () => {
cy.contains('light').parent().should('have.class', 'bordered');
cy.contains('dark').parent().should('not.have.class', 'bordered');
cy.getLocalStorage('themeStore').snapshot();
});
it('should change themes when clicked', () => {
cy.contains('light').parent().should('have.class', 'bordered');
cy.contains('cupcake').click();
cy.contains('cupcake').parent().should('have.class', 'bordered');
cy.contains('light').parent().should('not.have.class', 'bordered');
cy.contains('dark').parent().should('not.have.class', 'bordered');
cy.getLocalStorage('themeStore').snapshot();
});
});
describe('Test dark mode', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit', {
onBeforeLoad(win) {
cy.stub(win, 'matchMedia')
.callThrough()
.withArgs('(prefers-color-scheme: dark)')
.returns({
matches: true
});
}
});
cy.contains('Theme').click();
});
it('should set dark theme as default', () => {
cy.contains('light').parent().should('not.have.class', 'bordered');
cy.contains('dark').parent().should('have.class', 'bordered');
cy.getLocalStorage('themeStore').snapshot();
});
});
});
+60
View File
@@ -0,0 +1,60 @@
export const cmd = `{${Cypress.platform === 'darwin' ? 'meta' : 'ctrl'}}`;
interface EditorOptions {
bottom?: boolean;
newline?: boolean;
}
export const typeInEditor = (
text: string,
{ bottom = true, newline = false }: EditorOptions = {}
) => {
cy.window().should('have.property', 'editorLoaded', true);
cy.get('#editor').click();
cy.get('#editor').within(($editor) => {
if (bottom) {
cy.get('textarea').type('{pageDown}', { force: true });
}
if (newline) {
cy.get('textarea').type('{enter}', { force: true });
}
cy.get('textarea').type(text, { force: true });
});
};
const downloadsFolder = Cypress.config('downloadsFolder');
export const verifyFileSizeGreaterThan = (
fileType: 'history' | 'diagram',
extension: string,
size: number
) => {
const fileName = `mermaid-${fileType}-2022-01-01-000000.${extension}`;
const filePath = `${downloadsFolder}/${fileName}`;
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
cy.verifyDownload(fileName);
cy.readFile(filePath, null, {
log: false
}).then((buffer: ArrayBuffer) => {
expect(buffer.byteLength).to.be.gt(size);
expect(buffer.byteLength).to.be.lt(size * 1.3);
});
cy.task('deleteFile', filePath);
};
export const verifyFileSnapshot = (
fileType: 'history' | 'diagram',
extension: string,
content: string
) => {
const fileName = `mermaid-${fileType}-2022-01-01-000000.${extension}`;
const filePath = `${downloadsFolder}/${fileName}`;
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
cy.verifyDownload(fileName);
cy.readFile(filePath, null, {
log: false
}).then((buffer: ArrayBuffer) =>
expect(new TextDecoder('utf8').decode(buffer)).to.contain(content)
);
cy.task('deleteFile', filePath);
};
+3 -3
View File
@@ -1,5 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
-24
View File
@@ -1,24 +0,0 @@
describe('Check actions', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit');
});
it('should update markdown code', () => {
cy.get('#markdown')
.invoke('val')
.then((oldText) => {
cy.get('#editor').click('bottom').type('{enter}C --> HistoryTest');
cy.get('#markdown')
.invoke('val')
.then((newText) => {
expect(oldText).to.not.eq(newText);
});
});
});
it('should load gists from URL', () => {
cy.get('#gist').type('https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a');
cy.contains('Load Gist').click();
cy.contains('Go shopping!!');
});
});
-43
View File
@@ -1,43 +0,0 @@
describe('Auto sync tests', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/');
});
it('should dim diagram when code is edited', () => {
cy.contains('Auto sync').click();
cy.get('#view').should('not.have.class', 'outOfSync');
cy.get('#editor').type(' C --> Test');
cy.get('#view').should('have.class', 'outOfSync');
cy.getLocalStorage('codeStore').snapshot();
});
it('should show/hide sync button with auto sync', () => {
cy.get('[data-cy=sync]').should('not.exist');
cy.contains('Auto sync').click();
cy.get('[data-cy=sync]').should('exist');
cy.get('#autoSync').check();
cy.get('[data-cy=sync]').should('not.exist');
});
it('should not dim diagram when code is in sync', () => {
cy.contains('Auto sync').click();
cy.get('#view').should('not.have.class', 'outOfSync');
cy.get('#editor').type(' C --> Test');
cy.get('#view').should('have.class', 'outOfSync');
cy.get('[data-cy=sync]').click();
cy.get('#view').should('not.have.class', 'outOfSync');
cy.get('#autoSync').check();
cy.get('#editor').type('ing');
cy.get('#view').should('not.have.class', 'outOfSync');
cy.getLocalStorage('codeStore').snapshot();
});
it('supports commenting code out/in', () => {
const cmd = Cypress.platform === 'darwin' ? 'meta' : 'ctrl';
cy.get('#editor').type(`{uparrow}{${cmd}}/`);
cy.get('#view').contains('Car').should('not.exist');
cy.get('#editor').type(`{uparrow}{${cmd}}/`);
cy.get('#view').contains('Car').should('exist');
});
});
-36
View File
@@ -1,36 +0,0 @@
describe('Editor docs tests', () => {
beforeEach(() => {
cy.on('uncaught:exception', () => {
return false;
});
cy.clearLocalStorage();
cy.visit('/edit');
cy.contains('Sample Diagrams').click();
});
it('Test default loading', () => {
cy.get(`[data-cy=docs][href^="https://mermaid-js.github.io/mermaid"]`).should('exist');
});
it('Test to see if the correct URL loads when changing from one diagram to other', () => {
cy.contains('Flow Chart').click();
cy.get(`[data-cy=docs][href$="/#/flowchart"]`).should('exist');
cy.contains('Config').click();
cy.get(`[data-cy=docs][href$="/#/flowchart?id=configuration"]`).should('exist');
cy.contains('Sequence Diagram').click();
cy.get(`[data-cy=docs][href$="/#/sequenceDiagram?id=configuration"]`).should('exist');
cy.contains('Code').click();
cy.get(`[data-cy=docs][href$="/#/sequenceDiagram"]`).should('exist');
});
it("Test to check URLs for a case where config URL doesn't exist", () => {
cy.contains('State Diagram').click();
cy.get(`[data-cy=docs][href$="/#/stateDiagram"]`).should('exist');
cy.contains('Config').click();
cy.get(`[data-cy=docs][href$="/#/stateDiagram"]`).should('exist');
});
});
-65
View File
@@ -1,65 +0,0 @@
describe('Save History', () => {
beforeEach(() => {
cy.clock();
cy.clearLocalStorage();
cy.visit('/edit');
cy.contains('Actions').click();
cy.contains('History').click();
});
it('should save when clicked', () => {
cy.get('#historyList').find('li').should('have.length', 0);
cy.get('#historyList').contains('No items in History');
cy.get('#saveHistory').click();
cy.get('#historyList').find('No items in History').should('not.exist');
cy.get('#historyList').find('li').should('have.length', 1);
cy.get('#saveHistory').click();
cy.on('window:alert', (str) => {
expect(str).to.equal('State already saved.');
});
cy.on('window:confirm', () => true);
cy.get('#editor').type(' C --> HistoryTest');
cy.get('#saveHistory').click();
cy.get('#historyList').find('li').should('have.length', 2);
});
it('should be able to restore and delete', () => {
cy.get('#saveHistory').click();
cy.get('#editor').type(' C --> HistoryTest');
cy.get('#historyList').find('No items in History').should('not.exist');
cy.get('#historyList').find('li').should('have.length', 1);
cy.contains('HistoryTest');
cy.contains('Restore').click();
cy.contains('HistoryTest').should('not.exist');
cy.contains('Delete').click();
cy.get('#historyList').find('li').should('have.length', 0);
cy.get('#historyList').contains('No items in History');
cy.get('#saveHistory').click();
cy.get('#editor').type(' C --> HistoryTest');
cy.get('#saveHistory').click();
cy.get('#editor').type('ing');
cy.get('#clearHistory').click();
cy.on('window:alert', (str) => {
expect(str).to.equal('Clear all saved items?');
});
cy.on('window:confirm', () => true);
cy.get('#historyList').contains('No items in History');
});
// TODO: Fix #639
// eslint-disable-next-line mocha/no-skipped-tests
xit('should auto save history', () => {
cy.get('#editor').type(' C --> HistoryTest');
cy.tick(70000);
cy.contains('Timeline').click();
cy.get('#historyList').find('li').should('have.length', 1);
cy.get('#editor').type('ing');
cy.tick(70000);
cy.get('#historyList').find('li').should('have.length', 2);
for (let i = 0; i < 31; i++) {
cy.get('#editor').type('.');
cy.tick(70000);
}
cy.get('#historyList').find('li').should('have.length', 30);
});
});
-123
View File
@@ -1,123 +0,0 @@
import { toBase64 } from 'js-base64';
describe('Site Loads', () => {
beforeEach(() => {
cy.clearLocalStorage();
});
it('Check Home page load', () => {
cy.visit('/');
cy.url().should('include', '/edit');
cy.contains('History').click();
cy.getLocalStorage('codeStore').snapshot();
});
it('Check Redirect from old URL', () => {
cy.visit(
'/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbiAgICBBW0NocmlzdG1hc10gLS0-fEdldCBtb25leXwgQihHbyBzaG9wcGluZylcbiAgICBCIC0tPiBDe0xldCBtZSB0aGlua31cbiAgICBDIC0tPnxPbmV8IERbTGFwdG9wXVxuICAgIEMgLS0-fFR3b3wgRVtpUGhvbmVdXG4gICAgQyAtLT58VGhyZWV8IEZbZmE6ZmEtY2FyIENhcl0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ'
);
cy.url().should(
'include',
'/edit#pako:eNpVkM1qw0AMhF9F6NRC_AI-FBo7zSXQQHLz-iC8cnZJ9oe1TAm2373rmkKrk9B8MwyasAuascRbomjgWisPed6byiQ7iKOhhaJ4m48s4ILn5wz7l2OAwYQYrb-9bvx-haCaTivGIMb6-7JJ1Y__0_MMdXOiKCG2f5XrV5jh0NizyfH_FZM4uz6ansqeio4SVJRa3KHj5MjqXHtaDQrFsGOFZV419zQ-RKHyS0bHqEn4oK2EhDnmMfAOaZRwefoOS0kj_0K1pfwFtx2XbzAdW4g'
);
cy.contains('History').click();
cy.getLocalStorage('codeStore').snapshot();
});
it('should load sample diagrams when clicked', () => {
cy.contains('Sample Diagrams').click();
cy.contains('Pie Chart').click();
cy.contains('pie title Pets adopted by volunteers');
cy.contains('Class Diagram').click();
cy.contains('classDiagram');
});
it('should load diagram from gist', () => {
cy.visit(`/edit?gist=https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a`);
cy.contains('History').click();
cy.contains('Go shopping!!');
cy.contains('Revisions');
cy.contains('sidharthv96 v8f8f1e2');
cy.contains('sidharthv96 v7851e19');
cy.getLocalStorage('codeStore').snapshot();
});
it('should load diagram from gist revision', () => {
cy.visit(
'/edit?gist=https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/ec9b4ab0e41e4ff6287326cd3cb47affd7851e19'
);
cy.contains('History').click();
cy.contains('Party');
cy.contains('Revisions');
cy.contains('sidharthv96 v7851e19');
cy.getLocalStorage('codeStore').snapshot();
});
it('should load diagram from raw files', () => {
cy.visit(
'/edit?code=https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/code.mmd&config=https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/config.json'
);
cy.contains('Party');
cy.getLocalStorage('codeStore').snapshot();
});
// Disabled temporarily. Should be enabled after the issue is fixed in Mermaid.
// it('should prevent setting the "securityLevel" option via URL', () => {
// const b64State = toBase64(
// `{"code":"graph TD\\nA[\\"<img src='https://via.placeholder.com/64' width=64 />\\"]","mermaid":"{\\"securityLevel\\": \\"loose\\", \\"theme\\": \\"forest\\"}","updateEditor":true,"autoSync":true,"updateDiagram":true}`,
// true
// );
// cy.on('window:confirm', () => true);
// cy.visit(`/edit#${b64State}`);
// cy.contains('Config').click();
// cy.contains('forest');
// cy.contains('securityLevel').should('not.exist');
// cy.get('#view').find('img').should('not.exist');
// cy.get('#view').contains('<img');
// cy.get('#view').contains(`src='https://via.placeholder.com/64'`);
// });
it('should allow persisting "securityLevel" using confirm dialogue', () => {
const b64State = toBase64(
`{"code":"graph TD\\nA[\\"<img src='https://via.placeholder.com/64' width=64/>\\"]","mermaid":"{\\"securityLevel\\": \\"loose\\", \\"theme\\": \\"forest\\"}","updateEditor":true,"autoSync":true,"updateDiagram":true}`,
true
);
cy.on('window:confirm', () => false);
cy.visit(`/edit#${b64State}`);
cy.contains('Config').click();
cy.contains('forest');
cy.contains('securityLevel');
cy.get('#view').find('img').should('be.visible');
});
it('should show troubleshooting steps if loading fails', () => {
cy.visit('/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbiAg');
cy.contains('Please Click here to Raise an issue in github.');
});
it('should load uncompressed URL', () => {
cy.visit(
'/edit/#eyJjb2RlIjoiZ3JhcGggVERcbiAgICBBW05ldyBZZWFyXSAtLT58R2V0IG1vbmV5fCBCKEdvIHNob3BwaW5nKVxuICAgIEIgLS0-IEN7TGV0IG1lIHRoaW5rfVxuICAgIEMgLS0-fE9uZXwgRFtMYXB0b3BdXG4gICAgQyAtLT58VHdvfCBFW2lQaG9uZV1cbiAgICBDIC0tPnxUaHJlZXwgRltmYTpmYS1jYXIgQ2FyXSIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9'
);
cy.contains('New Year');
cy.visit(
'/edit#eyJjb2RlIjoiY2xhc3NEaWFncmFtXG4gICAgQW5pbWFsIDx8LS0gRHVja1xuICAgIEFuaW1hbCA8fC0tIEZpc2hcbiAgICBBbmltYWwgPHwtLSBaZWJyYVxuICAgIEFuaW1hbCA6ICtpbnQgYWdlXG4gICAgQW5pbWFsIDogK1N0cmluZyBnZW5kZXJcbiAgICBBbmltYWw6ICtpc01hbW1hbCgpXG4gICAgQW5pbWFsOiArbWF0ZSgpXG4gICAgY2xhc3MgRHVja3tcbiAgICAgICtTdHJpbmcgYmVha0NvbG9yXG4gICAgICArc3dpbSgpXG4gICAgICArcXVhY2soKVxuICAgIH1cbiAgICBjbGFzcyBGaXNoe1xuICAgICAgLWludCBzaXplSW5GZWV0XG4gICAgICAtY2FuRWF0KClcbiAgICB9XG4gICAgY2xhc3MgWmVicmF7XG4gICAgICArYm9vbCBpc193aWxkXG4gICAgICArcnVuKClcbiAgICB9XG4gICAgICAgICAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGFya1wiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ'
);
cy.contains('Animal');
cy.visit(
'/edit/#base64:eyJjb2RlIjoiZ3JhcGggVERcbiAgICBBW05ldyBZZWFyXSAtLT58R2V0IG1vbmV5fCBCKEdvIHNob3BwaW5nKVxuICAgIEIgLS0-IEN7TGV0IG1lIHRoaW5rfVxuICAgIEMgLS0-fE9uZXwgRFtMYXB0b3BdXG4gICAgQyAtLT58VHdvfCBFW2lQaG9uZV1cbiAgICBDIC0tPnxUaHJlZXwgRltmYTpmYS1jYXIgQ2FyXSIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9'
);
cy.contains('New Year');
});
it('should load compressed URL', () => {
cy.visit(
'/edit#pako:eNpVkM2KwkAQhF-l6dMK5gVyEDRxvYi7sF6WjIcm0zqDzg_jBJEk725Hd2G3Tw31VVFUj23QjCWeEkUD-1p5kFs2O77BN1M6QFEshg1ncMHzfYDV2ybA1YQYrT_NXvhqgqDqtxPGkI315_ElVU__h-cB6mZLMYd4-Kvsb2GAdWM_jcT_V0xicb03RyqPVLSUoJI-OEfHyZHV0rqfDAqzYccKS3k1pbNC5Ufhuqgp81rbHBJKxuXKc6Quh6-7b7HMqeNfqLYkC7gfanwAlW1ZvQ'
);
cy.contains('New Year');
cy.visit(
'/edit#pako:eNptkU1PwzAMhv9K5BOI9Q9EXBDbJA477YYqITcxndV8QD40weh_Jy1rGR0-OY_tV2_sEyivCSQogzGuGduAtnaixINji0bcf1WVWGfVXdMtx8M1faYm4B8sxR27JLClJd6nwK4VLTlN4bI4jMQd2pLe3C4KFhNNcLQ92jv9ADGLNoTdozc-zIV4ZDsNlud7RtVN7_5Sb_jYrFcN3iN_0pPbEqUZK3QbTP_Ojyv4NdR4bwTHlyMbPcOQ3WJ2CliBpWCRdbnLqFJDOpClGmRJNYauhtr1pS-_6bKMjebkA8hXNJFWgDn5_YdTIFPINDWdb3vu6r8BaWOZRQ'
);
cy.reload();
cy.contains('Animal');
});
});
-57
View File
@@ -1,57 +0,0 @@
describe('Test themes', () => {
describe('Test light themes', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit', {
onBeforeLoad(win) {
cy.stub(win, 'matchMedia')
.callThrough()
.withArgs('(prefers-color-scheme: dark)')
.returns({
matches: false
});
}
});
cy.contains('Change Theme').click();
});
it('should set light theme as default', () => {
cy.contains('light').parent().should('have.class', 'bordered');
cy.contains('dark').parent().should('not.have.class', 'bordered');
cy.getLocalStorage('themeStore').snapshot();
});
it('should change themes when clicked', () => {
cy.contains('light').parent().should('have.class', 'bordered');
cy.contains('cupcake').click();
cy.contains('cupcake').parent().should('have.class', 'bordered');
cy.contains('light').parent().should('not.have.class', 'bordered');
cy.contains('dark').parent().should('not.have.class', 'bordered');
cy.getLocalStorage('themeStore').snapshot();
});
});
describe('Test dark mode', () => {
// eslint-disable-next-line mocha/no-hooks-for-single-case
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit', {
onBeforeLoad(win) {
cy.stub(win, 'matchMedia')
.callThrough()
.withArgs('(prefers-color-scheme: dark)')
.returns({
matches: true
});
}
});
cy.contains('Change Theme').click();
});
it('should set dark theme as default', () => {
cy.contains('light').parent().should('not.have.class', 'bordered');
cy.contains('dark').parent().should('have.class', 'bordered');
cy.getLocalStorage('themeStore').snapshot();
});
});
});
-31
View File
@@ -1,31 +0,0 @@
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
/**
* @type {Cypress.PluginConfig}
*/
// eslint-disable-next-line no-unused-vars
import * as fs from 'fs';
module.exports = (on, config) => {
on('task', {
readFileMaybe(filename) {
if (fs.existsSync(filename)) {
return fs.readFileSync(filename, 'utf8');
}
return null;
}
});
};
+8 -8
View File
@@ -1,28 +1,28 @@
module.exports = {
"Site Loads": {
"Check Home page load": {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":true,\"autoSync\":true,\"updateDiagram\":true}"
"1": "{\"code\":\"flowchart TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"autoSync\":true,\"updateDiagram\":true}"
},
"Check Redirect from old URL": {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":true}"
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"autoSync\":true,\"updateDiagram\":true}"
},
"should load diagram from gist": {
"1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping!!)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello world\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"gist\",\"config\":{\"url\":\"https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a\"}}}"
"1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping!!)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello world\\\"\\n}\",\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"gist\",\"config\":{\"url\":\"https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a\"}}}"
},
"should load diagram from gist revision": {
"1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"gist\",\"config\":{\"url\":\"https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/ec9b4ab0e41e4ff6287326cd3cb47affd7851e19\"}}}"
"1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello\\\"\\n}\",\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"gist\",\"config\":{\"url\":\"https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/ec9b4ab0e41e4ff6287326cd3cb47affd7851e19\"}}}"
},
"should load diagram from raw files": {
"1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping!!)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello world\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"files\",\"config\":{\"codeURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/code.mmd\",\"configURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/config.json\"}}}"
"1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping!!)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello world\\\"\\n}\",\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"files\",\"config\":{\"codeURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/code.mmd\",\"configURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/config.json\"}}}"
}
},
"__version": "9.5.1",
"__version": "12.17.4",
"Auto sync tests": {
"should dim diagram when code is edited": {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Test\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":false,\"updateDiagram\":false}"
"1": "{\"code\":\"flowchart TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Test\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"autoSync\":false,\"updateDiagram\":false}"
},
"should not dim diagram when code is in sync": {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Testing\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":false}"
"1": "{\"code\":\"flowchart TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Testing\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"autoSync\":true,\"updateDiagram\":false}"
}
},
"Test themes": {
+6 -6
View File
@@ -27,12 +27,12 @@ import { register } from '@cypress/snapshot';
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
register();
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
snapshot(): void;
}
}
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
snapshot(): void;
}
}
}
import 'cypress-localstorage-commands';
@@ -15,13 +15,14 @@
// Import commands.js using ES2015 syntax:
import './commands';
require('cy-verify-downloads').addCustomCommand();
// Alternatively you can use CommonJS syntax:
// require('./commands')
Cypress.on('uncaught:exception', (err) => {
/* returning false here prevents Cypress from failing the test */
if (err.message.includes('ResizeObserver loop limit exceeded')) {
return false;
}
/* returning false here prevents Cypress from failing the test */
if (err.message.includes('ResizeObserver loop limit exceeded')) {
return false;
}
});
+5 -5
View File
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"allowJs": true,
"types": ["cypress", "cypress-localstorage-commands"]
},
"include": ["**/*.ts"]
"compilerOptions": {
"allowJs": true,
"types": ["cypress", "cypress-localstorage-commands", "cy-verify-downloads", "node"]
},
"include": ["**/*.ts"]
}
+1 -1
View File
@@ -7,5 +7,5 @@ services:
volumes:
- ./src:/app/src
ports:
- 8080:8080
- 3000:3000
- 24678:24678
+1 -1
View File
@@ -1,5 +1,5 @@
server {
listen 80;
listen 8080;
server_name mermaid;
location / {
root /usr/share/nginx/html;
+94 -74
View File
@@ -1,76 +1,96 @@
{
"name": "mermaid-live-editor",
"version": "2.0.67",
"scripts": {
"dev": "svelte-kit dev --host 0.0.0.0",
"build": "svelte-kit build",
"preview": "svelte-kit preview",
"lint": "prettier --check --plugin-search-dir=. .;eslint --ignore-path .gitignore .",
"lint:fix": "prettier --write --plugin-search-dir=. .;eslint --fix --ignore-path .gitignore .",
"format": "prettier --write --plugin-search-dir=. .",
"pre-commit": "lint-staged",
"postinstall": "husky install",
"test": "cypress run",
"cy": "cypress open"
},
"devDependencies": {
"@cypress/snapshot": "^2.1.7",
"@sveltejs/adapter-static": "1.0.0-next.29",
"@sveltejs/kit": "1.0.0-next.303",
"@types/mermaid": "^8.2.9",
"@types/pako": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"autoprefixer": "^10.4.4",
"chai": "^4.3.6",
"cssnano": "^5.1.5",
"cypress": "9.5.2",
"cypress-localstorage-commands": "^1.7.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-es": "^4.1.0",
"eslint-plugin-mocha": "^10.0.3",
"eslint-plugin-postcss-modules": "^2.0.0",
"eslint-plugin-svelte3": "^3.4.1",
"eslint-plugin-tailwindcss": "^3.5.0",
"husky": "^7.0.4",
"lint-staged": "^12.3.7",
"mocha": "^9.2.2",
"node-html-parser": "^5.3.3",
"postcss": "^8.4.12",
"postcss-load-config": "^3.1.3",
"prettier": "~2.6.1",
"prettier-plugin-svelte": "^2.6.0",
"svelte": "^3.46.4",
"svelte-preprocess": "^4.10.4",
"tailwindcss": "^3.0.21",
"tslib": "^2.3.1",
"typescript": "^4.6.3"
},
"type": "module",
"dependencies": {
"@analytics/google-analytics": "^0.5.3",
"@macfja/svelte-persistent-store": "^1.3.0",
"analytics": "^0.8.1",
"daisyui": "2.13.0",
"js-base64": "^3.7.2",
"mermaid": "8.14.0",
"moment": "^2.29.1",
"monaco-editor": "^0.33.0",
"monaco-mermaid": "^1.0.3",
"pako": "2.0.4",
"random-word-slugs": "^0.1.6"
},
"lint-staged": {
"*.{ts,svelte,js,css,md,json}": [
"prettier --plugin-search-dir=. --write",
"eslint --ignore-path .gitignore "
]
},
"volta": {
"node": "14.16.1",
"yarn": "1.22.10",
"npm": "7.11.2"
}
"name": "mermaid-live-editor",
"version": "2.0.67",
"type": "module",
"license": "MIT",
"scripts": {
"dev": "vite dev",
"dev:force": "MERMAID_LOCAL=true yarn dev --force",
"dev:test": "yarn dev",
"build": "vite build",
"preview": "vite preview",
"lint": "prettier --check --cache --plugin-search-dir=. .;eslint --ignore-path .gitignore .",
"lint:fix": "prettier --write --cache --plugin-search-dir=. .;eslint --fix --ignore-path .gitignore .",
"format": "prettier --write --cache --plugin-search-dir=. .",
"pre-commit": "lint-staged",
"postinstall": "husky install && svelte-kit sync && (git config blame.ignoreRevsFile .git-blame-ignore-revs || true)",
"test:unit": "vitest",
"test:ui": "vitest --ui",
"test:coverage": "vitest run --coverage",
"test:browser": "cypress run",
"test": "test:unit && test:browser",
"cy": "cypress open"
},
"devDependencies": {
"@cypress/snapshot": "2.1.7",
"@sveltejs/adapter-static": "2.0.3",
"@sveltejs/kit": "1.25.0",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/svelte": "3.2.2",
"@types/pako": "2.0.0",
"@types/uuid": "9.0.4",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@vitest/ui": "^0.34.0",
"autoprefixer": "^10.4.14",
"c8": "7.14.0",
"chai": "^4.3.7",
"cssnano": "^6.0.0",
"cy-verify-downloads": "0.2.0",
"cypress": "12.17.4",
"cypress-localstorage-commands": "2.2.4",
"eslint": "8.49.0",
"eslint-config-prettier": "8.10.0",
"eslint-plugin-cypress": "2.14.0",
"eslint-plugin-es": "4.1.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-postcss-modules": "2.0.0",
"eslint-plugin-svelte3": "4.0.0",
"eslint-plugin-tailwindcss": "3.13.0",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-vitest": "^0.3.0",
"esserializer": "1.3.11",
"font-awesome": "^4.7.0",
"husky": "^8.0.3",
"jsdom": "21.1.2",
"lint-staged": "13.3.0",
"node-html-parser": "^6.1.5",
"postcss": "^8.4.21",
"postcss-load-config": "4.0.1",
"prettier": "2.8.8",
"prettier-plugin-svelte": "^2.10.0",
"svelte": "3.59.2",
"svelte-preprocess": "5.0.4",
"tailwindcss": "^3.3.1",
"tslib": "^2.5.0",
"typescript": "5.2.2",
"vite": "^4.3.9",
"vitest": "^0.34.0"
},
"dependencies": {
"analytics": "0.8.9",
"analytics-plugin-plausible": "0.0.6",
"daisyui": "2.52.0",
"dayjs": "^1.11.7",
"js-base64": "3.7.5",
"mermaid": "10.5.0",
"monaco-editor": "0.43.0",
"pako": "2.1.0",
"random-word-slugs": "0.1.7",
"svg-pan-zoom": "3.6.1",
"uuid": "9.0.1"
},
"lint-staged": {
"*.{ts,svelte,js,css,md,json}": [
"prettier --plugin-search-dir=. --write",
"eslint --ignore-path .gitignore "
]
},
"volta": {
"node": "18.17.1",
"yarn": "1.22.19"
},
"engines": {
"node": ">=16.7"
}
}
+10 -10
View File
@@ -6,18 +6,18 @@ const mode = process.env.NODE_ENV;
const dev = mode === 'development';
module.exports = {
plugins: [
// Some plugins, like postcss-nested, need to run before Tailwind
plugins: [
// Some plugins, like postcss-nested, need to run before Tailwind
tailwindcss,
tailwindcss,
// But others, like autoprefixer, need to run after
// But others, like autoprefixer, need to run after
autoprefixer,
autoprefixer,
!dev &&
cssnano({
preset: 'default'
})
]
!dev &&
cssnano({
preset: 'default'
})
]
};
+26 -26
View File
@@ -1,28 +1,28 @@
{
"extends": [
"config:base",
":rebaseStalePrs",
"group:allNonMajor",
"schedule:earlyMondays",
":automergeMinor",
":automergeTesters",
":automergeLinters",
":automergeTypes",
":automergePatch"
],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
},
{
"matchDatasources": ["npm"],
"stabilityDays": 3
}
],
"dependencyDashboard": true,
"major": {
"dependencyDashboardApproval": true
},
"dependencyDashboardAutoclose": true
"extends": [
"config:base",
":rebaseStalePrs",
"group:allNonMajor",
"schedule:earlyMondays",
":automergeMinor",
":automergeTesters",
":automergeLinters",
":automergeTypes",
":automergePatch"
],
"packageRules": [
{
"matchPackagePatterns": ["^mermaid"],
"groupName": "Mermaid packages"
},
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
}
],
"dependencyDashboard": true,
"major": {
"dependencyDashboardApproval": true
},
"dependencyDashboardAutoclose": true
}
View File
+26 -44
View File
@@ -1,47 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Online FlowChart &amp; Diagrams Editor - Mermaid Live Editor</title>
<meta
name="og:image"
content="https://github.com/mermaid-js/mermaid/raw/develop/img/header.png" />
<link rel="canonical" href="https://mermaid.live" />
<meta
name="description"
content="Simplify documentation and avoid heavy tools. Open source Visio Alternative. Commonly used for explaining your code! Mermaid is a simple markdown-like script language for generating charts from text via javascript." />
<link rel="icon" type="image/png" href="%svelte.assets%/favicon.png" />
<link rel="manifest" href="%svelte.assets%/manifest.json" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.33.0/min/vs/editor/editor.main.min.css"
crossorigin="anonymous"
referrerpolicy="no-referrer" />
<script>
var require = {
paths: { vs: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.33.0/min/vs' }
};
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.33.0/min/vs/loader.min.js"
crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.33.0/min/vs/editor/editor.main.nls.min.js"
crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.33.0/min/vs/editor/editor.main.js"
crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
%svelte.head%
</head>
<body>
<div id="svelte">%svelte.body%</div>
</body>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Online FlowChart &amp; Diagrams Editor - Mermaid Live Editor</title>
<meta
name="og:image"
content="https://github.com/mermaid-js/mermaid/raw/develop/img/header.png" />
<link rel="canonical" href="https://mermaid.live" />
<meta
name="description"
content="Simplify documentation and avoid heavy tools. Open source Visio Alternative. Commonly used for explaining your code! Mermaid is a simple markdown-like script language for generating charts from text via javascript." />
<link rel="icon" type="image/png" href="%sveltekit.assets%/favicon.svg" />
<link rel="mask-icon" href="%sveltekit.assets%/favicon.svg" color="#000000" />
<meta name="theme-color" content="#6366F1" />
<link rel="manifest" href="%sveltekit.assets%/manifest.json" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA=="
crossorigin="anonymous"
referrerpolicy="no-referrer" />
%sveltekit.head%
</head>
<body>
<div id="svelte">%sveltekit.body%</div>
</body>
</html>
+2 -2
View File
@@ -3,8 +3,8 @@
@tailwind utilities;
.input {
@apply flex-1 border-primary border-solid border-2 rounded;
@apply flex-1 border-primary border-solid border-2 rounded;
}
.action-btn {
@apply btn btn-primary;
@apply btn btn-primary;
}
+14
View File
@@ -0,0 +1,14 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly MERMAID_RENDERER_URL?: string;
readonly MERMAID_KROKI_RENDERER_URL?: string;
readonly MERMAID_CDN_URL?: string;
readonly MERMAID_BASE_URL?: string;
readonly MERMAID_LOCAL?: boolean;
// more env variables...
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}
+15
View File
@@ -1 +1,16 @@
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable @typescript-eslint/no-unused-vars */
/// <reference types="@sveltejs/kit" />
import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers';
declare global {
namespace jest {
interface Matchers<R = void>
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// eslint-disable-next-line no-undef
extends TestingLibraryMatchers<typeof expect.stringContaining, R> {}
}
}
+6
View File
@@ -0,0 +1,6 @@
import type { Handle } from '@sveltejs/kit';
export const handle: Handle = async ({ event, resolve }) => {
const response = await resolve(event, {});
return response;
};
-9
View File
@@ -1,9 +0,0 @@
import type { Handle } from '@sveltejs/kit/types/hooks';
export const handle: Handle = async ({ event, resolve }) => {
const response = await resolve(event, {
ssr: false
});
return response;
};
+265
View File
@@ -0,0 +1,265 @@
<script lang="ts">
import { browser } from '$app/environment';
import Card from '$lib/components/Card/Card.svelte';
import { env } from '$lib/util/env';
import { pakoSerde } from '$lib/util/serde';
import { stateStore } from '$lib/util/state';
import { logEvent } from '$lib/util/stats';
import { toBase64 } from 'js-base64';
import dayjs from 'dayjs';
const { krokiRendererUrl, rendererUrl } = env;
type Exporter = (context: CanvasRenderingContext2D, image: HTMLImageElement) => () => void;
const getFileName = (ext: string) =>
`mermaid-diagram-${dayjs().format('YYYY-MM-DD-HHmmss')}.${ext}`;
const getBase64SVG = (svg?: HTMLElement, width?: number, height?: number): string => {
height && svg?.setAttribute('height', `${height}px`);
width && svg?.setAttribute('width', `${width}px`); // Workaround https://stackoverflow.com/questions/28690643/firefox-error-rendering-an-svg-image-to-html5-canvas-with-drawimage
if (!svg) {
svg = getSvgEl();
}
const svgString = svg.outerHTML
.replaceAll('<br>', '<br/>')
.replaceAll(/<img([^>]*)>/g, (m, g: string) => `<img ${g} />`);
return toBase64(svgString);
};
const exportImage = (event: Event, exporter: Exporter) => {
const canvas: HTMLCanvasElement = document.createElement('canvas');
const svg: HTMLElement | null = document.querySelector('#container svg');
if (!svg) {
throw new Error('svg not found');
}
const box: DOMRect = svg.getBoundingClientRect();
canvas.width = box.width;
canvas.height = box.height;
if (imagemodeselected === 'width') {
const ratio = box.height / box.width;
canvas.width = userimagesize;
canvas.height = userimagesize * ratio;
} else if (imagemodeselected === 'height') {
const ratio = box.width / box.height;
canvas.width = userimagesize * ratio;
canvas.height = userimagesize;
}
const context = canvas.getContext('2d');
if (!context) {
throw new Error('context not found');
}
context.fillStyle = 'white';
context.fillRect(0, 0, canvas.width, canvas.height);
const image = new Image();
image.onload = exporter(context, image);
image.src = `data:image/svg+xml;base64,${getBase64SVG(svg, canvas.width, canvas.height)}`;
event.stopPropagation();
event.preventDefault();
};
const getSvgEl = () => {
const svgEl: HTMLElement = document
.querySelector('#container svg')!
.cloneNode(true) as HTMLElement;
svgEl.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
const fontAwesomeCdnUrl = Array.from(document.head.getElementsByTagName('link'))
.map((l) => l.href)
.find((h) => h.includes('font-awesome'));
if (fontAwesomeCdnUrl == null) {
return svgEl;
}
const styleEl = document.createElement('style');
styleEl.innerText = `@import url("${fontAwesomeCdnUrl}");'`;
svgEl.prepend(styleEl);
return svgEl;
};
const simulateDownload = (download: string, href: string): void => {
const a = document.createElement('a');
a.download = download;
a.href = href;
a.click();
a.remove();
};
const downloadImage: Exporter = (context, image) => {
return () => {
const { canvas } = context;
context.drawImage(image, 0, 0, canvas.width, canvas.height);
simulateDownload(
getFileName('png'),
canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream')
);
};
};
const isClipboardAvailable = (): boolean => {
return Object.prototype.hasOwnProperty.call(window, 'ClipboardItem') as boolean;
};
const clipboardCopy: Exporter = (context, image) => {
return () => {
const { canvas } = context;
context.drawImage(image, 0, 0, canvas.width, canvas.height);
canvas.toBlob((blob) => {
try {
if (!blob) {
throw new Error('blob is empty');
}
void navigator.clipboard.write([
new ClipboardItem({
[blob.type]: blob
})
]);
} catch (error) {
console.error(error);
}
});
};
};
const onCopyClipboard = (event: Event) => {
exportImage(event, clipboardCopy);
logEvent('copyClipboard');
};
const onDownloadPNG = (event: Event) => {
exportImage(event, downloadImage);
logEvent('download', {
type: 'png'
});
};
const onDownloadSVG = () => {
simulateDownload(getFileName('svg'), `data:image/svg+xml;base64,${getBase64SVG()}`);
logEvent('download', {
type: 'svg'
});
};
const onCopyMarkdown = () => {
(document.getElementById('markdown') as HTMLInputElement).select();
document.execCommand('Copy');
logEvent('copyMarkdown');
};
let gistURL = '';
stateStore.subscribe(({ loader }) => {
if (loader?.type === 'gist') {
// @ts-expect-error Gist will have url
gistURL = loader.config.url;
}
});
const loadGist = () => {
if (!gistURL) {
alert('Please enter a Gist URL first');
}
window.location.href = `${window.location.pathname}?gist=${gistURL}`;
logEvent('loadGist');
};
let iUrl: string;
let svgUrl: string;
let krokiUrl: string;
let mdCode: string;
let imagemodeselected = 'auto';
let userimagesize = 1080;
let isNetlify = false;
if (browser && ['mermaid.live', 'netlify'].some((path) => window.location.host.includes(path))) {
isNetlify = true;
}
stateStore.subscribe(({ code, serialized }) => {
iUrl = `${rendererUrl}/img/${serialized}?type=png`;
svgUrl = `${rendererUrl}/svg/${serialized}`;
krokiUrl = `${krokiRendererUrl}/mermaid/svg/${pakoSerde.serialize(code)}`;
mdCode = `[![](${iUrl})](${window.location.protocol}//${window.location.host}${window.location.pathname}#${serialized})`;
});
</script>
<Card title="Actions" isOpen={false}>
<div class="flex flex-wrap gap-2 m-2">
{#if isClipboardAvailable()}
<button class="action-btn w-full" on:click={onCopyClipboard}
><i class="far fa-copy mr-2" /> Copy Image to clipboard
</button>
{/if}
<button id="downloadPNG" class="action-btn flex-grow" on:click={onDownloadPNG}>
<i class="fas fa-download mr-2" /> PNG
</button>
<button id="downloadSVG" class="action-btn flex-grow" on:click={onDownloadSVG}>
<i class="fas fa-download mr-2" /> SVG
</button>
<a target="_blank" rel="noreferrer" class="flex-grow" href={iUrl}>
<button class="action-btn w-full">
<i class="fas fa-external-link-alt mr-2" /> PNG
</button>
</a>
<a target="_blank" rel="noreferrer" class="flex-grow" href={svgUrl}>
<button class="action-btn w-full">
<i class="fas fa-external-link-alt mr-2" /> SVG
</button>
</a>
<a target="_blank" rel="noreferrer" class="flex-grow" href={krokiUrl}>
<button class="action-btn w-full">
<i class="fas fa-external-link-alt mr-2" /> Kroki
</button>
</a>
<div class="flex gap-2 items-center">
PNG size
<label for="autosize">
<input type="radio" value="auto" id="autosize" bind:group={imagemodeselected} /> Auto
</label>
<label for="width">
<input type="radio" value="width" id="width" bind:group={imagemodeselected} /> Width
</label>
<label for="height">
<input type="radio" value="height" id="height" bind:group={imagemodeselected} /> Height
</label>
{#if imagemodeselected !== 'auto'}
<input
id="height"
class="input"
type="number"
min="3"
max="10000"
bind:value={userimagesize} />
{/if}
</div>
<div class="w-full flex gap-2 items-center">
<input class="input" id="markdown" type="text" value={mdCode} on:click={onCopyMarkdown} />
<label for="markdown">
<button class="btn btn-primary btn-md flex-auto" on:click={onCopyMarkdown}>
Copy Markdown
</button>
</label>
</div>
<div class="w-full flex gap-2 items-center">
<input
class="input"
id="gist"
type="text"
bind:value={gistURL}
placeholder="Enter Gist URL" />
<label for="gist">
<button class="btn btn-primary btn-md flex-auto" on:click={loadGist}> Load Gist </button>
</label>
</div>
{#if isNetlify}
<div class="w-full flex items-center justify-center">
<a class="link underline text-gray-500 text-sm" href="https://netlify.com">
This site is powered by Netlify
</a>
</div>
{/if}
</div>
</Card>
+31
View File
@@ -0,0 +1,31 @@
<script lang="ts">
import type { Tab } from '$lib/types';
import { slide } from 'svelte/transition';
import Tabs from './Tabs.svelte';
export let isCloseable = true;
export let isOpen = true;
export let tabs: Tab[] = [];
export let activeTabID = '';
export let title: string;
$: isOpen = isCloseable ? isOpen : true;
$: isTabsShown = isOpen && tabs.length > 0;
</script>
<div class="card rounded overflow-hidden m-2 flex-grow flex flex-col shadow-2xl">
<div
class="bg-primary p-2 {isTabsShown ? 'pb-0' : ''} flex-none cursor-pointer"
on:click={() => (isOpen = !isOpen)}
on:keypress={() => (isOpen = !isOpen)}>
<div class="flex justify-between">
<Tabs on:select {tabs} bind:isOpen {title} {isCloseable} {activeTabID} />
<div class="flex gap-x-4 items-center {isTabsShown ? '-mt-2' : ''}">
<slot name="actions" />
</div>
</div>
</div>
{#if isOpen}
<div class="card-body p-0 flex-grow overflow-auto text-base-content" transition:slide>
<slot />
</div>
{/if}
</div>
+52
View File
@@ -0,0 +1,52 @@
<script lang="ts">
import type { Tab, TabEvents } from '$lib/types';
import { createEventDispatcher } from 'svelte';
import { fade } from 'svelte/transition';
export let isCloseable = true;
export let tabs: Tab[];
export let title: string;
export let isOpen = false;
export let activeTabID: string;
if (!activeTabID && tabs.length > 0) {
activeTabID = tabs[0].id;
}
const dispatch = createEventDispatcher<TabEvents>();
const toggleTabs = (tab: Tab) => {
activeTabID = tab.id;
dispatch('select', tab);
};
</script>
<div class="flex cursor-default">
<span
class="mr-2 font-semibold"
on:click|stopPropagation={() => (isOpen = !isOpen)}
on:keypress|stopPropagation={() => (isOpen = !isOpen)}>
{#if isCloseable}
<i class="fas fa-chevron-right icon" class:isOpen />
{/if}
{title}</span>
{#if isOpen && tabs}
<ul class="tabs" transition:fade>
{#each tabs as tab}
<div
class="tab tab-lifted {activeTabID === tab.id ? 'tab-active' : 'text-primary-content'}"
on:click|stopPropagation={() => toggleTabs(tab)}
on:keypress|stopPropagation={() => toggleTabs(tab)}>
<i class="mr-1 {tab.icon}" />
{tab.title}
</div>
{/each}
</ul>
{/if}
</div>
<style>
.icon {
transition-duration: 0.5s;
}
.isOpen {
transform: rotate(90deg);
}
</style>
+23
View File
@@ -0,0 +1,23 @@
import { cleanup, render } from '@testing-library/svelte';
import { describe, expect, it, afterEach } from 'vitest';
import Card from './Card.svelte';
describe('card.svelte', () => {
// TODO: @testing-library/svelte claims to add this automatically but it doesn't work without explicit afterEach
afterEach(() => cleanup());
it('mounts', () => {
const { container } = render(Card, {
title: 'TabTest',
tabs: [
{ id: 't1', title: 'title1', icon: 'fab fa-git-alt' },
{ id: 't2', title: 'title2', icon: 'far fa-bookmark' }
]
});
expect(container).toBeTruthy();
expect(container).toHaveTextContent('TabTest');
expect(container).toHaveTextContent('title1');
expect(container).toHaveTextContent('title2');
expect(container).not.toHaveTextContent('title3');
});
});
+128
View File
@@ -0,0 +1,128 @@
<script lang="ts">
import type { EditorMode } from '$lib/types';
import { stateStore, updateCode, updateConfig } from '$lib/util/state';
import { themeStore } from '$lib/util/theme';
import { errorDebug, syncDiagram } from '$lib/util/util';
import * as monaco from 'monaco-editor';
import monacoJsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker';
import monacoEditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
import { onMount } from 'svelte';
import { initEditor } from '$lib/util/monacoExtra';
import { logEvent } from '$lib/util/stats';
let divEl: HTMLDivElement | undefined = undefined;
let editor: monaco.editor.IStandaloneCodeEditor | undefined;
let editorOptions: monaco.editor.IStandaloneEditorConstructionOptions = {
minimap: {
enabled: false
},
theme: 'mermaid',
overviewRulerLanes: 0
};
let text = '';
stateStore.subscribe(({ errorMarkers, editorMode, code, mermaid }) => {
// console.log('editor store subscription', { code, mermaid });
if (!editor) {
return;
}
// Update editor text if it's different
const newText = editorMode === 'code' ? code : mermaid;
if (newText !== text) {
// console.log('updating editor text', newText);
editor.setScrollTop(0);
editor.setValue(newText);
text = newText;
}
// Update editor mode if it's different
const language = editorMode === 'code' ? 'mermaid' : 'json';
const model = editor.getModel();
if (!model) {
console.error("editor model doesn't exist");
return;
}
if (model.getLanguageId() !== language) {
monaco.editor.setModelLanguage(model, language);
}
// Display/clear errors
monaco.editor.setModelMarkers(model, 'mermaid', errorMarkers);
});
themeStore.subscribe(({ isDark }) => {
editor && monaco.editor.setTheme(isDark ? 'mermaid-dark' : 'mermaid');
});
const handleUpdate = (text: string, mode: EditorMode) => {
// console.log('editor HandleUpdate', { text, mode });
if (mode === 'code') {
updateCode(text);
} else {
updateConfig(text);
}
};
onMount(async () => {
self.MonacoEnvironment = {
getWorker(_, label) {
if (label === 'json') {
return new monacoJsonWorker();
}
return new monacoEditorWorker();
}
};
if (!divEl) {
throw new Error('divEl is undefined');
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
initEditor(monaco);
errorDebug(100);
editor = monaco.editor.create(divEl, editorOptions);
editor.onDidChangeModelContent(({ isFlush, changes }) => {
const newText = editor?.getValue();
// console.log('editor onDidChangeModelContent', { text, newText, isFlush, changes });
if (!newText || text === newText || isFlush) {
return;
}
text = newText;
handleUpdate(text, $stateStore.editorMode);
});
editor.addAction({
id: 'mermaid-render-diagram',
label: 'Render Diagram',
keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter],
run: function () {
syncDiagram();
logEvent('renderDiagram', {
method: 'keyboardShortcut'
});
}
});
monaco.editor.setTheme($themeStore.isDark ? 'mermaid-dark' : 'mermaid');
const resizeObserver = new ResizeObserver((entries) => {
editor?.layout({
height: entries[0].contentRect.height,
width: entries[0].contentRect.width
});
});
if (divEl.parentElement) {
resizeObserver.observe(divEl.parentElement);
}
// @ts-ignore
if (window.Cypress) {
// @ts-ignore
window.editorLoaded = true;
}
return () => {
// console.log(`editor disposed`);
editor?.dispose();
};
});
</script>
<div bind:this={divEl} id="editor" class="overflow-hidden" />
+194
View File
@@ -0,0 +1,194 @@
<script lang="ts">
import Card from '$lib/components/Card/Card.svelte';
import { inputStateStore, getStateString } from '$lib/util/state';
import {
addHistoryEntry,
historyModeStore,
clearHistoryData,
getPreviousState,
historyStore,
loaderHistoryStore,
restoreHistory
} from './history';
import { notify, prompt } from '$lib/util/notify';
import { onMount } from 'svelte';
import { get } from 'svelte/store';
import dayjs from 'dayjs';
import dayjsRelativeTime from 'dayjs/plugin/relativeTime';
import type { HistoryEntry, HistoryType, State, Tab } from '$lib/types';
import { logEvent } from '$lib/util/stats';
dayjs.extend(dayjsRelativeTime);
const HISTORY_SAVE_INTERVAL = 60000;
const tabSelectHandler = (message: CustomEvent<Tab>) => {
historyModeStore.set(message.detail.id as HistoryType);
};
let tabs: Tab[] = [
{
id: 'manual',
title: 'Saved',
icon: 'far fa-bookmark'
},
{
id: 'auto',
title: 'Timeline',
icon: 'fas fa-history'
}
];
const downloadHistory = () => {
const data = get(historyStore);
const blob = new Blob([JSON.stringify(data)], { type: 'application/json' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = `mermaid-history-${dayjs().format('YYYY-MM-DD-HHmmss')}.json`;
a.click();
URL.revokeObjectURL(url);
logEvent('history', {
action: 'download'
});
};
const uploadHistory = () => {
const input = document.createElement('input');
input.type = 'file';
input.accept = 'application/json';
input.addEventListener('change', ({ target }: Event) => {
const file = (<HTMLInputElement>target).files[0];
if (!file) {
return;
}
const reader = new FileReader();
reader.onload = (e) => {
const data: HistoryEntry[] = JSON.parse(e.target.result as string);
restoreHistory(data);
};
reader.readAsText(file);
});
input.click();
};
const saveHistory = (auto = false) => {
const currentState: string = getStateString();
const previousState: string = getPreviousState(auto);
if (previousState !== currentState) {
addHistoryEntry({
state: $inputStateStore,
time: Date.now(),
type: auto ? 'auto' : 'manual'
});
} else if (!auto) {
notify('State already saved.');
}
};
const clearHistory = (id?: string): void => {
if (!id && !prompt('Clear all saved items?')) {
return;
}
clearHistoryData(id);
};
const restoreHistoryItem = (state: State): void => {
inputStateStore.set({ ...state, updateDiagram: true });
};
const relativeTime = (time: number) => {
const t = new Date(time);
return `${new Date(t).toLocaleString()} (${dayjs(t).fromNow()})`;
};
onMount(() => {
historyModeStore.set('manual');
setInterval(() => {
saveHistory(true);
}, HISTORY_SAVE_INTERVAL);
});
loaderHistoryStore.subscribe((entries) => {
if (entries.length > 0 && tabs.length === 2) {
tabs = [
{
id: 'loader',
title: 'Revisions',
icon: 'fab fa-git-alt'
},
...tabs
];
historyModeStore.set('loader');
}
});
let isOpen = false;
</script>
<Card on:select={tabSelectHandler} bind:isOpen {tabs} title="History">
<div slot="actions">
<button
id="uploadHistory"
class="btn btn-xs btn-secondary w-12"
on:click|stopPropagation={() => uploadHistory()}
title="Upload history"><i class="fa fa-upload" /></button>
{#if $historyStore.length > 0}
<button
id="downloadHistory"
class="btn btn-xs btn-secondary w-12"
on:click|stopPropagation={() => downloadHistory()}
title="Download history"><i class="fa fa-download" /></button>
{/if}
|
<button
id="saveHistory"
class="btn btn-xs btn-success w-12"
on:click|stopPropagation={() => saveHistory()}
title="Save current state"><i class="far fa-save" /></button>
{#if $historyModeStore !== 'loader'}
<button
id="clearHistory"
class="btn btn-xs btn-error w-12"
on:click|stopPropagation={() => clearHistory()}
title="Delete all saved states"><i class="fas fa-trash-alt" /></button>
{/if}
</div>
<ul class="p-2 space-y-2 overflow-auto h-56" id="historyList">
{#if $historyStore.length > 0}
{#each $historyStore as { id, state, time, name, url, type }}
<li class="rounded p-2 shadow flex-col">
<div class="flex">
<div class="flex-1">
<div class="flex flex-col text-base-content">
{#if url}
<a
href={url}
target="_blank"
title="Open revision in new tab"
class="hover:underline text-blue-500">{name}</a>
{:else}
<span>{name}</span>
{/if}
<span class="text-gray-400 text-sm">{relativeTime(time)}</span>
</div>
</div>
<div class="flex gap-2 content-center">
<button class="btn btn-success" on:click={() => restoreHistoryItem(state)}
><i class="fas fa-undo mr-1" />Restore</button>
{#if type !== 'loader'}
<button class="btn btn-error" on:click={() => clearHistory(id)}
><i class="fas fa-trash-alt mr-1" />Delete</button>
{/if}
</div>
</div>
</li>
{/each}
{:else}
<div class="m-2">
No items in History<br />
Click the Save button to save current state and restore it later.<br />
Timeline will automatically be saved every minute.
</div>
{/if}
</ul>
</Card>
+127
View File
@@ -0,0 +1,127 @@
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
import type { HistoryEntry } from '$lib/types';
import { describe, it, expect } from 'vitest';
import {
addHistoryEntry,
injectHistoryIDs,
clearHistoryData,
historyModeStore,
historyStore
} from './history';
import { defaultState } from '$lib/util/state';
import { get } from 'svelte/store';
describe('history', () => {
it('should handle saving individual history entry', () => {
expect(window.localStorage.getItem('manualHistoryStore')).toBe('[]');
expect(window.localStorage.getItem('autoHistoryStore')).toBe('[]');
addHistoryEntry({
state: defaultState,
time: 12_345,
type: 'manual'
});
const [manualEntry] = JSON.parse(
window.localStorage.getItem('manualHistoryStore') ?? '[]'
) as HistoryEntry[];
expect(manualEntry.time).toBe(12_345);
expect(manualEntry.type).toBe('manual');
expect(manualEntry.name).not.toBeNull();
expect(manualEntry.state).not.toBeNull();
addHistoryEntry({
state: defaultState,
time: 54_321,
type: 'auto'
});
const [autoEntry] = JSON.parse(
window.localStorage.getItem('autoHistoryStore') ?? '[]'
) as HistoryEntry[];
expect(autoEntry.time).toBe(54_321);
expect(autoEntry.type).toBe('auto');
expect(autoEntry.name).not.toBeNull();
expect(autoEntry.state).not.toBeNull();
historyModeStore.set('manual');
clearHistoryData();
historyModeStore.set('auto');
clearHistoryData();
expect(window.localStorage.getItem('manualHistoryStore')).toBe('[]');
expect(window.localStorage.getItem('autoHistoryStore')).toBe('[]');
});
it('should clear history entries', () => {
addHistoryEntry({
state: defaultState,
time: 12_345,
type: 'manual'
});
addHistoryEntry({
state: { ...defaultState, code: 'graph TD\\n A[Christmas] -->|Get money| B(Go shopping)' },
time: 123_456,
type: 'manual'
});
historyModeStore.set('manual');
const store: HistoryEntry[] = get(historyStore);
expect(store.length).toBe(2);
clearHistoryData(store[1].id);
expect(get(historyStore).length).toBe(1);
clearHistoryData();
expect(get(historyStore).length).toBe(0);
historyModeStore.set('auto');
addHistoryEntry({
state: defaultState,
time: 54_321,
type: 'auto'
});
addHistoryEntry({
state: { ...defaultState, code: 'graph TD\\n A[Christmas] -->|Get money| B(Go shopping)' },
time: 654_321,
type: 'auto'
});
expect(get(historyStore).length).toBe(2);
clearHistoryData();
expect(get(historyStore).length).toBe(0);
// Test calling when history is empty
clearHistoryData();
expect(get(historyStore).length).toBe(0);
});
});
describe('history migration', () => {
it('should inject history IDs as migration', () => {
window.localStorage.setItem(
'manualHistoryStore',
'[{"state":{"code":"graph TD\\n A[Halloween] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":false},"time":0,"type":"manual","name":"hollow-art"},{"state":{"code":"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":true},"time":0,"type":"manual","name":"helpful-ocean"}]'
);
window.localStorage.setItem(
'autoHistoryStore',
'[{"state":{"code":"graph TD\\n A[New Year] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":false},"time":0,"type":"auto","name":"barking-dog"},{"state":{"code":"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":true},"time":0,"type":"manual","name":"needy-mosquito"}]'
);
let manualHistoryStore = JSON.parse(
window.localStorage.getItem('manualHistoryStore') ?? '[]'
) as HistoryEntry[];
let autoHistoryStore = JSON.parse(
window.localStorage.getItem('autoHistoryStore') ?? '[]'
) as HistoryEntry[];
expect(manualHistoryStore.every(({ id }) => id !== undefined)).toBe(false);
expect(autoHistoryStore.every(({ id }) => id !== undefined)).toBe(false);
injectHistoryIDs();
manualHistoryStore = JSON.parse(
window.localStorage.getItem('manualHistoryStore') ?? '[]'
) as HistoryEntry[];
autoHistoryStore = JSON.parse(
window.localStorage.getItem('autoHistoryStore') ?? '[]'
) as HistoryEntry[];
expect(manualHistoryStore.every(({ id }) => id !== undefined)).toBe(true);
expect(autoHistoryStore.every(({ id }) => id !== undefined)).toBe(true);
});
});
+152
View File
@@ -0,0 +1,152 @@
import { derived, writable, get } from 'svelte/store';
import type { Readable, Writable } from 'svelte/store';
import { persist, localStorage } from '$lib/util/persist';
import { generateSlug } from 'random-word-slugs';
import type { HistoryEntry, HistoryType, Optional } from '$lib/types';
import { v4 as uuidV4 } from 'uuid';
import { logEvent } from '$lib/util/stats';
const MAX_AUTO_HISTORY_LENGTH = 30;
export const historyModeStore: Writable<HistoryType> = persist(
writable('manual'),
localStorage(),
'autoHistoryMode'
);
const autoHistoryStore: Writable<HistoryEntry[]> = persist(
writable([]),
localStorage(),
'autoHistoryStore'
);
const manualHistoryStore: Writable<HistoryEntry[]> = persist(
writable([]),
localStorage(),
'manualHistoryStore'
);
export const loaderHistoryStore: Writable<HistoryEntry[]> = writable([]);
export const historyStore: Readable<HistoryEntry[]> = derived(
[historyModeStore, autoHistoryStore, manualHistoryStore, loaderHistoryStore],
([historyMode, autoHistories, manualHistories, loadedHistories], set) => {
switch (historyMode) {
case 'auto': {
set(autoHistories);
break;
}
case 'manual': {
set(manualHistories);
break;
}
case 'loader': {
set(loadedHistories);
break;
}
default: {
set(autoHistories);
}
}
}
);
export const addHistoryEntry = (entryToAdd: Optional<HistoryEntry, 'id'>): void => {
const entry: HistoryEntry = {
...entryToAdd,
id: uuidV4()
};
if (entry.type === 'loader') {
loaderHistoryStore.update((entries) => [entry, ...entries]);
return;
}
if (!entry.name) {
entry.name = generateSlug(2);
}
if (entry.type === 'auto') {
autoHistoryStore.update((entries) => {
if (entries.length >= MAX_AUTO_HISTORY_LENGTH) {
entries = entries.slice(0, MAX_AUTO_HISTORY_LENGTH - 1);
}
return [entry, ...entries];
});
}
manualHistoryStore.update((entries) => [entry, ...entries]);
logEvent('history', { action: 'save' });
};
export const clearHistoryData = (idToClear?: string): void => {
(get(historyModeStore) === 'auto' ? autoHistoryStore : manualHistoryStore).update((entries) => {
if (get(historyModeStore) !== 'loader') {
entries = entries.filter(({ id }) => idToClear && id != idToClear);
logEvent('history', { action: 'clear', type: idToClear ? 'single' : 'all' });
}
return entries;
});
};
export const getPreviousState = (auto: boolean): string => {
const entries = get(auto ? autoHistoryStore : manualHistoryStore);
if (entries.length > 0) {
return JSON.stringify(entries[0].state);
}
return '';
};
export const restoreHistory = (data: HistoryEntry[]) => {
const entries = data.filter((element) => validateEntry(element));
const invalidEntryCount = data.length - entries.length;
if (invalidEntryCount > 0) {
console.error(`${invalidEntryCount} invalid history entries were removed.`);
console.error(data);
}
if (entries.length > 0) {
let entryCount = 0;
(entries[0].type === 'auto' ? autoHistoryStore : manualHistoryStore).update((existing) => {
const existingIDs = new Set(existing.map(({ id }) => id));
const newEntries = entries.filter(({ id }) => !existingIDs.has(id));
entryCount = newEntries.length;
const combined = [...existing, ...newEntries];
combined.sort((a, b) => b.time - a.time);
return combined;
});
alert(
`${entryCount} entries restored. ${invalidEntryCount} invalid, ${
entries.length - entryCount
} duplicates.`
);
logEvent('history', {
action: 'restore',
success: entryCount,
invalid: invalidEntryCount,
duplicates: entries.length - entryCount
});
} else {
alert('No valid entries found.');
}
};
const setIDs = (entries: HistoryEntry[]) => {
for (const entry of entries) {
if (!entry.id) {
entry.id = uuidV4();
}
}
return entries;
};
export const injectHistoryIDs = (): void => {
autoHistoryStore.update(setIDs);
manualHistoryStore.update(setIDs);
};
const validateEntry = (entry: HistoryEntry): boolean => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
return entry.type && entry.state && entry.time && true;
};
+96
View File
@@ -0,0 +1,96 @@
<script context="module" lang="ts">
import { version } from 'mermaid/package.json';
import { analytics } from '$lib/util/stats';
void analytics?.track('version', {
mermaidVersion: version
});
</script>
<script lang="ts">
import Theme from './Theme.svelte';
interface Link {
href: string;
title?: string;
icon?: string;
img?: string;
}
const links: Link[] = [
{
title: 'Documentation',
href: 'https://mermaid.js.org/intro/n00b-gettingStarted.html'
},
{
title: 'Tutorial',
href: 'https://mermaid.js.org/config/Tutorials.html'
},
{
title: 'Mermaid',
href: 'https://github.com/mermaid-js/mermaid'
},
{
title: 'CLI',
href: 'https://github.com/mermaid-js/mermaid-cli'
},
{
href: 'https://github.com/mermaid-js/mermaid-live-editor',
icon: 'fab fa-github fa-lg'
},
{
href: 'https://mermaidchart.com',
img: '/mermaidchart-logo.svg'
}
];
</script>
<div class="navbar shadow-lg bg-primary p-0">
<div class="flex-1 px-2 mx-2">
<span class="text-lg font-bold">
<a href="/">Mermaid<span class="text-xs font-thin">v{version}</span> Live Editor</a>
</span>
</div>
<label for="menu-toggle" class="pointer-cursor lg:hidden block"
><svg
class="fill-current"
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
viewBox="0 0 20 20"
><title>Menu</title><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" /></svg
></label>
<input class="hidden" type="checkbox" id="menu-toggle" />
<Theme />
<div class="hidden lg:flex lg:items-center lg:w-auto w-full" id="menu">
<ul class="lg:flex items-center justify-between text-base pt-4 lg:pt-0">
{#each links as { title, href, icon, img }}
<li>
<a class="btn btn-ghost" target="_blank" {href}>
{#if icon}
<i class={icon} />
{:else if img}
<img src={img} alt={title} />
{/if}
{#if title}
{title}
{/if}
</a>
</li>
{/each}
</ul>
</div>
</div>
<style>
#menu-toggle:checked + #menu {
display: block;
}
.navbar {
z-index: 10000;
}
img {
width: 1.5rem;
height: 1.5rem;
}
</style>
+160
View File
@@ -0,0 +1,160 @@
<script lang="ts">
import { updateCode } from '$lib/util/state';
import Card from '$lib/components/Card/Card.svelte';
import { logEvent } from '$lib/util/stats';
const samples = {
Flow: `flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]`,
Sequence: `sequenceDiagram
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
John-->>-Alice: I feel great!`,
Class: `classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}`,
State: `stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]`,
Gantt: `gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d
another task : 24d`,
Pie: `pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15`,
ER: `erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"`,
'User Journey': `journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 3: Me`,
Git: `gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
commit`,
Mindmap: `mindmap
root((mindmap))
Origins
Long history
::icon(fa fa-book)
Popularisation
British popular psychology author Tony Buzan
Research
On effectivness<br/>and features
On Automatic creation
Uses
Creative techniques
Strategic planning
Argument mapping
Tools
Pen and paper
Mermaid`,
QuadrantChart: `quadrantChart
title Reach and engagement of campaigns
x-axis Low Reach --> High Reach
y-axis Low Engagement --> High Engagement
quadrant-1 We should expand
quadrant-2 Need to promote
quadrant-3 Re-evaluate
quadrant-4 May be improved
Campaign A: [0.3, 0.6]
Campaign B: [0.45, 0.23]
Campaign C: [0.57, 0.69]
Campaign D: [0.78, 0.34]
Campaign E: [0.40, 0.34]
Campaign F: [0.35, 0.78]`
};
type SampleTypes = keyof typeof samples;
const loadSampleDiagram = (diagramType: SampleTypes): void => {
updateCode(samples[diagramType], {
updateDiagram: true,
resetPanZoom: true
});
logEvent('loadSampleDiagram', { diagramType });
};
// Adding in this array will add an icon to the preset menu
const newDiagrams: SampleTypes[] = ['Mindmap', 'QuadrantChart'];
const diagramOrder: SampleTypes[] = [
'Sequence',
'Flow',
'Class',
'State',
'ER',
'Gantt',
'User Journey',
'Git',
'Pie',
'Mindmap',
'QuadrantChart'
];
</script>
<Card title="Sample Diagrams" isOpen={false}>
<div class="flex flex-wrap p-2 gap-2">
{#each diagramOrder as sample}
<button
class="btn btn-sm btn-primary w-28 normal-case flex-grow"
on:click={() => loadSampleDiagram(sample)}>
{sample}
{#if newDiagrams.includes(sample)}
<span class="ml-2 fa fa-heart" />
{/if}
</button>
{/each}
</div>
</Card>
+64
View File
@@ -0,0 +1,64 @@
<script lang="ts">
import { setTheme, themeStore } from '$lib/util/theme';
const themes = [
'🌝 light',
'🌚 dark',
'🧁 cupcake',
'🐝 bumblebee',
'✳️ emerald',
'🏢 corporate',
'🌃 synthwave',
'👴 retro',
'🤖 cyberpunk',
'🌸 valentine',
'🎃 halloween',
'🌷 garden',
'🌲 forest',
'🐟 aqua',
'👓 lofi',
'🖍 pastel',
'🧚‍♀️ fantasy',
'📝 wireframe',
'🏴 black',
'💎 luxury',
'🧛‍♂️ dracula'
];
</script>
<div class="hidden lg:block dropdown">
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div tabindex="0" class="btn btn-ghost">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="inline-block w-6 h-6 stroke-current md:mr-2"
><path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01" /></svg>
<span class="hidden md:inline">Theme</span>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1792 1792"
class="inline-block w-4 h-4 ml-1 fill-current"
><path
d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z" /></svg>
</div>
<div
class="mt-14 overflow-y-auto shadow-2xl top-px dropdown-content h-96 w-56 bg-base-200 text-base-content">
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<ul tabindex="0" class="p-4 menu compact">
{#each themes as theme}
<li class:bordered={$themeStore.theme !== undefined && theme.includes($themeStore.theme)}>
<span
class="btn btn-ghost justify-start"
on:click={() => setTheme(theme)}
on:keypress={() => setTheme(theme)}>{theme}</span>
</li>
{/each}
</ul>
</div>
</div>
+164
View File
@@ -0,0 +1,164 @@
<script lang="ts">
import { inputStateStore, stateStore, updateCodeStore } from '$lib/util/state';
import { onMount } from 'svelte';
import panzoom from 'svg-pan-zoom';
import type { State, ValidatedState } from '$lib/types';
import { logEvent } from '$lib/util/stats';
import { cmdKey } from '$lib/util/util';
import { render as renderDiagram } from '$lib/util/mermaid';
import type { MermaidConfig } from 'mermaid';
let code = '';
let config = '';
let container: HTMLDivElement;
let view: HTMLDivElement;
let error = false;
let outOfSync = false;
let hide = false;
let manualUpdate = true;
let panZoomEnabled = $stateStore.panZoom;
let pzoom: typeof panzoom | undefined;
const handlePanZoomChange = () => {
if (!pzoom) {
return;
}
const pan = pzoom.getPan();
const zoom = pzoom.getZoom();
updateCodeStore({ pan, zoom });
logEvent('panZoom');
};
const handlePanZoom = (state: State) => {
if (!state.panZoom) {
return;
}
hide = true;
pzoom?.destroy();
pzoom = undefined;
void Promise.resolve().then(() => {
const graphDiv = document.getElementById('graph-div');
if (!graphDiv) {
return;
}
pzoom = panzoom(graphDiv, {
onPan: handlePanZoomChange,
onZoom: handlePanZoomChange,
controlIconsEnabled: true,
fit: true,
center: true
});
const { pan, zoom } = state;
if (pan !== undefined && zoom !== undefined && Number.isFinite(zoom)) {
pzoom.zoom(zoom);
pzoom.pan(pan);
}
hide = false;
});
};
const handleStateChange = async (state: ValidatedState) => {
if (state.error !== undefined) {
error = true;
return;
}
error = false;
try {
if (container && state && (state.updateDiagram || state.autoSync)) {
if (!state.autoSync) {
$inputStateStore.updateDiagram = false;
}
outOfSync = false;
manualUpdate = true;
// Do not render if there is no change in Code/Config/PanZoom
if (code === state.code && config === state.mermaid && panZoomEnabled === state.panZoom) {
return;
}
code = state.code;
config = state.mermaid;
panZoomEnabled = state.panZoom;
const scroll = view.parentElement!.scrollTop;
delete container.dataset.processed;
const { svg, bindFunctions } = await renderDiagram(
Object.assign({}, JSON.parse(state.mermaid)) as MermaidConfig,
code,
'graph-div'
);
if (svg.length > 0) {
handlePanZoom(state);
container.innerHTML = svg;
console.log({ svg });
const graphDiv = document.getElementById('graph-div');
if (!graphDiv) {
throw new Error('graph-div not found');
}
graphDiv.setAttribute('height', '100%');
graphDiv.style.maxWidth = '100%';
if (bindFunctions) {
bindFunctions(graphDiv);
}
}
view.parentElement!.scrollTop = scroll;
error = false;
} else if (manualUpdate) {
manualUpdate = false;
} else if (code !== state.code || config !== state.mermaid) {
outOfSync = true;
}
} catch (e) {
console.error('view fail', e);
error = true;
}
};
onMount(() => {
stateStore.subscribe((state) => {
void handleStateChange(state);
});
window.addEventListener('resize', () => {
if ($stateStore.panZoom && pzoom) {
pzoom.resize();
}
});
});
</script>
{#if (error && $stateStore.error instanceof Error) || outOfSync}
<div
class="absolute w-full p-2 z-10 font-mono {error
? 'text-red-600'
: 'text-yellow-600'} bg-base-100 bg-opacity-80 text-left"
id="errorContainer">
{#if error}
{@html $stateStore.error?.toString().replace(/\n/g, '<br />')}
{:else}
Diagram out of sync. <br />
Press <i class="fas fa-sync" /> (Sync button) or <kbd>{cmdKey} + Enter</kbd> to sync.
{/if}
</div>
{/if}
<div id="view" bind:this={view} class="p-2 h-full" class:error class:outOfSync>
<div id="container" bind:this={container} class="h-full overflow-auto" class:hide />
</div>
<style>
#view {
flex: 1;
}
#container {
transition: visibility 0.3s;
}
.error,
.outOfSync {
opacity: 0.5;
}
.hide {
visibility: hidden;
}
</style>
-226
View File
@@ -1,226 +0,0 @@
<script lang="ts">
import { browser } from '$app/env';
import Card from '$lib/components/card/card.svelte';
import { krokiRendererUrl, rendererUrl } from '$lib/util/env';
import { pakoSerde } from '$lib/util/serde';
import { serializedState, codeStore } from '$lib/util/state';
import { toBase64 } from 'js-base64';
import moment from 'moment';
type Exporter = (context: CanvasRenderingContext2D, image: HTMLImageElement) => () => void;
const getBase64SVG = (svg?: HTMLElement, width?: number, height?: number): string => {
svg?.setAttribute('height', `${height}px`);
svg?.setAttribute('width', `${width}px`); // Workaround https://stackoverflow.com/questions/28690643/firefox-error-rendering-an-svg-image-to-html5-canvas-with-drawimage
if (!svg) {
svg = document.querySelector('#container svg');
}
const svgString = svg.outerHTML
.replaceAll('<br>', '<br/>')
.replaceAll(/<img([^>]*)>/g, (m, g: string) => `<img ${g} />`);
return toBase64(svgString);
};
const exportImage = (event: Event, exporter: Exporter) => {
const canvas: HTMLCanvasElement = document.createElement('canvas');
const svg: HTMLElement = document.querySelector('#container svg');
const box: DOMRect = svg.getBoundingClientRect();
canvas.width = box.width;
canvas.height = box.height;
if (imagemodeselected === 'width') {
const ratio = box.height / box.width;
canvas.width = userimagesize;
canvas.height = userimagesize * ratio;
} else if (imagemodeselected === 'height') {
const ratio = box.width / box.height;
canvas.width = userimagesize * ratio;
canvas.height = userimagesize;
}
const context = canvas.getContext('2d');
context.fillStyle = 'white';
context.fillRect(0, 0, canvas.width, canvas.height);
const image = new Image();
image.onload = exporter(context, image);
image.src = `data:image/svg+xml;base64,${getBase64SVG(svg, canvas.width, canvas.height)}`;
event.stopPropagation();
event.preventDefault();
};
const simulateDownload = (download: string, href: string): void => {
const a = document.createElement('a');
a.download = download;
a.href = href;
a.click();
a.remove();
};
const downloadImage: Exporter = (context, image) => {
return () => {
const { canvas } = context;
context.drawImage(image, 0, 0, canvas.width, canvas.height);
simulateDownload(
`mermaid-diagram-${moment().format('YYYYMMDDHHmmss')}.png`,
canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream')
);
};
};
const isClipboardAvailable = (): boolean => {
return Object.prototype.hasOwnProperty.call(window, 'ClipboardItem') as boolean;
};
const clipboardCopy: Exporter = (context, image) => {
return () => {
const { canvas } = context;
context.drawImage(image, 0, 0, canvas.width, canvas.height);
canvas.toBlob((blob) => {
try {
// @ts-ignore: https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1004/files
void navigator.clipboard.write([
/* eslint-disable no-undef */
// @ts-ignore: https://github.com/microsoft/TypeScript/issues/43821
new ClipboardItem({
[blob.type]: blob
})
]);
} catch (error) {
console.error(error);
}
});
};
};
const onCopyClipboard = (event: Event) => {
exportImage(event, clipboardCopy);
};
const onDownloadPNG = (event: Event) => {
exportImage(event, downloadImage);
};
const onDownloadSVG = () => {
simulateDownload(
`mermaid-diagram-${moment().format('YYYYMMDDHHmmss')}.svg`,
`data:image/svg+xml;base64,${getBase64SVG()}`
);
};
const onCopyMarkdown = () => {
(document.getElementById('markdown') as HTMLInputElement).select();
document.execCommand('Copy');
};
let gistURL = '';
codeStore.subscribe((state) => {
if (state.loader?.type === 'gist') {
// @ts-ignore Gist will have url
gistURL = state.loader.config.url;
}
});
const loadGist = () => {
if (!gistURL) {
alert('Please enter a Gist URL first');
}
window.location.href = `${window.location.pathname}?gist=${gistURL}`;
};
let iUrl: string;
let svgUrl: string;
let krokiUrl: string;
let mdCode: string;
let imagemodeselected = 'auto';
let userimagesize = 1080;
let isNetlify = false;
if (browser && ['mermaid.live', 'netlify'].some((path) => window.location.host.includes(path))) {
isNetlify = true;
}
serializedState.subscribe((encodedState: string) => {
iUrl = `${rendererUrl}/img/${encodedState}`;
svgUrl = `${rendererUrl}/svg/${encodedState}`;
krokiUrl = `${krokiRendererUrl}/mermaid/svg/${pakoSerde.serialize($codeStore.code)}`;
mdCode = `[![](${iUrl})](${window.location.protocol}//${window.location.host}${window.location.pathname}#${encodedState})`;
});
</script>
<Card title="Actions" isOpen={true}>
<div class="flex flex-wrap gap-2 m-2">
{#if isClipboardAvailable()}
<button class="action-btn w-full" on:click={onCopyClipboard}
><i class="far fa-copy mr-2" /> Copy Image to clipboard
</button>
{/if}
<button class="action-btn flex-auto" on:click={onDownloadPNG}>
<i class="fas fa-download mr-2" /> PNG
</button>
<button class="action-btn flex-auto" on:click={onDownloadSVG}>
<i class="fas fa-download mr-2" /> SVG
</button>
<button class="action-btn flex-auto">
<a target="_blank" href={iUrl}><i class="fas fa-external-link-alt mr-2" /> PNG</a>
</button>
<button class="action-btn flex-auto">
<a target="_blank" href={svgUrl}><i class="fas fa-external-link-alt mr-2" /> SVG</a>
</button>
<button class="action-btn flex-auto">
<a target="_blank" href={krokiUrl}><i class="fas fa-external-link-alt mr-2" /> Kroki</a>
</button>
<div class="flex gap-2 items-center">
PNG size
<label for="autosize">
<input type="radio" value="auto" id="autosize" bind:group={imagemodeselected} /> Auto
</label>
<label for="width">
<input type="radio" value="width" id="width" bind:group={imagemodeselected} /> Width
</label>
<label for="height">
<input type="radio" value="height" id="height" bind:group={imagemodeselected} /> Height
</label>
{#if imagemodeselected !== 'auto'}
<input
id="height"
class="input"
type="number"
min="3"
max="10000"
bind:value={userimagesize} />
{/if}
</div>
<div class="w-full flex gap-2 items-center">
<input class="input" id="markdown" type="text" value={mdCode} on:click={onCopyMarkdown} />
<label for="markdown">
<button class="btn btn-primary btn-md flex-auto" on:click={onCopyMarkdown}>
Copy Markdown
</button>
</label>
</div>
<div class="w-full flex gap-2 items-center">
<input
class="input"
id="gist"
type="text"
bind:value={gistURL}
placeholder="Enter Gist URL" />
<label for="gist">
<button class="btn btn-primary btn-md flex-auto" on:click={loadGist}> Load Gist </button>
</label>
</div>
{#if isNetlify}
<div class="w-full flex items-center justify-center">
<a class="link underline text-gray-500 text-sm" href="https://netlify.com">
This site is powered by Netlify
</a>
</div>
{/if}
</div>
</Card>
-29
View File
@@ -1,29 +0,0 @@
<script lang="ts">
import type { Tab } from '$lib/types';
import { slide } from 'svelte/transition';
import Tabs from './tabs.svelte';
export let isCloseable = true;
export let isOpen = true;
export let tabs: Tab[] = [];
export let title: string;
$: isOpen = isCloseable ? isOpen : true;
$: isTabsShown = isOpen && tabs.length > 0;
</script>
<div class="card rounded overflow-hidden m-2 flex-grow flex flex-col shadow-2xl">
<div
class="bg-primary p-2 {isTabsShown ? 'pb-0' : ''} flex-none cursor-pointer"
on:click={() => (isOpen = !isOpen)}>
<div class="flex justify-between">
<Tabs on:select {tabs} bind:isOpen {title} {isCloseable} />
<div class="flex gap-x-4 items-center {isTabsShown ? '-mt-2' : ''}">
<slot name="actions" />
</div>
</div>
</div>
{#if isOpen}
<div class="card-body p-0 flex-grow overflow-auto text-base-content" transition:slide>
<slot />
</div>
{/if}
</div>
-46
View File
@@ -1,46 +0,0 @@
<script lang="ts">
import type { Tab, TabEvents } from '$lib/types';
import { createEventDispatcher } from 'svelte';
import { fade } from 'svelte/transition';
export let isCloseable = true;
export let tabs: Tab[] = [];
export let title: string;
export let isOpen = false;
$: activeTabID = tabs[0]?.id;
const dispatch = createEventDispatcher<TabEvents>();
const toggleTabs = (tab: Tab) => {
activeTabID = tab.id;
dispatch('select', tab);
};
</script>
<div class="flex cursor-default">
<span class="mr-2 font-semibold" on:click|stopPropagation={() => (isOpen = !isOpen)}>
{#if isCloseable}
<i class="fas fa-chevron-right icon" class:isOpen />
{/if}
{title}</span>
{#if isOpen && tabs}
<ul class="tabs" transition:fade>
{#each tabs as tab}
<div
class="tab tab-lifted {activeTabID === tab.id ? 'tab-active' : 'text-primary-content'}"
on:click|stopPropagation={() => toggleTabs(tab)}>
<i class="mr-1 {tab.icon}" />
{tab.title}
</div>
{/each}
</ul>
{/if}
</div>
<style>
.icon {
transition-duration: 0.5s;
}
.isOpen {
transform: rotate(90deg);
}
</style>
-85
View File
@@ -1,85 +0,0 @@
<script lang="ts">
import type { EditorEvents } from '$lib/types';
import { codeStore } from '$lib/util/state';
import { themeStore } from '$lib/util/theme';
import type monaco from 'monaco-editor';
import { createEventDispatcher, onMount } from 'svelte';
import initEditor from 'monaco-mermaid';
let divEl: HTMLDivElement = null;
let editor: monaco.editor.IStandaloneCodeEditor;
let Monaco;
export let text: string;
export let language: string;
export let editorOptions: monaco.editor.IStandaloneEditorConstructionOptions = {
value: text,
language: language,
minimap: {
enabled: false
},
theme: 'mermaid',
overviewRulerLanes: 0
};
export let errorMarkers: monaco.editor.IMarkerData[] = [];
let oldText = text;
$: editor && Monaco?.editor.setModelLanguage(editor.getModel(), language);
$: {
if (text !== oldText) {
if ($codeStore.updateEditor) {
editor?.setValue(text);
}
oldText = text;
}
editor && Monaco?.editor.setModelMarkers(editor.getModel(), 'test', errorMarkers);
}
themeStore.subscribe(({ isDark }) => {
editor && Monaco?.editor.setTheme(isDark ? 'mermaid-dark' : 'mermaid');
});
const dispatch = createEventDispatcher<EditorEvents>();
const loadMonaco = async () => {
let i = 0;
while (i++ < 10) {
try {
// @ts-ignore : This is a hack to handle a svelte-kit error when importing monaco.
Monaco = monaco;
return;
} catch {
await new Promise((r) => setTimeout(r, 500));
}
}
alert('Loading Monaco Editor failed. Please try refreshing the page.');
};
onMount(async () => {
try {
// @ts-ignore : This is a hack to handle a svelte-kit error when importing monaco.
Monaco = monaco;
} catch {
await loadMonaco(); // Fix https://github.com/mermaid-js/mermaid-live-editor/issues/175
}
initEditor(Monaco);
editor = Monaco.editor.create(divEl, editorOptions);
editor.onDidChangeModelContent(() => {
text = editor.getValue();
dispatch('update', {
text
});
});
Monaco?.editor.setTheme($themeStore.isDark ? 'mermaid-dark' : 'mermaid');
const resizeObserver = new ResizeObserver((entries) => {
editor.layout({
height: entries[0].contentRect.height,
width: entries[0].contentRect.width
});
});
resizeObserver.observe(divEl.parentElement);
return () => {
editor.dispose();
};
});
</script>
<div bind:this={divEl} id="editor" class="overflow-hidden" />
-142
View File
@@ -1,142 +0,0 @@
<script lang="ts">
import Card from '$lib/components/card/card.svelte';
import { codeStore, getStateString } from '$lib/util/state';
import {
addHistoryEntry,
historyModeStore,
clearHistoryData,
getPreviousState,
historyStore,
loaderHistoryStore
} from './history';
import { notify, prompt } from '$lib/util/notify';
import { onMount } from 'svelte';
import moment from 'moment';
import type { HistoryType, State, Tab } from '$lib/types';
const HISTORY_SAVE_INTERVAL = 60000;
const tabSelectHandler = (message: CustomEvent<Tab>) => {
historyModeStore.set(message.detail.id as HistoryType);
};
let tabs: Tab[] = [
{
id: 'manual',
title: 'Saved',
icon: 'far fa-bookmark'
},
{
id: 'auto',
title: 'Timeline',
icon: 'fas fa-history'
}
];
const saveHistory = (auto = false) => {
const currentState: string = getStateString();
const previousState: string = getPreviousState(auto);
if (previousState !== currentState) {
addHistoryEntry({
state: $codeStore,
time: Date.now(),
type: auto ? 'auto' : 'manual'
});
} else if (!auto) {
notify('State already saved.');
}
};
const clearHistory = (date?: number): void => {
if (!date && !prompt('Clear all saved items?')) {
return;
}
clearHistoryData(date);
};
const restoreHistory = (state: State): void => {
codeStore.set({ ...state, updateEditor: true, updateDiagram: true });
};
const relativeTime = (time: number) => {
const t = new Date(time);
return `${new Date(t).toLocaleString()} (${moment(t).fromNow()})`;
};
onMount(() => {
historyModeStore.set('manual');
setInterval(() => {
saveHistory(true);
}, HISTORY_SAVE_INTERVAL);
});
loaderHistoryStore.subscribe((entries) => {
if (entries.length > 0 && tabs.length === 2) {
tabs = [
{
id: 'loader',
title: 'Revisions',
icon: 'fab fa-git-alt'
},
...tabs
];
historyModeStore.set('loader');
}
});
let isOpen = false;
</script>
<Card on:select={tabSelectHandler} bind:isOpen {tabs} title="History">
<div slot="actions">
<button
id="saveHistory"
class="btn btn-xs btn-success w-12"
on:click|stopPropagation={() => saveHistory()}
title="Save current state"><i class="far fa-save" /></button>
{#if $historyModeStore !== 'loader'}
<button
id="clearHistory"
class="btn btn-xs btn-error w-12"
on:click|stopPropagation={() => clearHistory()}
title="Delete all saved states"><i class="fas fa-trash-alt" /></button>
{/if}
</div>
<ul class="p-2 space-y-2 overflow-auto h-56" id="historyList">
{#if $historyStore.length > 0}
{#each $historyStore as { state, time, name, url, type }}
<li class="rounded p-2 shadow flex-col">
<div class="flex">
<div class="flex-1">
<div class="flex flex-col text-base-content">
{#if url}
<a
href={url}
target="_blank"
title="Open revision in new tab"
class="hover:underline text-blue-500">{name}</a>
{:else}
<span>{name}</span>
{/if}
<span class="text-gray-400 text-sm">{relativeTime(time)}</span>
</div>
</div>
<div class="flex gap-2 content-center">
<button class="btn btn-success" on:click={() => restoreHistory(state)}
><i class="fas fa-undo mr-1" />Restore</button>
{#if type !== 'loader'}
<button class="btn btn-error" on:click={() => clearHistory(time)}
><i class="fas fa-trash-alt mr-1" />Delete</button>
{/if}
</div>
</div>
</li>
{/each}
{:else}
<div class="m-2">
No items in History<br />
Click the Save button to save current state and restore it later.<br />
Timeline will automatically be saved every minute.
</div>
{/if}
</ul>
</Card>
-77
View File
@@ -1,77 +0,0 @@
import { derived, writable, get } from 'svelte/store';
import type { Readable, Writable } from 'svelte/store';
import { persist, localStorage } from '@macfja/svelte-persistent-store';
import { generateSlug } from 'random-word-slugs';
import type { HistoryEntry, HistoryType } from '$lib/types';
const MAX_AUTO_HISTORY_LENGTH = 30;
export const historyModeStore: Writable<HistoryType> = persist(
writable('manual'),
localStorage(),
'autoHistoryMode'
);
const autoHistoryStore: Writable<HistoryEntry[]> = persist(
writable([]),
localStorage(),
'autoHistoryStore'
);
const manualHistoryStore: Writable<HistoryEntry[]> = persist(
writable([]),
localStorage(),
'manualHistoryStore'
);
export const loaderHistoryStore: Writable<HistoryEntry[]> = writable([] as HistoryEntry[]);
export const historyStore: Readable<HistoryEntry[]> = derived(
[historyModeStore, autoHistoryStore, manualHistoryStore, loaderHistoryStore],
([historyMode, autoHistories, manualHistories, loadedHistories], set) => {
if (historyMode === 'auto') {
set(autoHistories);
} else if (historyMode === 'manual') {
set(manualHistories);
} else if (historyMode === 'loader') {
set(loadedHistories);
} else {
set(autoHistories);
}
}
);
export const addHistoryEntry = (entry: HistoryEntry): void => {
if (entry.type === 'loader') {
loaderHistoryStore.update((entries) => [entry, ...entries]);
return;
}
entry.name = generateSlug(2);
if (entry.type !== 'auto') {
manualHistoryStore.update((entries) => [entry, ...entries]);
return;
}
autoHistoryStore.update((entries) => {
if (entries.length === MAX_AUTO_HISTORY_LENGTH) {
entries.pop();
}
return [entry, ...entries];
});
};
export const clearHistoryData = (time?: number): void => {
(get(historyModeStore) === 'auto' ? autoHistoryStore : manualHistoryStore).update((entries) => {
if (get(historyModeStore) !== 'loader') {
entries = entries.filter((entry) => time && entry.time != time);
}
return entries;
});
};
export const getPreviousState = (auto: boolean): string => {
const entries = get(auto ? autoHistoryStore : manualHistoryStore);
if (entries.length > 0) {
return JSON.stringify(entries[0].state);
}
return '';
};
-82
View File
@@ -1,82 +0,0 @@
<script context="module">
import { version } from 'mermaid/package.json';
import { analytics } from '$lib/util/stats';
analytics?.track('version', {
mermaidVersion: version
});
</script>
<script lang="ts">
import Theme from './theme.svelte';
interface Link {
title: string;
href: string;
icon?: string;
}
const links: Link[] = [
{
title: 'Documentation',
href: 'https://mermaid-js.github.io/mermaid/#/n00b-gettingStarted'
},
{
title: 'Tutorial',
href: 'https://github.com/mermaid-js/mermaid/blob/develop/docs/Tutorials.md'
},
{
title: 'Mermaid',
href: 'https://github.com/mermaid-js/mermaid'
},
{
title: 'CLI',
href: 'https://github.com/mermaid-js/mermaid-cli'
},
{
title: '',
href: 'https://github.com/mermaid-js/mermaid-live-editor',
icon: 'fab fa-github fa-lg'
}
];
</script>
<div class="navbar mb-2 shadow-lg bg-primary">
<div class="flex-1 px-2 mx-2">
<span class="text-lg font-bold">
<a href="/">Mermaid<span class="text-xs font-thin">v{version}</span> Live Editor</a>
</span>
</div>
<label for="menu-toggle" class="pointer-cursor lg:hidden block"
><svg
class="fill-current "
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
viewBox="0 0 20 20"
><title>Menu</title><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" /></svg
></label>
<input class="hidden" type="checkbox" id="menu-toggle" />
<Theme />
<div class="hidden lg:flex lg:items-center lg:w-auto w-full" id="menu">
<ul class="lg:flex items-center justify-between text-base pt-4 lg:pt-0">
{#each links as { title, href, icon }}
<li>
<a class="btn btn-ghost" target="_blank" {href}>
{#if icon}
<i class={icon} />
{/if}
{title}</a>
</li>
{/each}
</ul>
</div>
</div>
<style>
#menu-toggle:checked + #menu {
display: block;
}
.navbar {
z-index: 10000;
}
</style>
-97
View File
@@ -1,97 +0,0 @@
<script lang="ts">
import { updateCode } from '$lib/util/state';
import Card from '$lib/components/card/card.svelte';
const samples = {
'Flow Chart': `graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]`,
'Sequence Diagram': `sequenceDiagram
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
John-->>-Alice: I feel great!
`,
'Class Diagram': `classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
`,
'State Diagram': `stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
`,
'Gantt Chart': `gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d
another task : 24d
`,
'Pie Chart': `pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15
`,
'ER Diagram': `erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
`,
'User Journey': ` journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 3: Me
`
};
const loadSampleDiagram = (diagramType: string): void => {
updateCode(samples[diagramType], true, true);
};
</script>
<Card title="Sample Diagrams" isOpen={false}>
<div class="flex gap-2 flex-wrap p-2">
{#each Object.keys(samples) as sample}
<button class="btn btn-primary normal-case btn-sm" on:click={() => loadSampleDiagram(sample)}
>{sample}</button>
{/each}
</div>
</Card>
-59
View File
@@ -1,59 +0,0 @@
<script>
import { setTheme, themeStore } from '$lib/util/theme';
const themes = [
'🌝 light',
'🌚 dark',
'🧁 cupcake',
'🐝 bumblebee',
'✳️ emerald',
'🏢 corporate',
'🌃 synthwave',
'👴 retro',
'🤖 cyberpunk',
'🌸 valentine',
'🎃 halloween',
'🌷 garden',
'🌲 forest',
'🐟 aqua',
'👓 lofi',
'🖍 pastel',
'🧚‍♀️ fantasy',
'📝 wireframe',
'🏴 black',
'💎 luxury',
'🧛‍♂️ dracula'
];
</script>
<div class="hidden lg:block dropdown">
<div tabindex="0" class="btn btn-ghost ">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="inline-block w-6 h-6 stroke-current md:mr-2"
><path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01" /></svg>
<span class="hidden md:inline"> Change Theme </span>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1792 1792"
class="inline-block w-4 h-4 ml-1 fill-current"
><path
d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z" /></svg>
</div>
<div
class="mt-14 overflow-y-auto shadow-2xl top-px dropdown-content h-96 w-56 bg-base-200 text-base-content">
<ul tabindex="0" class="p-4 menu compact">
{#each themes as theme}
<li class={theme.includes($themeStore.theme) ? 'bordered' : ''}>
<span class="btn btn-ghost justify-start" on:click={() => setTheme(theme)}>{theme}</span>
</li>
{/each}
</ul>
</div>
</div>
-72
View File
@@ -1,72 +0,0 @@
<script lang="ts">
import { errorStore } from '$lib/util/error';
import { codeStore } from '$lib/util/state';
import { onMount } from 'svelte';
import mermaid from 'mermaid';
let code = '';
let config = '';
let container: HTMLDivElement;
let view: HTMLDivElement;
let error = false;
let outOfSync = false;
let manualUpdate = true;
onMount(() => {
codeStore.subscribe((state) => {
try {
if (container && state && (state.updateDiagram || state.autoSync)) {
if (!state.autoSync) {
$codeStore.updateDiagram = false;
}
outOfSync = false;
manualUpdate = true;
if (code === state.code && config === state.mermaid) {
// Do not render if there is no change in Code/Config
return;
}
code = state.code;
config = state.mermaid;
const scroll = view.parentElement.scrollTop;
delete container.dataset.processed;
mermaid.initialize(Object.assign({}, JSON.parse(state.mermaid)));
mermaid.render('graph-div', code, (svgCode) => {
container.innerHTML = svgCode;
});
view.parentElement.scrollTop = scroll;
error = false;
} else if (manualUpdate) {
manualUpdate = false;
} else {
outOfSync = true;
}
} catch (e) {
console.log('view fail', e);
error = true;
}
});
errorStore.subscribe((err) => {
if (typeof err === 'undefined') {
error = false;
} else {
error = true;
console.log('Error: ', err);
}
});
});
</script>
<div id="view" bind:this={view} class="p-2" class:error class:outOfSync>
<div id="container" bind:this={container} class="flex-1 overflow-auto" />
</div>
<style>
#view {
border: 1px solor darkred;
flex: 1;
}
.error,
.outOfSync {
opacity: 0.5;
}
</style>
+65 -44
View File
@@ -1,67 +1,88 @@
/**
* Can be made globally available by placing this
* inside `global.d.ts` and removing `export` keyword
*/
export interface Locals {
userid: string;
}
export interface EditorUpdateEvent {
text: string;
}
export interface EditorEvents {
update: EditorUpdateEvent;
export interface MarkerData {
severity: number;
message: string;
source?: string;
startLineNumber: number;
startColumn: number;
endLineNumber: number;
endColumn: number;
}
export interface TabEvents {
select: Tab;
select: Tab;
}
export interface Tab {
id: string;
title: string;
icon: string;
id: string;
title: string;
icon: string;
}
export interface State {
code: string;
mermaid: string;
updateEditor: boolean;
updateDiagram: boolean;
autoSync: boolean;
loader?: LoaderConfig;
code: string;
mermaid: string;
updateDiagram: boolean;
autoSync: boolean;
editorMode?: EditorMode;
panZoom?: boolean;
pan?: { x: number; y: number };
zoom?: number;
loader?: LoaderConfig;
}
export interface ValidatedState extends State {
editorMode: EditorMode;
error?: Error;
errorMarkers: MarkerData[];
serialized: string;
}
export interface GistLoaderConfig {
url: string;
url: string;
}
export interface LoadingState {
loading: boolean;
message?: string;
loading: boolean;
message?: string;
}
export interface FileLoaderConfig {
codeURL: string;
configURL?: string;
codeURL: string;
configURL?: string;
}
export interface LoaderConfig {
type: 'gist' | 'files';
config: GistLoaderConfig | FileLoaderConfig;
type: 'gist' | 'files';
config: GistLoaderConfig | FileLoaderConfig;
}
export type HistoryType = 'auto' | 'manual' | 'loader';
export interface HistoryEntry {
state: State;
time: number;
name?: string;
type: HistoryType;
url?: string;
}
export type HistoryEntry = { id: string; state: State; time: number; url?: string } & (
| {
type: 'loader';
name: string;
}
| {
type: HistoryType;
name?: string;
}
);
export interface DocConfig {
[key: string]: {
code: string;
config?: string;
};
}
export type DocumentationConfig = Record<
string,
{
code: string;
config?: string;
}
>;
type Loader = (url: string) => Promise<State>;
export type EditorMode = 'code' | 'config';
export type Loader = (url: string) => Promise<State>;
export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
export interface ErrorHash {
loc: {
first_line: number;
last_line: number;
first_column: number;
last_column: number;
};
}
+9 -4
View File
@@ -1,4 +1,9 @@
export const rendererUrl: string =
(import.meta.env.MERMAID_RENDERER_URL as string) ?? 'https://mermaid.ink';
export const krokiRendererUrl: string =
(import.meta.env.MERMAID_KROKI_RENDERER_URL as string) ?? 'https://kroki.io';
export const env = {
rendererUrl: import.meta.env.MERMAID_RENDERER_URL ?? 'https://mermaid.ink',
krokiRendererUrl: import.meta.env.MERMAID_KROKI_RENDERER_URL ?? 'https://kroki.io',
mermaidCDNUrl: import.meta.env.MERMAID_CDN_URL ?? 'https://unpkg.com/@mermaid-js',
mermaidBaseURL: import.meta.env.MERMAID_BASE_URL ?? 'http://localhost:9000',
useLocalMermaid: import.meta.env.MERMAID_LOCAL ?? false,
isDev: import.meta.env.DEV,
baseURL: import.meta.env.BASE_URL
};
-3
View File
@@ -1,3 +0,0 @@
import { writable } from 'svelte/store';
export const errorStore = writable(undefined);
+103 -81
View File
@@ -1,105 +1,127 @@
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { State } from '$lib/types';
import { defaultState } from '../state';
import { addHistoryEntry } from '../../components/history/history';
import { defaultState } from '$lib/util/state';
import { addHistoryEntry } from '$lib/components/History/history';
import { fetchJSON, fetchText } from '$lib/util/util';
const codeFileName = 'code.mmd';
const configFileName = 'config.json';
interface GithubFile {
truncated: boolean;
raw_url: string;
content: string;
}
const isValidGist = (files: any): boolean => {
return codeFileName in files;
return codeFileName in files;
};
const getFileContent = async (file: any): Promise<string> => {
if (file.truncated) {
return await (await fetch(file.raw_url)).text();
}
return file.content;
const getFileContent = async (file: GithubFile): Promise<string> => {
if (file.truncated) {
return await fetchText(file.raw_url);
}
return file.content;
};
interface GistData {
code: string;
config?: string;
author: string;
time: number;
version: string;
url: string;
code: string;
config?: string;
author: string;
time: number;
version: string;
url: string;
}
interface GistResponse {
files: Record<string, GithubFile>;
html_url: string;
history: { url: string; committed_at: string; version: string; user: { login: string } }[];
}
const getGistData = async (gistURL: string): Promise<GistData> => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [_, __, gistID, revisionID] = gistURL.split('github.com').pop().split('/');
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { html_url, files, history } = await (
await fetch(`https://api.github.com/gists/${gistID}${revisionID ? '/' + revisionID : ''}`)
).json();
if (isValidGist(files)) {
const code = await getFileContent(files[codeFileName]);
let config: string;
if (configFileName in files) {
config = await getFileContent(files[configFileName]);
}
const currentItem = history[0];
return {
url: `${html_url}/${currentItem.version}`,
code,
config,
author: currentItem.user.login,
time: new Date(currentItem.committed_at).getTime(),
version: (currentItem.version as string).slice(-7)
};
} else {
throw 'Invalid gist provided';
}
const path = gistURL.split('github.com').pop();
if (!path) {
throw new Error('Invalid GitHub URL' + gistURL);
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [_, __, gistID, revisionID] = path.split('/');
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { html_url, files, history }: GistResponse = await fetchJSON(
`https://api.github.com/gists/${gistID}${revisionID ? '/' + revisionID : ''}`
);
if (isValidGist(files)) {
const code = await getFileContent(files[codeFileName]);
let config = '{}';
if (configFileName in files) {
config = await getFileContent(files[configFileName]);
}
const currentItem = history[0];
return {
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
url: `${html_url}/${currentItem.version}`,
code,
config,
author: currentItem.user.login,
time: new Date(currentItem.committed_at).getTime(),
version: currentItem.version.slice(-7)
};
} else {
throw new Error('Invalid gist provided');
}
};
const getStateFromGist = (gist: GistData, gistURL: string = gist.url): State => {
const state: State = {
...defaultState,
code: gist.code,
loader: {
type: 'gist',
config: {
url: gistURL
}
}
};
gist.config && (state.mermaid = gist.config);
return state;
const state: State = {
...defaultState,
code: gist.code,
loader: {
type: 'gist',
config: {
url: gistURL
}
}
};
gist.config && (state.mermaid = gist.config);
return state;
};
export const loadGistData = async (gistURL: string): Promise<State> => {
try {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [_, __, gistID, revisionID] = gistURL.split('github.com').pop().split('/');
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { history } = await (
await fetch(`https://api.github.com/gists/${gistID}${revisionID ? '/' + revisionID : ''}`)
).json();
const gistHistory: GistData[] = [];
for (const entry of history) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const data: GistData = await getGistData(entry.url).catch(() => undefined);
data && gistHistory.push(data);
}
if (gistHistory.length === 0) {
throw 'Invalid gist provided';
}
gistHistory.reverse();
const state = getStateFromGist(gistHistory.slice(-1).pop(), gistURL);
for (const gist of gistHistory) {
addHistoryEntry({
state: getStateFromGist(gist),
time: gist.time,
type: 'loader',
url: gist.url,
name: `${gist.author} v${gist.version}`
});
}
return state;
} catch (err) {
console.error(err);
}
const path = gistURL.split('github.com').pop();
if (!path) {
throw new Error('Invalid GitHub URL' + gistURL);
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [_, __, gistID, revisionID] = path.split('/');
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { history }: GistResponse = await fetchJSON(
`https://api.github.com/gists/${gistID}${revisionID ? '/' + revisionID : ''}`
);
const gistHistory: GistData[] = [];
for (const entry of history) {
const data: GistData | undefined = await getGistData(entry.url).catch();
data && gistHistory.push(data);
}
if (gistHistory.length === 0) {
throw new Error('Invalid gist provided');
}
gistHistory.reverse();
const entry = gistHistory.slice(-1).pop();
if (!entry) {
throw new Error('Invalid gist provided');
}
const state = getStateFromGist(entry, gistURL);
for (const gist of gistHistory) {
addHistoryEntry({
state: getStateFromGist(gist),
time: gist.time,
type: 'loader',
url: gist.url,
name: `${gist.author} v${gist.version}`
});
}
return state;
};
+50 -50
View File
@@ -1,58 +1,58 @@
import { loadGistData } from './gist';
import { updateCodeStore, defaultState } from '../state';
import { updateCodeStore, defaultState } from '$lib/util/state';
import { fetchText } from '$lib/util/util';
import type { Loader, State } from '$lib/types';
const loaders: Record<string, Loader> = {
gist: loadGistData
gist: loadGistData
};
export const loadDataFromUrl = async (): Promise<void> => {
const searchParams = new URLSearchParams(window.location.search);
let state: State = defaultState;
let code: string, config: string;
let loaded = false;
const codeURL: string = searchParams.get('code');
const configURL: string = searchParams.get('config');
const searchParams = new URLSearchParams(window.location.search);
let state: Partial<State> = defaultState;
let loaded = false;
const codeURL: string | undefined = searchParams.get('code') ?? undefined;
const configURL: string | undefined = searchParams.get('config') ?? undefined;
if (codeURL) {
code = await (await fetch(codeURL)).text();
loaded = true;
}
if (configURL) {
config = await (await fetch(configURL)).text();
} else {
config = defaultState.mermaid;
}
if (!code) {
for (const [key, value] of searchParams.entries()) {
if (key in loaders) {
try {
state = await loaders[key](value);
loaded = true;
break;
} catch (err) {
console.error(err);
}
}
}
} else {
state = {
code,
mermaid: config,
loader: {
type: 'files',
config: {
codeURL,
configURL
}
}
} as State;
}
loaded &&
updateCodeStore({
...state,
autoSync: true,
updateDiagram: true,
updateEditor: true
});
// window.location.search = '';
let code: string | undefined;
const config = configURL ? await fetchText(configURL) : defaultState.mermaid;
if (codeURL) {
code = await fetchText(codeURL);
loaded = true;
}
if (code) {
if (!codeURL) {
throw new Error('Code URL is not defined');
}
state = {
code,
mermaid: config,
loader: {
type: 'files',
config: {
codeURL,
configURL
}
}
};
} else {
for (const [key, value] of searchParams.entries()) {
if (key in loaders) {
try {
state = await loaders[key](value);
loaded = true;
break;
} catch (error) {
console.error(error);
}
}
}
}
loaded &&
updateCodeStore({
...state,
autoSync: true,
updateDiagram: true
});
};
+10 -10
View File
@@ -3,18 +3,18 @@ import type { Writable } from 'svelte/store';
import type { LoadingState } from '$lib/types';
const defaultLoading: LoadingState = {
loading: false
loading: false
};
export const loadingStateStore: Writable<LoadingState> = writable(defaultLoading);
export const initLoading = async <T>(message: string, task: Promise<T>): Promise<T> => {
loadingStateStore.set({
loading: true,
message
});
const result: T = await task;
loadingStateStore.set({
loading: false
});
return result;
loadingStateStore.set({
loading: true,
message
});
const result: T = await task;
loadingStateStore.set({
loading: false
});
return result;
};
+16
View File
@@ -0,0 +1,16 @@
import mermaid from 'mermaid';
import type { MermaidConfig, RenderResult } from 'mermaid';
export const render = async (
config: MermaidConfig,
code: string,
id: string
): Promise<RenderResult> => {
// Should be able to call this multiple times without any issues.
mermaid.initialize(config);
return await mermaid.render(id, code);
};
export const parse = async (code: string): Promise<unknown> => {
return await mermaid.parse(code);
};
+38
View File
@@ -0,0 +1,38 @@
import type { HistoryEntry } from '$lib/types';
import { describe, it, expect, beforeEach } from 'vitest';
describe('migrations', () => {
beforeEach(() => {
window.localStorage.setItem(
'manualHistoryStore',
'[{"state":{"code":"graph TD\\n A[Halloween] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":false},"time":0,"type":"manual","name":"hollow-art"},{"state":{"code":"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":true},"time":0,"type":"manual","name":"helpful-ocean"}]'
);
window.localStorage.setItem(
'autoHistoryStore',
'[{"state":{"code":"graph TD\\n A[New Year] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":false},"time":0,"type":"auto","name":"barking-dog"},{"state":{"code":"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)","mermaid":"{\\n \\"theme\\": \\"dark\\"\\n}","autoSync":true,"updateDiagram":true},"time":0,"type":"manual","name":"needy-mosquito"}]'
);
});
it('should migrate from v0 to v1', async () => {
const { applyMigrations } = await import('./migrations');
let manualHistoryStore: HistoryEntry[] = JSON.parse(
window.localStorage.getItem('manualHistoryStore') ?? '[]'
) as HistoryEntry[];
let autoHistoryStore: HistoryEntry[] = JSON.parse(
window.localStorage.getItem('autoHistoryStore') ?? '[]'
) as HistoryEntry[];
expect(manualHistoryStore.every(({ id }) => id !== undefined)).toBe(false);
expect(autoHistoryStore.every(({ id }) => id !== undefined)).toBe(false);
applyMigrations();
manualHistoryStore = JSON.parse(
window.localStorage.getItem('manualHistoryStore') ?? '[]'
) as HistoryEntry[];
autoHistoryStore = JSON.parse(
window.localStorage.getItem('autoHistoryStore') ?? '[]'
) as HistoryEntry[];
expect(manualHistoryStore.every(({ id }) => id !== undefined)).toBe(true);
expect(autoHistoryStore.every(({ id }) => id !== undefined)).toBe(true);
});
});
+35
View File
@@ -0,0 +1,35 @@
import { writable, get, type Writable } from 'svelte/store';
import { persist, localStorage } from '$lib/util/persist';
import { injectHistoryIDs } from '$lib/components/History/history';
import { logEvent } from './stats';
interface MigrationState {
version: number;
}
const migrations: Record<string, () => void> = {
injectHistoryIDs
};
const migrationStore: Writable<MigrationState> = persist(
writable({ version: -1 }),
localStorage(),
'migrations'
);
export const applyMigrations = (): void => {
const { version }: MigrationState = get(migrationStore);
const allMigrations = Object.entries(migrations);
if (version === allMigrations.length - 1) {
return;
}
console.log(`Current migration version: v${version}. Migrating to v${allMigrations.length - 1}.`);
for (let i = version + 1; i < allMigrations.length; i++) {
const [key, fn] = allMigrations[i];
console.log(`Applying migration ${i}: ${key}.`);
fn();
logEvent('migration', { key });
migrationStore.set({ version: i });
}
logEvent('migration', { status: 'complete', from: version, to: allMigrations.length - 1 });
};
+621
View File
@@ -0,0 +1,621 @@
// Modified from https://github.com/Yash-Singh1/monaco-mermaid/blob/main/index.ts
import type * as Monaco from 'monaco-editor';
export const initEditor = (monacoEditor: typeof Monaco): void => {
monacoEditor.languages.register({ id: 'mermaid' });
const requirementDiagrams = [
'requirement',
'functionalRequirement',
'interfaceRequirement',
'performanceRequirement',
'physicalRequirement',
'designConstraint'
];
const keywords: Record<
string,
{
typeKeywords: string[];
blockKeywords: string[];
keywords: string[];
}
> = {
flowchart: {
typeKeywords: ['flowchart', 'flowchart-v2', 'graph'],
blockKeywords: ['subgraph', 'end'],
keywords: [
'TB',
'TD',
'BT',
'RL',
'LR',
'click',
'call',
'href',
'_self',
'_blank',
'_parent',
'_top',
'linkStyle',
'style',
'classDef',
'class',
'direction',
'interpolate'
]
},
sequenceDiagram: {
typeKeywords: ['sequenceDiagram'],
blockKeywords: ['alt', 'par', 'and', 'loop', 'else', 'end', 'rect', 'opt', 'alt', 'rect'],
keywords: [
'participant',
'as',
'Note',
'note',
'right of',
'left of',
'over',
'activate',
'deactivate',
'autonumber',
'title',
'actor',
'accDescription',
'link',
'links'
]
},
classDiagram: {
typeKeywords: ['classDiagram', 'classDiagram-v2'],
blockKeywords: ['class'],
keywords: [
'link',
'click',
'callback',
'call',
'href',
'cssClass',
'direction',
'TB',
'BT',
'RL',
'LR',
'title',
'accDescription',
'order'
]
},
stateDiagram: {
typeKeywords: ['stateDiagram', 'stateDiagram-v2'],
blockKeywords: ['state', 'note', 'end'],
keywords: ['state', 'as', 'hide empty description', 'direction', 'TB', 'BT', 'RL', 'LR']
},
erDiagram: {
typeKeywords: ['erDiagram'],
blockKeywords: [],
keywords: ['title', 'accDescription']
},
journey: {
typeKeywords: ['journey'],
blockKeywords: ['section'],
keywords: ['title']
},
info: {
typeKeywords: ['info'],
blockKeywords: [],
keywords: ['showInfo']
},
gantt: {
typeKeywords: ['gantt'],
blockKeywords: [],
keywords: [
'title',
'dateFormat',
'axisFormat',
'todayMarker',
'section',
'excludes',
'inclusiveEndDates'
]
},
requirementDiagram: {
typeKeywords: ['requirement', 'requirementDiagram'],
blockKeywords: [...requirementDiagrams, 'element'],
keywords: []
},
gitGraph: {
typeKeywords: ['gitGraph'],
blockKeywords: [],
keywords: [
'accTitle',
'accDescr',
'commit',
'cherry-pick',
'branch',
'merge',
'reset',
'checkout',
'LR',
'BT',
'id',
'msg',
'type',
'tag',
'NORMAL',
'REVERSE',
'HIGHLIGHT'
]
},
pie: {
typeKeywords: ['pie'],
blockKeywords: [],
keywords: ['showData', 'title', 'accDescr', 'accTitle']
},
c4Diagram: {
typeKeywords: ['C4Context', 'C4Container', 'C4Component', 'C4Dynamic', 'C4Deployment'],
blockKeywords: [
'Boundary',
'Enterprise_Boundary',
'System_Boundary',
'Container_Boundary',
'Node',
'Node_L',
'Node_R'
],
keywords: [
'title',
'accDescription',
'direction',
'TB',
'BT',
'RL',
'LR',
'Person_Ext',
'Person',
'SystemQueue_Ext',
'SystemDb_Ext',
'System_Ext',
'SystemQueue',
'SystemDb',
'System',
'ContainerQueue_Ext',
'ContainerDb_Ext',
'Container_Ext',
'ContainerQueue',
'ContainerDb',
'Container',
'ComponentQueue_Ext',
'ComponentDb_Ext',
'Component_Ext',
'ComponentQueue',
'ComponentDb',
'Component',
'Deployment_Node',
'Rel',
'BiRel',
'Rel_Up',
'Rel_U',
'Rel_Down',
'Rel_D',
'Rel_Left',
'Rel_L',
'Rel_Right',
'Rel_R',
'Rel_Back',
'RelIndex'
]
},
sankey: {
typeKeywords: ['sankey-beta'],
blockKeywords: [],
keywords: []
}
};
const configDirectiveHandler = [
/^\s*%%(?={)/,
{
token: 'string',
next: '@configDirective',
nextEmbedded: 'javascript'
}
] as Monaco.languages.IShortMonarchLanguageRule1;
// Register a tokens provider for the mermaid language
monacoEditor.languages.setMonarchTokensProvider('mermaid', {
...Object.entries(keywords)
.map((entry) =>
Object.fromEntries(
Object.entries(entry[1]).map((deepEntry) => [
entry[0] + deepEntry[0][0].toUpperCase() + deepEntry[0].slice(1),
deepEntry[1]
])
)
)
// eslint-disable-next-line unicorn/no-array-reduce
.reduce(
(overallKeywords, nextKeyword) => ({
...overallKeywords,
...nextKeyword
}),
{}
),
tokenizer: {
root: [
[/^\s*gitGraph/m, 'typeKeyword', 'gitGraph'],
[/^\s*info/m, 'typeKeyword', 'info'],
[/^\s*pie/m, 'typeKeyword', 'pie'],
[/^\s*(flowchart|flowchart-v2|graph)/m, 'typeKeyword', 'flowchart'],
[/^\s*sequenceDiagram/, 'typeKeyword', 'sequenceDiagram'],
[/^\s*classDiagram(-v2)?/, 'typeKeyword', 'classDiagram'],
[/^\s*journey/, 'typeKeyword', 'journey'],
[/^\s*gantt/, 'typeKeyword', 'gantt'],
[/^\s*stateDiagram(-v2)?/, 'typeKeyword', 'stateDiagram'],
[/^\s*er(Diagram)?/, 'typeKeyword', 'erDiagram'],
[/^\s*requirement(Diagram)?/, 'typeKeyword', 'requirementDiagram'],
[/^\s*sankey-beta/m, 'typeKeyword', 'sankey'],
[
/^\s*(C4Context|C4Container|C4Component|C4Dynamic|C4Deployment)/m,
'typeKeyword',
'c4Diagram'
],
configDirectiveHandler,
[/%%[^${].*$/, 'comment']
],
configDirective: [[/%%$/, { token: 'string', next: '@pop', nextEmbedded: '@pop' }]],
gitGraph: [
configDirectiveHandler,
[/option(?=s)/, { token: 'typeKeyword', next: 'optionsGitGraph' }],
[/(accTitle|accDescr)(\s*:)(\s*[^\n\r]+$)/, ['keyword', 'delimiter.bracket', 'string']],
[
/(^\s*branch)(.*?)(\s+order)(:\s*)(\d+\s*$)/,
['keyword', 'variable', 'keyword', 'delimiter.bracket', 'number']
],
[/".*?"/, 'string'],
[
/(^\s*)(branch|reset|merge|checkout)(\s*\S+)/m,
['delimiter.bracket', 'keyword', 'variable']
],
[
/[A-Za-z][\w$]*/,
{
cases: {
'@gitGraphBlockKeywords': 'typeKeyword',
'@gitGraphKeywords': 'keyword'
}
}
],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'],
[/\^/, 'delimiter.bracket']
],
optionsGitGraph: [
[
/s$/,
{
token: 'typeKeyword',
nextEmbedded: 'json'
}
],
['end', { token: 'typeKeyword', next: '@pop', nextEmbedded: '@pop' }]
],
info: [
[
/[A-Za-z][\w$]*/,
{
cases: {
'@infoBlockKeywords': 'typeKeyword',
'@infoKeywords': 'keyword'
}
}
]
],
pie: [
configDirectiveHandler,
[/(title|accDescription)(.*$)/, ['keyword', 'string']],
[
/[A-Za-z][\w$]*/,
{
cases: {
'@pieBlockKeywords': 'typeKeyword',
'@pieKeywords': 'keyword'
}
}
],
[/".*?"/, 'string'],
[/\s*\d+/, 'number'],
[/:/, 'delimiter.bracket'],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment']
],
flowchart: [
configDirectiveHandler,
[/[ox]?(--+|==+)[ox]/, 'transition'],
[
/[A-Za-z][\w$]*/,
{
cases: {
'@flowchartBlockKeywords': 'typeKeyword',
'@flowchartKeywords': 'keyword',
'@default': 'variable'
}
}
],
[/\|+.+?\|+/, 'string'],
[/\[+(\\.+?[/\\]|\/.+?[/\\])]+/, 'string'],
[/[>[]+[^[\]|]+?]+/, 'string'],
[/{+.+?}+/, 'string'],
[/\(+.+?\)+/, 'string'],
[/-\.+->?/, 'transition'],
[/(-[.-])([^>-][^-]+?)(-{3,}|-{2,}>|\.-+>)/, ['transition', 'string', 'transition']],
[/(==+)([^=]+?)(={3,}|={2,}>)/, ['transition', 'string', 'transition']],
[/<?(--+|==+)>|===+|---+/, 'transition'],
[/:::/, 'transition'],
[/[&;]/, 'delimiter.bracket'],
[/".*?"/, 'string'],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment']
],
sequenceDiagram: [
configDirectiveHandler,
[/(title:?|accDescription)([^\n\r;]*$)/, ['keyword', 'string']],
[/(autonumber)([^\S\n\r]+off[^\S\n\r]*$)/, ['keyword', 'keyword']],
[/(autonumber)((?:[^\S\n\r]+\d+){2}[^\S\n\r]*$)/, ['keyword', 'number']],
[/(autonumber)([^\S\n\r]+\d+[^\S\n\r]*$)/, ['keyword', 'number']],
[
/(link\s+)(.*?)(:)(\s*.*?)(\s*@)(\s*[^\n\r;]+)/,
['keyword', 'variable', 'delimiter.bracket', 'string', 'delimiter.bracket', 'string']
],
[
/((?:links|properties)\s+)([^\n\r:]*?)(:\s+)/,
[
{ token: 'keyword' },
{ token: 'variable' },
{
token: 'delimiter.bracket',
nextEmbedded: 'javascript',
next: '@sequenceDiagramLinksProps'
}
]
],
[
/[A-Za-z][\w$]*/,
{
cases: {
'@sequenceDiagramBlockKeywords': 'typeKeyword',
'@sequenceDiagramKeywords': 'keyword',
'@default': 'variable'
}
}
],
[/(--?>?>|--?[)x])[+-]?/, 'transition'],
[/(:)([^\n:]*?$)/, ['delimiter.bracket', 'string']],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment']
],
sequenceDiagramLinksProps: [
// [/^:/, { token: 'delimiter.bracket', nextEmbedded: 'json' }],
[/$|;/, { nextEmbedded: '@pop', next: '@pop', token: 'delimiter.bracket' }]
],
classDiagram: [
configDirectiveHandler,
[/(^\s*(?:title|accDescription))(\s+.*$)/, ['keyword', 'string']],
[
/(\*|<\|?|o|)(--|\.\.)(\*|\|?>|o|)([\t ]*[A-Za-z]+[\t ]*)(:)(.*?$)/,
['transition', 'transition', 'transition', 'variable', 'delimiter.bracket', 'string']
],
[/(?!class\s)([A-Za-z]+)(\s+[A-Za-z]+)/, ['type', 'variable']],
[/(\*|<\|?|o)?(--|\.\.)(\*|\|?>|o)?/, 'transition'],
[/^\s*class\s(?!.*{)/, 'keyword'],
[
/[A-Za-z][\w$]*/,
{
cases: {
'@classDiagramBlockKeywords': 'typeKeyword',
'@classDiagramKeywords': 'keyword',
'@default': 'variable'
}
}
],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'],
[/(<<)(.+?)(>>)/, ['delimiter.bracket', 'annotation', 'delimiter.bracket']],
[/".*?"/, 'string'],
[/:::/, 'transition'],
[/:|\+|-|#|~|\*\s*$|\$\s*$|\(|\)|{|}/, 'delimiter.bracket']
],
journey: [
configDirectiveHandler,
[/(title)(.*)/, ['keyword', 'string']],
[/(section)(.*)/, ['typeKeyword', 'string']],
[
/[A-Za-z][\w$]*/,
{
cases: {
'@journeyBlockKeywords': 'typeKeyword',
'@journeyKeywords': 'keyword',
'@default': 'variable'
}
}
],
[
/(^\s*.+?)(:)(.*?)(:)(.*?)([$,])/,
[
'string',
'delimiter.bracket',
'number',
'delimiter.bracket',
'variable',
'delimiter.bracket'
]
],
[/,/, 'delimiter.bracket'],
[/(^\s*.+?)(:)([^:]*?)$/, ['string', 'delimiter.bracket', 'variable']],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment']
],
gantt: [
configDirectiveHandler,
[/(title)(.*)/, ['keyword', 'string']],
[/(section)(.*)/, ['typeKeyword', 'string']],
[/^\s*([^\n:]*?)(:)/, ['string', 'delimiter.bracket']],
[
/[A-Za-z][\w$]*/,
{
cases: {
'@ganttBlockKeywords': 'typeKeyword',
'@ganttKeywords': 'keyword'
}
}
],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'],
[/:/, 'delimiter.bracket']
],
stateDiagram: [
configDirectiveHandler,
[/note[^:]*$/, { token: 'typeKeyword', next: 'stateDiagramNote' }],
['hide empty description', 'keyword'],
[/^\s*state\s(?!.*{)/, 'keyword'],
[/(<<)(fork|join|choice)(>>)/, 'annotation'],
[/(\[\[)(fork|join|choice)(]])/, ['delimiter.bracket', 'annotation', 'delimiter.bracket']],
[
/[A-Za-z][\w$]*/,
{
cases: {
'@stateDiagramBlockKeywords': 'typeKeyword',
'@stateDiagramKeywords': 'keyword',
'@default': 'variable'
}
}
],
[/".*?"/, 'string'],
[/(:)([^\n:]*?$)/, ['delimiter.bracket', 'string']],
[/{|}/, 'delimiter.bracket'],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'],
[/-->/, 'transition'],
[/\[.*?]/, 'string']
],
stateDiagramNote: [
[/^\s*end note$/, { token: 'typeKeyword', next: '@pop' }],
[/.*/, 'string']
],
erDiagram: [
configDirectiveHandler,
[/(title|accDescription)(.*$)/, ['keyword', 'string']],
[/[|}][o|](--|\.\.)[o|][{|]/, 'transition'],
[/".*?"/, 'string'],
[/(:)(.*?$)/, ['delimiter.bracket', 'string']],
[/[:{}]/, 'delimiter.bracket'],
[/([A-Za-z]+)(\s+[A-Za-z]+)/, ['type', 'variable']],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'],
[/[A-Z_a-z-][\w$]*/, 'variable']
],
requirementDiagram: [
configDirectiveHandler,
[/->|<-|-/, 'transition'],
[/(\d+\.)*\d+/, 'number'],
[
/[A-Z_a-z-][\w$]*/,
{
cases: {
'@requirementDiagramBlockKeywords': 'typeKeyword',
'@default': 'variable'
}
}
],
[/[/:{}]/, 'delimiter.bracket'],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'],
[/".*?"/, 'string']
],
c4Diagram: [
configDirectiveHandler,
[/(title|accDescription)(.*$)/, ['keyword', 'string']],
[/\(/, { token: 'delimiter.bracket', next: 'c4DiagramParenthesis' }],
[
/[A-Z_a-z-][\w$]*/,
{
cases: {
'@c4DiagramBlockKeywords': 'typeKeyword',
'@c4DiagramKeywords': 'keyword',
'@default': 'variable'
}
}
],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment']
],
c4DiagramParenthesis: [
[/,/, 'delimiter.bracket'],
[/\)/, { next: '@pop', token: 'delimiter.bracket' }],
[/[^),]/, 'string']
],
sankey: [
configDirectiveHandler,
[/(title)(.*)/, ['keyword', 'string']],
[/(accTitle|accDescr)(\s*:)(\s*[^\n\r]+$)/, ['keyword', 'delimiter.bracket', 'string']],
[/".*?"/, 'string'],
[/[A-Za-z]+/, 'string'],
[/\s*\d+/, 'number'],
[/,/, 'delimiter.bracket'],
[/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment']
]
}
});
monacoEditor.editor.defineTheme('mermaid-dark', {
base: 'vs-dark',
inherit: true,
colors: {},
rules: [
{ token: 'typeKeyword', foreground: '9650c8', fontStyle: 'bold' },
{ token: 'transition', foreground: '008800', fontStyle: 'bold' },
{ token: 'identifier', foreground: '9cdcfe' }
]
});
monacoEditor.editor.defineTheme('mermaid', {
base: 'vs',
inherit: true,
colors: {},
rules: [
{ token: 'typeKeyword', foreground: '9650c8', fontStyle: 'bold' },
{ token: 'keyword', foreground: '649696' },
{ token: 'custom-error', foreground: 'ff0000', fontStyle: 'bold' },
{ token: 'string', foreground: 'AA8500' },
{ token: 'transition', foreground: '008800', fontStyle: 'bold' },
{ token: 'delimiter.bracket', foreground: '000000', fontStyle: 'bold' },
{ token: 'annotation', foreground: '4b4b96' },
{ token: 'number', foreground: '4b4b96' },
{ token: 'comment', foreground: '888c89' },
{ token: 'variable', foreground: 'A22889' },
{ token: 'type', foreground: '2BDEA8' },
{ token: 'identifier', foreground: '9cdcfe' }
]
});
monacoEditor.languages.registerCompletionItemProvider('mermaid', {
provideCompletionItems: () => {
return {
suggestions: []
};
}
});
monacoEditor.languages.setLanguageConfiguration('mermaid', {
autoClosingPairs: [
{
open: '(',
close: ')'
},
{
open: '{',
close: '}'
},
{
open: '[',
close: ']'
}
],
brackets: [
['(', ')'],
['{', '}'],
['[', ']']
],
comments: {
lineComment: '%%'
}
});
};
+2 -2
View File
@@ -1,7 +1,7 @@
export const notify = (message: string): void => {
alert(message);
alert(message);
};
export const prompt = (message: string): boolean => {
return confirm(message);
return confirm(message);
};
+257
View File
@@ -0,0 +1,257 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
// Copied from https://github.com/MacFJA/svelte-persistent-store
// # The MIT License (MIT)
// Copyright (c) 2021 [MacFJA](https://github.com/MacFJA)
// > Permission is hereby granted, free of charge, to any person obtaining a copy
// > of this software and associated documentation files (the "Software"), to deal
// > in the Software without restriction, including without limitation the rights
// > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// > copies of the Software, and to permit persons to whom the Software is
// > furnished to do so, subject to the following conditions:
// >
// > The above copyright notice and this permission notice shall be included in
// > all copies or substantial portions of the Software.
// >
// > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// > THE SOFTWARE.
import ESSerializer from 'esserializer';
import type { Writable } from 'svelte/store';
/**
* Disabled warnings about missing/unavailable storages
*/
export function disableWarnings(): void {
noWarnings = true;
}
/**
* If set to true, no warning will be emitted if the requested Storage is not found.
* This option can be useful when the lib is used on a server.
*/
let noWarnings = false;
/**
* List of storages where the warning have already been displayed.
*/
const alreadyWarnFor: string[] = [];
/**
* Add a log to indicate that the requested Storage have not been found.
* @param {string} storageName
*/
const warnStorageNotFound = (storageName: string) => {
const isProduction = typeof process !== 'undefined' && process.env.NODE_ENV === 'production';
if (!noWarnings && !alreadyWarnFor.includes(storageName) && !isProduction) {
let message = `Unable to find the ${storageName}. No data will be persisted.`;
if (typeof window === 'undefined') {
message +=
'\n' +
'Are you running on a server? Most of storages are not available while running on a server.';
}
console.warn(message);
alreadyWarnFor.push(storageName);
}
};
const serialize = (value: unknown): string => ESSerializer.serialize(value);
const deserialize = (value?: string | null): unknown => {
// @TODO: to remove in the next major
if (value === 'undefined') {
return undefined;
}
if (value !== null && value !== undefined) {
try {
return ESSerializer.deserialize(value);
} catch {
// Do nothing
// use the value "as is"
}
try {
return JSON.parse(value);
} catch {
// Do nothing
// use the value "as is"
}
}
return value;
};
/**
* A store that keep it's value in time.
*/
export interface PersistentStore<T> extends Writable<T> {
/**
* Delete the store value from the persistent storage
*/
delete(): void;
}
/**
* Storage interface
*/
export interface StorageInterface<T> {
/**
* Get a value from the storage.
*
* If the value doesn't exists in the storage, `null` should be returned.
* This method MUST be synchronous.
* @param key The key/name of the value to retrieve
*/
getValue(key: string): T | null;
/**
* Save a value in the storage.
* @param key The key/name of the value to save
* @param value The value to save
*/
setValue(key: string, value: T): void;
/**
* Remove a value from the storage
* @param key The key/name of the value to remove
*/
deleteValue(key: string): void;
}
export interface SelfUpdateStorageInterface<T> extends StorageInterface<T> {
/**
* Add a listener to the storage values changes
* @param {string} key The key to listen
* @param {(newValue: T) => void} listener The listener callback function
*/
addListener(key: string, listener: (newValue: T) => void): void;
/**
* Remove a listener from the storage values changes
* @param {string} key The key that was listened
* @param {(newValue: T) => void} listener The listener callback function to remove
*/
removeListener(key: string, listener: (newValue: T) => void): void;
}
/**
* Make a store persistent
* @param {Writable<*>} store The store to enhance
* @param {StorageInterface} storage The storage to use
* @param {string} key The name of the data key
*/
export function persist<T>(
store: Writable<T>,
storage: StorageInterface<T>,
key: string
): PersistentStore<T> {
const initialValue = storage.getValue(key);
if (null !== initialValue) {
store.set(initialValue);
}
if ('addListener' in storage) {
(storage as SelfUpdateStorageInterface<T>).addListener(key, (newValue) => {
store.set(newValue);
});
}
store.subscribe((value) => {
storage.setValue(key, value);
});
return {
...store,
delete() {
storage.deleteValue(key);
}
};
}
function getBrowserStorage(
browserStorage: Storage,
listenExternalChanges = false
): SelfUpdateStorageInterface<any> {
const listeners: { key: string; listener: (newValue: any) => void }[] = [];
const listenerFunction = (event: StorageEvent) => {
const eventKey = event.key;
if (event.storageArea === browserStorage) {
for (const { listener } of listeners.filter(({ key }) => key === eventKey)) {
listener(deserialize(event.newValue));
}
}
};
const connect = () => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (listenExternalChanges && typeof window !== 'undefined' && window.addEventListener) {
window.addEventListener('storage', listenerFunction);
}
};
const disconnect = () => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (listenExternalChanges && typeof window !== 'undefined' && window.removeEventListener) {
window.removeEventListener('storage', listenerFunction);
}
};
return {
addListener(key: string, listener: (newValue: any) => void) {
listeners.push({ key, listener });
if (listeners.length === 1) {
connect();
}
},
removeListener(key: string, listener: (newValue: any) => void) {
const index = listeners.indexOf({ key, listener });
if (index !== -1) {
listeners.splice(index, 1);
}
if (listeners.length === 0) {
disconnect();
}
},
getValue(key: string): any | null {
const value = browserStorage.getItem(key);
return deserialize(value);
},
deleteValue(key: string) {
browserStorage.removeItem(key);
},
setValue(key: string, value: any) {
browserStorage.setItem(key, serialize(value));
}
};
}
/**
* Storage implementation that use the browser local storage
* @param listenExternalChanges - Update the store if the localStorage is updated from another page
*/
export function localStorage<T>(listenExternalChanges = false): StorageInterface<T> {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (typeof window !== 'undefined' && window.localStorage) {
return getBrowserStorage(window.localStorage, listenExternalChanges);
}
warnStorageNotFound('window.localStorage');
return noopStorage();
}
/**
* Storage implementation that do nothing
*/
export function noopStorage<T>(): StorageInterface<T> {
return {
getValue(): null {
return null;
},
deleteValue() {
// Do nothing
},
setValue() {
// Do nothing
}
};
}
+40
View File
@@ -0,0 +1,40 @@
import { describe, expect, it } from 'vitest';
import { serializeState, deserializeState, type SerdeType } from './serde';
import { defaultState } from './state';
import type { State } from '$lib/types';
const verifySerde = (state: State, serde?: SerdeType): string => {
const serialized = serializeState(state, serde);
const deserialized = deserializeState(serialized);
expect(deserialized).to.deep.equal(state);
return serialized;
};
describe('Serde tests', () => {
it('should serialize and deserialize with default serde', () => {
expect(verifySerde(defaultState)).toMatchInlineSnapshot(
'"pako:eNpVjk2Lg0AMhv9KyGkL9Q94WGh1t5fCFurN6SFo7AztfDBGpKj_fcd62c0pvM_zhkzY-JYxx-7px0ZTFKhK5SDNoS50NL1Y6m-QZZ_ziQWsd_ya4fhx8tBrH4Jx993mH1cJium8agyijXssGyre_R_HM5T1mYL4cPtLqtHP8FWbi07n_xMdObW-647yjrKGIhQU3wru0XK0ZNr0_rQmCkWzZYV5WlvuaHiKQuWWpNIg_vpyDeYSB97jEFoSLg3dI9ktXH4B_cJWqw"'
);
});
it('should serialize and deserialize with base64 serde', () => {
expect(verifySerde(defaultState, 'base64')).toMatchInlineSnapshot(
'"base64:eyJjb2RlIjoiZmxvd2NoYXJ0IFREXG4gICAgQVtDaHJpc3RtYXNdIC0tPnxHZXQgbW9uZXl8IEIoR28gc2hvcHBpbmcpXG4gICAgQiAtLT4gQ3tMZXQgbWUgdGhpbmt9XG4gICAgQyAtLT58T25lfCBEW0xhcHRvcF1cbiAgICBDIC0tPnxUd298IEVbaVBob25lXVxuICAgIEMgLS0-fFRocmVlfCBGW2ZhOmZhLWNhciBDYXJdXG4gICIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0"'
);
});
it('should serialize and deserialize with pako serde', () => {
expect(verifySerde(defaultState, 'pako')).toMatchInlineSnapshot(
'"pako:eNpVjk2Lg0AMhv9KyGkL9Q94WGh1t5fCFurN6SFo7AztfDBGpKj_fcd62c0pvM_zhkzY-JYxx-7px0ZTFKhK5SDNoS50NL1Y6m-QZZ_ziQWsd_ya4fhx8tBrH4Jx993mH1cJium8agyijXssGyre_R_HM5T1mYL4cPtLqtHP8FWbi07n_xMdObW-647yjrKGIhQU3wru0XK0ZNr0_rQmCkWzZYV5WlvuaHiKQuWWpNIg_vpyDeYSB97jEFoSLg3dI9ktXH4B_cJWqw"'
);
});
it('should throw error for unrecognized serde', () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
expect(() => serializeState(defaultState, 'unknown')).toThrowError(
'Unknown serde type: unknown'
);
expect(() => deserializeState('unknown:hello')).toThrowError('Unknown serde type: unknown');
});
});
+44 -42
View File
@@ -3,59 +3,61 @@ import { toUint8Array, fromUint8Array, toBase64, fromBase64 } from 'js-base64';
import type { State } from '$lib/types';
interface Serde {
serialize: (state: string) => string;
deserialize: (state: string) => string;
serialize: (state: string) => string;
deserialize: (state: string) => string;
}
const base64Serde: Serde = {
serialize: (state: string): string => {
return toBase64(state, true);
},
deserialize: (state: string): string => {
return fromBase64(state);
}
serialize: (state: string): string => {
return toBase64(state, true);
},
deserialize: (state: string): string => {
return fromBase64(state);
}
};
export const pakoSerde: Serde = {
serialize: (state: string): string => {
const data = new TextEncoder().encode(state);
const compressed = deflate(data, { level: 9 });
return fromUint8Array(compressed, true);
},
deserialize: (state: string): string => {
const data = toUint8Array(state);
return inflate(data, { to: 'string' });
}
serialize: (state: string): string => {
const data = new TextEncoder().encode(state);
const compressed = deflate(data, { level: 9 });
return fromUint8Array(compressed, true);
},
deserialize: (state: string): string => {
const data = toUint8Array(state);
return inflate(data, { to: 'string' });
}
};
const serdes: { [key: string]: Serde } = {
base64: base64Serde,
pako: pakoSerde
export type SerdeType = 'base64' | 'pako';
const serdes: { [key in SerdeType]: Serde } = {
base64: base64Serde,
pako: pakoSerde
};
type SerdeType = keyof typeof serdes;
export const serializeState = (state: State): string => {
const json = JSON.stringify(state);
const defaultSerde: SerdeType = 'pako';
const serialized = serdes[defaultSerde].serialize(json);
return `${defaultSerde}:${serialized}`;
export const serializeState = (state: State, serde: SerdeType = 'pako'): string => {
if (!(serde in serdes)) {
throw new Error(`Unknown serde type: ${serde}`);
}
const json = JSON.stringify(state);
const serialized = serdes[serde].serialize(json);
return `${serde}:${serialized}`;
};
export const deserializeState = (state: string): State => {
let type: SerdeType, serialized: string;
if (state.includes(':')) {
let tempType: string;
[tempType, serialized] = state.split(':');
if (tempType in serdes) {
type = tempType;
} else {
throw new Error(`Unknown serde type: ${tempType}`);
}
} else {
type = 'base64';
serialized = state;
}
const json = serdes[type].deserialize(serialized);
return JSON.parse(json) as State;
let type: SerdeType, serialized: string;
if (state.includes(':')) {
let tempType: string;
[tempType, serialized] = state.split(':');
if (tempType in serdes) {
type = tempType as SerdeType;
} else {
throw new Error(`Unknown serde type: ${tempType}`);
}
} else {
type = 'base64';
serialized = state;
}
const json = serdes[type].deserialize(serialized);
return JSON.parse(json) as State;
};
+158 -83
View File
@@ -1,31 +1,29 @@
import { writable, get, derived } from 'svelte/store';
import type { Readable } from 'svelte/store';
import { persist, localStorage } from '@macfja/svelte-persistent-store';
import type { State } from '$lib/types';
import { saveStatistics } from './stats';
import { writable, get, type Readable, derived } from 'svelte/store';
import { persist, localStorage } from './persist';
import { saveStatistics, countLines } from './stats';
import { serializeState, deserializeState } from './serde';
import { cmdKey, errorDebug, formatJSON } from './util';
import { parse } from './mermaid';
import type { ErrorHash, MarkerData, State, ValidatedState } from '$lib/types';
import type { MermaidConfig } from 'mermaid';
export const defaultState: State = {
code: `graph TD
code: `flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
mermaid: JSON.stringify(
{
theme: 'default'
},
null,
2
),
updateEditor: false,
autoSync: true,
updateDiagram: true
mermaid: formatJSON({
theme: 'default'
}),
autoSync: true,
updateDiagram: true
};
const urlParseFailedState = `graph TD
const urlParseFailedState = `flowchart TD
A[Loading URL failed. We can try to figure out why.] -->|Decode JSON| B(Please check the console to see the JSON and error details.)
B --> C{Is the JSON correct?}
C -->|Yes| D(Please Click here to Raise an issue in github.<br/>Including the broken link in the issue <br/> will speed up the fix.)
@@ -36,90 +34,167 @@ const urlParseFailedState = `graph TD
G --> |"No :("| H(Try using the Timeline tab in History <br/>from same browser you used to create the diagram.)
click D href "https://github.com/mermaid-js/mermaid-live-editor/issues/new?assignees=&labels=bug&template=bug_report.md&title=Broken%20link" "Raise issue"`;
export const codeStore = persist(writable(defaultState), localStorage(), 'codeStore');
export const serializedState: Readable<string> = derived([codeStore], ([code], set) => {
set(serializeState(code));
});
// inputStateStore handles all updates and is shared externally when exporting via URL, History, etc.
export const inputStateStore = persist(writable(defaultState), localStorage(), 'codeStore');
export const loadState = (data: string): void => {
let state: State;
console.log('Loading', data);
try {
state = deserializeState(data);
const mermaidConfig: { [key: string]: string } =
typeof state.mermaid === 'string' ? JSON.parse(state.mermaid) : state.mermaid;
if (
mermaidConfig.securityLevel &&
mermaidConfig.securityLevel !== 'strict' &&
confirm(
`Removing "securityLevel":"${mermaidConfig.securityLevel}" from the config for safety.\nClick Cancel if you trust the source of this Diagram.`
)
) {
delete mermaidConfig.securityLevel; // Prevent setting overriding securityLevel when loading state to mitigate possible XSS attack
}
export const currentState: ValidatedState = (() => {
const state = get(inputStateStore);
return {
...state,
serialized: serializeState(state),
errorMarkers: [],
error: undefined,
editorMode: state.editorMode ?? 'code'
};
})();
state.mermaid = JSON.stringify(mermaidConfig, null, 2);
} catch (e) {
state = get(codeStore);
if (data) {
console.error('Init error', e);
state.code = urlParseFailedState;
}
}
updateCodeStore({ ...state, updateEditor: true });
const processState = async (state: State) => {
const processed: ValidatedState = {
...state,
serialized: '',
errorMarkers: [],
error: undefined,
editorMode: state.editorMode ?? 'code'
};
// No changes should be done to fields part of `state`.
try {
processed.serialized = serializeState(state);
await parse(state.code);
JSON.parse(state.mermaid);
} catch (error) {
processed.error = error as Error;
errorDebug();
console.error(error);
if ('hash' in error) {
try {
const {
loc: { first_line, last_line, first_column, last_column }
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
} = error.hash as ErrorHash;
const marker: MarkerData = {
severity: 8, // Error
startLineNumber: first_line,
startColumn: first_column,
endLineNumber: last_line,
endColumn: last_column + 1,
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
message: error.str
};
processed.errorMarkers = [marker];
} catch (error) {
console.error('Error without line helper', error);
}
}
}
return processed;
};
export const updateCodeStore = (newState: State): void => {
codeStore.update((state) => {
return { ...state, ...newState };
});
// All internal reads should be done via stateStore, but it should not be persisted/shared externally.
export const stateStore: Readable<ValidatedState> = derived(
[inputStateStore],
([state], set) => {
void processState(state).then(set);
},
currentState
);
export const loadState = (data: string): void => {
let state: State;
console.log(`Loading '${data}'`);
try {
state = deserializeState(data);
const mermaidConfig: MermaidConfig =
typeof state.mermaid === 'string'
? (JSON.parse(state.mermaid) as MermaidConfig)
: state.mermaid;
if (
mermaidConfig.securityLevel &&
mermaidConfig.securityLevel !== 'strict' &&
confirm(
`Removing "securityLevel":"${mermaidConfig.securityLevel}" from the config for safety.\nClick Cancel if you trust the source of this Diagram.`
)
) {
delete mermaidConfig.securityLevel; // Prevent setting overriding securityLevel when loading state to mitigate possible XSS attack
}
state.mermaid = formatJSON(mermaidConfig);
} catch (error) {
state = get(inputStateStore);
if (data) {
console.error('Init error', error);
state.code = urlParseFailedState;
state.mermaid = defaultState.mermaid;
}
}
updateCodeStore(state);
};
export const updateCodeStore = (newState: Partial<State>): void => {
inputStateStore.update((state) => {
return { ...state, ...newState };
});
};
let prompted = false;
export const updateCode = (code: string, updateEditor: boolean, updateDiagram = false): void => {
saveStatistics(code);
const lines = (code.match(/\n/g) || '').length + 1;
export const updateCode = (
code: string,
{
updateDiagram = false,
resetPanZoom = false
}: { updateDiagram?: boolean; resetPanZoom?: boolean } = {}
): void => {
// console.log('updateCode', code);
const lines = countLines(code);
saveStatistics(code);
errorDebug();
if (lines > 50 && !prompted && get(stateStore).autoSync) {
const turnOff = confirm(
`Long diagram detected. Turn off Auto Sync? Use ${cmdKey} + Enter or click the sync logo to manually sync.`
);
prompted = true;
if (turnOff) {
updateCodeStore({
autoSync: false
});
}
}
if (lines > 50 && !prompted && get(codeStore).autoSync) {
const turnOff = confirm(
'Long diagram detected. Turn off Auto Sync? Click the sync logo to manually sync.'
);
prompted = true;
if (turnOff) {
updateCodeStore({
autoSync: false
} as State);
}
}
codeStore.update((state) => {
return { ...state, code, updateEditor, updateDiagram };
});
inputStateStore.update((state) => {
if (resetPanZoom) {
state.pan = undefined;
state.zoom = undefined;
}
return { ...state, code, updateDiagram };
});
};
export const updateConfig = (config: string, updateEditor: boolean): void => {
codeStore.update((state) => {
return { ...state, mermaid: config, updateEditor };
});
export const updateConfig = (config: string): void => {
// console.log('updateConfig', config);
inputStateStore.update((state) => {
return { ...state, mermaid: config };
});
};
export const toggleDarkTheme = (dark: boolean): void => {
codeStore.update((state) => {
const config = JSON.parse(state.mermaid);
if (!config.theme || ['dark', 'default'].includes(config.theme)) {
config.theme = dark ? 'dark' : 'default';
}
inputStateStore.update((state) => {
const config = JSON.parse(state.mermaid) as MermaidConfig;
if (!config.theme || ['dark', 'default'].includes(config.theme)) {
config.theme = dark ? 'dark' : 'default';
}
return { ...state, mermaid: JSON.stringify(config, null, 2), updateEditor: true };
});
return { ...state, mermaid: formatJSON(config) };
});
};
let urlDebounce: number;
export const initURLSubscription = (): void => {
serializedState.subscribe((state: string) => {
history.replaceState(undefined, undefined, `#${state}`);
});
stateStore.subscribe(({ serialized }) => {
clearTimeout(urlDebounce);
urlDebounce = window.setTimeout(() => {
history.replaceState(undefined, '', `#${serialized}`);
}, 250);
});
};
export const getStateString = (): string => {
return JSON.stringify(get(codeStore));
return JSON.stringify(get(inputStateStore));
};
+19
View File
@@ -0,0 +1,19 @@
import { describe, it, expect } from 'vitest';
import { detectType } from './stats';
describe('diagram detection', () => {
it('should detect diagrams correctly', () => {
expect(
detectType(`%%{{
graph`)
).toBe('graph');
expect(detectType(`gitGraph`)).toBe('gitGraph');
expect(
detectType(`%%{{
flowChart
graph`)
).toBe('flowChart');
expect(detectType(`loki -> thor`)).toBe(undefined);
});
});
+112 -40
View File
@@ -1,49 +1,121 @@
import { browser } from '$app/env';
import { browser } from '$app/environment';
import type { AnalyticsInstance } from 'analytics';
export let analytics: AnalyticsInstance;
export let analytics: AnalyticsInstance | undefined;
export const initAnalytics = async (): Promise<void> => {
if (browser && !analytics) {
try {
const { Analytics } = await import('analytics');
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const googleAnalytics = await import('@analytics/google-analytics');
analytics = Analytics({
app: 'mermaid-live-editor',
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
plugins: [
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
googleAnalytics.init({
trackingId: 'UA-153180559-1'
})
]
});
} catch {
console.info('Analytics blocked ;)');
}
}
if (browser && !analytics) {
try {
const [{ Analytics }, { default: plausible }] = await Promise.all([
import('analytics'),
import('analytics-plugin-plausible')
]);
analytics = Analytics({
app: 'mermaid-live-editor',
plugins: [
plausible({
domain: 'mermaid.live',
hashMode: false,
// All tracked stats are public and available at https://p.mermaid.live/mermaid.live
apiHost: 'https://p.mermaid.live'
})
]
});
} catch (error) {
console.log(error);
console.info('Analytics blocked ;)');
}
}
};
const detectType = (text: string): string => {
return text
.replace(/^\s*%%.*\n/g, '\n')
.trimStart()
.split(' ')[0];
export const detectType = (text: string): string | undefined => {
const possibleDiagramTypes = [
'classDiagram',
'erDiagram',
'flowChart',
'gantt',
'gitGraph',
'graph',
'journey',
'pie',
'stateDiagram',
'quadrantChart',
'mindmap'
];
const firstLine = text
.replace(/^\s*%%.*\n/g, '\n')
.trimStart()
.split(' ')[0]
.toLowerCase();
const detectedDiagram = possibleDiagramTypes.find((d) => firstLine.includes(d.toLowerCase()));
return detectedDiagram;
};
export const countLines = (code: string): number => {
return (code.match(/\n/g)?.length ?? 0) + 1;
};
// manual debounce
let timeout;
export const saveStatistics = (graph: string): void => {
if (analytics) {
clearTimeout(timeout);
// Only save statistics after a 5 sec delay
timeout = setTimeout(function () {
const graphType = detectType(graph);
console.debug('ga:', 'send', 'event', 'render', graphType);
void analytics.track('render', {
graphType
});
}, 5000);
}
const graphType = detectType(graph);
if (!graphType) {
return;
}
const length = countLines(graph);
const lengthBucket =
length < 10
? '0-10'
: length < 25
? '10-25'
: length < 50
? '25-50'
: length < 100
? '50-100'
: length < 200
? '100-200'
: length < 500
? '200-500'
: length < 700
? '500-700'
: length < 1000
? '700-1000'
: length < 1500
? '1000-1500'
: '1500+';
logEvent('render', { graphType, length, lengthBucket });
};
const minutesToMilliSeconds = (minutes: number): number => {
return minutes * 60_000;
};
const defaultDelay = minutesToMilliSeconds(1);
const delaysPerEvent = {
render: minutesToMilliSeconds(5),
panZoom: minutesToMilliSeconds(10),
copyClipboard: defaultDelay,
download: defaultDelay,
copyMarkdown: defaultDelay,
loadGist: defaultDelay,
loadSampleDiagram: defaultDelay,
renderDiagram: defaultDelay,
history: defaultDelay,
migration: defaultDelay,
themeChange: defaultDelay
};
export type AnalyticsEvent = keyof typeof delaysPerEvent;
const timeouts: Map<string, number> = new Map<string, number>();
// manual debounce to reduce the number of events sent to analytics
export const logEvent = (name: AnalyticsEvent, data?: unknown): void => {
if (!analytics) {
return;
}
const key = data ? JSON.stringify({ name, data }) : name;
if (timeouts.has(key)) {
clearTimeout(timeouts.get(key));
} else {
void analytics.track(name, data);
}
timeouts.set(
key,
window.setTimeout(() => timeouts.delete(key), delaysPerEvent[name])
);
};
+26 -24
View File
@@ -1,36 +1,38 @@
import { writable } from 'svelte/store';
import type { Writable } from 'svelte/store';
import { persist, localStorage } from '@macfja/svelte-persistent-store';
import { persist, localStorage } from '$lib/util/persist';
import { logEvent } from './stats';
export interface ThemeConfig {
isDark: boolean;
theme?: string;
isDark: boolean;
theme?: string;
}
export const themeStore: Writable<ThemeConfig> = persist(
writable({
isDark: false
}),
localStorage(),
'themeStore'
writable({
isDark: false
}),
localStorage(),
'themeStore'
);
const darkThemes = [
'dark',
'synthwave',
'halloween',
'aqua',
'forest',
'luxury',
'black',
'dracula'
];
const darkThemes = new Set([
'dark',
'synthwave',
'halloween',
'aqua',
'forest',
'luxury',
'black',
'dracula'
]);
export const setTheme = (theme: string): void => {
if (theme.includes(' ')) {
theme = theme.split(' ')[1].trim();
}
const isDark = darkThemes.includes(theme);
console.log('Setting theme', theme);
themeStore.set({ theme, isDark });
if (theme.includes(' ')) {
theme = theme.split(' ')[1].trim();
}
const isDark = darkThemes.has(theme);
console.log('Setting theme', theme);
themeStore.set({ theme, isDark });
logEvent('themeChange', { theme, isDark });
};
+35 -11
View File
@@ -1,24 +1,48 @@
import type { State } from '$lib/types';
import { initURLSubscription, loadState, updateCodeStore } from './state';
import { analytics, initAnalytics } from './stats';
import { loadDataFromUrl } from './fileLoaders/loader';
import { initLoading } from './loading';
import { applyMigrations } from './migrations';
export const loadStateFromURL = (): void => {
loadState(window.location.hash.slice(1));
loadState(window.location.hash.slice(1));
};
export const syncDiagram = (): void => {
updateCodeStore({
updateDiagram: true
} as State);
updateCodeStore({
updateDiagram: true
});
};
export const initHandler = async (): Promise<void> => {
loadStateFromURL();
await initLoading('Loading Gist...', loadDataFromUrl().catch(console.error));
syncDiagram();
initURLSubscription();
await initAnalytics();
analytics?.page();
applyMigrations();
loadStateFromURL();
await initLoading('Loading Gist...', loadDataFromUrl().catch(console.error));
syncDiagram();
initURLSubscription();
await initAnalytics();
await analytics?.page();
};
export const isMac = navigator.platform.toUpperCase().includes('MAC');
export const cmdKey = isMac ? 'Cmd' : 'Ctrl';
let count = 0;
export const errorDebug = (limit = 100) => {
count += 1;
if (count > limit) {
console.log(count, limit);
// eslint-disable-next-line no-debugger
debugger;
}
};
export const formatJSON = (data: unknown): string => JSON.stringify(data, undefined, 2);
export const fetchJSON = async <T>(url: string): Promise<T> => {
const res = await fetch(url);
return res.json() as T;
};
export const fetchText = async (url: string): Promise<string> => {
const res = await fetch(url);
return res.text();
};

Some files were not shown because too many files have changed in this diff Show More