Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/mermaid-v12-redux-themes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@alauda/doom": minor
---

Upgrade Mermaid to v12.2.0 and switch the site defaults to `redux-color` / `redux-dark-color`.

Mermaid 12 makes `redux-color` and the `neo` look the default for many diagram types, and lays those types out with ELK. Doom used to force `theme: default` in light mode and `theme: dark` in dark mode, which would have kept the old palette after the upgrade. Light mode now names `redux-color`; dark mode names `redux-dark-color`, because Mermaid does not pick that palette from `dark` on its own.

Diagrams that do not set `theme`, `look`, or `layout` in front matter will look different.
2 changes: 1 addition & 1 deletion packages/doom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"mdast-util-phrasing": "^4.1.0",
"mdast-util-to-markdown": "^2.1.2",
"mdast-util-to-string": "^4.0.0",
"mermaid": "^11.15.0",
"mermaid": "^12.2.0",
"openai": "^6.38.0",
"openapi-types": "^12.1.3",
"p-ratelimit": "^1.0.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/doom/src/runtime/components/Mermaid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const Mermaid = ({ className, children }: MermaidProps) => {
useEffect(() => {
const container = containerRef.current!

mermaid.initialize({ theme: isDark ? 'dark' : 'default' })
// Dark has to be named; `theme: dark` would keep the old palette.
mermaid.initialize({ theme: isDark ? 'redux-dark-color' : 'redux-color' })

const render = async () => {
const { svg, diagramType, bindFunctions } = await mermaid.render(
Expand Down
139 changes: 97 additions & 42 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ __metadata:
mdast-util-phrasing: "npm:^4.1.0"
mdast-util-to-markdown: "npm:^2.1.2"
mdast-util-to-string: "npm:^4.0.0"
mermaid: "npm:^11.15.0"
mermaid: "npm:^12.2.0"
openai: "npm:^6.38.0"
openapi-types: "npm:^12.1.3"
p-ratelimit: "npm:^1.0.1"
Expand Down Expand Up @@ -696,7 +696,7 @@ __metadata:
languageName: node
linkType: hard

"@braintree/sanitize-url@npm:^7.1.1":
"@braintree/sanitize-url@npm:^7.1.2":
version: 7.1.2
resolution: "@braintree/sanitize-url@npm:7.1.2"
checksum: 10c0/62f2aa0cf58626e3880b2dc1025c42064b4639abd157ae4e1c35f4c2f5031e9273772046a423979845069c814e27ff818e8e669280dc53585e6f033d5b7a59cb
Expand Down Expand Up @@ -964,10 +964,43 @@ __metadata:
languageName: node
linkType: hard

"@chevrotain/types@npm:~11.1.1":
version: 11.1.2
resolution: "@chevrotain/types@npm:11.1.2"
checksum: 10c0/c0c4679a3d407df34e18d5adfa7ac599b4a2bfddbf68da6e43678b9b3e16ab911de7766b37b9fc466261c3dead3db1b620e2e344f800fa9f0f381720475eda8f
"@chevrotain/cst-dts-gen@npm:13.2.0":
version: 13.2.0
resolution: "@chevrotain/cst-dts-gen@npm:13.2.0"
dependencies:
"@chevrotain/gast": "npm:13.2.0"
"@chevrotain/types": "npm:13.2.0"
checksum: 10c0/844c3bbed4b55e428597dca6e33d34073971c2a0d28a1e804995a89581d2de598d9823a44b6b45651aa8364fe46495fbe31074a319b99fb53123870b898c8718
languageName: node
linkType: hard

"@chevrotain/gast@npm:13.2.0":
version: 13.2.0
resolution: "@chevrotain/gast@npm:13.2.0"
dependencies:
"@chevrotain/types": "npm:13.2.0"
checksum: 10c0/57b87780cb8941fa04781177fc73b40adc091b0daf822d45124bd1096f8b7b1c936013222e2f29cdb847bcb09e36586e8eb04710a8b8c9b65c91842e8bd5e703
languageName: node
linkType: hard

"@chevrotain/regexp-to-ast@npm:13.2.0":
version: 13.2.0
resolution: "@chevrotain/regexp-to-ast@npm:13.2.0"
checksum: 10c0/ddba2885059d83b6cb56df12b6b30d96bcd8c90f1b43f541d8a9e9eeafcba37c7542ecf17b1a15d5a8f2ea9c969717523069bf034cf931003e91a2039c1c06e1
languageName: node
linkType: hard

"@chevrotain/types@npm:13.2.0, @chevrotain/types@npm:~13.2.0":
version: 13.2.0
resolution: "@chevrotain/types@npm:13.2.0"
checksum: 10c0/89375750866db94ff957bc1468bad71c7522fe46f314c395d81fa748f71f80b249cb09073de4def3de81a9bc98b2c4533d634845be0400bf7710901d831ca505
languageName: node
linkType: hard

"@chevrotain/utils@npm:13.2.0":
version: 13.2.0
resolution: "@chevrotain/utils@npm:13.2.0"
checksum: 10c0/4d87dd83f865d2a868d0eeca36f330dd397967f224505b6aaf4492703b3f385646378c4a905594a483d1b7d9651e000292253ca4e1e17c521811b23f6a06fec8
languageName: node
linkType: hard

Expand Down Expand Up @@ -2385,12 +2418,12 @@ __metadata:
languageName: node
linkType: hard

"@mermaid-js/parser@npm:^1.1.1":
version: 1.1.1
resolution: "@mermaid-js/parser@npm:1.1.1"
"@mermaid-js/parser@npm:^2.0.1":
version: 2.0.1
resolution: "@mermaid-js/parser@npm:2.0.1"
dependencies:
"@chevrotain/types": "npm:~11.1.1"
checksum: 10c0/66414d9d66f3a86a6751427cb8890a00beaaee2b7eba34c21b34b60cdaf9237d21e9b50b9bf1f560a01a600ee332d33b949fd8f12cbda3238aba50edc0dfdf15
"@chevrotain/types": "npm:~13.2.0"
checksum: 10c0/15ef44aac5dd772d0b28b62fa97ef30440561fa9f8008267da885a73a8e2e2940af350214664f125244a1571729257c3b2e28af7c1f5e6060f4b23701a73efcc
languageName: node
linkType: hard

Expand Down Expand Up @@ -5350,6 +5383,19 @@ __metadata:
languageName: node
linkType: hard

"chevrotain@npm:~13.2.0":
version: 13.2.0
resolution: "chevrotain@npm:13.2.0"
dependencies:
"@chevrotain/cst-dts-gen": "npm:13.2.0"
"@chevrotain/gast": "npm:13.2.0"
"@chevrotain/regexp-to-ast": "npm:13.2.0"
"@chevrotain/types": "npm:13.2.0"
"@chevrotain/utils": "npm:13.2.0"
checksum: 10c0/f7384a69c4ef7d43be6fd63a9447af5877de7b66842638d8568a85e7f404a278495d68f0fd9024f12aec886aee9b888c544734549b9c95e03f6e4c6e87fcb1cf
languageName: node
linkType: hard

"chokidar@npm:^4.0.0":
version: 4.0.3
resolution: "chokidar@npm:4.0.3"
Expand Down Expand Up @@ -5515,10 +5561,10 @@ __metadata:
languageName: node
linkType: hard

"commander@npm:^8.3.0":
version: 8.3.0
resolution: "commander@npm:8.3.0"
checksum: 10c0/8b043bb8322ea1c39664a1598a95e0495bfe4ca2fad0d84a92d7d1d8d213e2a155b441d2470c8e08de7c4a28cf2bc6e169211c49e1b21d9f7edc6ae4d9356060
"commander@npm:^15.0.0":
version: 15.0.0
resolution: "commander@npm:15.0.0"
checksum: 10c0/539229c171914ea1ccd45ee5f10d924289a12a684ea3a7a44147abe54003c35ed6de9ae4ad198d88c29fdf403dca0428451a388234e6dc01b6faa978fb207206
languageName: node
linkType: hard

Expand Down Expand Up @@ -5816,10 +5862,10 @@ __metadata:
languageName: node
linkType: hard

"cytoscape@npm:^3.33.1":
version: 3.33.3
resolution: "cytoscape@npm:3.33.3"
checksum: 10c0/f0d01f682d3e443cbeea9aa294ccd6934442362df3ce259e7b0fe3b9a8ce534d901840c503db8b53da814542bc1508f7f14a69e4fe725f919c25483a7200efe7
"cytoscape@npm:^3.34.0":
version: 3.34.4
resolution: "cytoscape@npm:3.34.4"
checksum: 10c0/4dcd1f0a0ff61df5d3cfd4359426403e70fdc4c8d38c6c246506b3789514001c46c46cf54575455ab03736920dc09c497a40eaa20d61798f5a2bc31f7f038940
languageName: node
linkType: hard

Expand Down Expand Up @@ -6200,10 +6246,10 @@ __metadata:
languageName: node
linkType: hard

"dayjs@npm:^1.11.19":
version: 1.11.20
resolution: "dayjs@npm:1.11.20"
checksum: 10c0/8af525e2aa100c8db9923d706c42b2b2d30579faf89456619413a5c10916efc92c2b166e193c27c02eb3174b30aa440ee1e7b72b0a2876b3da651d204db848a0
"dayjs@npm:^1.11.21":
version: 1.11.23
resolution: "dayjs@npm:1.11.23"
checksum: 10c0/69ab04bf19c676e44ab50cc2fca223d265f3dafd107151ef3b0f3ad74d360c37caa602abe62f87cb25d90bd9f6bee003698af47df5b0dbf10a998b7b5f3bb3f1
languageName: node
linkType: hard

Expand Down Expand Up @@ -6354,15 +6400,15 @@ __metadata:
languageName: node
linkType: hard

"dompurify@npm:^3.3.1":
version: 3.4.2
resolution: "dompurify@npm:3.4.2"
"dompurify@npm:^3.4.12":
version: 3.4.17
resolution: "dompurify@npm:3.4.17"
dependencies:
"@types/trusted-types": "npm:^2.0.7"
dependenciesMeta:
"@types/trusted-types":
optional: true
checksum: 10c0/23ab3ab079480a49e1426c4ee7279e393913fa7f2193c4142a5be54d4163dbdd969558675876c6b8bbcbf2ad5d1bc3e00bf902acf142fff12e50274a65ae95b3
checksum: 10c0/6a12251ef5e700fc91b6d96d33e9f8b5fd590c55276f632cf42d182c5808e9f48d5bef435ab26eac235dfcc05ed8fe95e1c8308dcc502bf1050e561f14d0361a
languageName: node
linkType: hard

Expand Down Expand Up @@ -6440,6 +6486,13 @@ __metadata:
languageName: node
linkType: hard

"elkjs@npm:^0.9.3":
version: 0.9.3
resolution: "elkjs@npm:0.9.3"
checksum: 10c0/caf544ff4fce8442d1d3dd6dface176c9b2fe26fc1e34f56122828e6eef7d2d7fe70d3202f9f3ecf0feb6287d4c8430949f483e63e450a7454bb39ccffab3808
languageName: node
linkType: hard

"emoji-regex@npm:^10.2.1":
version: 10.6.0
resolution: "emoji-regex@npm:10.6.0"
Expand Down Expand Up @@ -8403,14 +8456,14 @@ __metadata:
languageName: node
linkType: hard

"katex@npm:^0.16.25":
version: 0.16.45
resolution: "katex@npm:0.16.45"
"katex@npm:^0.18.0":
version: 0.18.10
resolution: "katex@npm:0.18.10"
dependencies:
commander: "npm:^8.3.0"
commander: "npm:^15.0.0"
bin:
katex: cli.js
checksum: 10c0/f715eb9a73daff68ac14dcc8c2f47f02f5fc756a74077d22479e64e06872b2b44f0d81f1c91a98a9873722a08841388a869a0b9ddb96b224362eb8054ddf533a
checksum: 10c0/3864a236334e9c7aef906b2fdd70defb76edfe8362372ccd5504167e8b22bbc1a48210e5d03e30e464c0c0f669e6d467b3b8b01120598fb1968c275fa5059721
languageName: node
linkType: hard

Expand Down Expand Up @@ -8931,32 +8984,34 @@ __metadata:
languageName: node
linkType: hard

"mermaid@npm:^11.15.0":
version: 11.15.0
resolution: "mermaid@npm:11.15.0"
"mermaid@npm:^12.2.0":
version: 12.2.0
resolution: "mermaid@npm:12.2.0"
dependencies:
"@braintree/sanitize-url": "npm:^7.1.1"
"@braintree/sanitize-url": "npm:^7.1.2"
"@iconify/utils": "npm:^3.0.2"
"@mermaid-js/parser": "npm:^1.1.1"
"@mermaid-js/parser": "npm:^2.0.1"
"@types/d3": "npm:^7.4.3"
"@upsetjs/venn.js": "npm:^2.0.0"
cytoscape: "npm:^3.33.1"
chevrotain: "npm:~13.2.0"
cytoscape: "npm:^3.34.0"
cytoscape-cose-bilkent: "npm:^4.1.0"
cytoscape-fcose: "npm:^2.2.0"
d3: "npm:^7.9.0"
d3-sankey: "npm:^0.12.3"
dagre-d3-es: "npm:7.0.14"
dayjs: "npm:^1.11.19"
dompurify: "npm:^3.3.1"
dayjs: "npm:^1.11.21"
dompurify: "npm:^3.4.12"
elkjs: "npm:^0.9.3"
es-toolkit: "npm:^1.45.1"
katex: "npm:^0.16.25"
katex: "npm:^0.18.0"
khroma: "npm:^2.1.0"
marked: "npm:^16.3.0"
roughjs: "npm:^4.6.6"
stylis: "npm:^4.3.6"
ts-dedent: "npm:^2.2.0"
uuid: "npm:^11.1.0 || ^12 || ^13 || ^14.0.0"
checksum: 10c0/9085b47c30b66a1e94e07c93951d9e53e5c89ec8c9fff8814233bddeecf6b8eaf9036d3168e4d1360c3f5d07cd051c666da96860eb0f22f064bd749499a0c83f
checksum: 10c0/6b9e745667febde92ce9c01f1ee8dcd8df77b489a724a131c5340895f12d85de36fd7c52477e6cfb69aa43c2e74bd420b8adb4e9b78c430c4a7f5a5dfe8ad784
languageName: node
linkType: hard

Expand Down
Loading