Compare commits

..
596 Commits
Author SHA1 Message Date
Nuno Coração 52d6eb7bb1 Merge pull request #1675 from nunocoracao/dev
🔖 v2.76.0
2024-08-28 16:49:01 +01:00
Nuno Coração a517624b70 final changes 2024-08-28 16:48:38 +01:00
Nuno Coração d2143149cd Merge pull request #1681 from unacro/dev
⚙️ Move .Site.Author to .Site.Params.Author
2024-08-28 16:42:52 +01:00
Nuno Coração afbf2f66d7 Merge pull request #1678 from sculptor189/main
✨ Add rel attribute to button shortcode
2024-08-28 16:36:38 +01:00
Nuno Coração 4a4c13f3a0 update 2024-08-28 13:25:57 +01:00
Nuno Coração c0af00b628 Merge pull request #1677 from Ast3risk-ops/patch-2
✨Add Mastodon to sharing links
2024-08-28 13:15:52 +01:00
Nuno Coração 363ba66e14 Merge pull request #1679 from sculptor189/date-modify
Correct time format
2024-08-28 13:10:07 +01:00
Nuno Coração 5ccea15f3f Merge pull request #1693 from panjinbo/main
🐛 Do not prevent default for Enter
2024-08-28 12:54:32 +01:00
Nuno Coração ff7539933e Merge pull request #1699 from akatsukiro/main
🎏  Fix small typo in Chinese doc
2024-08-28 12:50:06 +01:00
Nuno Coração 2be439622b Merge pull request #1694 from sculptor189/lastmod-dev
Avoid showing incorrect lastmod "0001-01-01"
2024-08-28 12:46:21 +01:00
Nuno Coração 9d07830623 Merge pull request #1701 from BabaRagnarok/main
🎏 Add more translate content
2024-08-28 12:45:34 +01:00
Nuno Coração e69e326725 Merge pull request #1687 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-plugin-tailwindcss-0.6.6
📌 Bump prettier-plugin-tailwindcss from 0.6.5 to 0.6.6
2024-08-28 12:39:14 +01:00
Nuno Coração fa9c3439ba Merge pull request #1676 from wtchangdm/fix_show_more_link
add trailing slash for homepage.showMoreLinkDest
2024-08-28 12:38:58 +01:00
dependabot[bot] 9a28e25251 📌 Bump prettier-plugin-tailwindcss from 0.6.5 to 0.6.6
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.6.5 to 0.6.6.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.5...v0.6.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-28 11:38:34 +00:00
Nuno Coração 61c3fb2625 Merge pull request #1685 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-08-28 12:37:28 +01:00
Nuno Coração df7474ca19 Merge pull request #1686 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss-3.4.10
📌 Bump tailwindcss from 3.4.7 to 3.4.10
2024-08-28 12:37:07 +01:00
Nuno Coração 7811e36534 Merge pull request #1688 from nunocoracao/dependabot/npm_and_yarn/dev/lite-youtube-embed-0.3.3
📌 Bump lite-youtube-embed from 0.3.2 to 0.3.3
2024-08-28 12:36:45 +01:00
Nuno Coração 3092ea4523 Merge pull request #1689 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss/typography-0.5.14
📌 Bump @tailwindcss/typography from 0.5.13 to 0.5.14
2024-08-28 12:36:35 +01:00
Nuno Coração 9bfb7adf95 Merge pull request #1705 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-23.2.0
📌 Bump puppeteer from 22.15.0 to 23.2.0
2024-08-28 12:36:19 +01:00
dependabot[bot] 2e16b49adb 📌 Bump puppeteer from 22.15.0 to 23.2.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.15.0 to 23.2.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.15.0...puppeteer-v23.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-28 05:59:54 +00:00
nunocoracao 3b3a64c9b9 Update Hugo supported version 2024-08-27 06:05:36 +00:00
BabaRagnarok d966187073 Merge branch 'main' into main 2024-08-24 12:36:25 +02:00
BabaRagnarok 4152e27e35 translate homepage-layout 2024-08-24 12:25:35 +02:00
BabaRagnarok 8713e4429b translete getting-started 2024-08-24 12:17:33 +02:00
BabaRagnarok 7ac9d0ce24 Update index.it.md 2024-08-24 12:17:08 +02:00
BabaRagnarok 5b617bce69 translate getting-started 2024-08-24 12:16:18 +02:00
BabaRagnarok d573317640 translate front-metter 2024-08-24 12:10:50 +02:00
Shiro 6f8c427a36 Update index.zh-cn.md
small typo fix.
2024-08-23 17:45:45 +08:00
sculptor189 9e5d3f7758 avoid showing incorrect lastmod "0001-01-01" 2024-08-16 19:51:30 -04:00
Jinbo Pan dcde4feef3 Do not prevent default for Enter
Do not prevent default for "Enter" if search is not visible. Old logic would prevent comment system adding new line using "Enter"
2024-08-15 17:17:07 -07:00
dependabot[bot] a47a7e3bf5 💄 Rebuild CSS 2024-08-14 05:57:21 +00:00
dependabot[bot] d7f618a92e 💄 Rebuild CSS 2024-08-14 05:57:03 +00:00
dependabot[bot] 5f181d02db 📌 Bump @tailwindcss/typography from 0.5.13 to 0.5.14
Bumps [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography) from 0.5.13 to 0.5.14.
- [Release notes](https://github.com/tailwindlabs/tailwindcss-typography/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss-typography/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss-typography/compare/v0.5.13...v0.5.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-14 05:56:54 +00:00
dependabot[bot] c5dd873351 📌 Bump lite-youtube-embed from 0.3.2 to 0.3.3
Bumps [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/paulirish/lite-youtube-embed/releases)
- [Commits](https://github.com/paulirish/lite-youtube-embed/compare/v0.3.2...v0.3.3)

---
updated-dependencies:
- dependency-name: lite-youtube-embed
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-14 05:56:48 +00:00
dependabot[bot] 1fbb47f5d5 📌 Bump tailwindcss from 3.4.7 to 3.4.10
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.7 to 3.4.10.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.10/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.7...v3.4.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-14 05:56:36 +00:00
unacro d6873cf1b1 chore: Move .Site.Author to .Site.Params.Author 2024-08-11 20:45:05 +08:00
sculptor189 3ea13cfe37 correct time format 2024-08-10 19:23:16 -04:00
sculptor189 213880a1a3 add rel attribute to button shortcode 2024-08-10 15:15:59 -04:00
Asterisk e7a24c2e86 toot is now share2fedi (sharing.json) 2024-08-10 12:29:57 -04:00
Asterisk a5e9ac3997 edit default sharing link config 2024-08-10 11:40:07 -04:00
Asterisk 565837e0f5 Merge branch 'dev' into patch-2 2024-08-10 11:29:43 -04:00
Asterisk be6ce389c6 Update sharing.json 2024-08-10 11:28:30 -04:00
Asterisk 042eca79b2 fix period 2024-08-10 11:26:17 -04:00
Asterisk 40422fe062 Add mastodon sharing link 2024-08-10 11:17:52 -04:00
W.T. Chang c35242e912 add trailing slash for homepage.showMoreLinkDest 2024-08-10 19:21:45 +08:00
Nuno Coração 41615910a7 new version 2024-08-10 11:27:52 +01:00
Nuno Coração 580f36f0de Merge pull request #1621 from nunocoracao/dev
🔖 v2.75.0
2024-08-10 11:24:13 +01:00
Nuno Coração 80417d4238 final polish 2024-08-10 11:23:56 +01:00
Nuno Coração 32af8f189a Merge pull request #1659 from insidemordecai/dev
✨ Add 'Reply by Email' feature
2024-08-10 11:04:04 +01:00
Nuno Coração addf561a06 Merge branch 'dev' into dev 2024-08-10 11:02:44 +01:00
Nuno Coração 8a8ba86ab2 Merge pull request #1670 from ragibson/main
Consistently include js/page.js in relevant statement scopes
2024-08-10 11:00:47 +01:00
Nuno Coração f29b2cf002 Merge pull request #1671 from ragibson/break-long-urls
Word break long urls in CSS to avoid overflowing site width
2024-08-10 11:00:22 +01:00
Nuno Coração 4ba49d789d Merge pull request #1649 from ldericher/workaround-datetime-no-md
🐛 workaround for #1647
2024-08-10 10:59:25 +01:00
Nuno Coração c3f398058e Merge pull request #1646 from ldericher/support-svg-logo
✨ add SVG support for logos
2024-08-10 10:57:40 +01:00
Nuno Coração 0086ecdca5 Merge pull request #1642 from zizicici/main
Update README.md - Installation Part
2024-08-10 10:56:39 +01:00
Nuno Coração cff363fe77 Merge pull request #1640 from Weaxs/main
✨ Support Seline Analysis
2024-08-10 10:56:01 +01:00
Nuno Coração c18545b157 Merge pull request #1668 from ldericher/image-quality
✨ add parameters for finer adjustment of image quality
2024-08-10 10:53:37 +01:00
Nuno Coração dba26eb03f Merge pull request #1662 from dahisea/main
Update index.zh-cn.md
2024-08-10 10:51:13 +01:00
Nuno Coração bf77092865 Merge pull request #1660 from SmileGuide/dev
Add README.zh-cn.md
2024-08-10 10:50:52 +01:00
Nuno Coração 100aec8707 Merge pull request #1653 from StepaniaH/doc-chinese-optimization
Doc Chinese Optimization
2024-08-10 10:50:19 +01:00
Nuno Coração 7fc9a47b33 Merge pull request #1664 from sculptor189/main
Update Japanese translation
2024-08-10 10:49:18 +01:00
Nuno Coração a11112bfed Merge pull request #1666 from ldericher/selfhosted-git
✨ Add support for selfhosted git servers
2024-08-10 10:48:37 +01:00
Nuno Coração ad956ad51f Merge pull request #1628 from kurokobo/author_link
fix: correct links for the author pages
2024-08-10 10:46:13 +01:00
Nuno Coração 2f26d4d33e Merge pull request #1629 from ILoveBacteria/new-language
New fa.yaml for Persian language
2024-08-10 10:45:33 +01:00
Nuno Coração e796e4195a Merge pull request #1667 from ldericher/fix-typos
🐛 Fix typos
2024-08-10 10:44:43 +01:00
Nuno Coração fb0fc90df6 Merge pull request #1638 from wtchangdm/add-hash-to-libs
Add hash for jquery, zoom, typeit, and youtube lite URLs
2024-08-10 10:41:16 +01:00
Nuno Coração 5409cefcce Merge pull request #1637 from wtchangdm/add-trailing-slash
Add trailing slash for show more link
2024-08-10 10:40:33 +01:00
Nuno Coração bb6f8baf12 Merge pull request #1625 from wtchangdm/main
Fix warning caused by data.GetJSON
2024-08-10 10:39:26 +01:00
Nuno Coração 94411b39c0 Merge pull request #1654 from LesserCat/patch-1
update user list
2024-08-10 10:38:45 +01:00
Nuno Coração 4334878081 Merge branch 'dev' into patch-1 2024-08-10 10:38:36 +01:00
Nuno Coração 681586b5bc Merge pull request #1631 from micheledinelli/main
Update user list
2024-08-10 10:37:19 +01:00
Nuno Coração 9796ba1f20 Merge branch 'main' into main 2024-08-10 10:36:45 +01:00
Nuno Coração b2c27bed1b Merge pull request #1630 from nveshaan/main
update user list
2024-08-10 10:35:30 +01:00
Nuno Coração e46e45c9e6 Merge pull request #1633 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-3.3.3
📌 Bump prettier from 3.3.2 to 3.3.3
2024-08-10 10:34:16 +01:00
Nuno Coração 038c9f7d35 Merge pull request #1665 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.15.0
📌 Bump puppeteer from 22.14.0 to 22.15.0
2024-08-10 10:34:02 +01:00
Ryan Gibson ddb508446c Recompile CSS 2024-08-08 23:29:25 -04:00
Ryan Gibson b81ef0b227 Fix long URLs breaking out of article bounds on mobile 2024-08-08 23:29:25 -04:00
Ryan Gibson c12753c069 Consistently include js/page.js in relevant statement scopes 2024-08-08 23:02:30 -04:00
Jörn-Michael Miehe 148b45f12d forgejo icon stroke transparency 2024-08-09 00:19:31 +02:00
Jörn-Michael Miehe 190f011f88 🐛 icon fixes 2024-08-08 15:16:56 +02:00
Jörn-Michael Miehe 5926504cf3 move "default server" param documentation to docs/configuration 2024-08-08 02:01:38 +02:00
Jörn-Michael Miehe 0477c2018d ✨ add documentation to the exampleSite 2024-08-08 02:01:38 +02:00
Jörn-Michael Miehe 5762ecaf1b ✨ add shortcodes
- "forgejo" and "gitea"
- add copies as giteaColors.json resp. forgejoColors.json
- add params "giteaDefaultServer" and "forgejoDefaultServer"
2024-08-08 02:01:38 +02:00
Jörn-Michael Miehe fce2c4908b ✨ add icons
- forgejo.svg and gitea.svg (minified)
2024-08-08 02:01:38 +02:00
Jörn-Michael Miehe b772b5ed97 parameter backgroundImageWidth default function usage 2024-08-08 02:00:47 +02:00
Jörn-Michael Miehe eebadb405f ✨ add parameter author.imageQuality + english documentation 2024-08-08 01:54:47 +02:00
Jörn-Michael Miehe 090fd09ccf ✨ add parameter backgroundImageWidth + english documentation 2024-08-08 01:36:30 +02:00
Jörn-Michael Miehe cf85d913fb 🐛 fix typos in "term" default layout 2024-08-07 23:04:20 +02:00
Jörn-Michael Miehe cfe270e278 🐛 fix typos in "codeberg" shortcode 2024-08-07 23:01:50 +02:00
dependabot[bot] eebfab161c 📌 Bump puppeteer from 22.14.0 to 22.15.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.14.0 to 22.15.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.14.0...puppeteer-v22.15.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 05:34:38 +00:00
Mordecai K 47b99754e1 style(reply-by-email): separation from content
Add more separation from the content by adding a top margin
Add button-like styling to differentiate the link
2024-08-05 11:30:56 +03:00
dependabot[bot] aef409793a 📌 Bump prettier from 3.3.2 to 3.3.3
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.2 to 3.3.3.
- [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/3.3.2...3.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-04 20:44:34 +00:00
Nuno Coração b755978bae Merge pull request #1656 from nunocoracao/dependabot/npm_and_yarn/dev/typeit-8.8.4 2024-08-04 21:44:00 +01:00
Nuno Coração 931b65d141 Merge pull request #1657 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.14.0 2024-08-04 21:43:42 +01:00
Nuno Coração 89bd6ff884 Merge pull request #1655 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss-3.4.7 2024-08-04 21:43:24 +01:00
Nuno Coração 5f08c9428f Merge pull request #1623 from nunocoracao/hugo-new-version 2024-08-04 21:41:42 +01:00
sculptor189 41e5dc96db update japanese translation 2024-08-03 21:19:46 -04:00
nunocoracao cbd2ea70f9 Update Hugo supported version 2024-08-03 06:05:45 +00:00
Dahi e6167230b0 Update index.zh-cn.md 2024-08-02 14:32:02 +08:00
Karlukle 2c387ca348 Merge branch 'nunocoracao:dev' into dev 2024-08-01 13:22:26 +08:00
smileguide d23f448ee2 fix README.zh-cn.md 2024-08-01 13:22:01 +08:00
smileguide ce478c44d1 ru 2024-08-01 13:20:26 +08:00
smileguide 6838abecf2 add README.zh-cn.md 2024-08-01 13:14:45 +08:00
Mordecai K 43233a4e54 docs: reply-by-email 2024-07-31 17:04:38 +03:00
Mordecai K 5088638936 feat: add reply via email functionality 2024-07-31 16:42:39 +03:00
dependabot[bot] 1f8afb157a 💄 Rebuild CSS 2024-07-31 05:44:01 +00:00
dependabot[bot] c01b084c0f 📌 Bump puppeteer from 22.13.0 to 22.14.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.13.0 to 22.14.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.13.0...puppeteer-v22.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 05:43:47 +00:00
dependabot[bot] c96a9a1871 📌 Bump typeit from 8.8.3 to 8.8.4
Bumps [typeit](https://github.com/alexmacarthur/typeit) from 8.8.3 to 8.8.4.
- [Release notes](https://github.com/alexmacarthur/typeit/releases)
- [Commits](https://github.com/alexmacarthur/typeit/commits/v8.8.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 05:43:36 +00:00
dependabot[bot] 082f886a98 📌 Bump tailwindcss from 3.4.6 to 3.4.7
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.6 to 3.4.7.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.7/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.6...v3.4.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 05:43:32 +00:00
LesserCat 0df6098555 Update users.json 2024-07-31 11:19:33 +08:00
StepaniaH 9bac49e75d 🌐 Optimize Chinese documentation 2024-07-30 23:49:09 +08:00
Jörn-Michael Miehe 6007212bb8 🐛 workaround for #1647 2024-07-30 00:19:35 +02:00
Jörn-Michael Miehe 09bacd9f0b ✨ add SVG support for logos 2024-07-29 23:34:46 +02:00
zizicici 5e285513fb Update README.md - Installation Part
Synced from https://blowfish.page/docs/installation/
2024-07-28 22:43:48 +08:00
Weaxs d52f721c41 enableTrackEvent default true && documents 2024-07-26 17:04:24 +08:00
Weaxs 91d24e626e seline && umami enableTrackEvent 2024-07-26 10:33:50 +08:00
Weaxs bcc26c11b8 support seline analytics 2024-07-26 10:17:39 +08:00
W.T. Chang 8220a922a8 add hash to typeit 2024-07-25 00:06:02 +08:00
W.T. Chang 4fec5ab532 add hash to youtube lite 2024-07-24 23:27:11 +08:00
W.T. Chang df0a232bfc add hash to zoom.min.js 2024-07-24 23:27:00 +08:00
W.T. Chang 4a384379cf add hash for jquery 2024-07-24 23:20:57 +08:00
W.T. Chang 3751df66d6 add trailing slash for show more link 2024-07-24 22:54:15 +08:00
micheledinelli 71a8f61516 Add user file 2024-07-23 13:33:15 +02:00
micheledinelli efe34f4553 Update users.json 2024-07-23 12:42:44 +02:00
Eshaan Naga Venkata 4767cb7d7c Update users.json 2024-07-23 15:37:56 +05:30
Eshaan Naga Venkata 9fd63dcded added user file 2024-07-23 15:35:50 +05:30
Moein Arabi 85194342eb Update docs 2024-07-20 12:41:25 +00:00
Moein Arabi 312a7c79ef Add Persian language translation 2024-07-20 12:30:17 +00:00
kurokobo 8497eef0fe fix: correct links for the author pages 2024-07-19 14:39:08 +00:00
W.T. Chang 121909e809 fix warning caused by getJSON 2024-07-18 23:33:44 +08:00
Nuno Coração e46afe45cf v2.75.0 2024-07-17 12:18:06 +01:00
Nuno Coração 18ed67b2e6 Merge pull request #1601 from nunocoracao/dev
🔖 v2.74.0
2024-07-17 12:16:41 +01:00
Nuno Coração 62c022c76a update user listing 2024-07-17 12:14:00 +01:00
Nuno Coração 6d29a96533 Merge pull request #1614 from panjinbo/main
👤 Add new example site
2024-07-17 12:05:20 +01:00
Nuno Coração 121ae89ca9 Merge branch 'dev' into main 2024-07-17 12:05:08 +01:00
Nuno Coração 53c0d7e217 Merge pull request #1603 from nunocoracao/dependabot/npm_and_yarn/dev/headlessui/react-2.1.2
📌 Bump @headlessui/react from 2.1.1 to 2.1.2
2024-07-17 12:04:02 +01:00
Nuno Coração bb2a1d7642 Merge pull request #1617 from nunocoracao/dependabot/npm_and_yarn/dev/rimraf-6.0.1
📌 Bump rimraf from 5.0.7 to 6.0.1
2024-07-17 12:03:49 +01:00
Nuno Coração c3d20a7845 Merge pull request #1613 from zen96k/dev
Update users.json
2024-07-17 12:03:32 +01:00
dependabot[bot] 04493e9135 📌 Bump rimraf from 5.0.7 to 6.0.1
Bumps [rimraf](https://github.com/isaacs/rimraf) from 5.0.7 to 6.0.1.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v5.0.7...v6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 11:02:47 +00:00
dependabot[bot] 1afc638ca0 📌 Bump @headlessui/react from 2.1.1 to 2.1.2
Bumps [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.1.2/packages/@headlessui-react)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 11:02:34 +00:00
Nuno Coração 8501a73ab5 Merge pull request #1616 from nunocoracao/dependabot/npm_and_yarn/dev/heroicons/react-2.1.5
📌 Bump @heroicons/react from 2.1.4 to 2.1.5
2024-07-17 12:01:36 +01:00
Nuno Coração e1b863a0dd Merge pull request #1618 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.13.0
📌 Bump puppeteer from 22.12.1 to 22.13.0
2024-07-17 12:01:13 +01:00
Nuno Coração 410a289d4e Merge pull request #1619 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss-3.4.6
📌 Bump tailwindcss from 3.4.4 to 3.4.6
2024-07-17 12:01:02 +01:00
Nuno Coração 5aa9c973a8 Merge pull request #1609 from wtchangdm/main
⚡ target user PR link to dev branch
2024-07-17 12:00:51 +01:00
Nuno Coração 5ee922f30e Merge pull request #1608 from insidemordecai/dev
✨ add spotify icon
2024-07-17 11:56:41 +01:00
dependabot[bot] 7af72d197f 💄 Rebuild CSS 2024-07-17 05:24:01 +00:00
dependabot[bot] e09b90d38b 📌 Bump tailwindcss from 3.4.4 to 3.4.6
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.4 to 3.4.6.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.6/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.4...v3.4.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 05:23:35 +00:00
dependabot[bot] 2f2fdae2c1 📌 Bump puppeteer from 22.12.1 to 22.13.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.12.1 to 22.13.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.12.1...puppeteer-v22.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 05:23:24 +00:00
dependabot[bot] 1e2bd0e884 📌 Bump @heroicons/react from 2.1.4 to 2.1.5
Bumps [@heroicons/react](https://github.com/tailwindlabs/heroicons) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/tailwindlabs/heroicons/releases)
- [Changelog](https://github.com/tailwindlabs/heroicons/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/heroicons/compare/v2.1.4...v2.1.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 05:23:03 +00:00
Jinbo Pan 828cd6257b Add new example site
Add panjinbo.com for example site
2024-07-15 22:53:59 -07:00
Kotaro Kuroda 428510115d Update users.json 2024-07-14 19:51:50 +09:00
W.T. Chang 17cd866a04 target user PR link to dev branch 2024-07-11 01:31:18 +08:00
Mordecai K 465bd4f563 🔧 include spotify icon 2024-07-10 14:07:29 +03:00
Mordecai K 3ca1252db9 ✨ add spotify icon 2024-07-10 14:04:03 +03:00
Nuno Coração f99ec1ed2a update users 2024-07-09 13:25:44 +01:00
Nuno Coração 1f08dcb9d2 Merge pull request #1584 from nunocoracao/dev
🔖 v2.73.0
2024-07-09 13:24:30 +01:00
Nuno Coração abe51362e2 update users 2024-07-09 13:24:07 +01:00
Nuno Coração 3d07a2373e Merge pull request #1588 from wtchangdm/main
Remove unneeded files in lib/mermaid
2024-07-09 13:22:51 +01:00
Nuno Coração 8019b24aff Merge pull request #1593 from Weaxs/main
✨ umami analytics support data-domains
2024-07-09 13:21:07 +01:00
Nuno Coração 2a5e1289f1 Merge pull request #1586 from UmmItC/dev
Update users.json
2024-07-09 13:18:28 +01:00
Nuno Coração 47a0bd27d0 Merge pull request #1591 from nunocoracao/dependabot/npm_and_yarn/dev/katex-0.16.11
📌 Bump katex from 0.16.10 to 0.16.11
2024-07-09 13:17:53 +01:00
Nuno Coração 02b079bd79 Merge pull request #1590 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.12.1
📌 Bump puppeteer from 22.12.0 to 22.12.1
2024-07-09 13:17:34 +01:00
Nuno Coração c78a776465 Merge pull request #1589 from nunocoracao/dependabot/npm_and_yarn/dev/headlessui/react-2.1.1
📌 Bump @headlessui/react from 2.1.0 to 2.1.1
2024-07-09 13:17:23 +01:00
Nuno Coração d339db0c17 Merge pull request #1592 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-07-09 13:17:09 +01:00
W.T. Chang 26af64fb51 Rollback commit on wrong branch 2024-07-07 14:57:46 +08:00
W.T. Chang 0d2c3013c5 Update go.mod 2024-07-07 14:56:01 +08:00
nunocoracao f0ba1ed5a9 Update Hugo supported version 2024-07-05 06:05:10 +00:00
Weaxs 6f73fc630c umami analytics support data-domains 2024-07-05 11:09:22 +08:00
dependabot[bot] 4b9a773ffa 📦 Update packaged KaTeX 2024-07-03 06:06:33 +00:00
dependabot[bot] 2e1f74eb6c 📌 Bump katex from 0.16.10 to 0.16.11
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.10 to 0.16.11.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.10...v0.16.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 06:06:06 +00:00
dependabot[bot] 09c89a03fa 📌 Bump puppeteer from 22.12.0 to 22.12.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.12.0 to 22.12.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.12.0...puppeteer-v22.12.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 06:05:46 +00:00
dependabot[bot] 514c5557b9 📌 Bump @headlessui/react from 2.1.0 to 2.1.1
Bumps [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.1.1/packages/@headlessui-react)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 06:05:08 +00:00
W.T. Chang e293c0e58b copy mermaid.min.js only 2024-07-02 17:13:01 +08:00
W.T. Chang 64bc03f0f1 clean up files in lib/mermaid 2024-07-02 17:11:57 +08:00
UmmIt 849181bb56 Update users.json 2024-06-29 20:54:38 +08:00
Nuno Coração b3b165ce58 prep new verison 2024-06-27 23:18:57 +01:00
Nuno Coração c6c2689195 Merge pull request #1581 from nunocoracao/dev
🔖 v2.72.1
2024-06-27 23:18:06 +01:00
Nuno Coração d869c9c341 polish release 2024-06-27 23:17:49 +01:00
Nuno Coração 0075523d12 Merge pull request #1582 from nunocoracao/1563-add-ability-to-turn-off-dates-in-search
🐛 fix https://github.com/nunocoracao/blowfish/issues/1563
2024-06-27 23:08:42 +01:00
Nuno Coração 2ffe55a86a fix https://github.com/nunocoracao/blowfish/issues/1563 2024-06-27 23:05:51 +01:00
Nuno Coração 54d63fa4fc new version prep 2024-06-27 22:13:53 +01:00
Nuno Coração 9e19e933be Merge pull request #1572 from nunocoracao/dev
🔖 v2.72.0
2024-06-27 22:12:23 +01:00
Nuno Coração 9aaff799ee process users final polish 2024-06-27 22:12:06 +01:00
Nuno Coração 2e9f401017 small fixes to merged PR 2024-06-27 22:06:05 +01:00
Nuno Coração 84dc447944 Merge pull request #1558 from jason810496/main
✨ Add startLine, endLine Support for `codeimporter`
2024-06-27 22:04:07 +01:00
Nuno Coração 447006c9bc Merge pull request #1577 from mpoore/main
✨ Add data definition for sharing on Bluesky
2024-06-27 22:02:13 +01:00
Nuno Coração c4674781cd Merge pull request #1566 from wtchangdm/patch-1
👤 Update users.json
2024-06-27 21:59:46 +01:00
Nuno Coração a7d5533550 Merge branch 'dev' into patch-1 2024-06-27 21:59:40 +01:00
Nuno Coração 40d0e3afd5 Merge pull request #1565 from grahamking22/patch-1
👤 updated users.json
2024-06-27 21:58:20 +01:00
Nuno Coração 3fe84ee348 Merge pull request #1561 from b110011/dev
🌐 Add Ukrainian translation
2024-06-27 21:56:52 +01:00
Nuno Coração 001251711d Merge pull request #1574 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.12.0
📌 Bump puppeteer from 22.11.2 to 22.12.0
2024-06-27 21:55:29 +01:00
Nuno Coração 14929c9e52 Merge pull request #1573 from nunocoracao/dependabot/npm_and_yarn/dev/headlessui/react-2.1.0
📌 Bump @headlessui/react from 2.0.4 to 2.1.0
2024-06-27 21:55:18 +01:00
Nuno Coração eead070c23 Merge pull request #1575 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-06-27 21:55:00 +01:00
Michael Poore dcb01b0daa ✨ Add data definition for sharing on Bluesky 2024-06-26 15:54:06 +01:00
nunocoracao c10a97a7cc Update Hugo supported version 2024-06-26 06:05:06 +00:00
dependabot[bot] e15aaf7fb5 📌 Bump puppeteer from 22.11.2 to 22.12.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.11.2 to 22.12.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.11.2...puppeteer-v22.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-26 05:55:02 +00:00
dependabot[bot] 15782b0b96 📌 Bump @headlessui/react from 2.0.4 to 2.1.0
Bumps [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) from 2.0.4 to 2.1.0.
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.1.0/packages/@headlessui-react)

---
updated-dependencies:
- dependency-name: "@headlessui/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-26 05:54:41 +00:00
Nuno Coração 8972e66824 bla 2024-06-25 21:51:59 +01:00
Nuno Coração 485f44e2b4 Merge pull request #1571 from nunocoracao/main
merge v2.71.1 changes into dev
2024-06-25 21:50:32 +01:00
Nuno Coração 94515e2265 Merge branch 'dev' into main 2024-06-25 21:50:16 +01:00
Nuno Coração e7c61f9dbd Update package.json 2024-06-25 21:48:07 +01:00
Nuno Coração adff33a9cf Merge pull request #1569 from nunocoracao/dependabot/npm_and_yarn/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3
2024-06-25 21:47:18 +01:00
dependabot[bot] bfaacaa8c4 💄 Rebuild CSS 2024-06-25 20:44:23 +00:00
dependabot[bot] 22ab897f60 Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 20:43:53 +00:00
W.T. Chang bfb8a74679 Update users.json 2024-06-25 23:13:27 +08:00
W.T. Chang 652b482f7f Update users.json 2024-06-24 05:21:32 +08:00
grahamking22 78d520bb53 updated users.json 2024-06-23 21:11:50 +01:00
jason810496 c91bc9dfb5 fix: handle codeimporter URL encoding 2024-06-22 23:37:23 +08:00
jason810496 8a710a5f1a docs: fix codeimporter docs example 2024-06-22 00:10:40 +08:00
jason810496 6b4480ae83 docs: add codeimpoter startLine endLine docs 2024-06-21 23:59:10 +08:00
jason810496 2b001f0761 feat: add startLine and endLine support for codeimporter 2024-06-21 23:48:13 +08:00
Nuno Coração 7b118a8344 update readme 2024-06-19 18:10:55 +01:00
Nuno Coração 7ca7fea8a4 new version prep 2024-06-19 18:05:10 +01:00
Nuno Coração efba32b076 Merge pull request #1518 from nunocoracao/dev
🔖 v2.71.0
2024-06-19 18:00:04 +01:00
Nuno Coração ed1efd2f1a update user listing 2024-06-19 17:59:29 +01:00
Nuno Coração 2406d75ddc update user listing 2024-06-19 17:55:31 +01:00
Nuno Coração 7bf5e630ef config order by weight 2024-06-19 17:53:52 +01:00
Nuno Coração 5ccc8c23cf Merge pull request #1538 from mnjm/order-by-weight
✨ Articles ordering by weight
2024-06-19 17:38:32 +01:00
Nuno Coração a7fa4bb102 Merge pull request #1529 from nunocoracao/1474-long-tocs-not-shown-fully
🎨 Improve UI/UX for long TOCs
2024-06-19 17:37:55 +01:00
Nuno Coração ad9ab104db final polish 2024-06-19 17:37:35 +01:00
Nuno Coração 2245ef7ac5 Merge branch 'dev' into 1474-long-tocs-not-shown-fully 2024-06-19 17:23:50 +01:00
Nuno Coração 9b428c9f71 updating package.json 2024-06-19 17:22:11 +01:00
Nuno Coração d9ab4bd069 Merge pull request #1552 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-plugin-tailwindcss-0.6.5
📌 Bump prettier-plugin-tailwindcss from 0.6.1 to 0.6.5
2024-06-19 17:17:26 +01:00
Nuno Coração b81fc6cd5e Merge pull request #1532 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-3.3.2
📌 Bump prettier from 3.3.0 to 3.3.2
2024-06-19 17:17:09 +01:00
Nuno Coração 2685f70c99 Merge pull request #1533 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss-3.4.4
📌 Bump tailwindcss from 3.4.3 to 3.4.4
2024-06-19 17:16:56 +01:00
Nuno Coração 5b4309b35f Merge pull request #1547 from jblais493/main
👤 Add Joshblais.com to users.json
2024-06-19 17:16:46 +01:00
Nuno Coração 81e14c3972 Merge branch 'dev' into main 2024-06-19 17:16:39 +01:00
dependabot[bot] b25a495e1d 📌 Bump prettier from 3.3.0 to 3.3.2
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.0 to 3.3.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/3.3.0...3.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 16:15:52 +00:00
dependabot[bot] 8764d6f153 📌 Bump prettier-plugin-tailwindcss from 0.6.1 to 0.6.5
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.6.1 to 0.6.5.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.1...v0.6.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 16:15:37 +00:00
Nuno Coração fe93c478c4 Merge pull request #1548 from ennnbeee/main
Update users.json
2024-06-19 17:15:31 +01:00
Nuno Coração 0d90f00588 Merge pull request #1551 from nunocoracao/dependabot/npm_and_yarn/dev/heroicons/react-2.1.4
📌 Bump @heroicons/react from 2.1.3 to 2.1.4
2024-06-19 17:14:41 +01:00
Nuno Coração 80384f52bf Merge pull request #1553 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.11.2
📌 Bump puppeteer from 22.10.0 to 22.11.2
2024-06-19 17:14:24 +01:00
Nuno Coração 2d3fa0185d Merge pull request #1550 from mnjm/fix-1549-url-encoding
🐛 fix: https://github.com/nunocoracao/blowfish/issues/1549
2024-06-19 17:01:20 +01:00
dependabot[bot] ee56e3158f 📌 Bump puppeteer from 22.10.0 to 22.11.2
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.10.0 to 22.11.2.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.10.0...puppeteer-v22.11.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 05:26:44 +00:00
dependabot[bot] 6f75be5c13 📌 Bump @heroicons/react from 2.1.3 to 2.1.4
Bumps [@heroicons/react](https://github.com/tailwindlabs/heroicons) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/tailwindlabs/heroicons/releases)
- [Changelog](https://github.com/tailwindlabs/heroicons/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/heroicons/compare/v2.1.3...v2.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 05:26:01 +00:00
Manjunath Mohan e8dfdfe528 fix: https://github.com/nunocoracao/blowfish/issues/1549 2024-06-19 09:57:27 +05:30
Nick Benton 3fd24cb9b7 Update users.json 2024-06-16 23:31:33 +01:00
Joshua Blais 5f1b173656 add Joshblais.com to users.json 2024-06-16 09:44:52 -06:00
Manjunath Mohan ad72c1d7e6 + orderByWeight to configs and doc 2024-06-12 14:33:31 +05:30
dependabot[bot] 9b5fad45ce 💄 Rebuild CSS 2024-06-12 05:14:07 +00:00
dependabot[bot] 6618017998 📌 Bump tailwindcss from 3.4.3 to 3.4.4
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.3 to 3.4.4.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.4/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.3...v3.4.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-12 05:13:38 +00:00
Manjunath Mohan 6772f403d3 list-template: added ordering by weight 2024-06-12 10:19:22 +05:30
Manjunath Mohan afb206e5db list-template: lil house keeping 2024-06-12 10:11:14 +05:30
Nuno Coração d9ef1b8fb6 polish 2024-06-10 17:09:08 +01:00
Nuno Coração a59a7e4fbf polish 2024-06-10 17:08:31 +01:00
Nuno Coração 0efede2f1d fix https://github.com/nunocoracao/blowfish/issues/1474 2024-06-10 12:07:42 +01:00
Nuno Coração 89e048cc11 fixed configs 2024-06-08 12:41:51 +01:00
Nuno Coração f8136a509b Merge pull request #1527 from nunocoracao/1514-getting-started-docs-refer-to-nonexistant-files
✏️ fix https://github.com/nunocoracao/blowfish/issues/1514
2024-06-08 12:25:08 +01:00
Nuno Coração be7c4e8a8b fix https://github.com/nunocoracao/blowfish/issues/1514 2024-06-08 12:24:32 +01:00
Nuno Coração ef71d07bc3 Merge pull request #1526 from nunocoracao/1521-zen-mode-doenst-work-when-toc-is-disabled
🐛 fix https://github.com/nunocoracao/blowfish/issues/1521
2024-06-08 12:21:41 +01:00
Nuno Coração 9c5b68fb22 fix https://github.com/nunocoracao/blowfish/issues/1521 2024-06-08 12:20:26 +01:00
Nuno Coração f81b2f5f09 Merge pull request #1519 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-3.3.0
📌 Bump prettier from 3.2.5 to 3.3.0
2024-06-08 12:07:46 +01:00
Nuno Coração eff80401ed Merge pull request #1520 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-plugin-tailwindcss-0.6.1
📌 Bump prettier-plugin-tailwindcss from 0.5.14 to 0.6.1
2024-06-08 12:07:33 +01:00
Nuno Coração 11ff498657 Merge pull request #1522 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-06-08 12:07:19 +01:00
nunocoracao 703946d023 Update Hugo supported version 2024-06-06 06:05:04 +00:00
dependabot[bot] c901c00097 📌 Bump prettier-plugin-tailwindcss from 0.5.14 to 0.6.1
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.14 to 0.6.1.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.14...v0.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 05:17:58 +00:00
dependabot[bot] 1884bcce55 📌 Bump prettier from 3.2.5 to 3.3.0
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.0.
- [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/3.2.5...3.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 05:17:49 +00:00
Nuno Coração 8c197127bf v2.71.0 2024-06-03 23:30:48 +01:00
Nuno Coração 0a91156191 Merge pull request #1506 from nunocoracao/dev
🔖 v2.70.0
2024-06-03 23:29:33 +01:00
Nuno Coração de5911650f final polish 2024-06-03 23:23:51 +01:00
Nuno Coração 87b4ed88c6 final polish 2024-06-03 23:23:17 +01:00
Nuno Coração cc9ee9d26f Merge pull request #1513 from wermos/minor-improvements
🎨 Improvements to image handling and link handling
2024-06-03 23:21:24 +01:00
Nuno Coração 1a5e1728d0 Merge pull request #1511 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-06-03 23:20:57 +01:00
Nuno Coração 0033750d1b Merge pull request #1516 from nunocoracao/1510-copyright-in-footer-no-longer-accepts-markdown
🐛 fix copyright in footer no longer accepts markdown
2024-06-03 23:20:17 +01:00
Nuno Coração 576fee1d7d fix https://github.com/nunocoracao/blowfish/issues/1510 2024-06-03 23:19:14 +01:00
Nuno Coração 9bcab20864 Merge pull request #1508 from mnjm/list-doc-fixup
list shortcode doc fix
2024-06-03 23:13:36 +01:00
Nuno Coração 9640f0cb7d Merge pull request #1515 from wermos/fix-timeline
🐛 Prevent numbers from showing up in timelines
2024-06-03 23:03:07 +01:00
wermos f88923b3ff Fixed the issue of the numbers showing up. 2024-06-03 23:54:49 +05:30
wermos 581aba3359 Be less aggressive in removing newlines. 2024-06-03 22:45:22 +05:30
wermos bb435aded7 Minified the shortcodes and added handling for SVGs. 2024-06-03 22:34:24 +05:30
wermos de1cdd431c Fixed an inconsistency. 2024-06-03 20:50:15 +05:30
wermos c6cffadfa1 Made the link shortcode more readable. 2024-06-03 20:39:10 +05:30
wermos 46737b193f Tweaked the image shortcode. 2024-06-03 20:27:19 +05:30
nunocoracao 6d6885d990 Update Hugo supported version 2024-06-03 06:05:16 +00:00
wermos c54b7daff2 Updated the link shortcode. 2024-06-02 12:20:45 +05:30
Manjunath Mohan 26442558a7 list shortcode doc fixup 2024-06-01 12:21:17 +05:30
Nuno Coração 99d482e908 ? 2024-05-31 15:35:59 +01:00
Nuno Coração 37ca4b7640 v2.70.0 2024-05-31 15:11:24 +01:00
Nuno Coração 976e6d1472 Merge pull request #1494 from nunocoracao/dev
🔖 v2.69.0
2024-05-31 15:05:57 +01:00
Nuno Coração d20c8f1ea4 polish site configs 2024-05-31 15:04:29 +01:00
Nuno Coração 8eaef86c0d Merge pull request #1504 from zoriya/main
✨ Use markdown emojify instead of dump emojify
2024-05-31 15:01:03 +01:00
Nuno Coração e06fedcc60 Merge pull request #1501 from nunocoracao/dependabot/npm_and_yarn/dev/headlessui/react-2.0.4
📌 Bump @headlessui/react from 2.0.3 to 2.0.4
2024-05-31 14:57:21 +01:00
Nuno Coração b7eff2653d Merge pull request #1500 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.10.0
📌 Bump puppeteer from 22.9.0 to 22.10.0
2024-05-31 14:57:09 +01:00
Nuno Coração 628d16e9eb Merge pull request #1496 from racehd/patch-1
✏️ Fix typo in docs/partials/index.md
2024-05-31 14:53:15 +01:00
Nuno Coração b4e564e48d Merge pull request #1503 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-05-31 14:52:23 +01:00
Zoe Roux 9dc7940718 Use markdown emojify instead of dump emojify 2024-05-31 12:37:29 +02:00
nunocoracao d487de1e34 Update Hugo supported version 2024-05-31 06:05:23 +00:00
dependabot[bot] 820c7f5239 📌 Bump @headlessui/react from 2.0.3 to 2.0.4
Bumps [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.0.4/packages/@headlessui-react)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-29 05:59:34 +00:00
dependabot[bot] 3cb7bf2549 📌 Bump puppeteer from 22.9.0 to 22.10.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.9.0 to 22.10.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.9.0...puppeteer-v22.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-29 05:59:08 +00:00
racehd 6e2243ffcf Fix typo in partials/index.md 2024-05-28 08:59:03 -04:00
BabaRagnarok f52acf7a0f Update configuration file index.it.md
Translated some content
2024-05-28 11:34:11 +02:00
Nuno Coração a6e3b4899c v2.69.0 2024-05-26 22:11:43 +01:00
Nuno Coração c03744bd54 Merge pull request #1466 from nunocoracao/dev
🔖 v2.68.0
2024-05-26 22:09:07 +01:00
Nuno Coração a0dd73975c Merge pull request #1492 from nunocoracao/1112-some-figure-shortcode-attributes-have-no-effect
fixed https://github.com/nunocoracao/blowfish/issues/1112
2024-05-26 22:03:37 +01:00
Nuno Coração 5e0744981d fixed https://github.com/nunocoracao/blowfish/issues/1112 2024-05-26 22:02:28 +01:00
Nuno Coração 92494f353e Merge pull request #1485 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.9.0
📌 Bump puppeteer from 22.8.1 to 22.9.0
2024-05-26 21:40:31 +01:00
Nuno Coração d9d81d8560 Merge pull request #1484 from nunocoracao/dependabot/npm_and_yarn/dev/commander-12.1.0
📌 Bump commander from 12.0.0 to 12.1.0
2024-05-26 21:40:13 +01:00
Nuno Coração 3682046790 Merge pull request #1483 from nunocoracao/dependabot/npm_and_yarn/dev/chart.js-4.4.3
📌 Bump chart.js from 4.4.2 to 4.4.3
2024-05-26 21:39:59 +01:00
Bytes Mess 86c0d8d471 Update Ukrainian translation
- Added missing fields
- Mention new translation in docs
2024-05-23 01:37:33 +03:00
Andrii Serbovets 77e789f1a5 🌐 Add Ukrainian translation
Ported from jpanther/congo#703.
2024-05-23 01:36:56 +03:00
dependabot[bot] 8e4b1db3cb 📦 Update packaged ChartJS 2024-05-22 05:28:48 +00:00
dependabot[bot] aa42fcefed ---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-22 05:28:31 +00:00
dependabot[bot] a8bfb2af20 ---
updated-dependencies:
- dependency-name: commander
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-22 05:28:19 +00:00
dependabot[bot] 3ff34c2712 ---
updated-dependencies:
- dependency-name: chart.js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-22 05:28:12 +00:00
Nuno Coração cd073158b1 small polish of new shortcode 2024-05-19 15:35:36 +01:00
Nuno Coração 0b533a66da Merge pull request #1475 from UmmItC/dev
Add codeberg shortcode and icon support
2024-05-19 15:27:30 +01:00
Nuno Coração 2889f305ed Merge pull request #1479 from nunocoracao/main
disable views/likes
2024-05-19 15:26:28 +01:00
UmmIt 6e359f5af8 Add codeberg shortcode to the shortcode page 2024-05-19 13:19:06 +08:00
UmmIt cd7cf9b347 Merge branch 'nunocoracao:dev' into dev 2024-05-19 02:56:58 +00:00
Nuno Coração ba47d99390 update 2024-05-19 00:50:26 +01:00
Nuno Coração 193f54fe11 update 2024-05-18 15:04:46 +01:00
Nuno Coração 239f82ed3c Merge pull request #1476 from DJKero/add-user
👤 Add new user to users page
2024-05-18 15:01:49 +01:00
Nuno Coração ea3b32c791 Merge pull request #1471 from nunocoracao/dependabot/npm_and_yarn/dev/rimraf-5.0.7
📌 Bump rimraf from 5.0.5 to 5.0.7
2024-05-18 15:01:01 +01:00
Nuno Coração bc18e92896 Merge branch 'dev' into dependabot/npm_and_yarn/dev/rimraf-5.0.7 2024-05-18 15:00:50 +01:00
Nuno Coração 60480bdc8b Merge pull request #1473 from wermos/patch-1
Fix inconsistency in docs
2024-05-18 14:57:52 +01:00
Nuno Coração 3a8049a481 Merge pull request #1472 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-05-18 14:56:32 +01:00
Nuno Coração 178f0baf8d Merge pull request #1470 from nunocoracao/dependabot/npm_and_yarn/dev/mermaid-10.9.1
📌 Bump mermaid from 10.9.0 to 10.9.1
2024-05-18 14:55:45 +01:00
Nuno Coração b3b86ec876 Merge pull request #1469 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.8.1
📌 Bump puppeteer from 22.8.0 to 22.8.1
2024-05-18 14:55:31 +01:00
Nuno Coração 72ed17d32f Merge pull request #1447 from jmmarino2/Galician
🎏 New gl.yaml for Galician language
2024-05-18 14:55:18 +01:00
Ignacio Conde 80dbadd2db Add new user to users.json 2024-05-17 19:26:10 -03:00
UmmIt 1760d97f99 Add codeberg icon support 2024-05-17 09:52:27 +08:00
UmmIt 5ac21e9121 Add codeberg shortcode 2024-05-17 09:33:51 +08:00
nunocoracao 0c9e7de007 Update Hugo supported version 2024-05-16 06:04:12 +00:00
Tirthankar Mazumder 938d931f2d Update index.md
Made one TypeIt example consistent with the output
2024-05-16 10:55:47 +05:30
Tirthankar Mazumder 5e7ecada9a Update index.md 2024-05-16 10:49:01 +05:30
dependabot[bot] f157632721 💄 Rebuild CSS 2024-05-15 05:28:32 +00:00
dependabot[bot] 5dfc7dc8d6 💄 Rebuild CSS 2024-05-15 05:28:29 +00:00
dependabot[bot] e1a6518a8a 📦 Update packaged Mermaid 2024-05-15 05:28:27 +00:00
dependabot[bot] f7f803d281 💄 Rebuild CSS 2024-05-15 05:28:18 +00:00
dependabot[bot] f2c975ef81 📌 Bump rimraf from 5.0.5 to 5.0.7
Bumps [rimraf](https://github.com/isaacs/rimraf) from 5.0.5 to 5.0.7.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v5.0.5...v5.0.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-15 05:28:03 +00:00
dependabot[bot] 621066e306 📌 Bump mermaid from 10.9.0 to 10.9.1
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 10.9.0 to 10.9.1.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/mermaid-js/mermaid/compare/v10.9.0...v10.9.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-15 05:27:55 +00:00
dependabot[bot] a1b9094dd7 📌 Bump puppeteer from 22.8.0 to 22.8.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.8.0 to 22.8.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.8.0...puppeteer-v22.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-15 05:27:46 +00:00
José Manuel Mariño Mariño 6fdae2a00d Updated language number 2024-05-14 10:15:17 +02:00
José Manuel Mariño Mariño b11b32f3e5 Update index.md with Galician language 2024-05-14 10:12:35 +02:00
José Manuel Mariño Mariño 7cff1c3dc0 Merge branch 'nunocoracao:main' into Galician 2024-05-14 10:08:36 +02:00
Nuno Coração c98134b851 start new version 2024-05-13 23:06:29 +01:00
Nuno Coração 18ac12ea3c Merge pull request #1442 from nunocoracao/dev
🔖 v2.67.0
2024-05-13 23:05:19 +01:00
Nuno Coração 427830ed8f final polish 2024-05-13 23:05:04 +01:00
Nuno Coração 5773c1ee9b Merge pull request #1464 from nunocoracao/1404-the-rendering-is-misaligned-when-the-shortcode-github-is-under-the-timelineitem
🐛 fixed https://github.com/nunocoracao/blowfish/issues/1404
2024-05-13 22:59:45 +01:00
Nuno Coração 015ebabcab fixed https://github.com/nunocoracao/blowfish/issues/1404 2024-05-13 22:58:20 +01:00
Nuno Coração cf69bbef19 update user listing 2024-05-13 22:46:48 +01:00
Nuno Coração 5a5a856832 add translation for new shortcode 2024-05-13 22:04:07 +01:00
Nuno Coração f65cc799c8 Merge pull request #1461 from mnjm/code-importer-shortcode
✨ codeimporter shortcode
2024-05-13 21:58:18 +01:00
Nuno Coração 83b9670c7e Merge pull request #1443 from sakarie9/dev
🐛 Fix TOC scroll indicator with CJK characters
2024-05-13 21:43:42 +01:00
Nuno Coração d4b11d08c8 Merge pull request #1454 from michaeldorner/patch-1
Add new user to users page
2024-05-13 21:37:41 +01:00
Nuno Coração aea32c0a6e Merge branch 'dev' into patch-1 2024-05-13 21:37:32 +01:00
Nuno Coração 5accdbead8 Merge pull request #1448 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss/typography-0.5.13
📌 Bump @tailwindcss/typography from 0.5.12 to 0.5.13
2024-05-13 21:34:46 +01:00
Nuno Coração f2e49d89a4 Merge pull request #1456 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.8.0
📌 Bump puppeteer from 22.7.0 to 22.8.0
2024-05-13 21:34:32 +01:00
Nuno Coração f2436b6e61 Merge pull request #1450 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-05-13 21:33:55 +01:00
Nuno Coração e1f600a59f Merge pull request #1457 from nunocoracao/dependabot/npm_and_yarn/dev/headlessui/react-2.0.3
📌 Bump @headlessui/react from 1.7.19 to 2.0.3
2024-05-13 21:29:35 +01:00
Nuno Coração 18408a92fb Merge pull request #1462 from ncocchiaro/add-to-users-json
👤 Update users.json
2024-05-13 21:28:54 +01:00
Nicola Cocchiaro e89ebb05c9 Update users.json 2024-05-11 18:25:19 -07:00
Manjunath Mohan 07d1396986 Added codeimporter shortcode
- updated exampleSite.
2024-05-10 12:11:46 +05:30
nunocoracao ce52d9808f Update Hugo supported version 2024-05-09 06:04:43 +00:00
dependabot[bot] 184c3d0584 📌 Bump @headlessui/react from 1.7.19 to 2.0.3
Bumps [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) from 1.7.19 to 2.0.3.
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.0.3/packages/@headlessui-react)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-08 05:38:32 +00:00
dependabot[bot] 4348aa1e6e 📌 Bump puppeteer from 22.7.0 to 22.8.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.7.0 to 22.8.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.7.0...puppeteer-v22.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-08 05:38:23 +00:00
Michael Dorner 46e943ca71 Add me to users 2024-05-05 11:19:28 +02:00
dependabot[bot] dc654f4ac7 💄 Rebuild CSS 2024-05-01 05:16:53 +00:00
dependabot[bot] 627ad4bf0b 📌 Bump @tailwindcss/typography from 0.5.12 to 0.5.13
Bumps [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography) from 0.5.12 to 0.5.13.
- [Release notes](https://github.com/tailwindlabs/tailwindcss-typography/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss-typography/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss-typography/compare/v0.5.12...v0.5.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 05:16:12 +00:00
José Manuel Mariño Mariño a06f7ecc3a New gl.yaml for Galician language 2024-04-30 21:18:29 +02:00
Sakari 49e83b148c fix: CJK characters in TOC scroll indicator 2024-04-29 15:28:34 +08:00
Nuno Coração 7d634c9ac9 start v2.67.0 2024-04-28 22:20:16 +01:00
Nuno Coração 13ff6f5341 Merge pull request #1412 from nunocoracao/dev
🔖 v2.66.0
2024-04-28 22:18:36 +01:00
Nuno Coração deb389364b final polish 2024-04-28 22:18:15 +01:00
Nuno Coração b56ff2f071 Merge pull request #1428 from bonniss/improve-lang-vi
🌐 Improve Vietnamese translation
2024-04-28 22:11:19 +01:00
Nuno Coração ba37eb58ea Merge pull request #1431 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-04-28 22:10:49 +01:00
Nuno Coração 17ace5ffe3 Merge pull request #1435 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.7.0
📌 Bump puppeteer from 22.6.5 to 22.7.0
2024-04-28 22:10:37 +01:00
nunocoracao 60172543b9 Update Hugo supported version 2024-04-26 06:04:58 +00:00
dependabot[bot] 1a3c83288b 📌 Bump puppeteer from 22.6.5 to 22.7.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.6.5 to 22.7.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.6.5...puppeteer-v22.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-24 05:23:09 +00:00
trung.phamduy User 7fba9811b5 🌐 improve vi translation 2024-04-20 11:05:26 +07:00
Nuno Coração 23ae8c57b2 Merge pull request #1418 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-plugin-tailwindcss-0.5.14
📌 Bump prettier-plugin-tailwindcss from 0.5.13 to 0.5.14
2024-04-19 11:55:02 +01:00
Nuno Coração 9a2a082e5b Merge pull request #1415 from Weaxs/translate
translate hosting-deployment && 202310-blowfish-tutorial to zh-cn
2024-04-19 11:54:00 +01:00
dependabot[bot] 228b45d741 📌 Bump prettier-plugin-tailwindcss from 0.5.13 to 0.5.14
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.13 to 0.5.14.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.13...v0.5.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 10:51:16 +00:00
Nuno Coração 4313cf4726 Merge pull request #1419 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.6.5
📌 Bump puppeteer from 22.6.3 to 22.6.5
2024-04-19 11:50:37 +01:00
Nuno Coração 0591c38739 Merge pull request #1420 from nunocoracao/dependabot/npm_and_yarn/dev/headlessui/react-1.7.19
📌 Bump @headlessui/react from 1.7.18 to 1.7.19
2024-04-19 11:50:25 +01:00
Nuno Coração ebf7368437 Merge pull request #1421 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-04-19 11:50:00 +01:00
nunocoracao 353726db07 Update Hugo supported version 2024-04-19 06:05:28 +00:00
dependabot[bot] bad6b66a71 📌 Bump @headlessui/react from 1.7.18 to 1.7.19
Bumps [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) from 1.7.18 to 1.7.19.
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v1.7.19/packages/@headlessui-react)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-17 05:12:39 +00:00
dependabot[bot] fa38e1e220 📌 Bump puppeteer from 22.6.3 to 22.6.5
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.6.3 to 22.6.5.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.6.3...puppeteer-v22.6.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-17 05:12:30 +00:00
Weaxs 707cfae91a translate hosting-deployment && 202310-blowfish-tutorial to zh-cn
(cherry picked from commit a19cd90888)
2024-04-15 21:42:04 +08:00
Nuno Coração 6d66a8f022 v2.66.0 release prep 2024-04-12 12:56:50 +01:00
Nuno Coração f06bcb2a55 Merge pull request #1401 from nunocoracao/dev
🔖 v2.65.0
2024-04-12 12:51:54 +01:00
Nuno Coração 882f773fc7 Merge branch 'dev' of https://github.com/nunocoracao/blowfish into dev 2024-04-12 12:50:47 +01:00
Nuno Coração 0838f77b36 updated installation documentation 2024-04-12 12:50:37 +01:00
BabaRagnarok a9e19f38c8 Update index.it.md 2024-04-12 13:27:11 +02:00
Nuno Coração 808cba18bb Merge pull request #1410 from nunocoracao/dependabot/npm_and_yarn/undici-5.28.4
Bump undici from 5.28.3 to 5.28.4
2024-04-12 12:05:11 +01:00
Nuno Coração bc12f64ac7 updated users page 2024-04-12 12:04:24 +01:00
dependabot[bot] b10f690f18 💄 Rebuild CSS 2024-04-12 11:00:06 +00:00
dependabot[bot] 7647e08a95 Bump undici from 5.28.3 to 5.28.4
Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 10:59:34 +00:00
Nuno Coração 44b8fffc27 Merge pull request #1407 from eallion/main
chore: add users eallion.com
2024-04-12 11:58:38 +01:00
Nuno Coração cdca9889ec Merge pull request #1405 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.6.3
📌 Bump puppeteer from 22.6.2 to 22.6.3
2024-04-12 11:57:33 +01:00
Nuno Coração 4135bd4d5b Merge pull request #1408 from eallion/fix/shortcodes-article
fix: shortcodes article example
2024-04-12 11:55:22 +01:00
Charles Chin 1e50971639 fix: shortcodes article example 2024-04-12 10:04:18 +08:00
Charles Chin 4ec7b57183 chore: add users eallion.com 2024-04-12 09:18:20 +08:00
dependabot[bot] 2a1da5393a 💄 Rebuild CSS 2024-04-10 05:47:34 +00:00
dependabot[bot] 45d79db9e0 📌 Bump puppeteer from 22.6.2 to 22.6.3
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.6.2 to 22.6.3.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.6.2...puppeteer-v22.6.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-10 05:47:04 +00:00
BabaRagnarok 4c92571a0b Update started index.it.md
Add more translate content
2024-04-09 21:28:51 +02:00
Nuno Coração 0cfb9c1559 Merge pull request #1403 from nunocoracao/main
sync
2024-04-08 21:52:08 +01:00
Nuno Coração a145cf56c8 Merge pull request #1402 from d4rklynk/pr-fix-youtubeLite-docs
📚 Remove escape characters in youtubeLite documentation
2024-04-08 21:50:18 +01:00
samsepi0l 951ee29aa4 Update index.md 2024-04-08 07:54:43 +02:00
samsepi0l 7a2ba0b2cc Remove escape characters
Sorry for the inconvenience.
2024-04-08 07:53:21 +02:00
Nuno Coração 6d84f6715e v2.65.0 2024-04-07 20:03:42 +01:00
Nuno Coração 51df39a028 Merge pull request #1375 from nunocoracao/dev
🔖 v2.64.0
2024-04-07 20:01:37 +01:00
Nuno Coração fb6188b94c Merge pull request #1399 from nunocoracao/887--new-param-to-place-author-at-the-bottom-of-articles
🎨 New param to place author at the bottom of articles
2024-04-07 19:57:26 +01:00
Nuno Coração 56889bcbd4 fixes https://github.com/nunocoracao/blowfish/issues/887 2024-04-07 19:56:46 +01:00
Nuno Coração 6daf41ed2b fixed problem with likes/views rendering 2024-04-07 19:25:42 +01:00
Nuno Coração 756d07aa80 fixed typo 2024-04-07 19:07:58 +01:00
Nuno Coração 07d8dcb4a7 Merge pull request #1397 from SmileGuide/dev-1
🎏 add translations
2024-04-06 16:28:21 +01:00
Karlukle 42469c1638 Merge branch 'dev' into dev-1 2024-04-05 07:59:11 +08:00
Nuno Coração d5fec1cfcd fixed https://github.com/nunocoracao/blowfish/issues/1395 2024-04-04 21:30:28 +01:00
Nuno Coração cfcf6d5003 fixed comment in config file 2024-04-04 17:50:57 +01:00
smileguide 6193bdc5e3 add translations 2024-04-04 13:30:26 +08:00
Nuno Coração 35414a6e00 Merge pull request #1383 from Lemon73-Computing/translations-v1
🎏 Update Japanese translation
2024-04-03 22:49:49 +01:00
Nuno Coração a67d942e9a Merge pull request #1386 from 1an8r0wn/patch-1
🎏 Update index.zh-cn.md
2024-04-03 22:45:10 +01:00
Nuno Coração ab361bebb9 Merge pull request #1362 from d4rklynk/pr-youtubelite
✨ Add player parameters for youtubeLite shortcode
2024-04-03 22:43:02 +01:00
Nuno Coração 89b31ce563 Merge pull request #1390 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.6.2
📌 Bump puppeteer from 22.6.1 to 22.6.2
2024-04-03 22:42:03 +01:00
Nuno Coração 68b0e8518a Merge pull request #1388 from nunocoracao/dependabot/github_actions/dev/peaceiris/actions-hugo-3.0.0
👷 Bump peaceiris/actions-hugo from 2.6.0 to 3.0.0
2024-04-03 22:41:47 +01:00
dependabot[bot] af29c0662b 📌 Bump puppeteer from 22.6.1 to 22.6.2
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.6.1 to 22.6.2.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.6.1...puppeteer-v22.6.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 21:41:38 +00:00
Nuno Coração 6168a40033 Merge pull request #1389 from nunocoracao/dependabot/github_actions/dev/actions/configure-pages-5
👷 Bump actions/configure-pages from 4 to 5
2024-04-03 22:41:33 +01:00
Nuno Coração 66d996deb3 Merge pull request #1391 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss-3.4.3
📌 Bump tailwindcss from 3.4.1 to 3.4.3
2024-04-03 22:41:11 +01:00
Nuno Coração 5763b2b403 Merge pull request #1392 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-plugin-tailwindcss-0.5.13
📌 Bump prettier-plugin-tailwindcss from 0.5.12 to 0.5.13
2024-04-03 22:41:00 +01:00
Nuno Coração f6dbf6cfe9 Merge pull request #1393 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss/typography-0.5.12
📌 Bump @tailwindcss/typography from 0.5.11 to 0.5.12
2024-04-03 22:40:47 +01:00
dependabot[bot] 35e68d6f55 💄 Rebuild CSS 2024-04-03 05:36:13 +00:00
dependabot[bot] e56a4b59b8 📌 Bump @tailwindcss/typography from 0.5.11 to 0.5.12
Bumps [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography) from 0.5.11 to 0.5.12.
- [Release notes](https://github.com/tailwindlabs/tailwindcss-typography/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss-typography/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss-typography/compare/v0.5.11...v0.5.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 05:35:44 +00:00
dependabot[bot] 13c2a585c2 💄 Rebuild CSS 2024-04-03 05:35:30 +00:00
dependabot[bot] 67968a50c4 📌 Bump prettier-plugin-tailwindcss from 0.5.12 to 0.5.13
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.12 to 0.5.13.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.12...v0.5.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 05:35:26 +00:00
dependabot[bot] fed026827b 📌 Bump tailwindcss from 3.4.1 to 3.4.3
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.1 to 3.4.3.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.3/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.1...v3.4.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 05:34:58 +00:00
dependabot[bot] 35fcf1a50d 👷 Bump actions/configure-pages from 4 to 5
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 05:25:40 +00:00
dependabot[bot] e9c55f2e17 👷 Bump peaceiris/actions-hugo from 2.6.0 to 3.0.0
Bumps [peaceiris/actions-hugo](https://github.com/peaceiris/actions-hugo) from 2.6.0 to 3.0.0.
- [Release notes](https://github.com/peaceiris/actions-hugo/releases)
- [Changelog](https://github.com/peaceiris/actions-hugo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-hugo/compare/v2.6.0...v3.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 05:25:35 +00:00
BabaRagnarok b1c138deca Update index.it.md
Update some content IT
2024-04-02 19:18:57 +02:00
1an8r0wn 7e6fe3b6b2 Update index.zh-cn.md
更正错别字
上有 -> 上手
2024-04-02 17:50:21 +08:00
BabaRagnarok cd583f86a5 Update index.it.md 2024-04-01 20:34:32 +02:00
BabaRagnarok 9cecb76c45 Update index.it.md
Correct some content translation
2024-04-01 19:44:18 +02:00
Lemon73-Computing af85151907 update: japanese translation 2024-04-01 23:56:21 +09:00
Nuno Coração 7417b6ca2c Merge pull request #1361 from Lemon73-Computing/translations-v1
🎏 Added: Japanese translation (`authors/**` and `samples/**`)
2024-04-01 14:07:58 +01:00
Lemon73 f6e6f8325f Merge branch 'dev' into translations-v1 2024-04-01 20:22:44 +09:00
Lemon73-Computing 46fcf6cc68 translate: samples/icons into japanese 2024-04-01 20:13:04 +09:00
Lemon73-Computing cef8e28795 translate: samples/placeholder-text into japanese 2024-04-01 20:04:28 +09:00
Lemon73-Computing 0b492f26de translate: samples/diagrams-flowcharts into japanese 2024-04-01 20:00:41 +09:00
Nuno Coração ceb5c72b40 Merge pull request #1381 from BabaRagnarok/main
🇮🇹 Added more translated content (IT)
2024-04-01 10:31:05 +01:00
Nuno Coração 87b5ab53da Merge pull request #1377 from Weaxs/support-umami
📜 add umami docs && tanslate partials to zh-CN
2024-04-01 10:27:24 +01:00
Nuno Coração bf3f7b993c Merge pull request #1378 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.6.1
📌 Bump puppeteer from 22.5.0 to 22.6.1
2024-04-01 10:13:00 +01:00
Nuno Coração 74221bf424 Merge pull request #1379 from nunocoracao/dependabot/npm_and_yarn/dev/heroicons/react-2.1.3
📌 Bump @heroicons/react from 2.1.1 to 2.1.3
2024-04-01 10:12:46 +01:00
Nuno Coração 1fdfb46638 Merge pull request #1380 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss/typography-0.5.11
📌 Bump @tailwindcss/typography from 0.5.10 to 0.5.11
2024-04-01 10:11:58 +01:00
Lemon73-Computing 5b2f6f5648 improve: japanese translation of samples/mathematical-notation 2024-03-30 12:11:52 +09:00
Lemon73-Computing 7067128e48 translate: samples/mathematical-notation into japanese 2024-03-30 12:08:56 +09:00
Lemon73-Computing b06e9dc303 translate: samples/charts into japanese 2024-03-29 23:50:53 +09:00
BabaRagnarok 7c1930d3a8 Update get started index.it.md
Add some translate content
2024-03-28 15:39:58 +01:00
BabaRagnarok 85df73d8b6 Update index.it.md
Translated IT
2024-03-28 13:12:53 +01:00
BabaRagnarok 0297dd1de8 Update index.it.md
Translate all installation md file to Italian
2024-03-28 12:33:59 +01:00
BabaRagnarok 4eb838b230 Update index.it.md
More content translate
2024-03-27 20:23:41 +01:00
d4rklynk e36c227ce1 Add documentation about youtubeLite params variable 2024-03-27 19:26:05 +01:00
dependabot[bot] 9e55ca83e3 💄 Rebuild CSS 2024-03-27 05:29:34 +00:00
dependabot[bot] 6ea69b3b6d 📌 Bump @tailwindcss/typography from 0.5.10 to 0.5.11
Bumps [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography) from 0.5.10 to 0.5.11.
- [Release notes](https://github.com/tailwindlabs/tailwindcss-typography/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss-typography/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss-typography/compare/v0.5.10...v0.5.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 05:28:59 +00:00
dependabot[bot] c1a2340d49 📌 Bump @heroicons/react from 2.1.1 to 2.1.3
Bumps [@heroicons/react](https://github.com/tailwindlabs/heroicons) from 2.1.1 to 2.1.3.
- [Release notes](https://github.com/tailwindlabs/heroicons/releases)
- [Changelog](https://github.com/tailwindlabs/heroicons/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/heroicons/compare/v2.1.1...v2.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 05:28:50 +00:00
dependabot[bot] e768573d10 📌 Bump puppeteer from 22.5.0 to 22.6.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.5.0 to 22.6.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.5.0...puppeteer-v22.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 05:28:42 +00:00
Weaxs d4a45eb951 add umami docs 2024-03-27 11:49:17 +08:00
Nuno Coração 2abca494c0 bump version 2024-03-26 22:31:49 +00:00
Nuno Coração 92c13bdc85 Merge pull request #1357 from nunocoracao/dev
🔖 v2.63.0
2024-03-26 22:30:33 +00:00
Nuno Coração 81e9dee2f5 final polish 2024-03-26 22:26:22 +00:00
Nuno Coração 7e4db1f562 Merge pull request #1363 from Weaxs/dev
update language in i18n/[language-code].yaml
2024-03-26 22:22:15 +00:00
Nuno Coração de044b614e Merge pull request #1364 from Weaxs/support-umami
✨ Support Umami Analytics
2024-03-26 22:20:34 +00:00
Nuno Coração cc7d6a9aeb Merge pull request #1372 from nunocoracao/dependabot/npm_and_yarn/katex-0.16.10
Bump katex from 0.16.9 to 0.16.10
2024-03-26 22:04:02 +00:00
dependabot[bot] 15bf9dc07d 📦 Update packaged KaTeX 2024-03-26 22:03:29 +00:00
dependabot[bot] 5a4f5245a9 Bump katex from 0.16.9 to 0.16.10
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.9 to 0.16.10.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.9...v0.16.10)

---
updated-dependencies:
- dependency-name: katex
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-26 22:02:57 +00:00
BabaRagnarok 4df9af06ad Update index.it.md
more translation
2024-03-26 16:58:11 +01:00
BabaRagnarok a751c97dd9 Update index.it.md installation
Modify more content
2024-03-23 23:47:40 +01:00
BabaRagnarok e50e276f36 Update index.it.md Install
Update more text inside installation files
2024-03-22 22:12:34 +01:00
Weaxs 5ad54fd91a fix umami 2024-03-22 23:54:18 +08:00
Weaxs a0d05ce208 support umamiAnalytics 2024-03-22 23:26:56 +08:00
Weaxs 66c3a9c71d update language in i18n/[language-code].yaml 2024-03-22 22:48:41 +08:00
BabaRagnarok cbbdbcf1a9 First translation IT
Working....
2024-03-22 15:43:43 +01:00
samsepi0l b90b916493 Add player parameters
https://github.com/paulirish/lite-youtube-embed?tab=readme-ov-file#custom-player-parameters
2024-03-22 12:16:30 +01:00
Lemon73-Computing 22b51a2275 translate: samples/markdown into japanese 2024-03-22 12:48:20 +09:00
Lemon73-Computing c3a6c2ca27 tanslate: samples/rich-content into japanese 2024-03-22 12:29:44 +09:00
Lemon73-Computing 811a9b5c1c translate: samples/external into japanese 2024-03-21 20:41:13 +09:00
Lemon73-Computing 12f6b5b77c translate: samples/emoji into japanese 2024-03-21 20:14:38 +09:00
Nuno Coração bafc42f587 reenabled italian 2024-03-21 11:10:22 +00:00
Nuno Coração ab87f4cbad disabled italian since the translation is behind 2024-03-21 11:09:53 +00:00
Nuno Coração 6ae4f4b71c fixed small bug on pr #1359 2024-03-21 11:06:56 +00:00
Nuno Coração b0aa7298b5 Merge pull request #1359 from Aphcity/patch-2
Fix list.html render issue
2024-03-21 10:57:11 +00:00
Nuno Coração a1769a6722 Merge pull request #1360 from Aphcity/translations-v1
🎏 Update zh-CN translation for issue #1358
2024-03-21 10:55:15 +00:00
Lemon73-Computing 11463f3992 change: space 2024-03-21 18:41:33 +09:00
Aphcity 998a422ed6 Translate Author Bio 2024-03-21 17:10:36 +08:00
Aphcity 0f48b1a16d Translate sample pages
- exampleSite\content\samples\rich-content\index.zh-cn.md
- exampleSite\content\samples\placeholder-text\index.zh-cn.md
- exampleSite\content\samples\multiple-authors\index.zh-cn.md
- exampleSite\content\samples\mathematical-notation\index.zh-cn.md
- exampleSite\content\samples\markdown\index.zh-cn.md
- exampleSite\content\samples\_index.zh-cn.md
2024-03-21 15:35:36 +08:00
Aphcity 32b8aa5876 Translate guides, sample(Diagram, Emoji, External)
- exampleSite\content\guides\_index.zh-cn.md
- exampleSite\content\samples\diagrams-flowcharts\index.zh-cn.md
- exampleSite\content\samples\emoji\index.zh-cn.md
- exampleSite\content\samples\external\index.zh-cn.md
2024-03-21 15:05:17 +08:00
Aphcity 7df76e9a32 Add chart sample zh-CN translation
- .exampleSite\content\samples\charts\index.zh-cn.md
- fix a tag in icons sample
2024-03-21 14:34:30 +08:00
Aphcity 4690352255 Add guides template zh-CN translation 2024-03-21 14:09:39 +08:00
Aphcity e009305c4e 2 small translation fixes
- getting-started
- authors
2024-03-21 13:55:45 +08:00
Aphcity 5edba5cf2e Fix list.html render issue
FIXED: execute of template failed: template: _default/list.html:23:19: executing "main" at <.File.Path>: error calling Path: runtime error: invalid memory address or nil pointer dereference
2024-03-21 10:17:55 +08:00
Nuno Coração 75e76c572d translated some missing files for it https://github.com/nunocoracao/blowfish/issues/1358 2024-03-20 22:51:12 +00:00
Nuno Coração 686f2ef9fe added script to find missing translations 2024-03-20 22:35:13 +00:00
Nuno Coração f85fc05b6e bump version 2024-03-20 22:13:55 +00:00
Nuno Coração c7dbcbf154 Merge branch 'dev' of https://github.com/nunocoracao/blowfish into dev 2024-03-20 22:13:15 +00:00
Nuno Coração fd1dd03358 Merge pull request #1334 from nunocoracao/dev
🔖 v2.62.0
2024-03-20 22:06:42 +00:00
Nuno Coração c8b2c245a8 final polish 2024-03-20 22:01:51 +00:00
Nuno Coração 17a034a989 Merge pull request #1355 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-03-20 21:57:19 +00:00
Nuno Coração 6510a7505e Merge pull request #1324 from nunocoracao/translations-v1
🎏 Blowfish translation
2024-03-20 21:56:58 +00:00
nunocoracao c0c9d54fbf Update Hugo supported version 2024-03-20 21:56:30 +00:00
Nuno Coração 5a2ea71bdf Merge pull request #1354 from nunocoracao/1283-series-does-not-show-any-list
🐛 Series does not show any list
2024-03-20 21:54:04 +00:00
Nuno Coração 29625b34b6 🐛 Series does not show any list 2024-03-20 21:52:38 +00:00
Nuno Coração 5a38b0e42d Merge pull request #1350 from Aphcity/main
🐛 2 Small fixes
2024-03-20 16:10:40 +00:00
Nuno Coração ac6dc9275b Merge pull request #1352 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.5.0
📌 Bump puppeteer from 22.4.1 to 22.5.0
2024-03-20 16:08:29 +00:00
Nuno Coração 5d9a9beee6 Merge pull request #1353 from Aphcity/translations-v1
Update zh-CN translations
2024-03-20 16:08:12 +00:00
Nuno Coração 422d8fa8e8 Merge branch 'translations-v1' into translations-v1 2024-03-20 16:07:57 +00:00
Nuno Coração 6190898b70 fixed view like counters to work across multiple langs 2024-03-20 16:05:48 +00:00
Lemon73-Computing 4a58dae0a4 translate: samples into japanese 2024-03-21 00:24:21 +09:00
Aphcity 5ad4fd2225 Merge remote-tracking branch 'weaxs/translations-v1' into translations-v1 2024-03-20 21:01:40 +08:00
Aphcity 8bf4d13667 Add translations
- Add series
- Add shortcodes
- Some fix
2024-03-20 20:52:58 +08:00
Weaxs 433b51208d fix 2024-03-20 19:37:37 +08:00
Weaxs c3719406ac 中文(简体) -> 简体中文
中文(繁體) -> 繁體中文
2024-03-20 19:30:24 +08:00
Weaxs 1e7b2c58db enable hasCJKLanguage 2024-03-20 19:17:33 +08:00
Aphcity 4ef29d4697 Merge remote-tracking branch 'weaxs/translations-v1' into translations-v1 2024-03-20 18:44:18 +08:00
Aphcity 4a95a42286 Update zh-CN trans for Advanced Customisation 2024-03-20 14:04:51 +08:00
dependabot[bot] 94c013166b 📌 Bump puppeteer from 22.4.1 to 22.5.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.4.1 to 22.5.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.4.1...puppeteer-v22.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-20 05:48:15 +00:00
Weaxs 77d0ab83fd Merge remote-tracking branch 'blowfish/translations-v1' into translations-v1
# Conflicts:
#	exampleSite/content/docs/advanced-customisation/index.zh-cn.md
#	exampleSite/content/docs/configuration/index.zh-cn.md
#	exampleSite/content/docs/content-examples/index.zh-cn.md
#	exampleSite/content/docs/firebase-views/index.zh-cn.md
#	exampleSite/content/docs/front-matter/index.zh-cn.md
#	exampleSite/content/docs/getting-started/index.zh-cn.md
#	exampleSite/content/docs/homepage-layout/index.zh-cn.md
#	exampleSite/content/docs/installation/index.zh-cn.md
#	exampleSite/content/docs/multi-author/index.zh-cn.md
#	exampleSite/content/docs/thumbnails/index.zh-cn.md
#	exampleSite/content/docs/welcome/index.zh-cn.md
#	exampleSite/content/samples/_index.zh-cn.md
#	exampleSite/content/samples/icons/index.zh-cn.md
#	exampleSite/content/samples/thumbnail_sample/index.zh-cn.md
#	i18n/zh-CN.yaml
2024-03-20 11:58:51 +08:00
Weaxs 44b3b17fac translate thumbnails, multi-author, samples,icons, thumbnail_sample to zh-cn 2024-03-20 11:52:16 +08:00
Weaxs 6b341ad811 translate thumbnails, multi-author to zh-cn 2024-03-20 11:35:00 +08:00
Lemon73-Computing f81f55ba94 translate: samples/multiple-authors into japanese 2024-03-20 11:06:49 +09:00
Aphcity 4748453ea3 Add background blur to i18n menu 2024-03-20 10:05:26 +08:00
Aphcity 3b0393d553 Add remote image support to author image 2024-03-20 10:03:59 +08:00
Lemon73-Computing 74bd2b2b35 translate: samples/thumbnail_sample into japanese 2024-03-20 10:52:30 +09:00
Nuno Coração 74b985654e small fix in custom recent page 2024-03-20 00:16:24 +00:00
Nuno Coração 4e63dcadb3 updated backgrund 2024-03-20 00:05:45 +00:00
Nuno Coração a7ae2030f0 change to processUsers script 2024-03-20 00:03:07 +00:00
Nuno Coração c516d2ef6e fixed conflicts 2024-03-20 00:01:29 +00:00
Nuno Coração f7286ece55 fixed conflicts 2024-03-19 23:57:43 +00:00
Nuno Coração f03311be06 fixed conflicts 2024-03-19 23:53:25 +00:00
Nuno Coração c5eef5a8f6 fixed svg background for articles 2024-03-19 23:47:48 +00:00
Nuno Coração f1271eea67 removed SVG thumbnails in favour of just background 2024-03-19 23:45:12 +00:00
Nuno Coração 3d197535ea reprocess users 2024-03-19 23:31:36 +00:00
Nuno Coração e6a8167b11 added placeholder files for all missing translations 2024-03-19 23:20:22 +00:00
Nuno Coração 9ed6ee385c Merge pull request #1344 from ncocchiaro/add-itchio-icon
🖌️ Added itch.io icon
2024-03-19 23:13:09 +00:00
Nuno Coração 45ac03eb53 Merge pull request #1345 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-03-19 23:11:52 +00:00
Nuno Coração 8b93b9960a Merge pull request #1347 from Aphcity/patch-1
Update zh-CN.yaml
2024-03-19 23:11:29 +00:00
Weaxs b5307d0fb5 translate advanced-customisation, front-matter, firebase-views 2024-03-20 02:17:17 +08:00
Weaxs d54ecd6a04 translate configuration, content-examples, homepage-layout 2024-03-19 14:41:27 +08:00
Aphcity ff8e458e1f Update zh-CN.yaml 2024-03-18 12:38:31 +08:00
Weaxs 1c800f6d1b translate getting-started 2024-03-17 23:37:53 +08:00
nunocoracao 00845bbd18 Update Hugo supported version 2024-03-17 06:04:24 +00:00
Nicola Cocchiaro e528194e4c Added itch.io icon 2024-03-16 16:13:49 -07:00
Nuno Coração e90caa7a7b added ja skeleton files 2024-03-16 18:24:16 +00:00
Lemon73-Computing 67e026efd7 translate: dummy authors (japanese) 2024-03-16 17:40:14 +09:00
Nuno Coração 5d00985704 Merge pull request #1339 from Lemon73-Computing/translations-v1 2024-03-16 08:15:33 +00:00
Lemon73 3ad4fbd7a2 translate: japanese - advanced tags 2024-03-16 17:07:07 +09:00
Lemon73 c021818745 translate: japanese - tags 2024-03-16 16:59:30 +09:00
Lemon73 4f42c38e36 Merge branch 'translations-v1' into translations-v1 2024-03-15 16:22:23 +09:00
Nuno Coração 10bf07a7b7 Update LICENSE 2024-03-14 18:44:53 +00:00
Weaxs 8626104b88 translate installation 2024-03-15 02:24:56 +08:00
Lemon73-Computing cf15eca10f translate: japanese - guides-template 2024-03-14 20:32:09 +09:00
Lemon73-Computing 531e89ce6c translate: exsample site title 2024-03-14 19:55:19 +09:00
Lemon73-Computing 6de3ed8566 create: japanese translation - showcase 2024-03-14 19:49:17 +09:00
Lemon73-Computing 9a70203a42 create: japanese translation - recipes 2024-03-14 19:49:01 +09:00
Lemon73-Computing 745bf89b70 create: japanese posts 2024-03-14 18:59:43 +09:00
Lemon73-Computing cd33d1f880 create: japanese docs 2024-03-14 18:56:05 +09:00
Lemon73-Computing 6c1bdb36f6 create: _index.ja.md 2024-03-14 18:45:28 +09:00
Lemon73-Computing b176f67a91 change: details 2024-03-14 18:45:12 +09:00
Lemon73-Computing 80c1a9d96a translate: japanese - users page 2024-03-14 17:53:43 +09:00
Lemon73-Computing 6f646c8688 translate: to japanese 2024-03-14 17:46:44 +09:00
Lemon73-Computing 0aa278ada6 add: japanese translation 2024-03-14 17:32:29 +09:00
Lemon73-Computing eaff5aae11 change: date format 2024-03-14 17:24:22 +09:00
Nuno Coração 93ef687194 too big too describe 2024-03-14 00:01:32 +00:00
Nuno Coração 48bc05b12f updated users processing script to generate for all available languages 2024-03-13 23:08:17 +00:00
Nuno Coração 01a88441fd added commented config that hides languages 2024-03-13 21:54:20 +00:00
Nuno Coração c4ffe1f0d5 Merge pull request #1336 from arahmitz/patch-1
👤 Added new user page
2024-03-13 21:24:07 +00:00
Weaxs bbb0f9be0d translate welcome && update i18n 2024-03-14 01:37:38 +08:00
Nuno Coração 5e9bfbd9fe Merge pull request #1340 from BabaRagnarok/translations-v1 2024-03-13 16:09:59 +00:00
BabaRagnarok f8d48382bc Translated config files into Italian 2024-03-13 16:57:21 +01:00
Lemon73 8620d809fe translate: languages.ja.toml 2024-03-13 22:12:54 +09:00
Nuno Coração 9f67fb1859 Merge pull request #1338 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-plugin-tailwindcss-0.5.12 2024-03-13 12:50:42 +00:00
dependabot[bot] 241199c5ee 📌 Bump prettier-plugin-tailwindcss from 0.5.11 to 0.5.12
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.11 to 0.5.12.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.11...v0.5.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 09:57:13 +00:00
Nuno Coração 77462c9f21 Merge pull request #1337 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-22.4.1 2024-03-13 09:56:27 +00:00
dependabot[bot] f3f27729f1 📌 Bump puppeteer from 22.4.0 to 22.4.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 22.4.0 to 22.4.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.4.0...puppeteer-v22.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 05:43:13 +00:00
Adam Madej 18800f8408 Added new user page
Added page for adammadej.com - a portfolio site.
2024-03-12 23:20:06 +01:00
Nuno Coração b6c908e4e5 updating version 2024-03-12 19:15:23 +00:00
Nuno Coração 65956f10b9 Merge pull request #1317 from nunocoracao/dev
🔖 v2.61.1
2024-03-12 19:09:51 +00:00
Nuno Coração 35ab259633 updating version 2024-03-12 19:09:30 +00:00
Nuno Coração cad46b0876 Merge pull request #1331 from nunocoracao/1329--tailwind-colors-are-not-updating-with-colorscheme
🐛 Tailwind Colors are not updating with colorScheme
2024-03-12 19:06:35 +00:00
Nuno Coração 8409353223 🐛 Tailwind Colors are not updating with colorScheme 2024-03-12 19:03:25 +00:00
Nuno Coração 5ef6777ac9 fixed small menu issue in ZH-CN 2024-03-12 17:02:17 +00:00
Nuno Coração c2a84b2418 Merge pull request #1330 from Weaxs/translations-v1 2024-03-12 12:59:01 +00:00
Weaxs 2eb7f8aed7 add advanced listing page 2024-03-12 18:00:13 +08:00
Nuno Coração 6c47f51936 Merge pull request #1325 from Weaxs/translations-v1
🎏 Blowfish translation (zh-cn)
2024-03-12 09:50:42 +00:00
Nuno Coração abf51ad142 Merge pull request #1328 from fauziralpiandi/patch-1
update id.yaml
2024-03-12 09:44:18 +00:00
fwzyrln_ bb737313e2 update id.yaml 2024-03-12 12:09:17 +07:00
Weaxs 0bc9b9af6a translate docs/tags/users/content listing page 2024-03-11 19:41:50 +08:00
Nuno Coração 35a5b61881 initial language setup for ja it zh-cn 2024-03-11 10:12:03 +00:00
Nuno Coração d93195c377 Merge pull request #1323 from nunocoracao/hugo-new-version 2024-03-11 09:27:34 +00:00
nunocoracao 4a0d10dc18 Update Hugo supported version 2024-03-11 06:04:51 +00:00
Nuno Coração 6c6a559113 Update pt-PT.yaml 2024-03-10 23:55:49 +00:00
Nuno Coração ed6e943e57 script correction 2024-03-10 23:18:40 +00:00
Nuno Coração a67798f18a Merge pull request #1320 from nunocoracao/1319-add-translation-scripts
🎏 added translation lib and scripts
2024-03-10 22:43:08 +00:00
Nuno Coração 902b0d9c86 added translation lib and scripts 2024-03-10 22:42:10 +00:00
Nuno Coração 554e25716c Merge pull request #1318 from nunocoracao/main
Update params.toml
2024-03-10 17:48:47 +00:00
Nuno Coração 491ce02f59 Update params.toml 2024-03-10 17:48:23 +00:00
Nuno Coração 255358e016 Update package.json 2024-03-10 17:41:58 +00:00
1496 changed files with 30237 additions and 1065103 deletions

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
steps:
- name: Hugo setup
uses: peaceiris/actions-hugo@v2.6.0
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: 0.120.4
extended: true
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
steps:
- name: Hugo setup
uses: peaceiris/actions-hugo@v2.6.0
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: 0.120.4
extended: true
+1 -1
View File
@@ -42,7 +42,7 @@ jobs:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.6.0
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: "latest"
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2021 James Panther (https://jamespanther.com)
Copyright (c) 2022 Nuno Coração (https://nunocoracao.com)
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
+4 -1
View File
@@ -1,3 +1,4 @@
English | [简体中文](https://github.com/nunocoracao/blowfish/blob/main/README.zh-cn.md)
# Blowfish
[![Deploy Production to Firebase](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml)
[![Deploy Production to GitHub pages](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml)
@@ -36,10 +37,12 @@ Blowfish is designed to be a powerful, lightweight theme for [Hugo](https://gohu
- Multiple homepage layouts
- Multiple authors
- Series of articles
- Date and weight based article sorting
- Zen mode for article reading
- Flexible with any content types, taxonomies and menus
- Header and footer menus
- Nested menus & sub-navigation menu
- Scrollable table of contents
- Multilingual content support including support for RTL languages
- Ability to link to posts on third-party websites
- Support for several shortcodes like Gallery, Timeline, GitHub cards, and Carousels
@@ -139,7 +142,7 @@ blowfish-tools new mynewsite
3. Start your server using `hugo server` and the theme will be downloaded automatically.
4. In the root folder of your website, delete the `config.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder.
4. In the root folder of your website, delete the `hugo.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder.
> **Note:** Do not overwrite the `module.toml` file you created above!
+176
View File
@@ -0,0 +1,176 @@
[English](https://github.com/nunocoracao/blowfish/blob/main/README.md) | 简体中文
# Blowfish
[![Deploy Production to Firebase](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml)
[![Deploy Production to GitHub pages](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml)
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.87.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.87.0)
[![GitHub](https://img.shields.io/github/license/nunocoracao/blowfish)](https://github.com/nunocoracao/blowfish/blob/main/LICENSE)
[![Blowfish](https://img.shields.io/badge/Hugo--Themes-@Blowfish-blue)](https://themes.gohugo.io/themes/blowfish/)
![code-size](https://img.shields.io/github/languages/code-size/nunocoracao/blowfish)
Blowfish 是一个轻量有力的 Hugo 主题。它使用 Tailwind CSS 构建,洁净而富有极简主义,是你网站内容载体的不二之选。
![blowfish screenshot](https://github.com/nunocoracao/blowfish/blob/main/images/screenshot.png?raw=true)
🌏 [示例站点](https://blowfish.page/zh-cn/)
📑 [主题文档](https://blowfish.page/zh-cn/docs/)
💎 [周边商店](http://tee.pub/lic/qwSlWVBL5zc)
🐛 [Bug 问题报告](https://github.com/nunocoracao/blowfish/issues)
💡 [问答和功能需求](https://github.com/nunocoracao/blowfish/discussions)
<a href="https://www.buymeacoffee.com/nunocoracao" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
<a target="_blank" href="http://tee.pub/lic/qwSlWVBL5zc"><img class="nozoom" src="https://img.buymeacoffee.com/button-api/?text=Merch Store &emoji=💎&slug=nunocoracao&button_colour=5F7FFF&font_colour=ffffff&font_family=Lato&outline_colour=000000&coffee_colour=FFDD00" /></a>
## 特性
- 使用 Tailwind CSS 3.0 构建全面响应式布局
- 多种配色方案,亦可完全由你定义
- 夜间模式支持(手动开启/关闭或根据用户设备自动切换)
- 高度自主的配置方式
- 集成 Firebase 以支持动态数据统计
- 集成浏览次数统计和点赞机制
- “相关文章”列表生成
- 多种主页布局
- 多作者模式支持
- 可将文章整理成选集列表
- 禅模式支持
- 可灵活定义各种内容类型、分类标准和菜单
- 页眉和页脚双重菜单可选
- 支持嵌套菜单和子导航菜单
- 支持多语言内容,包括 RTL 语言
- 可链接到第三方网站上的帖子
- 支持多种简码,如图库、时间轴、GitHub 卡片和图片灯箱
- 支持 Buymeacoffee
- 拥有由 Fuse.js 支持的客户端一侧网站搜索功能
- 植入了基于 Mermaid 的图表功能
- 植入了基于 Chart.js 的图表功能
- 集成逼真的自动打字效果
- 集成性能优化的 Youtube 卡片简码
- 集成 KaTeX 的公式
- 集成 FontAwesome 6 的矢量图标引用
- 使用 Hugo Pipes 自动调整图像大小
- 拥有标题锚点、目录、代码复制、按钮、分类徽章等功能
- 文章内部支持 HTML 和 Emoji 🎉
- 便于搜索引擎优化,文章可一键分享到社交媒体
- 支持 Fathom Analytics 和 Google Analytics
- 支持 RSS 订阅、网站图标和评论功能
- 可使用简单的 Tailwind 对颜色和样式进行高级定制
- 优化了性能和可访问性,拥有极高的 Lighthouse 评分
- 文档齐全,定期更新
---
![blowfish logo](https://github.com/nunocoracao/blowfish/blob/main/logo.png?raw=true)
## 文档
Blowfish 有 [全面的文档](https://blowfish.page/zh-cn/docs/),覆盖主题的任何一个方面。 请确保 [阅读文档](https://blowfish.page/zh-cn/docs/) 以详细了解本主题有哪些功能。
---
## 安装
Blowfish 支持多种安装方式,既能作为 git 子模块、Hugo 模块,也可完全手动安装。
每种方法的详细说明都可以在 [安装](https://blowfish.page/zh-cn/docs/installation) 文档中找到。为了获得最简单的安装体验,请查阅文档。如果你使用的是 git,请阅读下面使用子模块的快速开始指南;如果你能安装 Hugo 主题,请阅读下面 Hugo 模块的快速开始指南。
### 使用 Blowfish Tools 快速开始
> **注:** 请确保你已安装 **Node.js**、 **Git**、 **Go** 和 **Hugo** ,且已经创建了一个 Hugo 工程。
我们最新推出了一个新的 CLI 工具,帮助你开始使用 Blowfish。它将为你创建一个新的 Hugo 项目、安装主题并设置主题配置文件。它仍处于测试阶段,因此请 [报告你发现的任何问题](https://github.com/nunocoracao/blowfish-tools)。
使用 npm(或其他软件包管理器)全局安装 CLI 工具:
```shell
npm i -g blowfish-tools
```
然后运行 "blowfish-tools "命令,开启一个交互式进程,引导你完成创建和配置。
```shell
blowfish-tools
```
你也可以运行命令 `blowfish-tools new` 来创建一个新的 Hugo 项目,并一次性安装主题。更多信息请查看 CLI 帮助。
```shell
blowfish-tools new mynewsite
```
### 使用 git 子模块快速开始
> **注:** 请确保你已安装 **Node.js**、 **Git**、 **Go** 和 **Hugo** ,且已经创建了一个 Hugo 工程。
1. 从你工程的所在目录初始化 git 仓库
```shell
git init
```
2. 配置 Blowfish 作为 git 子模块
```shell
git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish
```
3. 在你网站的根目录中删除由 Hugo 自动生成的 `config.toml`文件,并把主题文件夹中的`*.toml`配置文件复制到你的 `config/_default/`文件夹中
你可在 Hugo 缓存目录中找到主题配置文件,或者也可以从[这里](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default)下载一份。
4. 按照[入门指南](https://blowfish.page/zh-cn/docs/getting-started/)来配置你的网站
### 使用 Hugo 快速开始
> **注:** 确保你已经安装了 **Go** 和 **Hugo**,且已创建了一个 Hugo 工程。
1. 从你工程的所在目录初始化 Hugo 模块
```shell
hugo mod init github.com/<用户名>/<仓库名>
```
2. 新建 `config/_default/module.toml` 并写入以下内容:
```toml
[[imports]]
path = "github.com/nunocoracao/blowfish/v2"
```
3. 运行 `hugo server` 启动你的本地服务器,本主题就会自动下载。
4. 在你网站的根目录中删除由 Hugo 自动生成的 `config.toml`文件,并把主题文件夹中的`*.toml`配置文件复制到你的 `config/_default/`文件夹中
> **注** 不要覆盖之前的 `module.toml` !
你可在 Hugo 缓存目录中找到主题配置文件,或者也可以从[这里](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default)下载一份。
5. 按照[入门指南](https://blowfish.page/zh-cn/docs/getting-started/)来配置你的网站
### Installing theme updates
当新的主题版本发布,你可以在你网站的根目录使用 Hugo 命令`hugo mod get -u`来简单地把主题更新到最新版本。
详细的[更新指南](https://blowfish.page/zh-cn/docs/installation/#%E6%9B%B4%E6%96%B0%E4%B8%BB%E9%A2%98)在文档中。
---
## 贡献
Blowfish 将会持续进化。我打算不断增加功能,并按需进行修改。
如有任何问题或对新功能的建议,请随时联系我。
- 🐛 **Bug 问题报告** 使用 [GitHub Issues](https://github.com/nunocoracao/blowfish/issues)
- 💡 **发表关于新功能的想法:** 在 [GitHub Discussions](https://github.com/nunocoracao/blowfish/discussions) 发起讨论
- 🙋‍♀️ **一般问题:** 查看 [GitHub Discussions](https://github.com/nunocoracao/blowfish/discussions)
如果你有能力修补 Bug 或者实现新功能,欢迎提交 PR。[了解更多](https://github.com/nunocoracao/blowfish/blob/main/CONTRIBUTING.md).
---
## Star 数量统计
[![Stargazers over time](https://starchart.cc/nunocoracao/blowfish.svg)](https://starchart.cc/nunocoracao/blowfish)
<a rel="me" href="https://masto.ai/@blowfish">Mastodon</a>
File diff suppressed because it is too large. Load diff
+12
View File
@@ -16,6 +16,11 @@ body button {
@apply h-[1em] w-[1em];
}
/* Scale SVG logos to appropriate size */
.logo svg {
@apply h-[5rem] w-[5rem];
}
/* Search */
#search-query::-webkit-search-cancel-button,
#search-query::-webkit-search-decoration,
@@ -128,6 +133,13 @@ code {
overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */
}
/* Fix long URLs breaking out of article bounds on mobile */
a {
word-break: break-word;
word-wrap: break-word;
overflow-wrap: break-word;
}
/* -- Chroma Highlight -- */
/* Background */
.prose .chroma {
+2
View File
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<svg fill="currentColor" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><path d="M11.955.49A12 12 0 0 0 0 12.49a12 12 0 0 0 1.832 6.373L11.838 5.928a.187.14 0 0 1 .324 0l10.006 12.935A12 12 0 0 0 24 12.49a12 12 0 0 0-12-12 12 12 0 0 0-.045 0zm.375 6.467 4.416 16.553a12 12 0 0 0 5.137-4.213z"/></svg>

After

Width:  |  Height:  |  Size: 359 B

+1
View File
@@ -0,0 +1 @@
<svg viewBox="0 0 212 212" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor"><g style="opacity:.7"><path stroke-width="25" d="M64 174V76a50 50 0 0 1 50-50h20"/><circle stroke-width="15" cx="148" cy="26" r="18"/></g><path stroke-width="25" d="M64 174v-30a50 50 0 0 1 50-50h20"/><circle stroke-width="15" cx="148" cy="94" r="18"/><circle stroke-width="15" cx="64" cy="186" r="18"/></g></svg>

After

Width:  |  Height:  |  Size: 411 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="5.67 143.05 628.65 387.55"><path fill="currentColor" d="M115.912 143.075c-6.462 0-13.762.525-22.012 2.325-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.267.3-26.433.597-39.5.697l.1 117.002s57.4 24.202 83.1 40.102c3.7 2.3 10.2 6.798 12.9 14.398 2.1 6.1 2 13.101-1 19.301l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12l-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8a5290.322 5290.322 0 0 0 27 12.954c0-36.449-.1-109.053-.1-109.053-29 .4-89.2-2.201-89.2-2.201s-141.4-7.1-156.8-8.5c-4.9-.3-10.525-.825-16.988-.825zm12.188 48.026s7.1 59.399 15.7 94.199c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1z"/><path fill="currentColor" d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8-1.9 8 2 16.3 9.1 20 7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3 7.8 4 17.4 1.7 22.5-5.3 5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8l-24.6 50.4z"/></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="235.452" width="261.728" viewBox="0 0 245.37069 220.73612"><path fill="currentColor" d="M31.99 1.365C21.287 7.72.2 31.945 0 38.298v10.516C0 62.144 12.46 73.86 23.773 73.86c13.584 0 24.902-11.258 24.903-24.62 0 13.362 10.93 24.62 24.515 24.62 13.586 0 24.165-11.258 24.165-24.62 0 13.362 11.622 24.62 25.207 24.62h.246c13.586 0 25.208-11.258 25.208-24.62 0 13.362 10.58 24.62 24.164 24.62 13.585 0 24.515-11.258 24.515-24.62 0 13.362 11.32 24.62 24.903 24.62 11.313 0 23.773-11.714 23.773-25.046V38.298c-.2-6.354-21.287-30.58-31.988-36.933C180.118.197 157.056-.005 122.685 0c-34.37.003-81.228.54-90.697 1.365zm65.194 66.217a28.025 28.025 0 0 1-4.78 6.155c-5.128 5.014-12.157 8.122-19.906 8.122a28.482 28.482 0 0 1-19.948-8.126c-1.858-1.82-3.27-3.766-4.563-6.032l-.006.004c-1.292 2.27-3.092 4.215-4.954 6.037a28.5 28.5 0 0 1-19.948 8.12c-.934 0-1.906-.258-2.692-.528-1.092 11.372-1.553 22.24-1.716 30.164l-.002.045c-.02 4.024-.04 7.333-.06 11.93.21 23.86-2.363 77.334 10.52 90.473 19.964 4.655 56.7 6.775 93.555 6.788h.006c36.854-.013 73.59-2.133 93.554-6.788 12.883-13.14 10.31-66.614 10.52-90.474-.022-4.596-.04-7.905-.06-11.93l-.003-.045c-.162-7.926-.623-18.793-1.715-30.165-.786.27-1.757.528-2.692.528a28.5 28.5 0 0 1-19.948-8.12c-1.862-1.822-3.662-3.766-4.955-6.037l-.006-.004c-1.294 2.266-2.705 4.213-4.563 6.032a28.48 28.48 0 0 1-19.947 8.125c-7.748 0-14.778-3.11-19.906-8.123a28.025 28.025 0 0 1-4.78-6.155 27.99 27.99 0 0 1-4.736 6.155 28.49 28.49 0 0 1-19.95 8.124c-.27 0-.54-.012-.81-.02h-.007c-.27.008-.54.02-.813.02a28.49 28.49 0 0 1-19.95-8.123 27.992 27.992 0 0 1-4.736-6.155zm-20.486 26.49l-.002.01h.015c8.113.017 15.32 0 24.25 9.746 7.028-.737 14.372-1.105 21.722-1.094h.006c7.35-.01 14.694.357 21.723 1.094 8.93-9.747 16.137-9.73 24.25-9.746h.014l-.002-.01c3.833 0 19.166 0 29.85 30.007L210 165.244c8.504 30.624-2.723 31.373-16.727 31.4-20.768-.773-32.267-15.855-32.267-30.935-11.496 1.884-24.907 2.826-38.318 2.827h-.006c-13.412 0-26.823-.943-38.318-2.827 0 15.08-11.5 30.162-32.267 30.935-14.004-.027-25.23-.775-16.726-31.4L46.85 124.08c10.684-30.007 26.017-30.007 29.85-30.007zm45.985 23.582v.006c-.02.02-21.863 20.08-25.79 27.215l14.304-.573v12.474c0 .584 5.74.346 11.486.08h.006c5.744.266 11.485.504 11.485-.08v-12.474l14.304.573c-3.928-7.135-25.79-27.215-25.79-27.215v-.006l-.003.002z"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm100.7 364.9c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4zm26.9-65.6c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm31-76.2c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3z"/></svg>

After

Width:  |  Height:  |  Size: 889 B

+3 -3
View File
@@ -1,7 +1,9 @@
var liked_page = false
var id = oid ? oid.replaceAll("/", "-") : oid
var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes
if (typeof auth !== 'undefined') {
var id = oid ? oid.replaceAll("/", "-") : oid
var viewed = localStorage.getItem(id);
if (!viewed) {
@@ -28,7 +30,6 @@ if (typeof auth !== 'undefined') {
});
}
var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes
var liked = localStorage.getItem(id_likes);
if (liked) {
@@ -97,7 +98,6 @@ function remove_like_article(id_likes) {
}
function process_article() {
var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes
if (!liked_page) {
like_article(id_likes)
} else {
+7 -3
View File
@@ -73,8 +73,6 @@ document.addEventListener("keydown", function (event) {
} else {
document.activeElement.click();
}
}else{
event.preventDefault();
}
}
@@ -138,6 +136,12 @@ function buildIndex() {
{ name: "content", weight: 0.4 },
],
};
/*var finalIndex = [];
for (var i in data) {
if(data[i].type != "users" && data[i].type != "tags" && data[i].type != "categories"){
finalIndex.push(data[i]);
}
}*/
fuse = new Fuse(data, options);
indexed = true;
});
@@ -160,7 +164,7 @@ function executeQuery(term) {
<div class="-mb-1 text-lg font-bold">
${title}
</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">&middot;</span>${value.item.date}</span></div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">&middot;</span>${value.item.date? value.item.date : ""}</span></div>
<div class="text-sm italic">${value.item.summary}</div>
</div>
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">&rarr;</div>
+42 -40
View File
@@ -1,57 +1,59 @@
function _toogleZenMode(zendModeButton) {
// Nodes selection
const body = document.querySelector('body');
const tocRight = document.querySelector('.toc-right');
const tocInside = document.querySelector('.toc-inside');
const articleContent = document.querySelector('.article-content');
const header = document.querySelector('#single_header');
// Nodes selection
const body = document.querySelector('body');
const tocRight = document.querySelector('.toc-right');
const tocInside = document.querySelector('.toc-inside');
const articleContent = document.querySelector('.article-content');
const header = document.querySelector('#single_header');
// Add semantic class into body tag
body.classList.toggle('zen-mode-enable');
// Add semantic class into body tag
body.classList.toggle('zen-mode-enable');
// Show/Hide 'toc right' and 'toc inside'
// Show/Hide 'toc right' and 'toc inside'
if (tocRight)
tocRight.classList.toggle('lg:block');
if (tocInside)
tocInside.classList.toggle('lg:hidden');
// Change width of article content
articleContent.classList.toggle('max-w-fit');
articleContent.classList.toggle('max-w-prose');
// Change width of article content
articleContent.classList.toggle('max-w-fit');
articleContent.classList.toggle('max-w-prose');
// Read i18n title from data-attributes
const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable');
const titleI18nEnable = zendModeButton.getAttribute('data-title-i18n-enable');
// Read i18n title from data-attributes
const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable');
const titleI18nEnable = zendModeButton.getAttribute('data-title-i18n-enable');
if (body.classList.contains('zen-mode-enable')) {
// Persist configuration
//localStorage.setItem('blowfish-zen-mode-enabled', 'true');
// Change title to enable
zendModeButton.setAttribute('title', titleI18nEnable)
// Auto-scroll to title article
window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90);
} else {
//localStorage.setItem('blowfish-zen-mode-enabled', 'false');
zendModeButton.setAttribute('title', titleI18nDisable);
document.querySelector('body').scrollIntoView();
}
if (body.classList.contains('zen-mode-enable')) {
// Persist configuration
//localStorage.setItem('blowfish-zen-mode-enabled', 'true');
// Change title to enable
zendModeButton.setAttribute('title', titleI18nEnable)
// Auto-scroll to title article
window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90);
} else {
//localStorage.setItem('blowfish-zen-mode-enabled', 'false');
zendModeButton.setAttribute('title', titleI18nDisable);
document.querySelector('body').scrollIntoView();
}
}
function _registerZendModeButtonClick(zendModeButton) {
zendModeButton.addEventListener('click', function (event) {
event.preventDefault();
zendModeButton.addEventListener('click', function (event) {
event.preventDefault();
// Toggle zen-mode
_toogleZenMode(zendModeButton);
});
// Toggle zen-mode
_toogleZenMode(zendModeButton);
});
}
(function init() {
window.addEventListener("DOMContentLoaded", (event) => {
// Register click on 'zen-mode-button' node element
const zendModeButton = document.getElementById('zen-mode-button');
if(zendModeButton !== null && zendModeButton !== undefined) {
_registerZendModeButtonClick(zendModeButton);
}
});
window.addEventListener("DOMContentLoaded", (event) => {
// Register click on 'zen-mode-button' node element
const zendModeButton = document.getElementById('zen-mode-button');
if (zendModeButton !== null && zendModeButton !== undefined) {
_registerZendModeButtonClick(zendModeButton);
}
});
})();
+3 -3
View File
@@ -1,14 +1,14 @@
/*!
* Chart.js v4.4.2
* Chart.js v4.4.3
* https://www.chartjs.org
* (c) 2024 Chart.js Contributors
* Released under the MIT License
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";var t=Object.freeze({__proto__:null,get Colors(){return Go},get Decimation(){return Qo},get Filler(){return ma},get Legend(){return ya},get SubTitle(){return ka},get Title(){return Ma},get Tooltip(){return Ba}});function e(){}const i=(()=>{let t=0;return()=>t++})();function s(t){return null==t}function n(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function o(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function r(t,e){return a(t)?t:e}function l(t,e){return void 0===t?e:t}const h=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,c=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function d(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function u(t,e,i,s){let a,r,l;if(n(t))if(r=t.length,s)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<r;a++)e.call(i,t[a],a);else if(o(t))for(l=Object.keys(t),r=l.length,a=0;a<r;a++)e.call(i,t[l[a]],l[a])}function f(t,e){let i,s,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function g(t){if(n(t))return t.map(g);if(o(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=g(t[i[n]]);return e}return t}function p(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function m(t,e,i,s){if(!p(t))return;const n=e[t],a=i[t];o(n)&&o(a)?b(n,a,s):e[t]=g(a)}function b(t,e,i){const s=n(e)?e:[e],a=s.length;if(!o(t))return t;const r=(i=i||{}).merger||m;let l;for(let e=0;e<a;++e){if(l=s[e],!o(l))continue;const n=Object.keys(l);for(let e=0,s=n.length;e<s;++e)r(n[e],t,l,i)}return t}function x(t,e){return b(t,e,{merger:_})}function _(t,e,i){if(!p(t))return;const s=e[t],n=i[t];o(s)&&o(n)?x(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=g(n))}const y={"":t=>t,x:t=>t.x,y:t=>t.y};function v(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function M(t,e){const i=y[e]||(y[e]=function(t){const e=v(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function w(t){return t.charAt(0).toUpperCase()+t.slice(1)}const k=t=>void 0!==t,S=t=>"function"==typeof t,P=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function D(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const C=Math.PI,O=2*C,A=O+C,T=Number.POSITIVE_INFINITY,L=C/180,E=C/2,R=C/4,I=2*C/3,z=Math.log10,F=Math.sign;function V(t,e,i){return Math.abs(t-e)<i}function B(t){const e=Math.round(t);t=V(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(z(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function W(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function N(t){return!isNaN(parseFloat(t))&&isFinite(t)}function H(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function j(t,e,i){let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function $(t){return t*(C/180)}function Y(t){return t*(180/C)}function U(t){if(!a(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function X(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let o=Math.atan2(s,i);return o<-.5*C&&(o+=O),{angle:o,distance:n}}function q(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function K(t,e){return(t-e+A)%O-C}function G(t){return(t%O+O)%O}function Z(t,e,i,s){const n=G(t),o=G(e),a=G(i),r=G(o-n),l=G(a-n),h=G(n-o),c=G(n-a);return n===o||n===a||s&&o===a||r>l&&h<c}function J(t,e,i){return Math.max(e,Math.min(i,t))}function Q(t){return J(t,-32768,32767)}function tt(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function et(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,o=0;for(;n-o>1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const it=(t,e,i,s)=>et(t,i,s?s=>{const n=t[s][e];return n<i||n===i&&t[s+1][e]===i}:s=>t[s][e]<i),st=(t,e,i)=>et(t,i,(s=>t[s][e]>=i));function nt(t,e,i){let s=0,n=t.length;for(;s<n&&t[s]<e;)s++;for(;n>s&&t[n-1]>i;)n--;return s>0||n<t.length?t.slice(s,n):t}const ot=["push","pop","shift","splice","unshift"];function at(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ot.forEach((e=>{const i="_onData"+w(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=s.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}function rt(t,e){Line truncated
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";var t=Object.freeze({__proto__:null,get Colors(){return Go},get Decimation(){return Qo},get Filler(){return ma},get Legend(){return ya},get SubTitle(){return ka},get Title(){return Ma},get Tooltip(){return Ba}});function e(){}const i=(()=>{let t=0;return()=>t++})();function s(t){return null==t}function n(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function o(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function r(t,e){return a(t)?t:e}function l(t,e){return void 0===t?e:t}const h=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,c=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function d(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function u(t,e,i,s){let a,r,l;if(n(t))if(r=t.length,s)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<r;a++)e.call(i,t[a],a);else if(o(t))for(l=Object.keys(t),r=l.length,a=0;a<r;a++)e.call(i,t[l[a]],l[a])}function f(t,e){let i,s,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function g(t){if(n(t))return t.map(g);if(o(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=g(t[i[n]]);return e}return t}function p(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function m(t,e,i,s){if(!p(t))return;const n=e[t],a=i[t];o(n)&&o(a)?x(n,a,s):e[t]=g(a)}function x(t,e,i){const s=n(e)?e:[e],a=s.length;if(!o(t))return t;const r=(i=i||{}).merger||m;let l;for(let e=0;e<a;++e){if(l=s[e],!o(l))continue;const n=Object.keys(l);for(let e=0,s=n.length;e<s;++e)r(n[e],t,l,i)}return t}function b(t,e){return x(t,e,{merger:_})}function _(t,e,i){if(!p(t))return;const s=e[t],n=i[t];o(s)&&o(n)?b(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=g(n))}const y={"":t=>t,x:t=>t.x,y:t=>t.y};function v(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function M(t,e){const i=y[e]||(y[e]=function(t){const e=v(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function w(t){return t.charAt(0).toUpperCase()+t.slice(1)}const k=t=>void 0!==t,S=t=>"function"==typeof t,P=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function D(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const C=Math.PI,O=2*C,A=O+C,T=Number.POSITIVE_INFINITY,L=C/180,E=C/2,R=C/4,I=2*C/3,z=Math.log10,F=Math.sign;function V(t,e,i){return Math.abs(t-e)<i}function B(t){const e=Math.round(t);t=V(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(z(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function W(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function N(t){return!isNaN(parseFloat(t))&&isFinite(t)}function H(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function j(t,e,i){let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function $(t){return t*(C/180)}function Y(t){return t*(180/C)}function U(t){if(!a(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function X(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let o=Math.atan2(s,i);return o<-.5*C&&(o+=O),{angle:o,distance:n}}function q(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function K(t,e){return(t-e+A)%O-C}function G(t){return(t%O+O)%O}function Z(t,e,i,s){const n=G(t),o=G(e),a=G(i),r=G(o-n),l=G(a-n),h=G(n-o),c=G(n-a);return n===o||n===a||s&&o===a||r>l&&h<c}function J(t,e,i){return Math.max(e,Math.min(i,t))}function Q(t){return J(t,-32768,32767)}function tt(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function et(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,o=0;for(;n-o>1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const it=(t,e,i,s)=>et(t,i,s?s=>{const n=t[s][e];return n<i||n===i&&t[s+1][e]===i}:s=>t[s][e]<i),st=(t,e,i)=>et(t,i,(s=>t[s][e]>=i));function nt(t,e,i){let s=0,n=t.length;for(;s<n&&t[s]<e;)s++;for(;n>s&&t[n-1]>i;)n--;return s>0||n<t.length?t.slice(s,n):t}const ot=["push","pop","shift","splice","unshift"];function at(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ot.forEach((e=>{const i="_onData"+w(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=s.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}function rt(t,e){Line truncated
/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/function _t(t){return t+.5|0}const yt=(t,e,i)=>Math.max(Math.min(t,i),e);function vt(t){return yt(_t(2.55*t),0,255)}function Mt(t){return yt(_t(255*t),0,255)}function wt(t){return yt(_t(t/2.55)/100,0,1)}function kt(t){return yt(_t(100*t),0,100)}const St={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Pt=[..."0123456789ABCDEF"],Dt=t=>Pt[15&t],Ct=t=>Pt[(240&t)>>4]+Pt[15&t],Ot=t=>(240&t)>>4==(15&t);function At(t){var e=(t=>Ot(t.r)&&Ot(t.g)&&Ot(t.b)&&Ot(t.a))(t)?Dt:Ct;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Tt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Et(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Rt(t,e,i){const s=Lt(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function It(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,h,n),r=60*r+.5),[0|r,l||0,a]}function zt(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(Mt)}function Ft(t,e,i){return zt(Lt,t,e,i)}function Vt(t){return(t%360+360)%360}function Bt(t){const e=Tt.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?vt(+e[5]):Mt(+e[5]));const n=Vt(+e[2]),o=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return zt(Rt,t,e,i)}(n,o,a):"hsv"===e[1]?function(t,e,i){return zt(Et,t,e,i)}(n,o,a):Ft(n,o,a),{r:i[0],g:i[1],b:i[2],a:s}}const Wt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Nt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ht;function jt(t){Ht||(Ht=function(){const t={},e=Object.keys(Nt),i=Object.keys(Wt);let s,n,o,a,r;for(s=0;s<e.length;s++){for(a=r=e[s],n=0;n<i.length;n++)o=i[n],r=r.replace(o,Wt[o]);o=parseInt(Nt[a],16),t[r]=[o>>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const $t=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Yt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Ut=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Xt(t,e,i){if(t){let s=It(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),Line truncated
*/function _t(t){return t+.5|0}const yt=(t,e,i)=>Math.max(Math.min(t,i),e);function vt(t){return yt(_t(2.55*t),0,255)}function Mt(t){return yt(_t(255*t),0,255)}function wt(t){return yt(_t(t/2.55)/100,0,1)}function kt(t){return yt(_t(100*t),0,100)}const St={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Pt=[..."0123456789ABCDEF"],Dt=t=>Pt[15&t],Ct=t=>Pt[(240&t)>>4]+Pt[15&t],Ot=t=>(240&t)>>4==(15&t);function At(t){var e=(t=>Ot(t.r)&&Ot(t.g)&&Ot(t.b)&&Ot(t.a))(t)?Dt:Ct;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Tt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Et(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Rt(t,e,i){const s=Lt(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function It(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,h,n),r=60*r+.5),[0|r,l||0,a]}function zt(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(Mt)}function Ft(t,e,i){return zt(Lt,t,e,i)}function Vt(t){return(t%360+360)%360}function Bt(t){const e=Tt.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?vt(+e[5]):Mt(+e[5]));const n=Vt(+e[2]),o=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return zt(Rt,t,e,i)}(n,o,a):"hsv"===e[1]?function(t,e,i){return zt(Et,t,e,i)}(n,o,a):Ft(n,o,a),{r:i[0],g:i[1],b:i[2],a:s}}const Wt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Nt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ht;function jt(t){Ht||(Ht=function(){const t={},e=Object.keys(Nt),i=Object.keys(Wt);let s,n,o,a,r;for(s=0;s<e.length;s++){for(a=r=e[s],n=0;n<i.length;n++)o=i[n],r=r.replace(o,Wt[o]);o=parseInt(Nt[a],16),t[r]=[o>>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const $t=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Yt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Ut=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Xt(t,e,i){if(t){let s=It(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),Line truncated
//# sourceMappingURL=chart.umd.js.map
+1 -1
View File
@@ -1 +1 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var i={};return function(){n.d(i,{default:function(){return s}});var e=n(771),t=n.n(e),r=function(e,t,r){for(var n=r,i=0,a=e.length;n<t.length;){var o=t[n];if(i<=0&&t.slice(n,n+a)===e)return n;"\\"===o?n++:"{"===o?i++:"}"===o&&i--,n++}return-1},a=/^\\begin{/,o=function(e,t){for(var n,i=[],o=new RegExp("("+t.map((function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")})).join("|")+")");-1!==(n=e.search(o));){n>0&&(i.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var l=t.findIndex((function(t){return e.startsWith(t.left)}));if(-1===(n=r(t[l].right,e,t[l].left.length)))break;var d=e.slice(0,n+t[l].right.length),s=a.test(d)?d:e.slice(t[l].left.length,n);i.push({type:"math",data:s,rawData:d,display:t[l].display}),e=e.slice(n+t[l].right.length)}return""!==e&&i.push({type:"text",data:e}),i},l=function(e,r){var n=o(e,r.delimiters);if(1===n.length&&"text"===n[0].type)return null;for(var i=document.createDocumentFragment(),a=0;a<n.length;a++)if("text"===n[a].type)i.appendChild(document.createTextNode(n[a].data));else{var l=document.createElement("span"),d=n[a].data;r.displayMode=n[a].display;try{r.preProcess&&(d=r.preProcess(d)),t().render(d,l,r)}catch(e){if(!(e instanceof t().ParseError))throw e;r.errorCallback("KaTeX auto-render: Failed to parse `"+n[a].data+"` with ",e),i.appendChild(document.createTextNode(n[a].rawData));continue}i.appendChild(l)}return i},d=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(3===i.nodeType){for(var a=i.textContent,o=i.nextSibling,d=0;o&&o.nodeType===Node.TEXT_NODE;)a+=o.textContent,o=o.nextSibling,d++;var s=l(a,r);if(s){for(var f=0;f<d;f++)i.nextSibling.remove();n+=s.childNodes.length-1,t.replaceChild(s,i)}else n+=d}else 1===i.nodeType&&function(){var t=" "+i.className+" ";-1===r.ignoredTags.indexOf(i.nodeName.toLowerCase())&&r.ignoredClasses.every((function(e){return-1===t.indexOf(" "+e+" ")}))&&e(i,r)}()}},s=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},d(e,r)}}(),i=i.default}()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){r.d(o,{default:function(){return d}});var e=r(771),t=r.n(e);const n=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},i=/^\\begin{/;var a=function(e,t){let r;const o=[],a=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(o.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const a=t.findIndex((t=>e.startsWith(t.left)));if(r=n(t[a].right,e,t[a].left.length),-1===r)break;const l=e.slice(0,r+t[a].right.length),s=i.test(l)?l:e.slice(t[a].left.length,r);o.push({type:"math",data:s,rawData:l,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&o.push({type:"text",data:e}),o};const l=function(e,n){const r=a(e,n.delimiters);if(1===r.length&&"text"===r[0].type)return null;const o=document.createDocumentFragment();for(let e=0;e<r.length;e++)if("text"===r[e].type)o.appendChild(document.createTextNode(r[e].data));else{const i=document.createElement("span");let a=r[e].data;n.displayMode=r[e].display;try{n.preProcess&&(a=n.preProcess(a)),t().render(a,i,n)}catch(i){if(!(i instanceof t().ParseError))throw i;n.errorCallback("KaTeX auto-render: Failed to parse `"+r[e].data+"` with ",i),o.appendChild(document.createTextNode(r[e].rawData));continue}o.appendChild(i)}return o},s=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const s=l(o,t);if(s){for(let e=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&s(r,t)}}};var d=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},s(e,n)}}(),o=o.default}()}));
+1 -1
View File
@@ -1 +1 @@
@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.9"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1pxLine truncated
@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.11"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1pLine truncated
+1 -1
View File
@@ -1 +1 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return na}});var r=function e(t,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,a,i="KaTeX parse error: "+t,o=r&&r.loc;if(o&&o.start<=o.end){var s=o.lexer.input;n=o.start,a=o.end,n===s.length?i+=" at end of input: ":i+=" at position "+(n+1)+": ";var l=s.slice(n,a).replace(/[^]/g,"$&\u0332");i+=(n>15?"\u2026"+s.slice(n-15,n):s.slice(0,n))+l+(a+15<s.length?s.slice(a,a+15)+"\u2026":s.slice(a))}var h=new Error(i);return h.name="ParseError",h.__proto__=e.prototype,h.position=n,null!=n&&null!=a&&(h.length=a-n),h.rawMessage=t,h};r.prototype.__proto__=Error.prototype;var n=r,a=/([A-Z])/g,i={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},o=/[&><"']/g;var s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(o,(function(e){return i[e]}))},hyphenate:function(e){return e.replace(a,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(e){return"#"+e}},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(e,t){return t.push(e),t}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(e){return Math.max(0,e)},cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(e){return Math.max(0,e)},cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(e){return Math.max(0,e)},cli:"-e, --max-expand <n>",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function c(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var m=function(){function e(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void Line truncated
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Yn}});class r{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let n,o,s="KaTeX parse error: "+e;const i=t&&t.loc;if(i&&i.start<=i.end){const e=i.lexer.input;n=i.start,o=i.end,n===e.length?s+=" at end of input: ":s+=" at position "+(n+1)+": ";const t=e.slice(n,o).replace(/[^]/g,"$&\u0332");let r,a;r=n>15?"\u2026"+e.slice(n-15,n):e.slice(0,n),a=o+15<e.length?e.slice(o,o+15)+"\u2026":e.slice(o),s+=r+t+a}const a=new Error(s);return a.name="ParseError",a.__proto__=r.prototype,a.position=n,null!=n&&null!=o&&(a.length=o-n),a.rawMessage=e,a}}r.prototype.__proto__=Error.prototype;var n=r;const o=/([A-Z])/g,s={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;const a=function(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?a(e.body[0]):e:"font"===e.type?a(e.body):e};var l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(i,(e=>s[e]))},hyphenate:function(e){return e.replace(o,"-$1").toLowerCase()},getBaseElem:a,isCharacterBox:function(e){const t=a(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){const t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}};const h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function c(e){if(e.default)return e.default;const t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class m{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0Line truncated
+14 -1
View File
@@ -46,10 +46,23 @@ class LiteYTEmbed extends HTMLElement {
this.addNoscriptIframe();
playBtnEl.removeAttribute('href');
// for the PE pattern, change anchor's semantics to button
if(playBtnEl.nodeName === 'A'){
playBtnEl.removeAttribute('href');
playBtnEl.setAttribute('tabindex', '0');
playBtnEl.setAttribute('role', 'button');
// fake button needs keyboard help
playBtnEl.addEventListener('keydown', e => {
if( e.key === 'Enter' || e.key === ' ' ){
e.preventDefault();
this.activate();
}
});
}
// On hover (or tap), warm up the TCP connections we're (likely) about to use.
this.addEventListener('pointerover', LiteYTEmbed.warmConnections, {once: true});
this.addEventListener('focusin', LiteYTEmbed.warmConnections, {once: true});
// Once the user clicks, add the real iframe and drop our play button
// TODO: In the future we could be like amp-youtube and silently swap in the iframe during idle time
-33
View File
@@ -1,33 +0,0 @@
import type { DetailedError } from './utils.js';
import type { DiagramDefinition, DiagramMetadata } from './diagram-api/types.js';
export type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void;
/**
* An object representing a parsed mermaid diagram definition.
* @privateRemarks This is exported as part of the public mermaidAPI.
*/
export declare class Diagram {
text: string;
metadata: Pick<DiagramMetadata, 'title'>;
type: string;
parser: DiagramDefinition['parser'];
renderer: DiagramDefinition['renderer'];
db: DiagramDefinition['db'];
private init?;
private detectError?;
constructor(text: string, metadata?: Pick<DiagramMetadata, 'title'>);
parse(): void;
render(id: string, version: string): Promise<void>;
getParser(): import("./diagram-api/types.js").ParserDefinition;
getType(): string;
}
/**
* Parse the text asynchronously and generate a Diagram object asynchronously.
* **Warning:** This function may be changed in the future.
* @alpha
* @param text - The mermaid diagram definition.
* @param metadata - Diagram metadata, defined in YAML.
* @returns A the Promise of a Diagram object.
* @throws {@link UnknownDiagramError} if the diagram type can not be found.
* @privateRemarks This is exported as part of the public mermaidAPI.
*/
export declare const getDiagramFromText: (text: string, metadata?: Pick<DiagramMetadata, 'title'>) => Promise<Diagram>;
-10
View File
@@ -1,10 +0,0 @@
function colors(specifier) {
var n = specifier.length / 6 | 0, colors2 = new Array(n), i = 0;
while (i < n)
colors2[i] = "#" + specifier.slice(i * 6, ++i * 6);
return colors2;
}
const d3schemeTableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
export {
d3schemeTableau10 as d
};
-9
View File
@@ -1,9 +0,0 @@
function o(e) {
for (var c = e.length / 6 | 0, n = new Array(c), a = 0; a < c; )
n[a] = "#" + e.slice(a * 6, ++a * 6);
return n;
}
const r = o("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
export {
r as d
};
-13
View File
@@ -1,13 +0,0 @@
export declare const mermaidAPI: {
render: import("@vitest/spy").Mock<any, any>;
parse: (text: string, parseOptions?: import("../mermaidAPI.js").ParseOptions | undefined) => Promise<boolean>;
initialize: import("@vitest/spy").Mock<any, any>;
getConfig: () => import("../config.type.js").MermaidConfig;
setConfig: (conf: import("../config.type.js").MermaidConfig) => import("../config.type.js").MermaidConfig;
getSiteConfig: () => import("../config.type.js").MermaidConfig;
updateSiteConfig: (conf: import("../config.type.js").MermaidConfig) => import("../config.type.js").MermaidConfig;
reset: () => void;
globalReset: () => void;
defaultConfig: import("../config.type.js").MermaidConfig;
};
export default mermaidAPI;
-27
View File
@@ -1,27 +0,0 @@
/**
* Accessibility (a11y) functions, types, helpers.
*
* @see https://www.w3.org/WAI/
* @see https://www.w3.org/TR/wai-aria-1.1/
* @see https://www.w3.org/TR/svg-aam-1.0/
*/
import type { D3Element } from './mermaidAPI.js';
/**
* Add role and aria-roledescription to the svg element.
*
* @param svg - d3 object that contains the SVG HTML element
* @param diagramType - diagram name for to the aria-roledescription
*/
export declare function setA11yDiagramInfo(svg: D3Element, diagramType: string): void;
/**
* Add an accessible title and/or description element to a chart.
* The title is usually not displayed and the description is never displayed.
*
* The following charts display their title as a visual and accessibility element: gantt.
*
* @param svg - d3 node to insert the a11y title and desc info
* @param a11yTitle - a11y title. undefined or empty strings mean to skip them
* @param a11yDesc - a11y description. undefined or empty strings mean to skip them
* @param baseId - id used to construct the a11y title and description id
*/
export declare function addSVGa11yTitleDescription(svg: D3Element, a11yTitle: string | undefined, a11yDesc: string | undefined, baseId: string): void;
-1
View File
@@ -1 +0,0 @@
export {};
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"add-html-label-3fd8c466.js","sources":["../src/diagrams/flowchart/parser/flow.jison","../src/diagrams/flowchart/flowDb.js","../../../node_modules/.pnpm/dagre-d3-es@7.0.9/node_modules/dagre-d3-es/src/dagre-js/util.js","../../../node_modules/.pnpm/dagre-d3-es@7.0.9/node_modules/dagre-d3-es/src/dagre-js/label/add-html-label.js"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n%x string\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%x dir\n%x vertex\n%x click\n%x href\n%x callbackname\n%x callbackargs\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%\\%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n// <acc_descr_multiline>.*[^\\n]* { return \"acc_descr_line\"}\n[\"] this.begin(\"string\");\n<string>[\"] this.popState();\n<string>[^\"]* return \"STR\";\n\"style\" return 'STYLE';\n\"default\" return 'DEFAULT';\n\"linkStyle\" return 'LINKSTYLE';\n\"interpolate\" return 'INTERPOLATE';\n\"classDef\" return 'CLASSDEF';\n\"class\" return 'CLASS';\n\n/*\n---interactivity command---\n'href' adds a link to the specified node. 'href' can only be specified when the\nline was introduced with 'click'.\n'href \"<link>\"' attaches the specified link to the node that was specified by 'click'.\n*/\n\"href\"[\\s]+[\"] this.begin(\"href\");\n<href>[\"] this.popState();\n<href>[^\"]* return 'HREF';\n\n/*\n---interactivity command---\n'call' adds a callback to the specified node. 'call' can only be specified when\nthe line was introduced with 'click'.\n'call <callbackname>(<args>)' attaches the function 'callbackname' with the specified\narguments to the node that was specified by 'click'.\nFunction arguments are optional: 'call <callbackname>()' simply executes 'callbackname' without any arguments.\n*/\n\"call\"[\\s]+ this.begin(\"callbackname\");\n<callbackname>\\([\\s]*\\) this.popState();\n<callbackname>\\( this.popState(); this.begin(\"callbackargs\");\n<callbackname>[^(]* return 'CALLBACKNAME';\n<callbackargs>\\) this.popState();\n<callbackargs>[^)]* return 'CALLBACKARGS';\n\n/*\n'click' is the keyword to introduce a line that contains interactivity commands.\n'click' must be followed by an existing node-id. All commands are attached to\nthat id.\n'click <id>' can be followed by href or call commands in any desired order\n*/\n\"click\"[\\s]+ this.begin(\"click\");\n<click>[\\s\\n] this.popState();\n<click>[^\\s\\n]* return 'CLICK';\n\n\"flowchart-elk\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"graph\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"flowchart\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"subgraph\" return 'subgraph';\n\"end\"\\b\\s* return 'end';\n\n\"_self\" return 'LINK_TARGET';\n\"_blank\" return 'LINK_TARGET';\n\"_parent\" return 'LINK_TARGET';\n\"_top\" return 'LINK_TARGET';\n\n<dir>(\\r?\\n)*\\s*\\n { this.popState(); return 'NODIR'; }\n<dir>\\s*\"LR\" { this.popState(); return 'DIR'; }\n<dir>\\s*\"RL\" { this.popState(); return 'DIR'; }\n<dir>\\s*\"TB\" { thisLine truncated
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"add-html-label-6e56ed67.js","sources":["../src/diagrams/flowchart/parser/flow.jison","../src/diagrams/flowchart/flowDb.js","../../../node_modules/.pnpm/dagre-d3-es@7.0.9/node_modules/dagre-d3-es/src/dagre-js/util.js","../../../node_modules/.pnpm/dagre-d3-es@7.0.9/node_modules/dagre-d3-es/src/dagre-js/label/add-html-label.js"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n%x string\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%x dir\n%x vertex\n%x click\n%x href\n%x callbackname\n%x callbackargs\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%\\%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n// <acc_descr_multiline>.*[^\\n]* { return \"acc_descr_line\"}\n[\"] this.begin(\"string\");\n<string>[\"] this.popState();\n<string>[^\"]* return \"STR\";\n\"style\" return 'STYLE';\n\"default\" return 'DEFAULT';\n\"linkStyle\" return 'LINKSTYLE';\n\"interpolate\" return 'INTERPOLATE';\n\"classDef\" return 'CLASSDEF';\n\"class\" return 'CLASS';\n\n/*\n---interactivity command---\n'href' adds a link to the specified node. 'href' can only be specified when the\nline was introduced with 'click'.\n'href \"<link>\"' attaches the specified link to the node that was specified by 'click'.\n*/\n\"href\"[\\s]+[\"] this.begin(\"href\");\n<href>[\"] this.popState();\n<href>[^\"]* return 'HREF';\n\n/*\n---interactivity command---\n'call' adds a callback to the specified node. 'call' can only be specified when\nthe line was introduced with 'click'.\n'call <callbackname>(<args>)' attaches the function 'callbackname' with the specified\narguments to the node that was specified by 'click'.\nFunction arguments are optional: 'call <callbackname>()' simply executes 'callbackname' without any arguments.\n*/\n\"call\"[\\s]+ this.begin(\"callbackname\");\n<callbackname>\\([\\s]*\\) this.popState();\n<callbackname>\\( this.popState(); this.begin(\"callbackargs\");\n<callbackname>[^(]* return 'CALLBACKNAME';\n<callbackargs>\\) this.popState();\n<callbackargs>[^)]* return 'CALLBACKARGS';\n\n/*\n'click' is the keyword to introduce a line that contains interactivity commands.\n'click' must be followed by an existing node-id. All commands are attached to\nthat id.\n'click <id>' can be followed by href or call commands in any desired order\n*/\n\"click\"[\\s]+ this.begin(\"click\");\n<click>[\\s\\n] this.popState();\n<click>[^\\s\\n]* return 'CLICK';\n\n\"flowchart-elk\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"graph\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"flowchart\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"subgraph\" return 'subgraph';\n\"end\"\\b\\s* return 'end';\n\n\"_self\" return 'LINK_TARGET';\n\"_blank\" return 'LINK_TARGET';\n\"_parent\" return 'LINK_TARGET';\n\"_top\" return 'LINK_TARGET';\n\n<dir>(\\r?\\n)*\\s*\\n { this.popState(); return 'NODIR'; }\n<dir>\\s*\"LR\" { this.popState(); return 'DIR'; }\n<dir>\\s*\"RL\" { this.popState(); return 'DIR'; }\n<dir>\\s*\"TB\" { thisLine truncated
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"add-html-label-ce7f9292.js","sources":["../src/diagrams/flowchart/parser/flow.jison","../src/diagrams/flowchart/flowDb.js","../../../node_modules/.pnpm/dagre-d3-es@7.0.9/node_modules/dagre-d3-es/src/dagre-js/util.js","../../../node_modules/.pnpm/dagre-d3-es@7.0.9/node_modules/dagre-d3-es/src/dagre-js/label/add-html-label.js"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n%x string\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%x dir\n%x vertex\n%x click\n%x href\n%x callbackname\n%x callbackargs\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%\\%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n// <acc_descr_multiline>.*[^\\n]* { return \"acc_descr_line\"}\n[\"] this.begin(\"string\");\n<string>[\"] this.popState();\n<string>[^\"]* return \"STR\";\n\"style\" return 'STYLE';\n\"default\" return 'DEFAULT';\n\"linkStyle\" return 'LINKSTYLE';\n\"interpolate\" return 'INTERPOLATE';\n\"classDef\" return 'CLASSDEF';\n\"class\" return 'CLASS';\n\n/*\n---interactivity command---\n'href' adds a link to the specified node. 'href' can only be specified when the\nline was introduced with 'click'.\n'href \"<link>\"' attaches the specified link to the node that was specified by 'click'.\n*/\n\"href\"[\\s]+[\"] this.begin(\"href\");\n<href>[\"] this.popState();\n<href>[^\"]* return 'HREF';\n\n/*\n---interactivity command---\n'call' adds a callback to the specified node. 'call' can only be specified when\nthe line was introduced with 'click'.\n'call <callbackname>(<args>)' attaches the function 'callbackname' with the specified\narguments to the node that was specified by 'click'.\nFunction arguments are optional: 'call <callbackname>()' simply executes 'callbackname' without any arguments.\n*/\n\"call\"[\\s]+ this.begin(\"callbackname\");\n<callbackname>\\([\\s]*\\) this.popState();\n<callbackname>\\( this.popState(); this.begin(\"callbackargs\");\n<callbackname>[^(]* return 'CALLBACKNAME';\n<callbackargs>\\) this.popState();\n<callbackargs>[^)]* return 'CALLBACKARGS';\n\n/*\n'click' is the keyword to introduce a line that contains interactivity commands.\n'click' must be followed by an existing node-id. All commands are attached to\nthat id.\n'click <id>' can be followed by href or call commands in any desired order\n*/\n\"click\"[\\s]+ this.begin(\"click\");\n<click>[\\s\\n] this.popState();\n<click>[^\\s\\n]* return 'CLICK';\n\n\"flowchart-elk\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"graph\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"flowchart\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"subgraph\" return 'subgraph';\n\"end\"\\b\\s* return 'end';\n\n\"_self\" return 'LINK_TARGET';\n\"_blank\" return 'LINK_TARGET';\n\"_parent\" return 'LINK_TARGET';\n\"_top\" return 'LINK_TARGET';\n\n<dir>(\\r?\\n)*\\s*\\n { this.popState(); return 'NODIR'; }\n<dir>\\s*\"LR\" { this.popState(); return 'DIR'; }\n<dir>\\s*\"RL\" { this.popState(); return 'DIR'; }\n<dir>\\s*\"TB\" { thisLine truncated
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"add-html-label-f3a0bd34.js","sources":["../src/diagrams/flowchart/parser/flow.jison","../src/diagrams/flowchart/flowDb.js","../../../node_modules/.pnpm/dagre-d3-es@7.0.9/node_modules/dagre-d3-es/src/dagre-js/util.js","../../../node_modules/.pnpm/dagre-d3-es@7.0.9/node_modules/dagre-d3-es/src/dagre-js/label/add-html-label.js"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n%x string\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%x dir\n%x vertex\n%x click\n%x href\n%x callbackname\n%x callbackargs\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%\\%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n// <acc_descr_multiline>.*[^\\n]* { return \"acc_descr_line\"}\n[\"] this.begin(\"string\");\n<string>[\"] this.popState();\n<string>[^\"]* return \"STR\";\n\"style\" return 'STYLE';\n\"default\" return 'DEFAULT';\n\"linkStyle\" return 'LINKSTYLE';\n\"interpolate\" return 'INTERPOLATE';\n\"classDef\" return 'CLASSDEF';\n\"class\" return 'CLASS';\n\n/*\n---interactivity command---\n'href' adds a link to the specified node. 'href' can only be specified when the\nline was introduced with 'click'.\n'href \"<link>\"' attaches the specified link to the node that was specified by 'click'.\n*/\n\"href\"[\\s]+[\"] this.begin(\"href\");\n<href>[\"] this.popState();\n<href>[^\"]* return 'HREF';\n\n/*\n---interactivity command---\n'call' adds a callback to the specified node. 'call' can only be specified when\nthe line was introduced with 'click'.\n'call <callbackname>(<args>)' attaches the function 'callbackname' with the specified\narguments to the node that was specified by 'click'.\nFunction arguments are optional: 'call <callbackname>()' simply executes 'callbackname' without any arguments.\n*/\n\"call\"[\\s]+ this.begin(\"callbackname\");\n<callbackname>\\([\\s]*\\) this.popState();\n<callbackname>\\( this.popState(); this.begin(\"callbackargs\");\n<callbackname>[^(]* return 'CALLBACKNAME';\n<callbackargs>\\) this.popState();\n<callbackargs>[^)]* return 'CALLBACKARGS';\n\n/*\n'click' is the keyword to introduce a line that contains interactivity commands.\n'click' must be followed by an existing node-id. All commands are attached to\nthat id.\n'click <id>' can be followed by href or call commands in any desired order\n*/\n\"click\"[\\s]+ this.begin(\"click\");\n<click>[\\s\\n] this.popState();\n<click>[^\\s\\n]* return 'CLICK';\n\n\"flowchart-elk\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"graph\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"flowchart\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"subgraph\" return 'subgraph';\n\"end\"\\b\\s* return 'end';\n\n\"_self\" return 'LINK_TARGET';\n\"_blank\" return 'LINK_TARGET';\n\"_parent\" return 'LINK_TARGET';\n\"_top\" return 'LINK_TARGET';\n\n<dir>(\\r?\\n)*\\s*\\n { this.popState(); return 'NODIR'; }\n<dir>\\s*\"LR\" { this.popState(); return 'DIR'; }\n<dir>\\s*\"RL\" { this.popState(); return 'DIR'; }\n<dir>\\s*\"TB\" { thisLine truncated
-85
View File
@@ -1,85 +0,0 @@
import { c as Q, p as sn } from "./constant-2fe7eae5.js";
import { J as en, K as X, N as I, O as rn, P as y, I as ln, Q as z, R as b, T as un, V as t, W as an, X as on, Y as tn } from "./utils-aa888deb.js";
function fn(l) {
return l.innerRadius;
}
function cn(l) {
return l.outerRadius;
}
function yn(l) {
return l.startAngle;
}
function gn(l) {
return l.endAngle;
}
function mn(l) {
return l && l.padAngle;
}
function pn(l, x, w, O, h, v, S, r) {
var s = w - l, n = O - x, m = S - h, i = r - v, u = i * s - m * n;
if (!(u * u < y))
return u = (m * (x - v) - i * (l - h)) / u, [l + u * s, x + u * n];
}
function H(l, x, w, O, h, v, S) {
var r = l - w, s = x - O, n = (S ? v : -v) / z(r * r + s * s), m = n * s, i = -n * r, u = l + m, f = x + i, c = w + m, D = O + i, o = (u + c) / 2, E = (f + D) / 2, p = c - u, g = D - f, R = p * p + g * g, J = h - v, P = u * D - c * f, K = (g < 0 ? -1 : 1) * z(tn(0, J * J * R - P * P)), N = (P * g - p * K) / R, d = (-P * p - g * K) / R, A = (P * g + p * K) / R, T = (-P * p + g * K) / R, e = N - o, a = d - E, V = A - o, W = T - E;
return e * e + a * a > V * V + W * W && (N = A, d = T), {
cx: N,
cy: d,
x01: -m,
y01: -i,
x11: N * (h / J - 1),
y11: d * (h / J - 1)
};
}
function hn() {
var l = fn, x = cn, w = Q(0), O = null, h = yn, v = gn, S = mn, r = null;
function s() {
var n, m, i = +l.apply(this, arguments), u = +x.apply(this, arguments), f = h.apply(this, arguments) - rn, c = v.apply(this, arguments) - rn, D = un(c - f), o = c > f;
if (r || (r = n = sn()), u < i && (m = u, u = i, i = m), !(u > y))
r.moveTo(0, 0);
else if (D > ln - y)
r.moveTo(u * X(f), u * I(f)), r.arc(0, 0, u, f, c, !o), i > y && (r.moveTo(i * X(c), i * I(c)), r.arc(0, 0, i, c, f, o));
else {
var E = f, p = c, g = f, R = c, J = D, P = D, K = S.apply(this, arguments) / 2, N = K > y && (O ? +O.apply(this, arguments) : z(i * i + u * u)), d = b(un(u - i) / 2, +w.apply(this, arguments)), A = d, T = d, e, a;
if (N > y) {
var V = an(N / i * I(K)), W = an(N / u * I(K));
(J -= V * 2) > y ? (V *= o ? 1 : -1, g += V, R -= V) : (J = 0, g = R = (f + c) / 2), (P -= W * 2) > y ? (W *= o ? 1 : -1, E += W, p -= W) : (P = 0, E = p = (f + c) / 2);
}
var Y = u * X(E), j = u * I(E), B = i * X(R), C = i * I(R);
if (d > y) {
var F = u * X(p), G = u * I(p), L = i * X(g), M = i * I(g), q;
if (D < en && (q = pn(Y, j, L, M, F, G, B, C))) {
var U = Y - q[0], Z = j - q[1], $ = F - q[0], k = G - q[1], _ = 1 / I(on((U * $ + Z * k) / (z(U * U + Z * Z) * z($ * $ + k * k))) / 2), nn = z(q[0] * q[0] + q[1] * q[1]);
A = b(d, (i - nn) / (_ - 1)), T = b(d, (u - nn) / (_ + 1));
}
}
P > y ? T > y ? (e = H(L, M, Y, j, u, T, o), a = H(F, G, B, C, u, T, o), r.moveTo(e.cx + e.x01, e.cy + e.y01), T < d ? r.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(a.y01, a.x01), !o) : (r.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, u, t(e.cy + e.y11, e.cx + e.x11), t(a.cy + a.y11, a.cx + a.x11), !o), r.arc(a.cx, a.cy, T, t(a.y11, a.x11), t(a.y01, a.x01), !o))) : (r.moveTo(Y, j), r.arc(0, 0, u, E, p, !o)) : r.moveTo(Y, j), !(i > y) || !(J > y) ? r.lineTo(B, C) : A > y ? (e = H(B, C, F, G, i, -A, o), a = H(Y, j, L, M, i, -A, o), r.lineTo(e.cx + e.x01, e.cy + e.y01), A < d ? r.arc(e.cx, e.cy, A, t(e.y01, e.x01), t(a.y01, a.x01), !o) : (r.arc(e.cx, e.cy, A, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, i, t(e.cy + e.y11, e.cx + e.x11), t(a.cy + a.y11, a.cx + a.x11), o), r.arc(a.cx, a.cy, A, t(a.y11, a.x11), t(a.y01, a.x01), !o))) : r.arc(0, 0, i, R, g, o);
}
if (r.closePath(), n)
return r = null, n + "" || null;
}
return s.centroid = function() {
var n = (+l.apply(this, arguments) + +x.apply(this, arguments)) / 2, m = (+h.apply(this, arguments) + +v.apply(this, arguments)) / 2 - en / 2;
return [X(m) * n, I(m) * n];
}, s.innerRadius = function(n) {
return arguments.length ? (l = typeof n == "function" ? n : Q(+n), s) : l;
}, s.outerRadius = function(n) {
return arguments.length ? (x = typeof n == "function" ? n : Q(+n), s) : x;
}, s.cornerRadius = function(n) {
return arguments.length ? (w = typeof n == "function" ? n : Q(+n), s) : w;
}, s.padRadius = function(n) {
return arguments.length ? (O = n == null ? null : typeof n == "function" ? n : Q(+n), s) : O;
}, s.startAngle = function(n) {
return arguments.length ? (h = typeof n == "function" ? n : Q(+n), s) : h;
}, s.endAngle = function(n) {
return arguments.length ? (v = typeof n == "function" ? n : Q(+n), s) : v;
}, s.padAngle = function(n) {
return arguments.length ? (S = typeof n == "function" ? n : Q(+n), s) : S;
}, s.context = function(n) {
return arguments.length ? (r = n ?? null, s) : r;
}, s;
}
export {
hn as d
};
//# sourceMappingURL=arc-1bd4335b.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"arc-1bd4335b.js","sources":["../../../node_modules/.pnpm/d3-shape@3.1.0/node_modules/d3-shape/src/arc.js"],"sourcesContent":["import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle.\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) *Line truncated
-86
View File
@@ -1,86 +0,0 @@
import { w as ln, c as H } from "./path-428ebac9.js";
import { aw as an, ax as V, ay as D, az as rn, aA as y, V as on, aB as K, aC as _, aD as un, aE as t, aF as sn, aG as tn, aH as fn } from "./mermaid-00886c59.js";
function cn(l) {
return l.innerRadius;
}
function yn(l) {
return l.outerRadius;
}
function gn(l) {
return l.startAngle;
}
function mn(l) {
return l.endAngle;
}
function pn(l) {
return l && l.padAngle;
}
function dn(l, h, z, E, v, A, I, a) {
var B = z - l, i = E - h, n = I - v, m = a - A, r = m * B - n * i;
if (!(r * r < y))
return r = (n * (h - A) - m * (l - v)) / r, [l + r * B, h + r * i];
}
function W(l, h, z, E, v, A, I) {
var a = l - z, B = h - E, i = (I ? A : -A) / K(a * a + B * B), n = i * B, m = -i * a, r = l + n, s = h + m, f = z + n, c = E + m, O = (r + f) / 2, o = (s + c) / 2, p = f - r, g = c - s, R = p * p + g * g, T = v - A, w = r * c - f * s, C = (g < 0 ? -1 : 1) * K(fn(0, T * T * R - w * w)), F = (w * g - p * C) / R, G = (-w * p - g * C) / R, P = (w * g + p * C) / R, d = (-w * p + g * C) / R, x = F - O, e = G - o, u = P - O, S = d - o;
return x * x + e * e > u * u + S * S && (F = P, G = d), {
cx: F,
cy: G,
x01: -n,
y01: -m,
x11: F * (v / T - 1),
y11: G * (v / T - 1)
};
}
function vn() {
var l = cn, h = yn, z = H(0), E = null, v = gn, A = mn, I = pn, a = null, B = ln(i);
function i() {
var n, m, r = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - rn, c = A.apply(this, arguments) - rn, O = un(c - f), o = c > f;
if (a || (a = n = B()), s < r && (m = s, s = r, r = m), !(s > y))
a.moveTo(0, 0);
else if (O > on - y)
a.moveTo(s * V(f), s * D(f)), a.arc(0, 0, s, f, c, !o), r > y && (a.moveTo(r * V(c), r * D(c)), a.arc(0, 0, r, c, f, o));
else {
var p = f, g = c, R = f, T = c, w = O, C = O, F = I.apply(this, arguments) / 2, G = F > y && (E ? +E.apply(this, arguments) : K(r * r + s * s)), P = _(un(s - r) / 2, +z.apply(this, arguments)), d = P, x = P, e, u;
if (G > y) {
var S = sn(G / r * D(F)), L = sn(G / s * D(F));
(w -= S * 2) > y ? (S *= o ? 1 : -1, R += S, T -= S) : (w = 0, R = T = (f + c) / 2), (C -= L * 2) > y ? (L *= o ? 1 : -1, p += L, g -= L) : (C = 0, p = g = (f + c) / 2);
}
var j = s * V(p), J = s * D(p), M = r * V(T), N = r * D(T);
if (P > y) {
var Q = s * V(g), U = s * D(g), X = r * V(R), Y = r * D(R), q;
if (O < an)
if (q = dn(j, J, X, Y, Q, U, M, N)) {
var Z = j - q[0], $ = J - q[1], k = Q - q[0], b = U - q[1], nn = 1 / D(tn((Z * k + $ * b) / (K(Z * Z + $ * $) * K(k * k + b * b))) / 2), en = K(q[0] * q[0] + q[1] * q[1]);
d = _(P, (r - en) / (nn - 1)), x = _(P, (s - en) / (nn + 1));
} else
d = x = 0;
}
C > y ? x > y ? (e = W(X, Y, j, J, s, x, o), u = W(Q, U, M, N, s, x, o), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < P ? a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, s, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), a.arc(u.cx, u.cy, x, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (a.moveTo(j, J), a.arc(0, 0, s, p, g, !o)) : a.moveTo(j, J), !(r > y) || !(w > y) ? a.lineTo(M, N) : d > y ? (e = W(M, N, Q, U, r, -d, o), u = W(j, J, X, Y, r, -d, o), a.lineTo(e.cx + e.x01, e.cy + e.y01), d < P ? a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, r, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), a.arc(u.cx, u.cy, d, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : a.arc(0, 0, r, T, R, o);
}
if (a.closePath(), n)
return a = null, n + "" || null;
}
return i.centroid = function() {
var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, m = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - an / 2;
return [V(m) * n, D(m) * n];
}, i.innerRadius = function(n) {
return arguments.length ? (l = typeof n == "function" ? n : H(+n), i) : l;
}, i.outerRadius = function(n) {
return arguments.length ? (h = typeof n == "function" ? n : H(+n), i) : h;
}, i.cornerRadius = function(n) {
return arguments.length ? (z = typeof n == "function" ? n : H(+n), i) : z;
}, i.padRadius = function(n) {
return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : H(+n), i) : E;
}, i.startAngle = function(n) {
return arguments.length ? (v = typeof n == "function" ? n : H(+n), i) : v;
}, i.endAngle = function(n) {
return arguments.length ? (A = typeof n == "function" ? n : H(+n), i) : A;
}, i.padAngle = function(n) {
return arguments.length ? (I = typeof n == "function" ? n : H(+n), i) : I;
}, i.context = function(n) {
return arguments.length ? (a = n ?? null, i) : a;
}, i;
}
export {
vn as d
};
-148
View File
@@ -1,148 +0,0 @@
import { w as withPath, c as constant } from "./path-39bad7e2.js";
import { aw as pi, ax as cos, ay as sin, az as halfPi, aA as epsilon, V as tau, aB as sqrt, aC as min, aD as abs, aE as atan2, aF as asin, aG as acos, aH as max } from "./mermaid-c5809711.js";
function arcInnerRadius(d) {
return d.innerRadius;
}
function arcOuterRadius(d) {
return d.outerRadius;
}
function arcStartAngle(d) {
return d.startAngle;
}
function arcEndAngle(d) {
return d.endAngle;
}
function arcPadAngle(d) {
return d && d.padAngle;
}
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10;
if (t * t < epsilon)
return;
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
return [x0 + t * x10, y0 + t * y10];
}
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00;
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1)
cx0 = cx1, cy0 = cy1;
return {
cx: cx0,
cy: cy0,
x01: -ox,
y01: -oy,
x11: cx0 * (r1 / r - 1),
y11: cy0 * (r1 / r - 1)
};
}
function d3arc() {
var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null, path = withPath(arc);
function arc() {
var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = abs(a1 - a0), cw = a1 > a0;
if (!context)
context = buffer = path();
if (r1 < r0)
r = r1, r1 = r0, r0 = r;
if (!(r1 > epsilon))
context.moveTo(0, 0);
else if (da > tau - epsilon) {
context.moveTo(r1 * cos(a0), r1 * sin(a0));
context.arc(0, 0, r1, a0, a1, !cw);
if (r0 > epsilon) {
context.moveTo(r0 * cos(a1), r0 * sin(a1));
context.arc(0, 0, r0, a1, a0, cw);
}
} else {
var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1;
if (rp > epsilon) {
var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap));
if ((da0 -= p0 * 2) > epsilon)
p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
else
da0 = 0, a00 = a10 = (a0 + a1) / 2;
if ((da1 -= p1 * 2) > epsilon)
p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
else
da1 = 0, a01 = a11 = (a0 + a1) / 2;
}
var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
if (rc > epsilon) {
var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc;
if (da < pi) {
if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {
var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
rc0 = min(rc, (r0 - lc) / (kc - 1));
rc1 = min(rc, (r1 - lc) / (kc + 1));
} else {
rc0 = rc1 = 0;
}
}
}
if (!(da1 > epsilon))
context.moveTo(x01, y01);
else if (rc1 > epsilon) {
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
if (rc1 < rc)
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
else {
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
}
} else
context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
if (!(r0 > epsilon) || !(da0 > epsilon))
context.lineTo(x10, y10);
else if (rc0 > epsilon) {
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
if (rc0 < rc)
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
else {
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
}
} else
context.arc(0, 0, r0, a10, a00, cw);
}
context.closePath();
if (buffer)
return context = null, buffer + "" || null;
}
arc.centroid = function() {
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
return [cos(a) * r, sin(a) * r];
};
arc.innerRadius = function(_) {
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
};
arc.outerRadius = function(_) {
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
};
arc.cornerRadius = function(_) {
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
};
arc.padRadius = function(_) {
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
};
arc.startAngle = function(_) {
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
};
arc.endAngle = function(_) {
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
};
arc.padAngle = function(_) {
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
};
arc.context = function(_) {
return arguments.length ? (context = _ == null ? null : _, arc) : context;
};
return arc;
}
export {
d3arc as d
};
-145
View File
@@ -1,145 +0,0 @@
import { c as constant, p as path } from "./constant-b644328d.js";
import { J as pi, K as cos, N as sin, O as halfPi, P as epsilon, I as tau, Q as sqrt, R as min, T as abs, V as atan2, W as asin, X as acos, Y as max } from "./utils-872dfc50.js";
function arcInnerRadius(d) {
return d.innerRadius;
}
function arcOuterRadius(d) {
return d.outerRadius;
}
function arcStartAngle(d) {
return d.startAngle;
}
function arcEndAngle(d) {
return d.endAngle;
}
function arcPadAngle(d) {
return d && d.padAngle;
}
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10;
if (t * t < epsilon)
return;
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
return [x0 + t * x10, y0 + t * y10];
}
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00;
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1)
cx0 = cx1, cy0 = cy1;
return {
cx: cx0,
cy: cy0,
x01: -ox,
y01: -oy,
x11: cx0 * (r1 / r - 1),
y11: cy0 * (r1 / r - 1)
};
}
function d3arc() {
var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null;
function arc() {
var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = abs(a1 - a0), cw = a1 > a0;
if (!context)
context = buffer = path();
if (r1 < r0)
r = r1, r1 = r0, r0 = r;
if (!(r1 > epsilon))
context.moveTo(0, 0);
else if (da > tau - epsilon) {
context.moveTo(r1 * cos(a0), r1 * sin(a0));
context.arc(0, 0, r1, a0, a1, !cw);
if (r0 > epsilon) {
context.moveTo(r0 * cos(a1), r0 * sin(a1));
context.arc(0, 0, r0, a1, a0, cw);
}
} else {
var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1;
if (rp > epsilon) {
var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap));
if ((da0 -= p0 * 2) > epsilon)
p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
else
da0 = 0, a00 = a10 = (a0 + a1) / 2;
if ((da1 -= p1 * 2) > epsilon)
p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
else
da1 = 0, a01 = a11 = (a0 + a1) / 2;
}
var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
if (rc > epsilon) {
var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc;
if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {
var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
rc0 = min(rc, (r0 - lc) / (kc - 1));
rc1 = min(rc, (r1 - lc) / (kc + 1));
}
}
if (!(da1 > epsilon))
context.moveTo(x01, y01);
else if (rc1 > epsilon) {
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
if (rc1 < rc)
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
else {
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
}
} else
context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
if (!(r0 > epsilon) || !(da0 > epsilon))
context.lineTo(x10, y10);
else if (rc0 > epsilon) {
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
if (rc0 < rc)
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
else {
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
}
} else
context.arc(0, 0, r0, a10, a00, cw);
}
context.closePath();
if (buffer)
return context = null, buffer + "" || null;
}
arc.centroid = function() {
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
return [cos(a) * r, sin(a) * r];
};
arc.innerRadius = function(_) {
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
};
arc.outerRadius = function(_) {
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
};
arc.cornerRadius = function(_) {
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
};
arc.padRadius = function(_) {
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
};
arc.startAngle = function(_) {
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
};
arc.endAngle = function(_) {
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
};
arc.padAngle = function(_) {
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
};
arc.context = function(_) {
return arguments.length ? (context = _ == null ? null : _, arc) : context;
};
return arc;
}
export {
d3arc as d
};
//# sourceMappingURL=arc-7c943a40.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"arc-7c943a40.js","sources":["../../../node_modules/.pnpm/d3-shape@3.1.0/node_modules/d3-shape/src/arc.js"],"sourcesContent":["import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle.\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) *Line truncated
-6
View File
@@ -1,6 +0,0 @@
function t(r) {
return typeof r == "object" && "length" in r ? r : Array.from(r);
}
export {
t as a
};
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"array-2ff2c7a6.js","sources":["../../../node_modules/.pnpm/d3-shape@3.1.0/node_modules/d3-shape/src/array.js"],"sourcesContent":["export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n"],"names":["array","x"],"mappings":"AAEe,SAAQA,EAACC,GAAG;AACzB,SAAO,OAAOA,KAAM,YAAY,YAAYA,IACxCA,IACA,MAAM,KAAKA,CAAC;AAClB;"}
-6
View File
@@ -1,6 +0,0 @@
function array(x) {
return typeof x === "object" && "length" in x ? x : Array.from(x);
}
export {
array as a
};
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"array-b7dcf730.js","sources":["../../../node_modules/.pnpm/d3-shape@3.1.0/node_modules/d3-shape/src/array.js"],"sourcesContent":["export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n"],"names":[],"mappings":"AAEe,SAAQ,MAAC,GAAG;AACzB,SAAO,OAAO,MAAM,YAAY,YAAY,IACxC,IACA,MAAM,KAAK,CAAC;AAClB;"}
-30
View File
@@ -1,30 +0,0 @@
/**
* assignWithDepth Extends the functionality of {@link Object.assign} with the
* ability to merge arbitrary-depth objects For each key in src with path `k` (recursively)
* performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of
* undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to `{}` and
* effectively merged with src[`k`]<p> Additionally, dissimilar types will not clobber unless the
* config.clobber parameter === true. Example:
*
* ```
* const config_0 = { foo: { bar: 'bar' }, bar: 'foo' };
* const config_1 = { foo: 'foo', bar: 'bar' };
* const result = assignWithDepth(config_0, config_1);
* console.log(result);
* //-> result: { foo: { bar: 'bar' }, bar: 'bar' }
* ```
*
* Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a
* destructured array of objects and dst is not an array, assignWithDepth will apply each element
* of src to dst in order.
* @param dst - The destination of the merge
* @param src - The source object(s) to merge into destination
* @param config -
* * depth: depth to traverse within src and dst for merging
* * clobber: should dissimilar types clobber
*/
declare const assignWithDepth: (dst: any, src: any, { depth, clobber }?: {
depth?: number | undefined;
clobber?: boolean | undefined;
}) => any;
export default assignWithDepth;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"c4Diagram-03ae1c00.js","sources":["../src/diagrams/c4/parser/c4Diagram.jison","../src/diagrams/c4/c4Db.js","../src/diagrams/c4/svgDraw.js","../src/diagrams/c4/c4Renderer.js","../src/diagrams/c4/styles.js","../src/diagrams/c4/c4Diagram.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2022 mzhx.meng@gmail.com\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n\n/* context */\n%x person\n%x person_ext\n%x system\n%x system_db\n%x system_queue\n%x system_ext\n%x system_ext_db\n%x system_ext_queue\n%x boundary\n%x enterprise_boundary\n%x system_boundary\n%x rel\n%x birel\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n\n/* container */\n%x container\n%x container_db\n%x container_queue\n%x container_ext\n%x container_ext_db\n%x container_ext_queue\n%x container_boundary\n\n/* component */\n%x component\n%x component_db\n%x component_queue\n%x component_ext\n%x component_ext_db\n%x component_ext_queue\n\n/* Dynamic diagram */\n%x rel_index\n%x index\n\n/* Deployment diagram */\n%x node\n%x node_l\n%x node_r\n\n/* Relationship Types */\n%x rel\n%x rel_bi\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n%x rel_b\n\n/* Custom tags/stereotypes */\n%x update_el_style\n%x update_rel_style\n%x update_layout_config\n\n%x attribute\n%x string\n%x string_kv\n%x string_kv_key\n%x string_kv_value\n\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\n\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* c /* skip comments */\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"C4Context\" return 'C4_CONTEXT';\n\"C4Container\" return 'C4_CONTAINER';\n\"C4Component\" return 'C4_COMPONENT';\n\"C4Dynamic\" return 'C4_DYNAMIC';\n\"C4Deployment\" return 'C4_DEPLOYMENT';\n\n\"Person_Ext\" { this.begin(\"person_ext\"); return 'PERSON_EXT';}\n\"Person\" { this.begin(\"person\"); return 'PERSON';}\n\"SystemQueue_Ext\" { this.begin(\"system_ext_queue\"); return 'SYSTEM_EXT_QUEUE';}\n\"SystemDb_Ext\" { this.begin(\"system_ext_db\"); return 'SYSTEM_EXT_DB';}\n\"System_Ext\" { this.begin(\"system_ext\"); return 'SYSTEM_EXT';}\n\"SystemQueue\" { this.begin(\"system_queue\"); return 'SYSTEM_QUEUE';}\n\"SystemDb\" { this.begin(\"system_db\"); return 'SYSTEM_DB';}\n\"System\" { this.begin(\"system\"); return 'SYSTEM';}\n\n\"Boundary\" { this.begin(\"boundary\"); return 'BOUNDARY';}\n\"Enterprise_Boundary\" { this.begin(\"enterprise_boundary\"); return 'ENTERPRISE_BOUNDARY';}\n\"System_Boundary\" { this.begin(\"system_boundary\"); return 'SYSTEM_BOUNDARY';}\n\n\"ContainerQueue_Ext\" { this.begin(\"container_ext_queue\"); return 'CONTAINER_EXT_QUEUE';}\n\"ContainerDb_Ext\" { this.begin(\"container_ext_db\"); return 'CONTAINER_EXT_DB';}\n\"Container_Ext\" { thisLine truncated
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"c4Diagram-8889d224.js","sources":["../src/diagrams/c4/parser/c4Diagram.jison","../src/diagrams/c4/c4Db.js","../src/diagrams/c4/svgDraw.js","../src/diagrams/c4/c4Renderer.js","../src/diagrams/c4/styles.js","../src/diagrams/c4/c4Diagram.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2022 mzhx.meng@gmail.com\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n\n/* context */\n%x person\n%x person_ext\n%x system\n%x system_db\n%x system_queue\n%x system_ext\n%x system_ext_db\n%x system_ext_queue\n%x boundary\n%x enterprise_boundary\n%x system_boundary\n%x rel\n%x birel\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n\n/* container */\n%x container\n%x container_db\n%x container_queue\n%x container_ext\n%x container_ext_db\n%x container_ext_queue\n%x container_boundary\n\n/* component */\n%x component\n%x component_db\n%x component_queue\n%x component_ext\n%x component_ext_db\n%x component_ext_queue\n\n/* Dynamic diagram */\n%x rel_index\n%x index\n\n/* Deployment diagram */\n%x node\n%x node_l\n%x node_r\n\n/* Relationship Types */\n%x rel\n%x rel_bi\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n%x rel_b\n\n/* Custom tags/stereotypes */\n%x update_el_style\n%x update_rel_style\n%x update_layout_config\n\n%x attribute\n%x string\n%x string_kv\n%x string_kv_key\n%x string_kv_value\n\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\n\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* c /* skip comments */\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"C4Context\" return 'C4_CONTEXT';\n\"C4Container\" return 'C4_CONTAINER';\n\"C4Component\" return 'C4_COMPONENT';\n\"C4Dynamic\" return 'C4_DYNAMIC';\n\"C4Deployment\" return 'C4_DEPLOYMENT';\n\n\"Person_Ext\" { this.begin(\"person_ext\"); return 'PERSON_EXT';}\n\"Person\" { this.begin(\"person\"); return 'PERSON';}\n\"SystemQueue_Ext\" { this.begin(\"system_ext_queue\"); return 'SYSTEM_EXT_QUEUE';}\n\"SystemDb_Ext\" { this.begin(\"system_ext_db\"); return 'SYSTEM_EXT_DB';}\n\"System_Ext\" { this.begin(\"system_ext\"); return 'SYSTEM_EXT';}\n\"SystemQueue\" { this.begin(\"system_queue\"); return 'SYSTEM_QUEUE';}\n\"SystemDb\" { this.begin(\"system_db\"); return 'SYSTEM_DB';}\n\"System\" { this.begin(\"system\"); return 'SYSTEM';}\n\n\"Boundary\" { this.begin(\"boundary\"); return 'BOUNDARY';}\n\"Enterprise_Boundary\" { this.begin(\"enterprise_boundary\"); return 'ENTERPRISE_BOUNDARY';}\n\"System_Boundary\" { this.begin(\"system_boundary\"); return 'SYSTEM_BOUNDARY';}\n\n\"ContainerQueue_Ext\" { this.begin(\"container_ext_queue\"); return 'CONTAINER_EXT_QUEUE';}\n\"ContainerDb_Ext\" { this.begin(\"container_ext_db\"); return 'CONTAINER_EXT_DB';}\n\"Container_Ext\" { thisLine truncated
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"c4Diagram-a7af8508.js","sources":["../src/diagrams/c4/parser/c4Diagram.jison","../src/diagrams/c4/c4Db.js","../src/diagrams/c4/svgDraw.js","../src/diagrams/c4/c4Renderer.js","../src/diagrams/c4/styles.js","../src/diagrams/c4/c4Diagram.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2022 mzhx.meng@gmail.com\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n\n/* context */\n%x person\n%x person_ext\n%x system\n%x system_db\n%x system_queue\n%x system_ext\n%x system_ext_db\n%x system_ext_queue\n%x boundary\n%x enterprise_boundary\n%x system_boundary\n%x rel\n%x birel\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n\n/* container */\n%x container\n%x container_db\n%x container_queue\n%x container_ext\n%x container_ext_db\n%x container_ext_queue\n%x container_boundary\n\n/* component */\n%x component\n%x component_db\n%x component_queue\n%x component_ext\n%x component_ext_db\n%x component_ext_queue\n\n/* Dynamic diagram */\n%x rel_index\n%x index\n\n/* Deployment diagram */\n%x node\n%x node_l\n%x node_r\n\n/* Relationship Types */\n%x rel\n%x rel_bi\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n%x rel_b\n\n/* Custom tags/stereotypes */\n%x update_el_style\n%x update_rel_style\n%x update_layout_config\n\n%x attribute\n%x string\n%x string_kv\n%x string_kv_key\n%x string_kv_value\n\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\n\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* c /* skip comments */\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"C4Context\" return 'C4_CONTEXT';\n\"C4Container\" return 'C4_CONTAINER';\n\"C4Component\" return 'C4_COMPONENT';\n\"C4Dynamic\" return 'C4_DYNAMIC';\n\"C4Deployment\" return 'C4_DEPLOYMENT';\n\n\"Person_Ext\" { this.begin(\"person_ext\"); return 'PERSON_EXT';}\n\"Person\" { this.begin(\"person\"); return 'PERSON';}\n\"SystemQueue_Ext\" { this.begin(\"system_ext_queue\"); return 'SYSTEM_EXT_QUEUE';}\n\"SystemDb_Ext\" { this.begin(\"system_ext_db\"); return 'SYSTEM_EXT_DB';}\n\"System_Ext\" { this.begin(\"system_ext\"); return 'SYSTEM_EXT';}\n\"SystemQueue\" { this.begin(\"system_queue\"); return 'SYSTEM_QUEUE';}\n\"SystemDb\" { this.begin(\"system_db\"); return 'SYSTEM_DB';}\n\"System\" { this.begin(\"system\"); return 'SYSTEM';}\n\n\"Boundary\" { this.begin(\"boundary\"); return 'BOUNDARY';}\n\"Enterprise_Boundary\" { this.begin(\"enterprise_boundary\"); return 'ENTERPRISE_BOUNDARY';}\n\"System_Boundary\" { this.begin(\"system_boundary\"); return 'SYSTEM_BOUNDARY';}\n\n\"ContainerQueue_Ext\" { this.begin(\"container_ext_queue\"); return 'CONTAINER_EXT_QUEUE';}\n\"ContainerDb_Ext\" { this.begin(\"container_ext_db\"); return 'CONTAINER_EXT_DB';}\n\"Container_Ext\" { thisLine truncated
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"c4Diagram-adf7b82c.js","sources":["../src/diagrams/c4/parser/c4Diagram.jison","../src/diagrams/c4/c4Db.js","../src/diagrams/c4/svgDraw.js","../src/diagrams/c4/c4Renderer.js","../src/diagrams/c4/styles.js","../src/diagrams/c4/c4Diagram.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2022 mzhx.meng@gmail.com\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n\n/* context */\n%x person\n%x person_ext\n%x system\n%x system_db\n%x system_queue\n%x system_ext\n%x system_ext_db\n%x system_ext_queue\n%x boundary\n%x enterprise_boundary\n%x system_boundary\n%x rel\n%x birel\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n\n/* container */\n%x container\n%x container_db\n%x container_queue\n%x container_ext\n%x container_ext_db\n%x container_ext_queue\n%x container_boundary\n\n/* component */\n%x component\n%x component_db\n%x component_queue\n%x component_ext\n%x component_ext_db\n%x component_ext_queue\n\n/* Dynamic diagram */\n%x rel_index\n%x index\n\n/* Deployment diagram */\n%x node\n%x node_l\n%x node_r\n\n/* Relationship Types */\n%x rel\n%x rel_bi\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n%x rel_b\n\n/* Custom tags/stereotypes */\n%x update_el_style\n%x update_rel_style\n%x update_layout_config\n\n%x attribute\n%x string\n%x string_kv\n%x string_kv_key\n%x string_kv_value\n\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\n\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* c /* skip comments */\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"C4Context\" return 'C4_CONTEXT';\n\"C4Container\" return 'C4_CONTAINER';\n\"C4Component\" return 'C4_COMPONENT';\n\"C4Dynamic\" return 'C4_DYNAMIC';\n\"C4Deployment\" return 'C4_DEPLOYMENT';\n\n\"Person_Ext\" { this.begin(\"person_ext\"); return 'PERSON_EXT';}\n\"Person\" { this.begin(\"person\"); return 'PERSON';}\n\"SystemQueue_Ext\" { this.begin(\"system_ext_queue\"); return 'SYSTEM_EXT_QUEUE';}\n\"SystemDb_Ext\" { this.begin(\"system_ext_db\"); return 'SYSTEM_EXT_DB';}\n\"System_Ext\" { this.begin(\"system_ext\"); return 'SYSTEM_EXT';}\n\"SystemQueue\" { this.begin(\"system_queue\"); return 'SYSTEM_QUEUE';}\n\"SystemDb\" { this.begin(\"system_db\"); return 'SYSTEM_DB';}\n\"System\" { this.begin(\"system\"); return 'SYSTEM';}\n\n\"Boundary\" { this.begin(\"boundary\"); return 'BOUNDARY';}\n\"Enterprise_Boundary\" { this.begin(\"enterprise_boundary\"); return 'ENTERPRISE_BOUNDARY';}\n\"System_Boundary\" { this.begin(\"system_boundary\"); return 'SYSTEM_BOUNDARY';}\n\n\"ContainerQueue_Ext\" { this.begin(\"container_ext_queue\"); return 'CONTAINER_EXT_QUEUE';}\n\"ContainerDb_Ext\" { this.begin(\"container_ext_db\"); return 'CONTAINER_EXT_DB';}\n\"Container_Ext\" { thisLine truncated
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"c4Diagram-f9e67060.js","sources":["../src/diagrams/c4/parser/c4Diagram.jison","../src/diagrams/c4/c4Db.js","../src/diagrams/c4/svgDraw.js","../src/diagrams/c4/c4Renderer.js","../src/diagrams/c4/styles.js","../src/diagrams/c4/c4Diagram.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2022 mzhx.meng@gmail.com\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n\n/* context */\n%x person\n%x person_ext\n%x system\n%x system_db\n%x system_queue\n%x system_ext\n%x system_ext_db\n%x system_ext_queue\n%x boundary\n%x enterprise_boundary\n%x system_boundary\n%x rel\n%x birel\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n\n/* container */\n%x container\n%x container_db\n%x container_queue\n%x container_ext\n%x container_ext_db\n%x container_ext_queue\n%x container_boundary\n\n/* component */\n%x component\n%x component_db\n%x component_queue\n%x component_ext\n%x component_ext_db\n%x component_ext_queue\n\n/* Dynamic diagram */\n%x rel_index\n%x index\n\n/* Deployment diagram */\n%x node\n%x node_l\n%x node_r\n\n/* Relationship Types */\n%x rel\n%x rel_bi\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n%x rel_b\n\n/* Custom tags/stereotypes */\n%x update_el_style\n%x update_rel_style\n%x update_layout_config\n\n%x attribute\n%x string\n%x string_kv\n%x string_kv_key\n%x string_kv_value\n\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\n\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* c /* skip comments */\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"C4Context\" return 'C4_CONTEXT';\n\"C4Container\" return 'C4_CONTAINER';\n\"C4Component\" return 'C4_COMPONENT';\n\"C4Dynamic\" return 'C4_DYNAMIC';\n\"C4Deployment\" return 'C4_DEPLOYMENT';\n\n\"Person_Ext\" { this.begin(\"person_ext\"); return 'PERSON_EXT';}\n\"Person\" { this.begin(\"person\"); return 'PERSON';}\n\"SystemQueue_Ext\" { this.begin(\"system_ext_queue\"); return 'SYSTEM_EXT_QUEUE';}\n\"SystemDb_Ext\" { this.begin(\"system_ext_db\"); return 'SYSTEM_EXT_DB';}\n\"System_Ext\" { this.begin(\"system_ext\"); return 'SYSTEM_EXT';}\n\"SystemQueue\" { this.begin(\"system_queue\"); return 'SYSTEM_QUEUE';}\n\"SystemDb\" { this.begin(\"system_db\"); return 'SYSTEM_DB';}\n\"System\" { this.begin(\"system\"); return 'SYSTEM';}\n\n\"Boundary\" { this.begin(\"boundary\"); return 'BOUNDARY';}\n\"Enterprise_Boundary\" { this.begin(\"enterprise_boundary\"); return 'ENTERPRISE_BOUNDARY';}\n\"System_Boundary\" { this.begin(\"system_boundary\"); return 'SYSTEM_BOUNDARY';}\n\n\"ContainerQueue_Ext\" { this.begin(\"container_ext_queue\"); return 'CONTAINER_EXT_QUEUE';}\n\"ContainerDb_Ext\" { this.begin(\"container_ext_db\"); return 'CONTAINER_EXT_DB';}\n\"Container_Ext\" { thisLine truncated
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"c4Diagram-fa9ef55f.js","sources":["../src/diagrams/c4/parser/c4Diagram.jison","../src/diagrams/c4/c4Db.js","../src/diagrams/c4/svgDraw.js","../src/diagrams/c4/c4Renderer.js","../src/diagrams/c4/styles.js","../src/diagrams/c4/c4Diagram.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2022 mzhx.meng@gmail.com\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n\n/* context */\n%x person\n%x person_ext\n%x system\n%x system_db\n%x system_queue\n%x system_ext\n%x system_ext_db\n%x system_ext_queue\n%x boundary\n%x enterprise_boundary\n%x system_boundary\n%x rel\n%x birel\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n\n/* container */\n%x container\n%x container_db\n%x container_queue\n%x container_ext\n%x container_ext_db\n%x container_ext_queue\n%x container_boundary\n\n/* component */\n%x component\n%x component_db\n%x component_queue\n%x component_ext\n%x component_ext_db\n%x component_ext_queue\n\n/* Dynamic diagram */\n%x rel_index\n%x index\n\n/* Deployment diagram */\n%x node\n%x node_l\n%x node_r\n\n/* Relationship Types */\n%x rel\n%x rel_bi\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n%x rel_b\n\n/* Custom tags/stereotypes */\n%x update_el_style\n%x update_rel_style\n%x update_layout_config\n\n%x attribute\n%x string\n%x string_kv\n%x string_kv_key\n%x string_kv_value\n\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\n\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* c /* skip comments */\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"C4Context\" return 'C4_CONTEXT';\n\"C4Container\" return 'C4_CONTAINER';\n\"C4Component\" return 'C4_COMPONENT';\n\"C4Dynamic\" return 'C4_DYNAMIC';\n\"C4Deployment\" return 'C4_DEPLOYMENT';\n\n\"Person_Ext\" { this.begin(\"person_ext\"); return 'PERSON_EXT';}\n\"Person\" { this.begin(\"person\"); return 'PERSON';}\n\"SystemQueue_Ext\" { this.begin(\"system_ext_queue\"); return 'SYSTEM_EXT_QUEUE';}\n\"SystemDb_Ext\" { this.begin(\"system_ext_db\"); return 'SYSTEM_EXT_DB';}\n\"System_Ext\" { this.begin(\"system_ext\"); return 'SYSTEM_EXT';}\n\"SystemQueue\" { this.begin(\"system_queue\"); return 'SYSTEM_QUEUE';}\n\"SystemDb\" { this.begin(\"system_db\"); return 'SYSTEM_DB';}\n\"System\" { this.begin(\"system\"); return 'SYSTEM';}\n\n\"Boundary\" { this.begin(\"boundary\"); return 'BOUNDARY';}\n\"Enterprise_Boundary\" { this.begin(\"enterprise_boundary\"); return 'ENTERPRISE_BOUNDARY';}\n\"System_Boundary\" { this.begin(\"system_boundary\"); return 'SYSTEM_BOUNDARY';}\n\n\"ContainerQueue_Ext\" { this.begin(\"container_ext_queue\"); return 'CONTAINER_EXT_QUEUE';}\n\"ContainerDb_Ext\" { this.begin(\"container_ext_db\"); return 'CONTAINER_EXT_DB';}\n\"Container_Ext\" { thisLine truncated
-5
View File
@@ -1,5 +0,0 @@
import { aI as o, aJ as r } from "./mermaid-00886c59.js";
const s = (a, n) => o.lang.round(r.parse(a)[n]), e = s;
export {
e as c
};
-8
View File
@@ -1,8 +0,0 @@
import { aI as _, aJ as Color } from "./mermaid-c5809711.js";
const channel = (color, channel2) => {
return _.lang.round(Color.parse(color)[channel2]);
};
const channel$1 = channel;
export {
channel$1 as c
};
@@ -1,97 +0,0 @@
import { p as W, d as M, s as H } from "./styles-55d85316.js";
import { g as S, l as d, f as u } from "./config-e567ef17.js";
import { G as X, l as Y } from "./layout-d6d8be39.js";
import { s as l } from "./svgDraw-c034b55e.js";
import { c as Z } from "./setupGraphViewbox-a4603a92.js";
import "./utils-aa888deb.js";
import "./commonDb-4dc3d465.js";
import "./mermaidAPI-04b5c286.js";
import "./errorRenderer-a3c4bedb.js";
import "./isPlainObject-a5cb4071.js";
import "./array-2ff2c7a6.js";
import "./constant-2fe7eae5.js";
let h = {};
const g = 20, p = function(e) {
const s = Object.entries(h).find((k) => k[1].label === e);
if (s)
return s[0];
}, D = function(e) {
e.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), e.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, $ = function(e, s, k, a) {
const f = S().class;
h = {}, d.info("Rendering diagram " + e);
const L = S().securityLevel;
let y;
L === "sandbox" && (y = u("#i" + s));
const x = L === "sandbox" ? u(y.nodes()[0].contentDocument.body) : u("body"), n = x.select(`[id='${s}']`);
D(n);
const r = new X({
multigraph: !0
});
r.setGraph({
isMultiGraph: !0
}), r.setDefaultEdgeLabel(function() {
return {};
});
const m = a.db.getClasses(), N = Object.keys(m);
for (const t of N) {
const o = m[t], i = l.drawClass(n, o, f, a);
h[i.id] = i, r.setNode(i.id, i), d.info("Org height: " + i.height);
}
a.db.getRelations().forEach(function(t) {
d.info(
"tjoho" + p(t.id1) + p(t.id2) + JSON.stringify(t)
), r.setEdge(
p(t.id1),
p(t.id2),
{
relation: t
},
t.title || "DEFAULT"
);
}), a.db.getNotes().forEach(function(t) {
d.debug(`Adding note: ${JSON.stringify(t)}`);
const o = l.drawNote(n, t, f, a);
h[o.id] = o, r.setNode(o.id, o), t.class && t.class in m && r.setEdge(
t.id,
p(t.class),
{
relation: {
id1: t.id,
id2: t.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}), Y(r), r.nodes().forEach(function(t) {
t !== void 0 && r.node(t) !== void 0 && (d.debug("Node " + t + ": " + JSON.stringify(r.node(t))), x.select("#" + (a.db.lookUpDomId(t) || t)).attr(
"transform",
"translate(" + (r.node(t).x - r.node(t).width / 2) + "," + (r.node(t).y - r.node(t).height / 2) + " )"
));
}), r.edges().forEach(function(t) {
t !== void 0 && r.edge(t) !== void 0 && (d.debug("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(r.edge(t))), l.drawEdge(n, r.edge(t), r.edge(t).relation, f, a));
});
const c = n.node().getBBox(), E = c.width + g * 2, b = c.height + g * 2;
Z(n, b, E, f.useMaxWidth);
const w = `${c.x - g} ${c.y - g} ${E} ${b}`;
d.debug(`viewBox ${w}`), n.attr("viewBox", w);
}, B = {
draw: $
}, q = {
parser: W,
db: M,
renderer: B,
styles: H,
init: (e) => {
e.class || (e.class = {}), e.class.arrowMarkerAbsolute = e.arrowMarkerAbsolute, M.clear();
}
};
export {
q as diagram
};
//# sourceMappingURL=classDiagram-17eafd8a.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-17eafd8a.js","sources":["../src/diagrams/class/classRenderer.js","../src/diagrams/class/classDiagram.ts"],"sourcesContent":["import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport svgDraw from './svgDraw';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport { getConfig } from '../../config';\n\nlet idCache = {};\nconst padding = 20;\n\n/**\n * Gets the ID with the same label as in the cache\n *\n * @param {string} label The label to look for\n * @returns {string} The resulting ID\n */\nconst getGraphId = function (label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n\n if (foundEntry) {\n return foundEntry[0];\n }\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {SVGSVGElement} elem The SVG element to append to\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n // diagObj.db.clear();\n // diagObj.parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = diagObj.db.getClasses();\n const keys = Object.keys(classes);\n\n for (const key of keys) {\n const classDef = classes[key];\n const node = svgDraw.drawLine truncated
-363
View File
@@ -1,363 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-991ebdfc.js";
import { line, curveBasis, select } from "d3";
import { layout } from "dagre-d3-es/src/dagre/index.js";
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
import { u as utils, l as log, x as parseGenericTypes, c as getConfig, i as configureSvgSize } from "./mermaid-f47111a7.js";
import "ts-dedent";
import "dayjs";
import "@braintree/sanitize-url";
import "dompurify";
import "khroma";
import "lodash-es/memoize.js";
import "lodash-es/merge.js";
import "stylis";
import "lodash-es/isEmpty.js";
let edgeCount = 0;
const drawEdge = function(elem, path, relation, conf, diagObj) {
const getRelationType = function(type) {
switch (type) {
case diagObj.db.relationType.AGGREGATION:
return "aggregation";
case diagObj.db.relationType.EXTENSION:
return "extension";
case diagObj.db.relationType.COMPOSITION:
return "composition";
case diagObj.db.relationType.DEPENDENCY:
return "dependency";
case diagObj.db.relationType.LOLLIPOP:
return "lollipop";
}
};
path.points = path.points.filter((p) => !Number.isNaN(p.y));
const lineData = path.points;
const lineFunction = line().x(function(d) {
return d.x;
}).y(function(d) {
return d.y;
}).curve(curveBasis);
const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "relation");
let url = "";
if (conf.arrowMarkerAbsolute) {
url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
url = url.replace(/\(/g, "\\(");
url = url.replace(/\)/g, "\\)");
}
if (relation.relation.lineType == 1) {
svgPath.attr("class", "relation dashed-line");
}
if (relation.relation.lineType == 10) {
svgPath.attr("class", "relation dotted-line");
}
if (relation.relation.type1 !== "none") {
svgPath.attr(
"marker-start",
"url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)"
);
}
if (relation.relation.type2 !== "none") {
svgPath.attr(
"marker-end",
"url(" + url + "#" + getRelationType(relation.relation.type2) + "End)"
);
}
let x, y;
const l = path.points.length;
let labelPosition = utils.calcLabelPosition(path.points);
x = labelPosition.x;
y = labelPosition.y;
let p1_card_x, p1_card_y;
let p2_card_x, p2_card_y;
if (l % 2 !== 0 && l > 1) {
let cardinality_1_point = utils.calcCardinalityPosition(
relation.relation.type1 !== "none",
path.points,
path.points[0]
);
let cardinality_2_point = utils.calcCardinalityPosition(
relation.relation.type2 !== "none",
path.points,
path.points[l - 1]
);
log.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point));
log.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point));
p1_card_x = cardinality_1_point.x;
p1_card_y = cardinality_1_point.y;
p2_card_x = cardinality_2_point.x;
p2_card_y = cardinality_2_point.y;
}
if (relation.title !== void 0) {
const g = elem.append("g").attr("class", "classLabel");
const label = g.append("text").attr("class", "label").attr("x", x).attr("y", y).attr("fill", "red").attr("text-anchor", "middle").text(relation.title);
window.label = label;
const bounds = label.node().getBBox();
g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds.x - conf.padding / 2).attr("y", bounds.y - conf.padding / 2).attr("width", bounds.width + conf.padding).attr("height", bounds.height + conf.padding);
}
log.info("Rendering relation " + JSON.stringify(relation));
if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") {
const g = elem.append("g").attr("class", "cardinality");
g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1);
}
if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") {
const g = elem.append("g").attr("class", "cardinality");
g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2);
}
edgeCount++;
};
const drawClass = function(elem, classDef, conf, diagObj) {
log.debug("Rendering class ", classDef, conf);
const id = classDef.id;
const classInfo = {
id,
label: classDef.id,
width: 0,
height: 0
};
const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id)).attr("class", "classGroup");
let title;
if (classDef.link) {
title = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
} else {
title = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
}
let isFirst = true;
classDef.annotations.forEach(function(member) {
const titleText2 = title.append("tspan").text("«" + member + "»");
if (!isFirst) {
titleText2.attr("dy", conf.textHeight);
}
isFirst = false;
});
let classTitleString = getClassTitleString(classDef);
const classTitle = title.append("tspan").text(classTitleString).attr("class", "title");
if (!isFirst) {
classTitle.attr("dy", conf.textHeight);
}
const titleHeight = title.node().getBBox().height;
let membersLine;
let membersBox;
let methodsLine;
if (classDef.members.length > 0) {
membersLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin / 2).attr("y2", conf.padding + titleHeight + conf.dividerMargin / 2);
const members = g.append("text").attr("x", conf.padding).attr("y", titleHeight + conf.dividerMargin + conf.textHeight).attr("fill", "white").attr("class", "classText");
isFirst = true;
classDef.members.forEach(function(member) {
addTspan(members, member, isFirst, conf);
isFirst = false;
});
membersBox = members.node().getBBox();
}
if (classDef.methods.length > 0) {
methodsLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr("y2", conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
const methods = g.append("text").attr("x", conf.padding).attr("y", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr("fill", "white").attr("class", "classText");
isFirst = true;
classDef.methods.forEach(function(method) {
addTspan(methods, method, isFirst, conf);
isFirst = false;
});
}
const classBox = g.node().getBBox();
var cssClassStr = " ";
if (classDef.cssClasses.length > 0) {
cssClassStr = cssClassStr + classDef.cssClasses.join(" ");
}
const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf.padding).attr("height", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr("class", cssClassStr);
const rectWidth = rect.node().getBBox().width;
title.node().childNodes.forEach(function(x) {
x.setAttribute("x", (rectWidth - x.getBBox().width) / 2);
});
if (classDef.tooltip) {
title.insert("title").text(classDef.tooltip);
}
if (membersLine) {
membersLine.attr("x2", rectWidth);
}
if (methodsLine) {
methodsLine.attr("x2", rectWidth);
}
classInfo.width = rectWidth;
classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
return classInfo;
};
const getClassTitleString = function(classDef) {
let classTitleString = classDef.id;
if (classDef.type) {
classTitleString += "<" + parseGenericTypes(classDef.type) + ">";
}
return classTitleString;
};
const drawNote = function(elem, note, conf, diagObj) {
log.debug("Rendering note ", note, conf);
const id = note.id;
const noteInfo = {
id,
text: note.text,
width: 0,
height: 0
};
const g = elem.append("g").attr("id", id).attr("class", "classGroup");
let text = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
const lines = JSON.parse(`"${note.text}"`).split("\n");
lines.forEach(function(line2) {
log.debug(`Adding line: ${line2}`);
text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight);
});
const noteBox = g.node().getBBox();
const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr(
"height",
noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin
);
const rectWidth = rect.node().getBBox().width;
text.node().childNodes.forEach(function(x) {
x.setAttribute("x", (rectWidth - x.getBBox().width) / 2);
});
noteInfo.width = rectWidth;
noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin;
return noteInfo;
};
const addTspan = function(textEl, member, isFirst, conf) {
const { displayText, cssStyle } = member.getDisplayDetails();
const tSpan = textEl.append("tspan").attr("x", conf.padding).text(displayText);
if (cssStyle !== "") {
tSpan.attr("style", member.cssStyle);
}
if (!isFirst) {
tSpan.attr("dy", conf.textHeight);
}
};
const svgDraw = {
getClassTitleString,
drawClass,
drawEdge,
drawNote
};
let idCache = {};
const padding = 20;
const getGraphId = function(label) {
const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
if (foundEntry) {
return foundEntry[0];
}
};
const insertMarkers = function(elem) {
elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
};
const draw = function(text, id, _version, diagObj) {
const conf = getConfig().class;
idCache = {};
log.info("Rendering diagram " + text);
const securityLevel = getConfig().securityLevel;
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
const diagram2 = root.select(`[id='${id}']`);
insertMarkers(diagram2);
const g = new graphlib.Graph({
multigraph: true
});
g.setGraph({
isMultiGraph: true
});
g.setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const keys = Object.keys(classes);
for (const key of keys) {
const classDef = classes[key];
const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
log.info("Org height: " + node.height);
}
const relations = diagObj.db.getRelations();
relations.forEach(function(relation) {
log.info(
// cspell:ignore tjoho
"tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)
);
g.setEdge(
getGraphId(relation.id1),
getGraphId(relation.id2),
{
relation
},
relation.title || "DEFAULT"
);
});
const notes = diagObj.db.getNotes();
notes.forEach(function(note) {
log.debug(`Adding note: ${JSON.stringify(note)}`);
const node = svgDraw.drawNote(diagram2, note, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
if (note.class && note.class in classes) {
g.setEdge(
note.id,
getGraphId(note.class),
{
relation: {
id1: note.id,
id2: note.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}
});
layout(g);
g.nodes().forEach(function(v) {
if (v !== void 0 && g.node(v) !== void 0) {
log.debug("Node " + v + ": " + JSON.stringify(g.node(v)));
root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr(
"transform",
"translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"
);
}
});
g.edges().forEach(function(e) {
if (e !== void 0 && g.edge(e) !== void 0) {
log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e)));
svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);
}
});
const svgBounds = diagram2.node().getBBox();
const width = svgBounds.width + padding * 2;
const height = svgBounds.height + padding * 2;
configureSvgSize(diagram2, height, width, conf.useMaxWidth);
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
log.debug(`viewBox ${vBox}`);
diagram2.attr("viewBox", vBox);
};
const renderer = {
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
-356
View File
@@ -1,356 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-d48462a7.js";
import { F as curveBasis, A as utils, l as log, G as parseGenericTypes, c as getConfig, j as d3select, k as configureSvgSize } from "./mermaid-c5809711.js";
import { G as Graph } from "./graph-af3d5df6.js";
import { l as layout } from "./layout-6685625a.js";
import { l as line } from "./line-65d70945.js";
import "./array-b7dcf730.js";
import "./path-39bad7e2.js";
let edgeCount = 0;
const drawEdge = function(elem, path, relation, conf, diagObj) {
const getRelationType = function(type) {
switch (type) {
case diagObj.db.relationType.AGGREGATION:
return "aggregation";
case diagObj.db.relationType.EXTENSION:
return "extension";
case diagObj.db.relationType.COMPOSITION:
return "composition";
case diagObj.db.relationType.DEPENDENCY:
return "dependency";
case diagObj.db.relationType.LOLLIPOP:
return "lollipop";
}
};
path.points = path.points.filter((p) => !Number.isNaN(p.y));
const lineData = path.points;
const lineFunction = line().x(function(d) {
return d.x;
}).y(function(d) {
return d.y;
}).curve(curveBasis);
const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "relation");
let url = "";
if (conf.arrowMarkerAbsolute) {
url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
url = url.replace(/\(/g, "\\(");
url = url.replace(/\)/g, "\\)");
}
if (relation.relation.lineType == 1) {
svgPath.attr("class", "relation dashed-line");
}
if (relation.relation.lineType == 10) {
svgPath.attr("class", "relation dotted-line");
}
if (relation.relation.type1 !== "none") {
svgPath.attr(
"marker-start",
"url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)"
);
}
if (relation.relation.type2 !== "none") {
svgPath.attr(
"marker-end",
"url(" + url + "#" + getRelationType(relation.relation.type2) + "End)"
);
}
let x, y;
const l = path.points.length;
let labelPosition = utils.calcLabelPosition(path.points);
x = labelPosition.x;
y = labelPosition.y;
let p1_card_x, p1_card_y;
let p2_card_x, p2_card_y;
if (l % 2 !== 0 && l > 1) {
let cardinality_1_point = utils.calcCardinalityPosition(
relation.relation.type1 !== "none",
path.points,
path.points[0]
);
let cardinality_2_point = utils.calcCardinalityPosition(
relation.relation.type2 !== "none",
path.points,
path.points[l - 1]
);
log.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point));
log.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point));
p1_card_x = cardinality_1_point.x;
p1_card_y = cardinality_1_point.y;
p2_card_x = cardinality_2_point.x;
p2_card_y = cardinality_2_point.y;
}
if (relation.title !== void 0) {
const g = elem.append("g").attr("class", "classLabel");
const label = g.append("text").attr("class", "label").attr("x", x).attr("y", y).attr("fill", "red").attr("text-anchor", "middle").text(relation.title);
window.label = label;
const bounds = label.node().getBBox();
g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds.x - conf.padding / 2).attr("y", bounds.y - conf.padding / 2).attr("width", bounds.width + conf.padding).attr("height", bounds.height + conf.padding);
}
log.info("Rendering relation " + JSON.stringify(relation));
if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") {
const g = elem.append("g").attr("class", "cardinality");
g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1);
}
if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") {
const g = elem.append("g").attr("class", "cardinality");
g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2);
}
edgeCount++;
};
const drawClass = function(elem, classDef, conf, diagObj) {
log.debug("Rendering class ", classDef, conf);
const id = classDef.id;
const classInfo = {
id,
label: classDef.id,
width: 0,
height: 0
};
const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id)).attr("class", "classGroup");
let title;
if (classDef.link) {
title = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
} else {
title = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
}
let isFirst = true;
classDef.annotations.forEach(function(member) {
const titleText2 = title.append("tspan").text("«" + member + "»");
if (!isFirst) {
titleText2.attr("dy", conf.textHeight);
}
isFirst = false;
});
let classTitleString = getClassTitleString(classDef);
const classTitle = title.append("tspan").text(classTitleString).attr("class", "title");
if (!isFirst) {
classTitle.attr("dy", conf.textHeight);
}
const titleHeight = title.node().getBBox().height;
let membersLine;
let membersBox;
let methodsLine;
if (classDef.members.length > 0) {
membersLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin / 2).attr("y2", conf.padding + titleHeight + conf.dividerMargin / 2);
const members = g.append("text").attr("x", conf.padding).attr("y", titleHeight + conf.dividerMargin + conf.textHeight).attr("fill", "white").attr("class", "classText");
isFirst = true;
classDef.members.forEach(function(member) {
addTspan(members, member, isFirst, conf);
isFirst = false;
});
membersBox = members.node().getBBox();
}
if (classDef.methods.length > 0) {
methodsLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr("y2", conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
const methods = g.append("text").attr("x", conf.padding).attr("y", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr("fill", "white").attr("class", "classText");
isFirst = true;
classDef.methods.forEach(function(method) {
addTspan(methods, method, isFirst, conf);
isFirst = false;
});
}
const classBox = g.node().getBBox();
var cssClassStr = " ";
if (classDef.cssClasses.length > 0) {
cssClassStr = cssClassStr + classDef.cssClasses.join(" ");
}
const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf.padding).attr("height", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr("class", cssClassStr);
const rectWidth = rect.node().getBBox().width;
title.node().childNodes.forEach(function(x) {
x.setAttribute("x", (rectWidth - x.getBBox().width) / 2);
});
if (classDef.tooltip) {
title.insert("title").text(classDef.tooltip);
}
if (membersLine) {
membersLine.attr("x2", rectWidth);
}
if (methodsLine) {
methodsLine.attr("x2", rectWidth);
}
classInfo.width = rectWidth;
classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
return classInfo;
};
const getClassTitleString = function(classDef) {
let classTitleString = classDef.id;
if (classDef.type) {
classTitleString += "<" + parseGenericTypes(classDef.type) + ">";
}
return classTitleString;
};
const drawNote = function(elem, note, conf, diagObj) {
log.debug("Rendering note ", note, conf);
const id = note.id;
const noteInfo = {
id,
text: note.text,
width: 0,
height: 0
};
const g = elem.append("g").attr("id", id).attr("class", "classGroup");
let text = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
const lines = JSON.parse(`"${note.text}"`).split("\n");
lines.forEach(function(line2) {
log.debug(`Adding line: ${line2}`);
text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight);
});
const noteBox = g.node().getBBox();
const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr(
"height",
noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin
);
const rectWidth = rect.node().getBBox().width;
text.node().childNodes.forEach(function(x) {
x.setAttribute("x", (rectWidth - x.getBBox().width) / 2);
});
noteInfo.width = rectWidth;
noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin;
return noteInfo;
};
const addTspan = function(textEl, member, isFirst, conf) {
const { displayText, cssStyle } = member.getDisplayDetails();
const tSpan = textEl.append("tspan").attr("x", conf.padding).text(displayText);
if (cssStyle !== "") {
tSpan.attr("style", member.cssStyle);
}
if (!isFirst) {
tSpan.attr("dy", conf.textHeight);
}
};
const svgDraw = {
getClassTitleString,
drawClass,
drawEdge,
drawNote
};
let idCache = {};
const padding = 20;
const getGraphId = function(label) {
const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
if (foundEntry) {
return foundEntry[0];
}
};
const insertMarkers = function(elem) {
elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
};
const draw = function(text, id, _version, diagObj) {
const conf = getConfig().class;
idCache = {};
log.info("Rendering diagram " + text);
const securityLevel = getConfig().securityLevel;
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = d3select("#i" + id);
}
const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body");
const diagram2 = root.select(`[id='${id}']`);
insertMarkers(diagram2);
const g = new Graph({
multigraph: true
});
g.setGraph({
isMultiGraph: true
});
g.setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const keys = Object.keys(classes);
for (const key of keys) {
const classDef = classes[key];
const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
log.info("Org height: " + node.height);
}
const relations = diagObj.db.getRelations();
relations.forEach(function(relation) {
log.info(
// cspell:ignore tjoho
"tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)
);
g.setEdge(
getGraphId(relation.id1),
getGraphId(relation.id2),
{
relation
},
relation.title || "DEFAULT"
);
});
const notes = diagObj.db.getNotes();
notes.forEach(function(note) {
log.debug(`Adding note: ${JSON.stringify(note)}`);
const node = svgDraw.drawNote(diagram2, note, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
if (note.class && note.class in classes) {
g.setEdge(
note.id,
getGraphId(note.class),
{
relation: {
id1: note.id,
id2: note.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}
});
layout(g);
g.nodes().forEach(function(v) {
if (v !== void 0 && g.node(v) !== void 0) {
log.debug("Node " + v + ": " + JSON.stringify(g.node(v)));
root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr(
"transform",
"translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"
);
}
});
g.edges().forEach(function(e) {
if (e !== void 0 && g.edge(e) !== void 0) {
log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e)));
svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);
}
});
const svgBounds = diagram2.node().getBBox();
const width = svgBounds.width + padding * 2;
const height = svgBounds.height + padding * 2;
configureSvgSize(diagram2, height, width, conf.useMaxWidth);
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
log.debug(`viewBox ${vBox}`);
diagram2.attr("viewBox", vBox);
};
const renderer = {
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
-143
View File
@@ -1,143 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-d6ad8edb.js";
import { g as getConfig, l as log, f as select } from "./config-b4fa35bb.js";
import { G as Graph, l as layout } from "./layout-4663fc19.js";
import { s as svgDraw } from "./svgDraw-9e97e6db.js";
import { c as configureSvgSize } from "./setupGraphViewbox-16a0ba81.js";
import "./utils-872dfc50.js";
import "./commonDb-7f40ab5a.js";
import "./mermaidAPI-6f22a815.js";
import "./errorRenderer-ebf63d74.js";
import "./isPlainObject-91dd8bc9.js";
import "./array-b7dcf730.js";
import "./constant-b644328d.js";
let idCache = {};
const padding = 20;
const getGraphId = function(label) {
const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
if (foundEntry) {
return foundEntry[0];
}
};
const insertMarkers = function(elem) {
elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
};
const draw = function(text, id, _version, diagObj) {
const conf = getConfig().class;
idCache = {};
log.info("Rendering diagram " + text);
const securityLevel = getConfig().securityLevel;
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
const diagram2 = root.select(`[id='${id}']`);
insertMarkers(diagram2);
const g = new Graph({
multigraph: true
});
g.setGraph({
isMultiGraph: true
});
g.setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const keys = Object.keys(classes);
for (const key of keys) {
const classDef = classes[key];
const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
log.info("Org height: " + node.height);
}
const relations = diagObj.db.getRelations();
relations.forEach(function(relation) {
log.info(
"tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)
);
g.setEdge(
getGraphId(relation.id1),
getGraphId(relation.id2),
{
relation
},
relation.title || "DEFAULT"
);
});
const notes = diagObj.db.getNotes();
notes.forEach(function(note) {
log.debug(`Adding note: ${JSON.stringify(note)}`);
const node = svgDraw.drawNote(diagram2, note, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
if (note.class && note.class in classes) {
g.setEdge(
note.id,
getGraphId(note.class),
{
relation: {
id1: note.id,
id2: note.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}
});
layout(g);
g.nodes().forEach(function(v) {
if (v !== void 0 && g.node(v) !== void 0) {
log.debug("Node " + v + ": " + JSON.stringify(g.node(v)));
root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr(
"transform",
"translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"
);
}
});
g.edges().forEach(function(e) {
if (e !== void 0 && g.edge(e) !== void 0) {
log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e)));
svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);
}
});
const svgBounds = diagram2.node().getBBox();
const width = svgBounds.width + padding * 2;
const height = svgBounds.height + padding * 2;
configureSvgSize(diagram2, height, width, conf.useMaxWidth);
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
log.debug(`viewBox ${vBox}`);
diagram2.attr("viewBox", vBox);
};
const renderer = {
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
//# sourceMappingURL=classDiagram-3ab3550d.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-3ab3550d.js","sources":["../src/diagrams/class/classRenderer.js","../src/diagrams/class/classDiagram.ts"],"sourcesContent":["import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport svgDraw from './svgDraw';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport { getConfig } from '../../config';\n\nlet idCache = {};\nconst padding = 20;\n\n/**\n * Gets the ID with the same label as in the cache\n *\n * @param {string} label The label to look for\n * @returns {string} The resulting ID\n */\nconst getGraphId = function (label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n\n if (foundEntry) {\n return foundEntry[0];\n }\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {SVGSVGElement} elem The SVG element to append to\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n // diagObj.db.clear();\n // diagObj.parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = diagObj.db.getClasses();\n const keys = Object.keys(classes);\n\n for (const key of keys) {\n const classDef = classes[key];\n const node = svgDraw.drawLine truncated
-149
View File
@@ -1,149 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-0dd3ba1e.js";
import { select } from "d3";
import { layout } from "dagre-d3-es/src/dagre/index.js";
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
import { g as getConfig, l as log } from "./config-389b86ff.js";
import { s as svgDraw } from "./svgDraw-6a237a99.js";
import { c as configureSvgSize } from "./setupGraphViewbox-e35e4124.js";
import "./utils-d5eeff82.js";
import "@braintree/sanitize-url";
import "./commonDb-2ace122b.js";
import "lodash-es/memoize.js";
import "./mermaidAPI-0716c7c2.js";
import "stylis";
import "./errorRenderer-d05351b9.js";
import "dompurify";
import "lodash-es/isEmpty.js";
import "dayjs";
import "khroma";
let idCache = {};
const padding = 20;
const getGraphId = function(label) {
const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
if (foundEntry) {
return foundEntry[0];
}
};
const insertMarkers = function(elem) {
elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
};
const draw = function(text, id, _version, diagObj) {
const conf = getConfig().class;
idCache = {};
log.info("Rendering diagram " + text);
const securityLevel = getConfig().securityLevel;
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
const diagram2 = root.select(`[id='${id}']`);
insertMarkers(diagram2);
const g = new graphlib.Graph({
multigraph: true
});
g.setGraph({
isMultiGraph: true
});
g.setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const keys = Object.keys(classes);
for (const key of keys) {
const classDef = classes[key];
const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
log.info("Org height: " + node.height);
}
const relations = diagObj.db.getRelations();
relations.forEach(function(relation) {
log.info(
"tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)
);
g.setEdge(
getGraphId(relation.id1),
getGraphId(relation.id2),
{
relation
},
relation.title || "DEFAULT"
);
});
const notes = diagObj.db.getNotes();
notes.forEach(function(note) {
log.debug(`Adding note: ${JSON.stringify(note)}`);
const node = svgDraw.drawNote(diagram2, note, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
if (note.class && note.class in classes) {
g.setEdge(
note.id,
getGraphId(note.class),
{
relation: {
id1: note.id,
id2: note.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}
});
layout(g);
g.nodes().forEach(function(v) {
if (v !== void 0 && g.node(v) !== void 0) {
log.debug("Node " + v + ": " + JSON.stringify(g.node(v)));
root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr(
"transform",
"translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"
);
}
});
g.edges().forEach(function(e) {
if (e !== void 0 && g.edge(e) !== void 0) {
log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e)));
svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);
}
});
const svgBounds = diagram2.node().getBBox();
const width = svgBounds.width + padding * 2;
const height = svgBounds.height + padding * 2;
configureSvgSize(diagram2, height, width, conf.useMaxWidth);
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
log.debug(`viewBox ${vBox}`);
diagram2.attr("viewBox", vBox);
};
const renderer = {
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
//# sourceMappingURL=classDiagram-4456d403.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-4456d403.js","sources":["../src/diagrams/class/classRenderer.js","../src/diagrams/class/classDiagram.ts"],"sourcesContent":["import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport svgDraw from './svgDraw';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport { getConfig } from '../../config';\n\nlet idCache = {};\nconst padding = 20;\n\n/**\n * Gets the ID with the same label as in the cache\n *\n * @param {string} label The label to look for\n * @returns {string} The resulting ID\n */\nconst getGraphId = function (label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n\n if (foundEntry) {\n return foundEntry[0];\n }\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {SVGSVGElement} elem The SVG element to append to\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n // diagObj.db.clear();\n // diagObj.parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = diagObj.db.getClasses();\n const keys = Object.keys(classes);\n\n for (const key of keys) {\n const classDef = classes[key];\n const node = svgDraw.drawLine truncated
-220
View File
@@ -1,220 +0,0 @@
import { p as A, d as S, s as G } from "./styles-4bdb8b48.js";
import { F as W, A as B, l as u, G as I, c as H, j as M, k as O } from "./mermaid-00886c59.js";
import { G as P } from "./graph-dee88f0d.js";
import { l as X } from "./layout-03086fc5.js";
import { l as Y } from "./line-79437661.js";
import "./array-2ff2c7a6.js";
import "./path-428ebac9.js";
let _ = 0;
const $ = function(i, a, t, o, p) {
const g = function(e) {
switch (e) {
case p.db.relationType.AGGREGATION:
return "aggregation";
case p.db.relationType.EXTENSION:
return "extension";
case p.db.relationType.COMPOSITION:
return "composition";
case p.db.relationType.DEPENDENCY:
return "dependency";
case p.db.relationType.LOLLIPOP:
return "lollipop";
}
};
a.points = a.points.filter((e) => !Number.isNaN(e.y));
const s = a.points, c = Y().x(function(e) {
return e.x;
}).y(function(e) {
return e.y;
}).curve(W), n = i.append("path").attr("d", c(s)).attr("id", "edge" + _).attr("class", "relation");
let r = "";
o.arrowMarkerAbsolute && (r = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, r = r.replace(/\(/g, "\\("), r = r.replace(/\)/g, "\\)")), t.relation.lineType == 1 && n.attr("class", "relation dashed-line"), t.relation.lineType == 10 && n.attr("class", "relation dotted-line"), t.relation.type1 !== "none" && n.attr(
"marker-start",
"url(" + r + "#" + g(t.relation.type1) + "Start)"
), t.relation.type2 !== "none" && n.attr(
"marker-end",
"url(" + r + "#" + g(t.relation.type2) + "End)"
);
let f, h;
const x = a.points.length;
let k = B.calcLabelPosition(a.points);
f = k.x, h = k.y;
let y, m, w, b;
if (x % 2 !== 0 && x > 1) {
let e = B.calcCardinalityPosition(
t.relation.type1 !== "none",
a.points,
a.points[0]
), d = B.calcCardinalityPosition(
t.relation.type2 !== "none",
a.points,
a.points[x - 1]
);
u.debug("cardinality_1_point " + JSON.stringify(e)), u.debug("cardinality_2_point " + JSON.stringify(d)), y = e.x, m = e.y, w = d.x, b = d.y;
}
if (t.title !== void 0) {
const e = i.append("g").attr("class", "classLabel"), d = e.append("text").attr("class", "label").attr("x", f).attr("y", h).attr("fill", "red").attr("text-anchor", "middle").text(t.title);
window.label = d;
const l = d.node().getBBox();
e.insert("rect", ":first-child").attr("class", "box").attr("x", l.x - o.padding / 2).attr("y", l.y - o.padding / 2).attr("width", l.width + o.padding).attr("height", l.height + o.padding);
}
u.info("Rendering relation " + JSON.stringify(t)), t.relationTitle1 !== void 0 && t.relationTitle1 !== "none" && i.append("g").attr("class", "cardinality").append("text").attr("class", "type1").attr("x", y).attr("y", m).attr("fill", "black").attr("font-size", "6").text(t.relationTitle1), t.relationTitle2 !== void 0 && t.relationTitle2 !== "none" && i.append("g").attr("class", "cardinality").append("text").attr("class", "type2").attr("x", w).attr("y", b).attr("fill", "black").attr("font-size", "6").text(t.relationTitle2), _++;
}, J = function(i, a, t, o) {
u.debug("Rendering class ", a, t);
const p = a.id, g = {
id: p,
label: a.id,
width: 0,
height: 0
}, s = i.append("g").attr("id", o.db.lookUpDomId(p)).attr("class", "classGroup");
let c;
a.link ? c = s.append("svg:a").attr("xlink:href", a.link).attr("target", a.linkTarget).append("text").attr("y", t.textHeight + t.padding).attr("x", 0) : c = s.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
let n = !0;
a.annotations.forEach(function(d) {
const l = c.append("tspan").text("«" + d + "»");
n || l.attr("dy", t.textHeight), n = !1;
});
let r = C(a);
const f = c.append("tspan").text(r).attr("class", "title");
n || f.attr("dy", t.textHeight);
const h = c.node().getBBox().height;
let x, k, y;
if (a.members.length > 0) {
x = s.append("line").attr("x1", 0).attr("y1", t.padding + h + t.dividerMargin / 2).attr("y2", t.padding + h + t.dividerMargin / 2);
const d = s.append("text").attr("x", t.padding).attr("y", h + t.dividerMargin + t.textHeight).attr("fill", "white").attr("class", "classText");
n = !0, a.members.forEach(function(l) {
v(d, l, n, t), n = !1;
}), k = d.node().getBBox();
}
if (a.methods.length > 0) {
y = s.append("line").attr("x1", 0).attr("y1", t.padding + h + t.dividerMargin + k.height).attr("y2", t.padding + h + t.dividerMargin + k.height);
const d = s.append("text").attr("x", t.padding).attr("y", h + 2 * t.dividerMargin + k.height + t.textHeight).attr("fill", "white").attr("class", "classText");
n = !0, a.methods.forEach(function(l) {
v(d, l, n, t), n = !1;
});
}
const m = s.node().getBBox();
var w = " ";
a.cssClasses.length > 0 && (w = w + a.cssClasses.join(" "));
const e = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", m.width + 2 * t.padding).attr("height", m.height + t.padding + 0.5 * t.dividerMargin).attr("class", w).node().getBBox().width;
return c.node().childNodes.forEach(function(d) {
d.setAttribute("x", (e - d.getBBox().width) / 2);
}), a.tooltip && c.insert("title").text(a.tooltip), x && x.attr("x2", e), y && y.attr("x2", e), g.width = e, g.height = m.height + t.padding + 0.5 * t.dividerMargin, g;
}, C = function(i) {
let a = i.id;
return i.type && (a += "<" + I(i.type) + ">"), a;
}, Z = function(i, a, t, o) {
u.debug("Rendering note ", a, t);
const p = a.id, g = {
id: p,
text: a.text,
width: 0,
height: 0
}, s = i.append("g").attr("id", p).attr("class", "classGroup");
let c = s.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
const n = JSON.parse(`"${a.text}"`).split(`
`);
n.forEach(function(x) {
u.debug(`Adding line: ${x}`), c.append("tspan").text(x).attr("class", "title").attr("dy", t.textHeight);
});
const r = s.node().getBBox(), h = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", r.width + 2 * t.padding).attr(
"height",
r.height + n.length * t.textHeight + t.padding + 0.5 * t.dividerMargin
).node().getBBox().width;
return c.node().childNodes.forEach(function(x) {
x.setAttribute("x", (h - x.getBBox().width) / 2);
}), g.width = h, g.height = r.height + n.length * t.textHeight + t.padding + 0.5 * t.dividerMargin, g;
}, v = function(i, a, t, o) {
const { displayText: p, cssStyle: g } = a.getDisplayDetails(), s = i.append("tspan").attr("x", o.padding).text(p);
g !== "" && s.attr("style", a.cssStyle), t || s.attr("dy", o.textHeight);
}, N = {
getClassTitleString: C,
drawClass: J,
drawEdge: $,
drawNote: Z
};
let T = {};
const E = 20, L = function(i) {
const a = Object.entries(T).find((t) => t[1].label === i);
if (a)
return a[0];
}, R = function(i) {
i.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), i.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), i.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, F = function(i, a, t, o) {
const p = H().class;
T = {}, u.info("Rendering diagram " + i);
const g = H().securityLevel;
let s;
g === "sandbox" && (s = M("#i" + a));
const c = g === "sandbox" ? M(s.nodes()[0].contentDocument.body) : M("body"), n = c.select(`[id='${a}']`);
R(n);
const r = new P({
multigraph: !0
});
r.setGraph({
isMultiGraph: !0
}), r.setDefaultEdgeLabel(function() {
return {};
});
const f = o.db.getClasses(), h = Object.keys(f);
for (const e of h) {
const d = f[e], l = N.drawClass(n, d, p, o);
T[l.id] = l, r.setNode(l.id, l), u.info("Org height: " + l.height);
}
o.db.getRelations().forEach(function(e) {
u.info(
// cspell:ignore tjoho
"tjoho" + L(e.id1) + L(e.id2) + JSON.stringify(e)
), r.setEdge(
L(e.id1),
L(e.id2),
{
relation: e
},
e.title || "DEFAULT"
);
}), o.db.getNotes().forEach(function(e) {
u.debug(`Adding note: ${JSON.stringify(e)}`);
const d = N.drawNote(n, e, p, o);
T[d.id] = d, r.setNode(d.id, d), e.class && e.class in f && r.setEdge(
e.id,
L(e.class),
{
relation: {
id1: e.id,
id2: e.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}), X(r), r.nodes().forEach(function(e) {
e !== void 0 && r.node(e) !== void 0 && (u.debug("Node " + e + ": " + JSON.stringify(r.node(e))), c.select("#" + (o.db.lookUpDomId(e) || e)).attr(
"transform",
"translate(" + (r.node(e).x - r.node(e).width / 2) + "," + (r.node(e).y - r.node(e).height / 2) + " )"
));
}), r.edges().forEach(function(e) {
e !== void 0 && r.edge(e) !== void 0 && (u.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(r.edge(e))), N.drawEdge(n, r.edge(e), r.edge(e).relation, p, o));
});
const y = n.node().getBBox(), m = y.width + E * 2, w = y.height + E * 2;
O(n, w, m, p.useMaxWidth);
const b = `${y.x - E} ${y.y - E} ${m} ${w}`;
u.debug(`viewBox ${b}`), n.attr("viewBox", b);
}, U = {
draw: F
}, tt = {
parser: A,
db: S,
renderer: U,
styles: G,
init: (i) => {
i.class || (i.class = {}), i.class.arrowMarkerAbsolute = i.arrowMarkerAbsolute, S.clear();
}
};
export {
tt as diagram
};
-149
View File
@@ -1,149 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-b8bd0053.js";
import { select } from "d3";
import { layout } from "dagre-d3-es/src/dagre/index.js";
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
import { g as getConfig, l as log } from "./config-389b86ff.js";
import { s as svgDraw } from "./svgDraw-6a237a99.js";
import { c as configureSvgSize } from "./setupGraphViewbox-e35e4124.js";
import "./utils-d5eeff82.js";
import "@braintree/sanitize-url";
import "./commonDb-2ace122b.js";
import "lodash-es/memoize.js";
import "./mermaidAPI-b17c596d.js";
import "stylis";
import "./errorRenderer-d05351b9.js";
import "dompurify";
import "lodash-es/isEmpty.js";
import "dayjs";
import "khroma";
let idCache = {};
const padding = 20;
const getGraphId = function(label) {
const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
if (foundEntry) {
return foundEntry[0];
}
};
const insertMarkers = function(elem) {
elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
};
const draw = function(text, id, _version, diagObj) {
const conf = getConfig().class;
idCache = {};
log.info("Rendering diagram " + text);
const securityLevel = getConfig().securityLevel;
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
const diagram2 = root.select(`[id='${id}']`);
insertMarkers(diagram2);
const g = new graphlib.Graph({
multigraph: true
});
g.setGraph({
isMultiGraph: true
});
g.setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const keys = Object.keys(classes);
for (const key of keys) {
const classDef = classes[key];
const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
log.info("Org height: " + node.height);
}
const relations = diagObj.db.getRelations();
relations.forEach(function(relation) {
log.info(
"tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)
);
g.setEdge(
getGraphId(relation.id1),
getGraphId(relation.id2),
{
relation
},
relation.title || "DEFAULT"
);
});
const notes = diagObj.db.getNotes();
notes.forEach(function(note) {
log.debug(`Adding note: ${JSON.stringify(note)}`);
const node = svgDraw.drawNote(diagram2, note, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
if (note.class && note.class in classes) {
g.setEdge(
note.id,
getGraphId(note.class),
{
relation: {
id1: note.id,
id2: note.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}
});
layout(g);
g.nodes().forEach(function(v) {
if (v !== void 0 && g.node(v) !== void 0) {
log.debug("Node " + v + ": " + JSON.stringify(g.node(v)));
root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr(
"transform",
"translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"
);
}
});
g.edges().forEach(function(e) {
if (e !== void 0 && g.edge(e) !== void 0) {
log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e)));
svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);
}
});
const svgBounds = diagram2.node().getBBox();
const width = svgBounds.width + padding * 2;
const height = svgBounds.height + padding * 2;
configureSvgSize(diagram2, height, width, conf.useMaxWidth);
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
log.debug(`viewBox ${vBox}`);
diagram2.attr("viewBox", vBox);
};
const renderer = {
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
//# sourceMappingURL=classDiagram-ef563e47.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-ef563e47.js","sources":["../src/diagrams/class/classRenderer.js","../src/diagrams/class/classDiagram.ts"],"sourcesContent":["import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport svgDraw from './svgDraw';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport { getConfig } from '../../config';\n\nlet idCache = {};\nconst padding = 20;\n\n/**\n * Gets the ID with the same label as in the cache\n *\n * @param {string} label The label to look for\n * @returns {string} The resulting ID\n */\nconst getGraphId = function (label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n\n if (foundEntry) {\n return foundEntry[0];\n }\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {SVGSVGElement} elem The SVG element to append to\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n // diagObj.db.clear();\n // diagObj.parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = diagObj.db.getClasses();\n const keys = Object.keys(classes);\n\n for (const key of keys) {\n const classDef = classes[key];\n const node = svgDraw.drawLine truncated
@@ -1,97 +0,0 @@
import { p as W, d as M, s as H } from "./styles-e9bde71f.js";
import { g as S, l as d, f as u } from "./config-e567ef17.js";
import { G as X, l as Y } from "./layout-10a68736.js";
import { s as l } from "./svgDraw-c2c52520.js";
import { c as Z } from "./setupGraphViewbox-a4603a92.js";
import "./utils-aa888deb.js";
import "./commonDb-4dc3d465.js";
import "./mermaidAPI-51c0c26b.js";
import "./errorRenderer-a3c4bedb.js";
import "./isPlainObject-bb374f45.js";
import "./array-2ff2c7a6.js";
import "./constant-2fe7eae5.js";
let h = {};
const g = 20, p = function(e) {
const s = Object.entries(h).find((k) => k[1].label === e);
if (s)
return s[0];
}, D = function(e) {
e.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), e.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, $ = function(e, s, k, a) {
const f = S().class;
h = {}, d.info("Rendering diagram " + e);
const L = S().securityLevel;
let y;
L === "sandbox" && (y = u("#i" + s));
const x = L === "sandbox" ? u(y.nodes()[0].contentDocument.body) : u("body"), n = x.select(`[id='${s}']`);
D(n);
const r = new X({
multigraph: !0
});
r.setGraph({
isMultiGraph: !0
}), r.setDefaultEdgeLabel(function() {
return {};
});
const m = a.db.getClasses(), N = Object.keys(m);
for (const t of N) {
const o = m[t], i = l.drawClass(n, o, f, a);
h[i.id] = i, r.setNode(i.id, i), d.info("Org height: " + i.height);
}
a.db.getRelations().forEach(function(t) {
d.info(
"tjoho" + p(t.id1) + p(t.id2) + JSON.stringify(t)
), r.setEdge(
p(t.id1),
p(t.id2),
{
relation: t
},
t.title || "DEFAULT"
);
}), a.db.getNotes().forEach(function(t) {
d.debug(`Adding note: ${JSON.stringify(t)}`);
const o = l.drawNote(n, t, f, a);
h[o.id] = o, r.setNode(o.id, o), t.class && t.class in m && r.setEdge(
t.id,
p(t.class),
{
relation: {
id1: t.id,
id2: t.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}), Y(r), r.nodes().forEach(function(t) {
t !== void 0 && r.node(t) !== void 0 && (d.debug("Node " + t + ": " + JSON.stringify(r.node(t))), x.select("#" + (a.db.lookUpDomId(t) || t)).attr(
"transform",
"translate(" + (r.node(t).x - r.node(t).width / 2) + "," + (r.node(t).y - r.node(t).height / 2) + " )"
));
}), r.edges().forEach(function(t) {
t !== void 0 && r.edge(t) !== void 0 && (d.debug("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(r.edge(t))), l.drawEdge(n, r.edge(t), r.edge(t).relation, f, a));
});
const c = n.node().getBBox(), E = c.width + g * 2, b = c.height + g * 2;
Z(n, b, E, f.useMaxWidth);
const w = `${c.x - g} ${c.y - g} ${E} ${b}`;
d.debug(`viewBox ${w}`), n.attr("viewBox", w);
}, B = {
draw: $
}, q = {
parser: W,
db: M,
renderer: B,
styles: H,
init: (e) => {
e.class || (e.class = {}), e.class.arrowMarkerAbsolute = e.arrowMarkerAbsolute, M.clear();
}
};
export {
q as diagram
};
//# sourceMappingURL=classDiagram-f04b3d8f.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-f04b3d8f.js","sources":["../src/diagrams/class/classRenderer.js","../src/diagrams/class/classDiagram.ts"],"sourcesContent":["import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport svgDraw from './svgDraw';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport { getConfig } from '../../config';\n\nlet idCache = {};\nconst padding = 20;\n\n/**\n * Gets the ID with the same label as in the cache\n *\n * @param {string} label The label to look for\n * @returns {string} The resulting ID\n */\nconst getGraphId = function (label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n\n if (foundEntry) {\n return foundEntry[0];\n }\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {SVGSVGElement} elem The SVG element to append to\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n // diagObj.db.clear();\n // diagObj.parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = diagObj.db.getClasses();\n const keys = Object.keys(classes);\n\n for (const key of keys) {\n const classDef = classes[key];\n const node = svgDraw.drawLine truncated
-143
View File
@@ -1,143 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-ee347520.js";
import { g as getConfig, l as log, f as select } from "./config-b4fa35bb.js";
import { G as Graph, l as layout } from "./layout-47a4d1ce.js";
import { s as svgDraw } from "./svgDraw-aae20718.js";
import { c as configureSvgSize } from "./setupGraphViewbox-16a0ba81.js";
import "./utils-872dfc50.js";
import "./commonDb-7f40ab5a.js";
import "./mermaidAPI-a31c2c80.js";
import "./errorRenderer-ebf63d74.js";
import "./isPlainObject-53794b96.js";
import "./array-b7dcf730.js";
import "./constant-b644328d.js";
let idCache = {};
const padding = 20;
const getGraphId = function(label) {
const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
if (foundEntry) {
return foundEntry[0];
}
};
const insertMarkers = function(elem) {
elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
};
const draw = function(text, id, _version, diagObj) {
const conf = getConfig().class;
idCache = {};
log.info("Rendering diagram " + text);
const securityLevel = getConfig().securityLevel;
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
const diagram2 = root.select(`[id='${id}']`);
insertMarkers(diagram2);
const g = new Graph({
multigraph: true
});
g.setGraph({
isMultiGraph: true
});
g.setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const keys = Object.keys(classes);
for (const key of keys) {
const classDef = classes[key];
const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
log.info("Org height: " + node.height);
}
const relations = diagObj.db.getRelations();
relations.forEach(function(relation) {
log.info(
"tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)
);
g.setEdge(
getGraphId(relation.id1),
getGraphId(relation.id2),
{
relation
},
relation.title || "DEFAULT"
);
});
const notes = diagObj.db.getNotes();
notes.forEach(function(note) {
log.debug(`Adding note: ${JSON.stringify(note)}`);
const node = svgDraw.drawNote(diagram2, note, conf, diagObj);
idCache[node.id] = node;
g.setNode(node.id, node);
if (note.class && note.class in classes) {
g.setEdge(
note.id,
getGraphId(note.class),
{
relation: {
id1: note.id,
id2: note.class,
relation: {
type1: "none",
type2: "none",
lineType: 10
}
}
},
"DEFAULT"
);
}
});
layout(g);
g.nodes().forEach(function(v) {
if (v !== void 0 && g.node(v) !== void 0) {
log.debug("Node " + v + ": " + JSON.stringify(g.node(v)));
root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr(
"transform",
"translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"
);
}
});
g.edges().forEach(function(e) {
if (e !== void 0 && g.edge(e) !== void 0) {
log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e)));
svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);
}
});
const svgBounds = diagram2.node().getBBox();
const width = svgBounds.width + padding * 2;
const height = svgBounds.height + padding * 2;
configureSvgSize(diagram2, height, width, conf.useMaxWidth);
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
log.debug(`viewBox ${vBox}`);
diagram2.attr("viewBox", vBox);
};
const renderer = {
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
//# sourceMappingURL=classDiagram-ffa2ea72.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-ffa2ea72.js","sources":["../src/diagrams/class/classRenderer.js","../src/diagrams/class/classDiagram.ts"],"sourcesContent":["import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport svgDraw from './svgDraw';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport { getConfig } from '../../config';\n\nlet idCache = {};\nconst padding = 20;\n\n/**\n * Gets the ID with the same label as in the cache\n *\n * @param {string} label The label to look for\n * @returns {string} The resulting ID\n */\nconst getGraphId = function (label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n\n if (foundEntry) {\n return foundEntry[0];\n }\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {SVGSVGElement} elem The SVG element to append to\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n // diagObj.db.clear();\n // diagObj.parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = diagObj.db.getClasses();\n const keys = Object.keys(classes);\n\n for (const key of keys) {\n const classDef = classes[key];\n const node = svgDraw.drawLine truncated
@@ -1,200 +0,0 @@
import { p as M, d as k, s as R } from "./styles-55d85316.js";
import { l as p, g as r, f as v, e as C } from "./config-e567ef17.js";
import { G as B } from "./layout-d6d8be39.js";
import { r as G } from "./index-e6caf2ad.js";
import { u as I, z as D, x as E, y as _ } from "./utils-aa888deb.js";
import { s as z } from "./setupGraphViewbox-a4603a92.js";
import "./mermaidAPI-04b5c286.js";
import "./errorRenderer-a3c4bedb.js";
import "./commonDb-4dc3d465.js";
import "./isPlainObject-a5cb4071.js";
import "./array-2ff2c7a6.js";
import "./constant-2fe7eae5.js";
import "./edges-0979260b.js";
import "./svgDraw-c034b55e.js";
const A = (l) => C.sanitizeText(l, r());
let S = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const $ = function(l, o, b, a) {
const e = Object.keys(l);
p.info("keys:", e), p.info(l), e.forEach(function(s) {
var y, m;
const t = l[s];
let i = "";
t.cssClasses.length > 0 && (i = i + " " + t.cssClasses.join(" "));
const n = { labelStyle: "", style: "" }, f = t.label ?? t.id, c = 0, u = "class_box", d = {
labelStyle: n.labelStyle,
shape: u,
labelText: A(f),
classData: t,
rx: c,
ry: c,
class: i,
style: n.style,
id: t.id,
domId: t.domId,
tooltip: a.db.getTooltip(t.id) || "",
haveCallback: t.haveCallback,
link: t.link,
width: t.type === "group" ? 500 : void 0,
type: t.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((y = r().flowchart) == null ? void 0 : y.padding) ?? ((m = r().class) == null ? void 0 : m.padding)
};
o.setNode(t.id, d), p.info("setNode", d);
});
}, q = function(l, o, b, a) {
p.info(l), l.forEach(function(e, s) {
var x, h;
const t = e, i = "", n = { labelStyle: "", style: "" }, f = t.text, c = 0, u = "note", d = {
labelStyle: n.labelStyle,
shape: u,
labelText: A(f),
noteData: t,
rx: c,
ry: c,
class: i,
style: n.style,
id: t.id,
domId: t.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((x = r().flowchart) == null ? void 0 : x.padding) ?? ((h = r().class) == null ? void 0 : h.padding)
};
if (o.setNode(t.id, d), p.info("setNode", d), !t.class || !(t.class in a))
return;
const y = b + s, m = {
id: `edgeNote${y}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: D(S.curve, E)
};
o.setEdge(t.id, t.class, m, y);
});
}, F = function(l, o) {
const b = r().flowchart;
let a = 0;
l.forEach(function(e) {
var t;
a++;
const s = {
//Set relationship style and line type
classes: "relation",
pattern: e.relation.lineType == 1 ? "dashed" : "solid",
id: "id" + a,
// Set link type for rendering
arrowhead: e.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: e.relationTitle1 === "none" ? "" : e.relationTitle1,
endLabelLeft: e.relationTitle2 === "none" ? "" : e.relationTitle2,
//Set relation arrow types
arrowTypeStart: L(e.relation.type1),
arrowTypeEnd: L(e.relation.type2),
style: "fill:none",
labelStyle: "",
curve: D(b == null ? void 0 : b.curve, E)
};
if (p.info(s, e), e.style !== void 0) {
const i = _(e.style);
s.style = i.style, s.labelStyle = i.labelStyle;
}
e.text = e.title, e.text === void 0 ? e.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", ((t = r().flowchart) == null ? void 0 : t.htmlLabels) ?? r().htmlLabels ? (s.labelType = "html", s.label = '<span class="edgeLabel">' + e.text + "</span>") : (s.labelType = "text", s.label = e.text.replace(C.lineBreakRegex, `
`), e.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), o.setEdge(e.id1, e.id2, s, a);
});
}, H = function(l) {
S = {
...S,
...l
};
}, P = function(l, o, b, a) {
p.info("Drawing class - ", o);
const e = r().flowchart ?? r().class, s = r().securityLevel;
p.info("config:", e);
const t = (e == null ? void 0 : e.nodeSpacing) ?? 50, i = (e == null ? void 0 : e.rankSpacing) ?? 50, n = new B({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: a.db.getDirection(),
nodesep: t,
ranksep: i,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
}), f = a.db.getClasses(), c = a.db.getRelations(), u = a.db.getNotes();
p.info(c), $(f, n, o, a), F(c, n), q(u, n, c.length + 1, f);
let d;
s === "sandbox" && (d = v("#i" + o));
const y = s === "sandbox" ? (
// @ts-ignore Ignore type error for now
v(d.nodes()[0].contentDocument.body)
) : v("body"), m = y.select(`[id="${o}"]`), x = y.select("#" + o + " g");
if (G(
x,
n,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
o
), I.insertTitle(m, "classTitleText", (e == null ? void 0 : e.titleTopMargin) ?? 5, a.db.getDiagramTitle()), z(n, m, e == null ? void 0 : e.diagramPadding, e == null ? void 0 : e.useMaxWidth), !(e != null && e.htmlLabels)) {
const h = s === "sandbox" ? d.nodes()[0].contentDocument : document, N = h.querySelectorAll('[id="' + o + '"] .edgeLabel .label');
for (const w of N) {
const T = w.getBBox(), g = h.createElementNS("http://www.w3.org/2000/svg", "rect");
g.setAttribute("rx", 0), g.setAttribute("ry", 0), g.setAttribute("width", T.width), g.setAttribute("height", T.height), w.insertBefore(g, w.firstChild);
}
}
};
function L(l) {
let o;
switch (l) {
case 0:
o = "aggregation";
break;
case 1:
o = "extension";
break;
case 2:
o = "composition";
break;
case 3:
o = "dependency";
break;
case 4:
o = "lollipop";
break;
default:
o = "none";
}
return o;
}
const V = {
setConf: H,
draw: P
}, le = {
parser: M,
db: k,
renderer: V,
styles: R,
init: (l) => {
l.class || (l.class = {}), l.class.arrowMarkerAbsolute = l.arrowMarkerAbsolute, k.clear();
}
};
export {
le as diagram
};
//# sourceMappingURL=classDiagram-v2-146d8a48.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-v2-146d8a48.js","sources":["../src/diagrams/class/classRenderer-v2.ts","../src/diagrams/class/classDiagram-v2.ts"],"sourcesContent":["// @ts-ignore d3 types are not available\nimport { select, curveLinear } from 'd3';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\nimport utils from '../../utils';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport { ClassRelation, ClassNote, ClassMap, EdgeData } from './classTypes';\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: undefined,\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param classes - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n */\nexport const addClasses = function (\n classes: ClassMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any\n) {\n const keys = Object.keys(classes);\n log.info('keys:', keys);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = classes[id];\n\n /**\n * Variable for storing the classes for the vertex\n */\n let cssClassStr = '';\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n }\n\n const styles = { labelStyle: '', style: '' }; //getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = 'class_box';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.\n *\n * @param notes - Object containing the additional vertices (notes).\n * @param g - The graph that is to be drawn.\n * @param startEdgeId - starting index for note edge\n * @param classes - Classes\n */\nexport const addNotes = function (\n notes: ClassNote[],\n g: graphlib.Graph,\n startEdgeId: number,\n classes: ClassMap\n) {\n log.info(notes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n notes.forEach(function (note, i) {\n const vertex = note;\n\n /**\n * Variable for storing the classes for the vertex\n *\n */\n const cssNoteStr = '';\n\n const styles = { labelStyle: '', style: '' };\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.text;\n\n const radius = 0;\n const shape = 'note';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: '',\n type: 'note',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n\n if (!vertex.class || !(vertex.class in classes)) {\n return;\n }\n const edgeId = startEdgeId + i;\n\n const edgeData: EdgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: 'relation',\n pattern: 'dotted',\n // Set link type for rendering\n arrowhead: 'none',\n //Set edge extra labels\n startLabelRight: '',\n endLabelLeft: '',\n //Set relation arrow types\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none'Line truncated
@@ -1,290 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-d48462a7.js";
import { l as log, c as getConfig, j as d3select, A as utils, t as setupGraphViewbox, o as getStylesFromArray, q as interpolateToCurve, n as curveLinear, f as common } from "./mermaid-c5809711.js";
import { G as Graph } from "./graph-af3d5df6.js";
import { r as render } from "./index-c8395ba2.js";
import "./layout-6685625a.js";
import "./clone-d2e37f8c.js";
import "./edges-1e1ebc73.js";
import "./createText-f6615236.js";
import "./line-65d70945.js";
import "./array-b7dcf730.js";
import "./path-39bad7e2.js";
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
let conf = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const addNamespaces = function(namespaces, g, _id, diagObj) {
const keys = Object.keys(namespaces);
log.info("keys:", keys);
log.info(namespaces);
keys.forEach(function(id) {
var _a, _b;
const vertex = namespaces[id];
const shape = "rect";
const node = {
shape,
id: vertex.id,
domId: vertex.domId,
labelText: sanitizeText(vertex.id),
labelStyle: "",
style: "fill: none; stroke: black",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
addClasses(vertex.classes, g, _id, diagObj, vertex.id);
log.info("setNode", node);
});
};
const addClasses = function(classes, g, _id, diagObj, parent) {
const keys = Object.keys(classes);
log.info("keys:", keys);
log.info(classes);
keys.filter((id) => classes[id].parent == parent).forEach(function(id) {
var _a, _b;
const vertex = classes[id];
const cssClassStr = vertex.cssClasses.join(" ");
const styles2 = getStylesFromArray(vertex.styles);
const vertexText = vertex.label ?? vertex.id;
const radius = 0;
const shape = "class_box";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
classData: vertex,
rx: radius,
ry: radius,
class: cssClassStr,
style: styles2.style,
id: vertex.id,
domId: vertex.domId,
tooltip: diagObj.db.getTooltip(vertex.id, parent) || "",
haveCallback: vertex.haveCallback,
link: vertex.link,
width: vertex.type === "group" ? 500 : void 0,
type: vertex.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
if (parent) {
g.setParent(vertex.id, parent);
}
log.info("setNode", node);
});
};
const addNotes = function(notes, g, startEdgeId, classes) {
log.info(notes);
notes.forEach(function(note, i) {
var _a, _b;
const vertex = note;
const cssNoteStr = "";
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.text;
const radius = 0;
const shape = "note";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
noteData: vertex,
rx: radius,
ry: radius,
class: cssNoteStr,
style: styles2.style,
id: vertex.id,
domId: vertex.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
if (!vertex.class || !(vertex.class in classes)) {
return;
}
const edgeId = startEdgeId + i;
const edgeData = {
id: `edgeNote${edgeId}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf.curve, curveLinear)
};
g.setEdge(vertex.id, vertex.class, edgeData, edgeId);
});
};
const addRelations = function(relations, g) {
const conf2 = getConfig().flowchart;
let cnt = 0;
relations.forEach(function(edge) {
var _a;
cnt++;
const edgeData = {
//Set relationship style and line type
classes: "relation",
pattern: edge.relation.lineType == 1 ? "dashed" : "solid",
id: `id_${edge.id1}_${edge.id2}_${cnt}`,
// Set link type for rendering
arrowhead: edge.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1,
endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2,
//Set relation arrow types
arrowTypeStart: getArrowMarker(edge.relation.type1),
arrowTypeEnd: getArrowMarker(edge.relation.type2),
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear)
};
log.info(edgeData, edge);
if (edge.style !== void 0) {
const styles2 = getStylesFromArray(edge.style);
edgeData.style = styles2.style;
edgeData.labelStyle = styles2.labelStyle;
}
edge.text = edge.title;
if (edge.text === void 0) {
if (edge.style !== void 0) {
edgeData.arrowheadStyle = "fill: #333";
}
} else {
edgeData.arrowheadStyle = "fill: #333";
edgeData.labelpos = "c";
if (((_a = getConfig().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig().htmlLabels) {
edgeData.labelType = "html";
edgeData.label = '<span class="edgeLabel">' + edge.text + "</span>";
} else {
edgeData.labelType = "text";
edgeData.label = edge.text.replace(common.lineBreakRegex, "\n");
if (edge.style === void 0) {
edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none";
}
edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:");
}
}
g.setEdge(edge.id1, edge.id2, edgeData, cnt);
});
};
const setConf = function(cnf) {
conf = {
...conf,
...cnf
};
};
const draw = async function(text, id, _version, diagObj) {
log.info("Drawing class - ", id);
const conf2 = getConfig().flowchart ?? getConfig().class;
const securityLevel = getConfig().securityLevel;
log.info("config:", conf2);
const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50;
const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50;
const g = new Graph({
multigraph: true,
compound: true
}).setGraph({
rankdir: diagObj.db.getDirection(),
nodesep: nodeSpacing,
ranksep: rankSpacing,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
const namespaces = diagObj.db.getNamespaces();
const classes = diagObj.db.getClasses();
const relations = diagObj.db.getRelations();
const notes = diagObj.db.getNotes();
log.info(relations);
addNamespaces(namespaces, g, id, diagObj);
addClasses(classes, g, id, diagObj);
addRelations(relations, g);
addNotes(notes, g, relations.length + 1, classes);
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = d3select("#i" + id);
}
const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body");
const svg = root.select(`[id="${id}"]`);
const element = root.select("#" + id + " g");
await render(
element,
g,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
id
);
utils.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle());
setupGraphViewbox(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth);
if (!(conf2 == null ? void 0 : conf2.htmlLabels)) {
const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
for (const label of labels) {
const dim = label.getBBox();
const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute("rx", 0);
rect.setAttribute("ry", 0);
rect.setAttribute("width", dim.width);
rect.setAttribute("height", dim.height);
label.insertBefore(rect, label.firstChild);
}
}
};
function getArrowMarker(type) {
let marker;
switch (type) {
case 0:
marker = "aggregation";
break;
case 1:
marker = "extension";
break;
case 2:
marker = "composition";
break;
case 3:
marker = "dependency";
break;
case 4:
marker = "lollipop";
break;
default:
marker = "none";
}
return marker;
}
const renderer = {
setConf,
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
@@ -1,279 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-0dd3ba1e.js";
import { select, curveLinear } from "d3";
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
import { l as log, g as getConfig, d as common } from "./config-389b86ff.js";
import { r as render } from "./index-f9d09cc9.js";
import { u as utils, n as interpolateToCurve, m as getStylesFromArray } from "./utils-d5eeff82.js";
import { s as setupGraphViewbox } from "./setupGraphViewbox-e35e4124.js";
import "./mermaidAPI-0716c7c2.js";
import "stylis";
import "./errorRenderer-d05351b9.js";
import "dompurify";
import "lodash-es/isEmpty.js";
import "./commonDb-2ace122b.js";
import "dayjs";
import "khroma";
import "dagre-d3-es/src/dagre/index.js";
import "dagre-d3-es/src/graphlib/json.js";
import "./edges-65da65dc.js";
import "./svgDraw-6a237a99.js";
import "@braintree/sanitize-url";
import "lodash-es/memoize.js";
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
let conf = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const addClasses = function(classes, g, _id, diagObj) {
const keys = Object.keys(classes);
log.info("keys:", keys);
log.info(classes);
keys.forEach(function(id) {
var _a, _b;
const vertex = classes[id];
let cssClassStr = "";
if (vertex.cssClasses.length > 0) {
cssClassStr = cssClassStr + " " + vertex.cssClasses.join(" ");
}
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.label ?? vertex.id;
const radius = 0;
const shape = "class_box";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
classData: vertex,
rx: radius,
ry: radius,
class: cssClassStr,
style: styles2.style,
id: vertex.id,
domId: vertex.domId,
tooltip: diagObj.db.getTooltip(vertex.id) || "",
haveCallback: vertex.haveCallback,
link: vertex.link,
width: vertex.type === "group" ? 500 : void 0,
type: vertex.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
});
};
const addNotes = function(notes, g, startEdgeId, classes) {
log.info(notes);
notes.forEach(function(note, i) {
var _a, _b;
const vertex = note;
const cssNoteStr = "";
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.text;
const radius = 0;
const shape = "note";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
noteData: vertex,
rx: radius,
ry: radius,
class: cssNoteStr,
style: styles2.style,
id: vertex.id,
domId: vertex.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
if (!vertex.class || !(vertex.class in classes)) {
return;
}
const edgeId = startEdgeId + i;
const edgeData = {
id: `edgeNote${edgeId}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf.curve, curveLinear)
};
g.setEdge(vertex.id, vertex.class, edgeData, edgeId);
});
};
const addRelations = function(relations, g) {
const conf2 = getConfig().flowchart;
let cnt = 0;
relations.forEach(function(edge) {
var _a;
cnt++;
const edgeData = {
//Set relationship style and line type
classes: "relation",
pattern: edge.relation.lineType == 1 ? "dashed" : "solid",
id: "id" + cnt,
// Set link type for rendering
arrowhead: edge.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1,
endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2,
//Set relation arrow types
arrowTypeStart: getArrowMarker(edge.relation.type1),
arrowTypeEnd: getArrowMarker(edge.relation.type2),
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear)
};
log.info(edgeData, edge);
if (edge.style !== void 0) {
const styles2 = getStylesFromArray(edge.style);
edgeData.style = styles2.style;
edgeData.labelStyle = styles2.labelStyle;
}
edge.text = edge.title;
if (edge.text === void 0) {
if (edge.style !== void 0) {
edgeData.arrowheadStyle = "fill: #333";
}
} else {
edgeData.arrowheadStyle = "fill: #333";
edgeData.labelpos = "c";
if (((_a = getConfig().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig().htmlLabels) {
edgeData.labelType = "html";
edgeData.label = '<span class="edgeLabel">' + edge.text + "</span>";
} else {
edgeData.labelType = "text";
edgeData.label = edge.text.replace(common.lineBreakRegex, "\n");
if (edge.style === void 0) {
edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none";
}
edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:");
}
}
g.setEdge(edge.id1, edge.id2, edgeData, cnt);
});
};
const setConf = function(cnf) {
conf = {
...conf,
...cnf
};
};
const draw = function(text, id, _version, diagObj) {
log.info("Drawing class - ", id);
const conf2 = getConfig().flowchart ?? getConfig().class;
const securityLevel = getConfig().securityLevel;
log.info("config:", conf2);
const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50;
const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50;
const g = new graphlib.Graph({
multigraph: true,
compound: true
}).setGraph({
rankdir: diagObj.db.getDirection(),
nodesep: nodeSpacing,
ranksep: rankSpacing,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const relations = diagObj.db.getRelations();
const notes = diagObj.db.getNotes();
log.info(relations);
addClasses(classes, g, id, diagObj);
addRelations(relations, g);
addNotes(notes, g, relations.length + 1, classes);
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? (
// @ts-ignore Ignore type error for now
select(sandboxElement.nodes()[0].contentDocument.body)
) : select("body");
const svg = root.select(`[id="${id}"]`);
const element = root.select("#" + id + " g");
render(
element,
g,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
id
);
utils.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle());
setupGraphViewbox(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth);
if (!(conf2 == null ? void 0 : conf2.htmlLabels)) {
const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
for (const label of labels) {
const dim = label.getBBox();
const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute("rx", 0);
rect.setAttribute("ry", 0);
rect.setAttribute("width", dim.width);
rect.setAttribute("height", dim.height);
label.insertBefore(rect, label.firstChild);
}
}
};
function getArrowMarker(type) {
let marker;
switch (type) {
case 0:
marker = "aggregation";
break;
case 1:
marker = "extension";
break;
case 2:
marker = "composition";
break;
case 3:
marker = "dependency";
break;
case 4:
marker = "lollipop";
break;
default:
marker = "none";
}
return marker;
}
const renderer = {
setConf,
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
//# sourceMappingURL=classDiagram-v2-539b00ca.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-v2-539b00ca.js","sources":["../src/diagrams/class/classRenderer-v2.ts","../src/diagrams/class/classDiagram-v2.ts"],"sourcesContent":["// @ts-ignore d3 types are not available\nimport { select, curveLinear } from 'd3';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\nimport utils from '../../utils';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport { ClassRelation, ClassNote, ClassMap, EdgeData } from './classTypes';\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: undefined,\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param classes - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n */\nexport const addClasses = function (\n classes: ClassMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any\n) {\n const keys = Object.keys(classes);\n log.info('keys:', keys);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = classes[id];\n\n /**\n * Variable for storing the classes for the vertex\n */\n let cssClassStr = '';\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n }\n\n const styles = { labelStyle: '', style: '' }; //getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = 'class_box';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.\n *\n * @param notes - Object containing the additional vertices (notes).\n * @param g - The graph that is to be drawn.\n * @param startEdgeId - starting index for note edge\n * @param classes - Classes\n */\nexport const addNotes = function (\n notes: ClassNote[],\n g: graphlib.Graph,\n startEdgeId: number,\n classes: ClassMap\n) {\n log.info(notes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n notes.forEach(function (note, i) {\n const vertex = note;\n\n /**\n * Variable for storing the classes for the vertex\n *\n */\n const cssNoteStr = '';\n\n const styles = { labelStyle: '', style: '' };\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.text;\n\n const radius = 0;\n const shape = 'note';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: '',\n type: 'note',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n\n if (!vertex.class || !(vertex.class in classes)) {\n return;\n }\n const edgeId = startEdgeId + i;\n\n const edgeData: EdgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: 'relation',\n pattern: 'dotted',\n // Set link type for rendering\n arrowhead: 'none',\n //Set edge extra labels\n startLabelRight: '',\n endLabelLeft: '',\n //Set relation arrow types\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none'Line truncated
@@ -1,200 +0,0 @@
import { p as M, d as k, s as R } from "./styles-e9bde71f.js";
import { l as p, g as r, f as v, e as C } from "./config-e567ef17.js";
import { G as B } from "./layout-10a68736.js";
import { r as G } from "./index-f4462e28.js";
import { u as I, z as D, x as E, y as _ } from "./utils-aa888deb.js";
import { s as z } from "./setupGraphViewbox-a4603a92.js";
import "./mermaidAPI-51c0c26b.js";
import "./errorRenderer-a3c4bedb.js";
import "./commonDb-4dc3d465.js";
import "./isPlainObject-bb374f45.js";
import "./array-2ff2c7a6.js";
import "./constant-2fe7eae5.js";
import "./edges-a2733861.js";
import "./svgDraw-c2c52520.js";
const A = (l) => C.sanitizeText(l, r());
let S = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const $ = function(l, o, b, a) {
const e = Object.keys(l);
p.info("keys:", e), p.info(l), e.forEach(function(s) {
var y, m;
const t = l[s];
let i = "";
t.cssClasses.length > 0 && (i = i + " " + t.cssClasses.join(" "));
const n = { labelStyle: "", style: "" }, f = t.label ?? t.id, c = 0, u = "class_box", d = {
labelStyle: n.labelStyle,
shape: u,
labelText: A(f),
classData: t,
rx: c,
ry: c,
class: i,
style: n.style,
id: t.id,
domId: t.domId,
tooltip: a.db.getTooltip(t.id) || "",
haveCallback: t.haveCallback,
link: t.link,
width: t.type === "group" ? 500 : void 0,
type: t.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((y = r().flowchart) == null ? void 0 : y.padding) ?? ((m = r().class) == null ? void 0 : m.padding)
};
o.setNode(t.id, d), p.info("setNode", d);
});
}, q = function(l, o, b, a) {
p.info(l), l.forEach(function(e, s) {
var x, h;
const t = e, i = "", n = { labelStyle: "", style: "" }, f = t.text, c = 0, u = "note", d = {
labelStyle: n.labelStyle,
shape: u,
labelText: A(f),
noteData: t,
rx: c,
ry: c,
class: i,
style: n.style,
id: t.id,
domId: t.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((x = r().flowchart) == null ? void 0 : x.padding) ?? ((h = r().class) == null ? void 0 : h.padding)
};
if (o.setNode(t.id, d), p.info("setNode", d), !t.class || !(t.class in a))
return;
const y = b + s, m = {
id: `edgeNote${y}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: D(S.curve, E)
};
o.setEdge(t.id, t.class, m, y);
});
}, F = function(l, o) {
const b = r().flowchart;
let a = 0;
l.forEach(function(e) {
var t;
a++;
const s = {
//Set relationship style and line type
classes: "relation",
pattern: e.relation.lineType == 1 ? "dashed" : "solid",
id: "id" + a,
// Set link type for rendering
arrowhead: e.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: e.relationTitle1 === "none" ? "" : e.relationTitle1,
endLabelLeft: e.relationTitle2 === "none" ? "" : e.relationTitle2,
//Set relation arrow types
arrowTypeStart: L(e.relation.type1),
arrowTypeEnd: L(e.relation.type2),
style: "fill:none",
labelStyle: "",
curve: D(b == null ? void 0 : b.curve, E)
};
if (p.info(s, e), e.style !== void 0) {
const i = _(e.style);
s.style = i.style, s.labelStyle = i.labelStyle;
}
e.text = e.title, e.text === void 0 ? e.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", ((t = r().flowchart) == null ? void 0 : t.htmlLabels) ?? r().htmlLabels ? (s.labelType = "html", s.label = '<span class="edgeLabel">' + e.text + "</span>") : (s.labelType = "text", s.label = e.text.replace(C.lineBreakRegex, `
`), e.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), o.setEdge(e.id1, e.id2, s, a);
});
}, H = function(l) {
S = {
...S,
...l
};
}, P = function(l, o, b, a) {
p.info("Drawing class - ", o);
const e = r().flowchart ?? r().class, s = r().securityLevel;
p.info("config:", e);
const t = (e == null ? void 0 : e.nodeSpacing) ?? 50, i = (e == null ? void 0 : e.rankSpacing) ?? 50, n = new B({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: a.db.getDirection(),
nodesep: t,
ranksep: i,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
}), f = a.db.getClasses(), c = a.db.getRelations(), u = a.db.getNotes();
p.info(c), $(f, n, o, a), F(c, n), q(u, n, c.length + 1, f);
let d;
s === "sandbox" && (d = v("#i" + o));
const y = s === "sandbox" ? (
// @ts-ignore Ignore type error for now
v(d.nodes()[0].contentDocument.body)
) : v("body"), m = y.select(`[id="${o}"]`), x = y.select("#" + o + " g");
if (G(
x,
n,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
o
), I.insertTitle(m, "classTitleText", (e == null ? void 0 : e.titleTopMargin) ?? 5, a.db.getDiagramTitle()), z(n, m, e == null ? void 0 : e.diagramPadding, e == null ? void 0 : e.useMaxWidth), !(e != null && e.htmlLabels)) {
const h = s === "sandbox" ? d.nodes()[0].contentDocument : document, N = h.querySelectorAll('[id="' + o + '"] .edgeLabel .label');
for (const w of N) {
const T = w.getBBox(), g = h.createElementNS("http://www.w3.org/2000/svg", "rect");
g.setAttribute("rx", 0), g.setAttribute("ry", 0), g.setAttribute("width", T.width), g.setAttribute("height", T.height), w.insertBefore(g, w.firstChild);
}
}
};
function L(l) {
let o;
switch (l) {
case 0:
o = "aggregation";
break;
case 1:
o = "extension";
break;
case 2:
o = "composition";
break;
case 3:
o = "dependency";
break;
case 4:
o = "lollipop";
break;
default:
o = "none";
}
return o;
}
const V = {
setConf: H,
draw: P
}, le = {
parser: M,
db: k,
renderer: V,
styles: R,
init: (l) => {
l.class || (l.class = {}), l.class.arrowMarkerAbsolute = l.arrowMarkerAbsolute, k.clear();
}
};
export {
le as diagram
};
//# sourceMappingURL=classDiagram-v2-6bb7b84a.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-v2-6bb7b84a.js","sources":["../src/diagrams/class/classRenderer-v2.ts","../src/diagrams/class/classDiagram-v2.ts"],"sourcesContent":["// @ts-ignore d3 types are not available\nimport { select, curveLinear } from 'd3';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\nimport utils from '../../utils';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport { ClassRelation, ClassNote, ClassMap, EdgeData } from './classTypes';\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: undefined,\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param classes - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n */\nexport const addClasses = function (\n classes: ClassMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any\n) {\n const keys = Object.keys(classes);\n log.info('keys:', keys);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = classes[id];\n\n /**\n * Variable for storing the classes for the vertex\n */\n let cssClassStr = '';\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n }\n\n const styles = { labelStyle: '', style: '' }; //getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = 'class_box';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.\n *\n * @param notes - Object containing the additional vertices (notes).\n * @param g - The graph that is to be drawn.\n * @param startEdgeId - starting index for note edge\n * @param classes - Classes\n */\nexport const addNotes = function (\n notes: ClassNote[],\n g: graphlib.Graph,\n startEdgeId: number,\n classes: ClassMap\n) {\n log.info(notes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n notes.forEach(function (note, i) {\n const vertex = note;\n\n /**\n * Variable for storing the classes for the vertex\n *\n */\n const cssNoteStr = '';\n\n const styles = { labelStyle: '', style: '' };\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.text;\n\n const radius = 0;\n const shape = 'note';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: '',\n type: 'note',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n\n if (!vertex.class || !(vertex.class in classes)) {\n return;\n }\n const edgeId = startEdgeId + i;\n\n const edgeData: EdgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: 'relation',\n pattern: 'dotted',\n // Set link type for rendering\n arrowhead: 'none',\n //Set edge extra labels\n startLabelRight: '',\n endLabelLeft: '',\n //Set relation arrow types\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none'Line truncated
@@ -1,272 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-d6ad8edb.js";
import { l as log, g as getConfig, f as select, e as common } from "./config-b4fa35bb.js";
import { G as Graph } from "./layout-4663fc19.js";
import { r as render } from "./index-a1a98052.js";
import { u as utils, z as interpolateToCurve, x as curveLinear, y as getStylesFromArray } from "./utils-872dfc50.js";
import { s as setupGraphViewbox } from "./setupGraphViewbox-16a0ba81.js";
import "./mermaidAPI-6f22a815.js";
import "./errorRenderer-ebf63d74.js";
import "./commonDb-7f40ab5a.js";
import "./isPlainObject-91dd8bc9.js";
import "./array-b7dcf730.js";
import "./constant-b644328d.js";
import "./edges-62a01f73.js";
import "./svgDraw-9e97e6db.js";
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
let conf = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const addClasses = function(classes, g, _id, diagObj) {
const keys = Object.keys(classes);
log.info("keys:", keys);
log.info(classes);
keys.forEach(function(id) {
var _a, _b;
const vertex = classes[id];
let cssClassStr = "";
if (vertex.cssClasses.length > 0) {
cssClassStr = cssClassStr + " " + vertex.cssClasses.join(" ");
}
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.label ?? vertex.id;
const radius = 0;
const shape = "class_box";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
classData: vertex,
rx: radius,
ry: radius,
class: cssClassStr,
style: styles2.style,
id: vertex.id,
domId: vertex.domId,
tooltip: diagObj.db.getTooltip(vertex.id) || "",
haveCallback: vertex.haveCallback,
link: vertex.link,
width: vertex.type === "group" ? 500 : void 0,
type: vertex.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
});
};
const addNotes = function(notes, g, startEdgeId, classes) {
log.info(notes);
notes.forEach(function(note, i) {
var _a, _b;
const vertex = note;
const cssNoteStr = "";
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.text;
const radius = 0;
const shape = "note";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
noteData: vertex,
rx: radius,
ry: radius,
class: cssNoteStr,
style: styles2.style,
id: vertex.id,
domId: vertex.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
if (!vertex.class || !(vertex.class in classes)) {
return;
}
const edgeId = startEdgeId + i;
const edgeData = {
id: `edgeNote${edgeId}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf.curve, curveLinear)
};
g.setEdge(vertex.id, vertex.class, edgeData, edgeId);
});
};
const addRelations = function(relations, g) {
const conf2 = getConfig().flowchart;
let cnt = 0;
relations.forEach(function(edge) {
var _a;
cnt++;
const edgeData = {
//Set relationship style and line type
classes: "relation",
pattern: edge.relation.lineType == 1 ? "dashed" : "solid",
id: "id" + cnt,
// Set link type for rendering
arrowhead: edge.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1,
endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2,
//Set relation arrow types
arrowTypeStart: getArrowMarker(edge.relation.type1),
arrowTypeEnd: getArrowMarker(edge.relation.type2),
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear)
};
log.info(edgeData, edge);
if (edge.style !== void 0) {
const styles2 = getStylesFromArray(edge.style);
edgeData.style = styles2.style;
edgeData.labelStyle = styles2.labelStyle;
}
edge.text = edge.title;
if (edge.text === void 0) {
if (edge.style !== void 0) {
edgeData.arrowheadStyle = "fill: #333";
}
} else {
edgeData.arrowheadStyle = "fill: #333";
edgeData.labelpos = "c";
if (((_a = getConfig().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig().htmlLabels) {
edgeData.labelType = "html";
edgeData.label = '<span class="edgeLabel">' + edge.text + "</span>";
} else {
edgeData.labelType = "text";
edgeData.label = edge.text.replace(common.lineBreakRegex, "\n");
if (edge.style === void 0) {
edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none";
}
edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:");
}
}
g.setEdge(edge.id1, edge.id2, edgeData, cnt);
});
};
const setConf = function(cnf) {
conf = {
...conf,
...cnf
};
};
const draw = function(text, id, _version, diagObj) {
log.info("Drawing class - ", id);
const conf2 = getConfig().flowchart ?? getConfig().class;
const securityLevel = getConfig().securityLevel;
log.info("config:", conf2);
const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50;
const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50;
const g = new Graph({
multigraph: true,
compound: true
}).setGraph({
rankdir: diagObj.db.getDirection(),
nodesep: nodeSpacing,
ranksep: rankSpacing,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const relations = diagObj.db.getRelations();
const notes = diagObj.db.getNotes();
log.info(relations);
addClasses(classes, g, id, diagObj);
addRelations(relations, g);
addNotes(notes, g, relations.length + 1, classes);
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? (
// @ts-ignore Ignore type error for now
select(sandboxElement.nodes()[0].contentDocument.body)
) : select("body");
const svg = root.select(`[id="${id}"]`);
const element = root.select("#" + id + " g");
render(
element,
g,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
id
);
utils.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle());
setupGraphViewbox(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth);
if (!(conf2 == null ? void 0 : conf2.htmlLabels)) {
const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
for (const label of labels) {
const dim = label.getBBox();
const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute("rx", 0);
rect.setAttribute("ry", 0);
rect.setAttribute("width", dim.width);
rect.setAttribute("height", dim.height);
label.insertBefore(rect, label.firstChild);
}
}
};
function getArrowMarker(type) {
let marker;
switch (type) {
case 0:
marker = "aggregation";
break;
case 1:
marker = "extension";
break;
case 2:
marker = "composition";
break;
case 3:
marker = "dependency";
break;
case 4:
marker = "lollipop";
break;
default:
marker = "none";
}
return marker;
}
const renderer = {
setConf,
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
//# sourceMappingURL=classDiagram-v2-8096aa52.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-v2-8096aa52.js","sources":["../src/diagrams/class/classRenderer-v2.ts","../src/diagrams/class/classDiagram-v2.ts"],"sourcesContent":["// @ts-ignore d3 types are not available\nimport { select, curveLinear } from 'd3';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\nimport utils from '../../utils';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport { ClassRelation, ClassNote, ClassMap, EdgeData } from './classTypes';\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: undefined,\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param classes - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n */\nexport const addClasses = function (\n classes: ClassMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any\n) {\n const keys = Object.keys(classes);\n log.info('keys:', keys);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = classes[id];\n\n /**\n * Variable for storing the classes for the vertex\n */\n let cssClassStr = '';\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n }\n\n const styles = { labelStyle: '', style: '' }; //getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = 'class_box';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.\n *\n * @param notes - Object containing the additional vertices (notes).\n * @param g - The graph that is to be drawn.\n * @param startEdgeId - starting index for note edge\n * @param classes - Classes\n */\nexport const addNotes = function (\n notes: ClassNote[],\n g: graphlib.Graph,\n startEdgeId: number,\n classes: ClassMap\n) {\n log.info(notes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n notes.forEach(function (note, i) {\n const vertex = note;\n\n /**\n * Variable for storing the classes for the vertex\n *\n */\n const cssNoteStr = '';\n\n const styles = { labelStyle: '', style: '' };\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.text;\n\n const radius = 0;\n const shape = 'note';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: '',\n type: 'note',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n\n if (!vertex.class || !(vertex.class in classes)) {\n return;\n }\n const edgeId = startEdgeId + i;\n\n const edgeData: EdgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: 'relation',\n pattern: 'dotted',\n // Set link type for rendering\n arrowhead: 'none',\n //Set edge extra labels\n startLabelRight: '',\n endLabelLeft: '',\n //Set relation arrow types\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none'Line truncated
@@ -1,206 +0,0 @@
import { p as R, d as N, s as $ } from "./styles-4bdb8b48.js";
import { l as c, c as r, j as k, A as B, t as G, o as E, q as A, n as C, f as _ } from "./mermaid-00886c59.js";
import { G as q } from "./graph-dee88f0d.js";
import { r as z } from "./index-14a831a4.js";
import "./layout-03086fc5.js";
import "./clone-a4e35854.js";
import "./edges-4734986e.js";
import "./createText-0ee50ac4.js";
import "./line-79437661.js";
import "./array-2ff2c7a6.js";
import "./path-428ebac9.js";
const S = (o) => _.sanitizeText(o, r());
let v = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const P = function(o, e, p, n) {
const t = Object.keys(o);
c.info("keys:", t), c.info(o), t.forEach(function(s) {
var y, d;
const l = o[s], i = {
shape: "rect",
id: l.id,
domId: l.domId,
labelText: S(l.id),
labelStyle: "",
style: "fill: none; stroke: black",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((y = r().flowchart) == null ? void 0 : y.padding) ?? ((d = r().class) == null ? void 0 : d.padding)
};
e.setNode(l.id, i), I(l.classes, e, p, n, l.id), c.info("setNode", i);
});
}, I = function(o, e, p, n, t) {
const s = Object.keys(o);
c.info("keys:", s), c.info(o), s.filter((l) => o[l].parent == t).forEach(function(l) {
var u, m;
const a = o[l], i = a.cssClasses.join(" "), y = E(a.styles), d = a.label ?? a.id, f = 0, h = "class_box", b = {
labelStyle: y.labelStyle,
shape: h,
labelText: S(d),
classData: a,
rx: f,
ry: f,
class: i,
style: y.style,
id: a.id,
domId: a.domId,
tooltip: n.db.getTooltip(a.id, t) || "",
haveCallback: a.haveCallback,
link: a.link,
width: a.type === "group" ? 500 : void 0,
type: a.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((u = r().flowchart) == null ? void 0 : u.padding) ?? ((m = r().class) == null ? void 0 : m.padding)
};
e.setNode(a.id, b), t && e.setParent(a.id, t), c.info("setNode", b);
});
}, F = function(o, e, p, n) {
c.info(o), o.forEach(function(t, s) {
var m, g;
const l = t, a = "", i = { labelStyle: "", style: "" }, y = l.text, d = 0, f = "note", h = {
labelStyle: i.labelStyle,
shape: f,
labelText: S(y),
noteData: l,
rx: d,
ry: d,
class: a,
style: i.style,
id: l.id,
domId: l.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((m = r().flowchart) == null ? void 0 : m.padding) ?? ((g = r().class) == null ? void 0 : g.padding)
};
if (e.setNode(l.id, h), c.info("setNode", h), !l.class || !(l.class in n))
return;
const b = p + s, u = {
id: `edgeNote${b}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: A(v.curve, C)
};
e.setEdge(l.id, l.class, u, b);
});
}, H = function(o, e) {
const p = r().flowchart;
let n = 0;
o.forEach(function(t) {
var l;
n++;
const s = {
//Set relationship style and line type
classes: "relation",
pattern: t.relation.lineType == 1 ? "dashed" : "solid",
id: `id_${t.id1}_${t.id2}_${n}`,
// Set link type for rendering
arrowhead: t.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: t.relationTitle1 === "none" ? "" : t.relationTitle1,
endLabelLeft: t.relationTitle2 === "none" ? "" : t.relationTitle2,
//Set relation arrow types
arrowTypeStart: D(t.relation.type1),
arrowTypeEnd: D(t.relation.type2),
style: "fill:none",
labelStyle: "",
curve: A(p == null ? void 0 : p.curve, C)
};
if (c.info(s, t), t.style !== void 0) {
const a = E(t.style);
s.style = a.style, s.labelStyle = a.labelStyle;
}
t.text = t.title, t.text === void 0 ? t.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", ((l = r().flowchart) == null ? void 0 : l.htmlLabels) ?? r().htmlLabels ? (s.labelType = "html", s.label = '<span class="edgeLabel">' + t.text + "</span>") : (s.labelType = "text", s.label = t.text.replace(_.lineBreakRegex, `
`), t.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), e.setEdge(t.id1, t.id2, s, n);
});
}, V = function(o) {
v = {
...v,
...o
};
}, W = async function(o, e, p, n) {
c.info("Drawing class - ", e);
const t = r().flowchart ?? r().class, s = r().securityLevel;
c.info("config:", t);
const l = (t == null ? void 0 : t.nodeSpacing) ?? 50, a = (t == null ? void 0 : t.rankSpacing) ?? 50, i = new q({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: n.db.getDirection(),
nodesep: l,
ranksep: a,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
}), y = n.db.getNamespaces(), d = n.db.getClasses(), f = n.db.getRelations(), h = n.db.getNotes();
c.info(f), P(y, i, e, n), I(d, i, e, n), H(f, i), F(h, i, f.length + 1, d);
let b;
s === "sandbox" && (b = k("#i" + e));
const u = s === "sandbox" ? k(b.nodes()[0].contentDocument.body) : k("body"), m = u.select(`[id="${e}"]`), g = u.select("#" + e + " g");
if (await z(
g,
i,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
e
), B.insertTitle(m, "classTitleText", (t == null ? void 0 : t.titleTopMargin) ?? 5, n.db.getDiagramTitle()), G(i, m, t == null ? void 0 : t.diagramPadding, t == null ? void 0 : t.useMaxWidth), !(t != null && t.htmlLabels)) {
const T = s === "sandbox" ? b.nodes()[0].contentDocument : document, M = T.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (const w of M) {
const L = w.getBBox(), x = T.createElementNS("http://www.w3.org/2000/svg", "rect");
x.setAttribute("rx", 0), x.setAttribute("ry", 0), x.setAttribute("width", L.width), x.setAttribute("height", L.height), w.insertBefore(x, w.firstChild);
}
}
};
function D(o) {
let e;
switch (o) {
case 0:
e = "aggregation";
break;
case 1:
e = "extension";
break;
case 2:
e = "composition";
break;
case 3:
e = "dependency";
break;
case 4:
e = "lollipop";
break;
default:
e = "none";
}
return e;
}
const J = {
setConf: V,
draw: W
}, ot = {
parser: R,
db: N,
renderer: J,
styles: $,
init: (o) => {
o.class || (o.class = {}), o.class.arrowMarkerAbsolute = o.arrowMarkerAbsolute, N.clear();
}
};
export {
ot as diagram
};
@@ -1,279 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-b8bd0053.js";
import { select, curveLinear } from "d3";
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
import { l as log, g as getConfig, d as common } from "./config-389b86ff.js";
import { r as render } from "./index-1dda2409.js";
import { u as utils, n as interpolateToCurve, m as getStylesFromArray } from "./utils-d5eeff82.js";
import { s as setupGraphViewbox } from "./setupGraphViewbox-e35e4124.js";
import "./mermaidAPI-b17c596d.js";
import "stylis";
import "./errorRenderer-d05351b9.js";
import "dompurify";
import "lodash-es/isEmpty.js";
import "./commonDb-2ace122b.js";
import "dayjs";
import "khroma";
import "dagre-d3-es/src/dagre/index.js";
import "dagre-d3-es/src/graphlib/json.js";
import "./edges-abc56c75.js";
import "./svgDraw-6a237a99.js";
import "@braintree/sanitize-url";
import "lodash-es/memoize.js";
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
let conf = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const addClasses = function(classes, g, _id, diagObj) {
const keys = Object.keys(classes);
log.info("keys:", keys);
log.info(classes);
keys.forEach(function(id) {
var _a, _b;
const vertex = classes[id];
let cssClassStr = "";
if (vertex.cssClasses.length > 0) {
cssClassStr = cssClassStr + " " + vertex.cssClasses.join(" ");
}
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.label ?? vertex.id;
const radius = 0;
const shape = "class_box";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
classData: vertex,
rx: radius,
ry: radius,
class: cssClassStr,
style: styles2.style,
id: vertex.id,
domId: vertex.domId,
tooltip: diagObj.db.getTooltip(vertex.id) || "",
haveCallback: vertex.haveCallback,
link: vertex.link,
width: vertex.type === "group" ? 500 : void 0,
type: vertex.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
});
};
const addNotes = function(notes, g, startEdgeId, classes) {
log.info(notes);
notes.forEach(function(note, i) {
var _a, _b;
const vertex = note;
const cssNoteStr = "";
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.text;
const radius = 0;
const shape = "note";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
noteData: vertex,
rx: radius,
ry: radius,
class: cssNoteStr,
style: styles2.style,
id: vertex.id,
domId: vertex.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
if (!vertex.class || !(vertex.class in classes)) {
return;
}
const edgeId = startEdgeId + i;
const edgeData = {
id: `edgeNote${edgeId}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf.curve, curveLinear)
};
g.setEdge(vertex.id, vertex.class, edgeData, edgeId);
});
};
const addRelations = function(relations, g) {
const conf2 = getConfig().flowchart;
let cnt = 0;
relations.forEach(function(edge) {
var _a;
cnt++;
const edgeData = {
//Set relationship style and line type
classes: "relation",
pattern: edge.relation.lineType == 1 ? "dashed" : "solid",
id: "id" + cnt,
// Set link type for rendering
arrowhead: edge.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1,
endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2,
//Set relation arrow types
arrowTypeStart: getArrowMarker(edge.relation.type1),
arrowTypeEnd: getArrowMarker(edge.relation.type2),
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear)
};
log.info(edgeData, edge);
if (edge.style !== void 0) {
const styles2 = getStylesFromArray(edge.style);
edgeData.style = styles2.style;
edgeData.labelStyle = styles2.labelStyle;
}
edge.text = edge.title;
if (edge.text === void 0) {
if (edge.style !== void 0) {
edgeData.arrowheadStyle = "fill: #333";
}
} else {
edgeData.arrowheadStyle = "fill: #333";
edgeData.labelpos = "c";
if (((_a = getConfig().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig().htmlLabels) {
edgeData.labelType = "html";
edgeData.label = '<span class="edgeLabel">' + edge.text + "</span>";
} else {
edgeData.labelType = "text";
edgeData.label = edge.text.replace(common.lineBreakRegex, "\n");
if (edge.style === void 0) {
edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none";
}
edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:");
}
}
g.setEdge(edge.id1, edge.id2, edgeData, cnt);
});
};
const setConf = function(cnf) {
conf = {
...conf,
...cnf
};
};
const draw = function(text, id, _version, diagObj) {
log.info("Drawing class - ", id);
const conf2 = getConfig().flowchart ?? getConfig().class;
const securityLevel = getConfig().securityLevel;
log.info("config:", conf2);
const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50;
const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50;
const g = new graphlib.Graph({
multigraph: true,
compound: true
}).setGraph({
rankdir: diagObj.db.getDirection(),
nodesep: nodeSpacing,
ranksep: rankSpacing,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const relations = diagObj.db.getRelations();
const notes = diagObj.db.getNotes();
log.info(relations);
addClasses(classes, g, id, diagObj);
addRelations(relations, g);
addNotes(notes, g, relations.length + 1, classes);
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? (
// @ts-ignore Ignore type error for now
select(sandboxElement.nodes()[0].contentDocument.body)
) : select("body");
const svg = root.select(`[id="${id}"]`);
const element = root.select("#" + id + " g");
render(
element,
g,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
id
);
utils.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle());
setupGraphViewbox(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth);
if (!(conf2 == null ? void 0 : conf2.htmlLabels)) {
const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
for (const label of labels) {
const dim = label.getBBox();
const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute("rx", 0);
rect.setAttribute("ry", 0);
rect.setAttribute("width", dim.width);
rect.setAttribute("height", dim.height);
label.insertBefore(rect, label.firstChild);
}
}
};
function getArrowMarker(type) {
let marker;
switch (type) {
case 0:
marker = "aggregation";
break;
case 1:
marker = "extension";
break;
case 2:
marker = "composition";
break;
case 3:
marker = "dependency";
break;
case 4:
marker = "lollipop";
break;
default:
marker = "none";
}
return marker;
}
const renderer = {
setConf,
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
//# sourceMappingURL=classDiagram-v2-b31c380f.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-v2-b31c380f.js","sources":["../src/diagrams/class/classRenderer-v2.ts","../src/diagrams/class/classDiagram-v2.ts"],"sourcesContent":["// @ts-ignore d3 types are not available\nimport { select, curveLinear } from 'd3';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\nimport utils from '../../utils';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport { ClassRelation, ClassNote, ClassMap, EdgeData } from './classTypes';\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: undefined,\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param classes - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n */\nexport const addClasses = function (\n classes: ClassMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any\n) {\n const keys = Object.keys(classes);\n log.info('keys:', keys);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = classes[id];\n\n /**\n * Variable for storing the classes for the vertex\n */\n let cssClassStr = '';\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n }\n\n const styles = { labelStyle: '', style: '' }; //getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = 'class_box';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.\n *\n * @param notes - Object containing the additional vertices (notes).\n * @param g - The graph that is to be drawn.\n * @param startEdgeId - starting index for note edge\n * @param classes - Classes\n */\nexport const addNotes = function (\n notes: ClassNote[],\n g: graphlib.Graph,\n startEdgeId: number,\n classes: ClassMap\n) {\n log.info(notes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n notes.forEach(function (note, i) {\n const vertex = note;\n\n /**\n * Variable for storing the classes for the vertex\n *\n */\n const cssNoteStr = '';\n\n const styles = { labelStyle: '', style: '' };\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.text;\n\n const radius = 0;\n const shape = 'note';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: '',\n type: 'note',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n\n if (!vertex.class || !(vertex.class in classes)) {\n return;\n }\n const edgeId = startEdgeId + i;\n\n const edgeData: EdgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: 'relation',\n pattern: 'dotted',\n // Set link type for rendering\n arrowhead: 'none',\n //Set edge extra labels\n startLabelRight: '',\n endLabelLeft: '',\n //Set relation arrow types\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none'Line truncated
@@ -1,272 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-ee347520.js";
import { l as log, g as getConfig, f as select, e as common } from "./config-b4fa35bb.js";
import { G as Graph } from "./layout-47a4d1ce.js";
import { r as render } from "./index-70db0a05.js";
import { u as utils, z as interpolateToCurve, x as curveLinear, y as getStylesFromArray } from "./utils-872dfc50.js";
import { s as setupGraphViewbox } from "./setupGraphViewbox-16a0ba81.js";
import "./mermaidAPI-a31c2c80.js";
import "./errorRenderer-ebf63d74.js";
import "./commonDb-7f40ab5a.js";
import "./isPlainObject-53794b96.js";
import "./array-b7dcf730.js";
import "./constant-b644328d.js";
import "./edges-3b4dbffd.js";
import "./svgDraw-aae20718.js";
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
let conf = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const addClasses = function(classes, g, _id, diagObj) {
const keys = Object.keys(classes);
log.info("keys:", keys);
log.info(classes);
keys.forEach(function(id) {
var _a, _b;
const vertex = classes[id];
let cssClassStr = "";
if (vertex.cssClasses.length > 0) {
cssClassStr = cssClassStr + " " + vertex.cssClasses.join(" ");
}
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.label ?? vertex.id;
const radius = 0;
const shape = "class_box";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
classData: vertex,
rx: radius,
ry: radius,
class: cssClassStr,
style: styles2.style,
id: vertex.id,
domId: vertex.domId,
tooltip: diagObj.db.getTooltip(vertex.id) || "",
haveCallback: vertex.haveCallback,
link: vertex.link,
width: vertex.type === "group" ? 500 : void 0,
type: vertex.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
});
};
const addNotes = function(notes, g, startEdgeId, classes) {
log.info(notes);
notes.forEach(function(note, i) {
var _a, _b;
const vertex = note;
const cssNoteStr = "";
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.text;
const radius = 0;
const shape = "note";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
noteData: vertex,
rx: radius,
ry: radius,
class: cssNoteStr,
style: styles2.style,
id: vertex.id,
domId: vertex.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
if (!vertex.class || !(vertex.class in classes)) {
return;
}
const edgeId = startEdgeId + i;
const edgeData = {
id: `edgeNote${edgeId}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf.curve, curveLinear)
};
g.setEdge(vertex.id, vertex.class, edgeData, edgeId);
});
};
const addRelations = function(relations, g) {
const conf2 = getConfig().flowchart;
let cnt = 0;
relations.forEach(function(edge) {
var _a;
cnt++;
const edgeData = {
//Set relationship style and line type
classes: "relation",
pattern: edge.relation.lineType == 1 ? "dashed" : "solid",
id: "id" + cnt,
// Set link type for rendering
arrowhead: edge.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1,
endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2,
//Set relation arrow types
arrowTypeStart: getArrowMarker(edge.relation.type1),
arrowTypeEnd: getArrowMarker(edge.relation.type2),
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear)
};
log.info(edgeData, edge);
if (edge.style !== void 0) {
const styles2 = getStylesFromArray(edge.style);
edgeData.style = styles2.style;
edgeData.labelStyle = styles2.labelStyle;
}
edge.text = edge.title;
if (edge.text === void 0) {
if (edge.style !== void 0) {
edgeData.arrowheadStyle = "fill: #333";
}
} else {
edgeData.arrowheadStyle = "fill: #333";
edgeData.labelpos = "c";
if (((_a = getConfig().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig().htmlLabels) {
edgeData.labelType = "html";
edgeData.label = '<span class="edgeLabel">' + edge.text + "</span>";
} else {
edgeData.labelType = "text";
edgeData.label = edge.text.replace(common.lineBreakRegex, "\n");
if (edge.style === void 0) {
edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none";
}
edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:");
}
}
g.setEdge(edge.id1, edge.id2, edgeData, cnt);
});
};
const setConf = function(cnf) {
conf = {
...conf,
...cnf
};
};
const draw = function(text, id, _version, diagObj) {
log.info("Drawing class - ", id);
const conf2 = getConfig().flowchart ?? getConfig().class;
const securityLevel = getConfig().securityLevel;
log.info("config:", conf2);
const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50;
const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50;
const g = new Graph({
multigraph: true,
compound: true
}).setGraph({
rankdir: diagObj.db.getDirection(),
nodesep: nodeSpacing,
ranksep: rankSpacing,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
const classes = diagObj.db.getClasses();
const relations = diagObj.db.getRelations();
const notes = diagObj.db.getNotes();
log.info(relations);
addClasses(classes, g, id, diagObj);
addRelations(relations, g);
addNotes(notes, g, relations.length + 1, classes);
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? (
// @ts-ignore Ignore type error for now
select(sandboxElement.nodes()[0].contentDocument.body)
) : select("body");
const svg = root.select(`[id="${id}"]`);
const element = root.select("#" + id + " g");
render(
element,
g,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
id
);
utils.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle());
setupGraphViewbox(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth);
if (!(conf2 == null ? void 0 : conf2.htmlLabels)) {
const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
for (const label of labels) {
const dim = label.getBBox();
const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute("rx", 0);
rect.setAttribute("ry", 0);
rect.setAttribute("width", dim.width);
rect.setAttribute("height", dim.height);
label.insertBefore(rect, label.firstChild);
}
}
};
function getArrowMarker(type) {
let marker;
switch (type) {
case 0:
marker = "aggregation";
break;
case 1:
marker = "extension";
break;
case 2:
marker = "composition";
break;
case 3:
marker = "dependency";
break;
case 4:
marker = "lollipop";
break;
default:
marker = "none";
}
return marker;
}
const renderer = {
setConf,
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
//# sourceMappingURL=classDiagram-v2-cd41be19.js.map
@@ -1 +0,0 @@
{"version":3,"file":"classDiagram-v2-cd41be19.js","sources":["../src/diagrams/class/classRenderer-v2.ts","../src/diagrams/class/classDiagram-v2.ts"],"sourcesContent":["// @ts-ignore d3 types are not available\nimport { select, curveLinear } from 'd3';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\nimport utils from '../../utils';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport { ClassRelation, ClassNote, ClassMap, EdgeData } from './classTypes';\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: undefined,\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param classes - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n */\nexport const addClasses = function (\n classes: ClassMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any\n) {\n const keys = Object.keys(classes);\n log.info('keys:', keys);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = classes[id];\n\n /**\n * Variable for storing the classes for the vertex\n */\n let cssClassStr = '';\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n }\n\n const styles = { labelStyle: '', style: '' }; //getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = 'class_box';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.\n *\n * @param notes - Object containing the additional vertices (notes).\n * @param g - The graph that is to be drawn.\n * @param startEdgeId - starting index for note edge\n * @param classes - Classes\n */\nexport const addNotes = function (\n notes: ClassNote[],\n g: graphlib.Graph,\n startEdgeId: number,\n classes: ClassMap\n) {\n log.info(notes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n notes.forEach(function (note, i) {\n const vertex = note;\n\n /**\n * Variable for storing the classes for the vertex\n *\n */\n const cssNoteStr = '';\n\n const styles = { labelStyle: '', style: '' };\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.text;\n\n const radius = 0;\n const shape = 'note';\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: '',\n type: 'note',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n\n if (!vertex.class || !(vertex.class in classes)) {\n return;\n }\n const edgeId = startEdgeId + i;\n\n const edgeData: EdgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: 'relation',\n pattern: 'dotted',\n // Set link type for rendering\n arrowhead: 'none',\n //Set edge extra labels\n startLabelRight: '',\n endLabelLeft: '',\n //Set relation arrow types\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none'Line truncated
@@ -1,298 +0,0 @@
import { p as parser, d as db, s as styles } from "./styles-991ebdfc.js";
import { select, curveLinear } from "d3";
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
import { l as log, c as getConfig, u as utils, o as setupGraphViewbox, k as getStylesFromArray, n as interpolateToCurve, e as common } from "./mermaid-f47111a7.js";
import { r as render } from "./index-fc10efb0.js";
import "ts-dedent";
import "dayjs";
import "@braintree/sanitize-url";
import "dompurify";
import "khroma";
import "lodash-es/memoize.js";
import "lodash-es/merge.js";
import "stylis";
import "lodash-es/isEmpty.js";
import "dagre-d3-es/src/dagre/index.js";
import "dagre-d3-es/src/graphlib/json.js";
import "./edges-d32062c0.js";
import "./createText-6b48ae7d.js";
import "mdast-util-from-markdown";
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
let conf = {
dividerMargin: 10,
padding: 5,
textHeight: 10,
curve: void 0
};
const addNamespaces = function(namespaces, g, _id, diagObj) {
const keys = Object.keys(namespaces);
log.info("keys:", keys);
log.info(namespaces);
keys.forEach(function(id) {
var _a, _b;
const vertex = namespaces[id];
const shape = "rect";
const node = {
shape,
id: vertex.id,
domId: vertex.domId,
labelText: sanitizeText(vertex.id),
labelStyle: "",
style: "fill: none; stroke: black",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
addClasses(vertex.classes, g, _id, diagObj, vertex.id);
log.info("setNode", node);
});
};
const addClasses = function(classes, g, _id, diagObj, parent) {
const keys = Object.keys(classes);
log.info("keys:", keys);
log.info(classes);
keys.filter((id) => classes[id].parent == parent).forEach(function(id) {
var _a, _b;
const vertex = classes[id];
const cssClassStr = vertex.cssClasses.join(" ");
const styles2 = getStylesFromArray(vertex.styles);
const vertexText = vertex.label ?? vertex.id;
const radius = 0;
const shape = "class_box";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
classData: vertex,
rx: radius,
ry: radius,
class: cssClassStr,
style: styles2.style,
id: vertex.id,
domId: vertex.domId,
tooltip: diagObj.db.getTooltip(vertex.id, parent) || "",
haveCallback: vertex.haveCallback,
link: vertex.link,
width: vertex.type === "group" ? 500 : void 0,
type: vertex.type,
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
if (parent) {
g.setParent(vertex.id, parent);
}
log.info("setNode", node);
});
};
const addNotes = function(notes, g, startEdgeId, classes) {
log.info(notes);
notes.forEach(function(note, i) {
var _a, _b;
const vertex = note;
const cssNoteStr = "";
const styles2 = { labelStyle: "", style: "" };
const vertexText = vertex.text;
const radius = 0;
const shape = "note";
const node = {
labelStyle: styles2.labelStyle,
shape,
labelText: sanitizeText(vertexText),
noteData: vertex,
rx: radius,
ry: radius,
class: cssNoteStr,
style: styles2.style,
id: vertex.id,
domId: vertex.id,
tooltip: "",
type: "note",
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding)
};
g.setNode(vertex.id, node);
log.info("setNode", node);
if (!vertex.class || !(vertex.class in classes)) {
return;
}
const edgeId = startEdgeId + i;
const edgeData = {
id: `edgeNote${edgeId}`,
//Set relationship style and line type
classes: "relation",
pattern: "dotted",
// Set link type for rendering
arrowhead: "none",
//Set edge extra labels
startLabelRight: "",
endLabelLeft: "",
//Set relation arrow types
arrowTypeStart: "none",
arrowTypeEnd: "none",
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf.curve, curveLinear)
};
g.setEdge(vertex.id, vertex.class, edgeData, edgeId);
});
};
const addRelations = function(relations, g) {
const conf2 = getConfig().flowchart;
let cnt = 0;
relations.forEach(function(edge) {
var _a;
cnt++;
const edgeData = {
//Set relationship style and line type
classes: "relation",
pattern: edge.relation.lineType == 1 ? "dashed" : "solid",
id: `id_${edge.id1}_${edge.id2}_${cnt}`,
// Set link type for rendering
arrowhead: edge.type === "arrow_open" ? "none" : "normal",
//Set edge extra labels
startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1,
endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2,
//Set relation arrow types
arrowTypeStart: getArrowMarker(edge.relation.type1),
arrowTypeEnd: getArrowMarker(edge.relation.type2),
style: "fill:none",
labelStyle: "",
curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear)
};
log.info(edgeData, edge);
if (edge.style !== void 0) {
const styles2 = getStylesFromArray(edge.style);
edgeData.style = styles2.style;
edgeData.labelStyle = styles2.labelStyle;
}
edge.text = edge.title;
if (edge.text === void 0) {
if (edge.style !== void 0) {
edgeData.arrowheadStyle = "fill: #333";
}
} else {
edgeData.arrowheadStyle = "fill: #333";
edgeData.labelpos = "c";
if (((_a = getConfig().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig().htmlLabels) {
edgeData.labelType = "html";
edgeData.label = '<span class="edgeLabel">' + edge.text + "</span>";
} else {
edgeData.labelType = "text";
edgeData.label = edge.text.replace(common.lineBreakRegex, "\n");
if (edge.style === void 0) {
edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none";
}
edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:");
}
}
g.setEdge(edge.id1, edge.id2, edgeData, cnt);
});
};
const setConf = function(cnf) {
conf = {
...conf,
...cnf
};
};
const draw = async function(text, id, _version, diagObj) {
log.info("Drawing class - ", id);
const conf2 = getConfig().flowchart ?? getConfig().class;
const securityLevel = getConfig().securityLevel;
log.info("config:", conf2);
const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50;
const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50;
const g = new graphlib.Graph({
multigraph: true,
compound: true
}).setGraph({
rankdir: diagObj.db.getDirection(),
nodesep: nodeSpacing,
ranksep: rankSpacing,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
const namespaces = diagObj.db.getNamespaces();
const classes = diagObj.db.getClasses();
const relations = diagObj.db.getRelations();
const notes = diagObj.db.getNotes();
log.info(relations);
addNamespaces(namespaces, g, id, diagObj);
addClasses(classes, g, id, diagObj);
addRelations(relations, g);
addNotes(notes, g, relations.length + 1, classes);
let sandboxElement;
if (securityLevel === "sandbox") {
sandboxElement = select("#i" + id);
}
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
const svg = root.select(`[id="${id}"]`);
const element = root.select("#" + id + " g");
await render(
element,
g,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
id
);
utils.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle());
setupGraphViewbox(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth);
if (!(conf2 == null ? void 0 : conf2.htmlLabels)) {
const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
for (const label of labels) {
const dim = label.getBBox();
const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute("rx", 0);
rect.setAttribute("ry", 0);
rect.setAttribute("width", dim.width);
rect.setAttribute("height", dim.height);
label.insertBefore(rect, label.firstChild);
}
}
};
function getArrowMarker(type) {
let marker;
switch (type) {
case 0:
marker = "aggregation";
break;
case 1:
marker = "extension";
break;
case 2:
marker = "composition";
break;
case 3:
marker = "dependency";
break;
case 4:
marker = "lollipop";
break;
default:
marker = "none";
}
return marker;
}
const renderer = {
setConf,
draw
};
const diagram = {
parser,
db,
renderer,
styles,
init: (cnf) => {
if (!cnf.class) {
cnf.class = {};
}
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
db.clear();
}
};
export {
diagram
};
-8
View File
@@ -1,8 +0,0 @@
import { c as r } from "./graph-dee88f0d.js";
var e = 4;
function a(o) {
return r(o, e);
}
export {
a as c
};
-8
View File
@@ -1,8 +0,0 @@
import { c as baseClone } from "./graph-af3d5df6.js";
var CLONE_SYMBOLS_FLAG = 4;
function clone(value) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
export {
clone as c
};
-59
View File
@@ -1,59 +0,0 @@
import { b as sanitizeText$1, g as getConfig } from "./config-389b86ff.js";
let title = "";
let diagramTitle = "";
let description = "";
const sanitizeText = (txt) => sanitizeText$1(txt, getConfig());
const clear = function() {
title = "";
description = "";
diagramTitle = "";
};
const setAccTitle = function(txt) {
title = sanitizeText(txt).replace(/^\s+/g, "");
};
const getAccTitle = function() {
return title || diagramTitle;
};
const setAccDescription = function(txt) {
description = sanitizeText(txt).replace(/\n\s+/g, "\n");
};
const getAccDescription = function() {
return description;
};
const setDiagramTitle = function(txt) {
diagramTitle = sanitizeText(txt);
};
const getDiagramTitle = function() {
return diagramTitle;
};
const commonDb = {
setAccTitle,
getAccTitle,
setDiagramTitle,
getDiagramTitle,
getAccDescription,
setAccDescription,
clear
};
const commonDb$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
clear,
default: commonDb,
getAccDescription,
getAccTitle,
getDiagramTitle,
setAccDescription,
setAccTitle,
setDiagramTitle
}, Symbol.toStringTag, { value: "Module" }));
export {
getAccDescription as a,
setAccDescription as b,
commonDb$1 as c,
setDiagramTitle as d,
getDiagramTitle as e,
clear as f,
getAccTitle as g,
setAccTitle as s
};
//# sourceMappingURL=commonDb-2ace122b.js.map
Loaded 100 of 1496 files, more files were not shown because too many files have changed in this diff. Show more