diff --git a/package.json b/package.json index 1bc6433f75b2a..16ce48579b1d5 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "js-yaml": "^4.1.0", "match-sorter": "^6.3.4", "mdx-bundler": "^10.0.1", - "mermaid": "^11.4.0", + "mermaid": "^11.11.0", "micromark": "^4.0.0", "next": "15.1.7", "next-mdx-remote": "^4.4.1", @@ -106,6 +106,7 @@ "search-insights": "^2.17.2", "server-only": "^0.0.1", "sharp": "^0.33.4", + "svg-pan-zoom": "^3.6.2", "tailwindcss-scoped-preflight": "^3.0.4", "textarea-markdown-editor": "^1.0.4", "unified": "^11.0.5", @@ -149,4 +150,4 @@ "node": "22.16.0", "yarn": "1.22.22" } -} \ No newline at end of file +} diff --git a/src/components/mermaid.tsx b/src/components/mermaid.tsx index 75893c458d865..b2d96e199e9cf 100644 --- a/src/components/mermaid.tsx +++ b/src/components/mermaid.tsx @@ -2,94 +2,97 @@ import {useEffect, useState} from 'react'; import {useTheme} from 'next-themes'; -/** - * we target ```mermaid``` code blocks after they have been highlighted (not ideal), - * then we strip the code from the html elements used for highlighting - * then we render the mermaid chart both in light and dark modes - * CSS takes care of showing the right one depending on the theme - */ export default function Mermaid() { const [isDoneRendering, setDoneRendering] = useState(false); const {resolvedTheme: theme} = useTheme(); + useEffect(() => { const renderMermaid = async () => { - const escapeHTML = (str: string) => { - return str.replace(/[&<>"']/g, function (match) { - const escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - }; - return escapeMap[match]; - }); - }; const mermaidBlocks = document.querySelectorAll('.language-mermaid'); - if (mermaidBlocks.length === 0) { - return; - } - // we have to dig like this as the nomral import doesn't work + if (mermaidBlocks.length === 0) return; + + const escapeHTML = (str: string) => + str.replace( + /[&<>"']/g, + match => + ({ + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + })[match] || match + ); + const {default: mermaid} = await import('mermaid/dist/mermaid.esm.min.mjs'); - mermaid.initialize({startOnLoad: false}); - mermaidBlocks.forEach(lightModeblock => { - // get rid of code highlighting - const code = lightModeblock.textContent ?? ''; - lightModeblock.innerHTML = escapeHTML(code); - // force transparent background - lightModeblock.style.backgroundColor = 'transparent'; - lightModeblock.classList.add('light'); - const parentCodeTabs = lightModeblock.closest('.code-tabs-wrapper'); - if (!parentCodeTabs) { - // eslint-disable-next-line no-console - console.error('Mermaid code block was not wrapped in a code tab'); - return; - } - // empty the container - parentCodeTabs.innerHTML = ''; - parentCodeTabs.appendChild(lightModeblock.cloneNode(true)); + const svgPanZoom = (await import('svg-pan-zoom')).default; + + // Create light and dark versions + mermaidBlocks.forEach(block => { + const code = block.textContent ?? ''; + block.innerHTML = escapeHTML(code); + block.style.backgroundColor = 'transparent'; + block.classList.add('light'); - const darkModeBlock = lightModeblock.cloneNode(true) as HTMLPreElement; - darkModeBlock.classList.add('dark'); - darkModeBlock.classList.remove('light'); - parentCodeTabs?.appendChild(darkModeBlock); + const parentCodeTabs = block.closest('.code-tabs-wrapper'); + const darkBlock = block.cloneNode(true) as HTMLDivElement; + darkBlock.classList.replace('light', 'dark'); + + if (parentCodeTabs) { + parentCodeTabs.innerHTML = ''; + parentCodeTabs.append(block, darkBlock); + } else { + const wrapper = document.createElement('div'); + wrapper.className = 'mermaid-theme-wrapper'; + block.parentNode?.insertBefore(wrapper, block); + wrapper.append(block, darkBlock); + } }); + + // Render both themes + mermaid.initialize({startOnLoad: false, theme: 'default'}); await mermaid.run({nodes: document.querySelectorAll('.language-mermaid.light')}); mermaid.initialize({startOnLoad: false, theme: 'dark'}); - await mermaid - .run({nodes: document.querySelectorAll('.language-mermaid.dark')}) - .then(() => setDoneRendering(true)); + await mermaid.run({nodes: document.querySelectorAll('.language-mermaid.dark')}); + + // Initialize pan/zoom for all SVGs (including hidden ones) + document.querySelectorAll('.language-mermaid svg').forEach(svg => { + const svgElement = svg as SVGSVGElement; + const rect = svgElement.getBoundingClientRect(); + + if (rect.width > 0 && rect.height > 0) { + svgElement.setAttribute('width', rect.width.toString()); + svgElement.setAttribute('height', rect.height.toString()); + } + + svgPanZoom(svgElement, { + zoomEnabled: true, + panEnabled: true, + controlIconsEnabled: true, + fit: true, + center: true, + minZoom: 0.1, + maxZoom: 10, + zoomScaleSensitivity: 0.2, + }); + }); + + setDoneRendering(true); }; + renderMermaid(); }, []); - // we have to wait for mermaid.js to finish rendering both light and dark charts - // before we hide one of them depending on the theme - // this is necessary because mermaid.js relies on the DOM for calculations + return isDoneRendering ? ( - theme === 'dark' ? ( - - ) : ( - - ) + ) : null; } diff --git a/yarn.lock b/yarn.lock index e3252dcba8b4e..c904828fa55b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -174,18 +174,18 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@antfu/install-pkg@^0.4.0": - version "0.4.1" - resolved "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-0.4.1.tgz" - integrity sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw== +"@antfu/install-pkg@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-1.1.0.tgz#78fa036be1a6081b5a77a5cf59f50c7752b6ba26" + integrity sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ== dependencies: - package-manager-detector "^0.2.0" - tinyexec "^0.3.0" + package-manager-detector "^1.3.0" + tinyexec "^1.0.1" -"@antfu/utils@^0.7.10": - version "0.7.10" - resolved "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.10.tgz" - integrity sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww== +"@antfu/utils@^9.2.0": + version "9.2.0" + resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-9.2.0.tgz#0f55b14d51408413dee17bbffb2cf06a0dd3f60b" + integrity sha512-Oq1d9BGZakE/FyoEtcNeSwM7MpDO2vUBi11RWBZXf75zPsbUVWmUs03EqkRFrcgbXyKTas0BdZWC1wcuSoqSAw== "@ariakit/core@0.4.13": version "0.4.13" @@ -1156,10 +1156,10 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@braintree/sanitize-url@^7.0.1": - version "7.1.0" - resolved "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.0.tgz" - integrity sha512-o+UlMLt49RvtCASlOMW0AkHnabN9wR9rwCCherxO0yG4Npy34GkvrAqdXQvrhNs+jh+gkK8gB8Lf05qL/O7KWg== +"@braintree/sanitize-url@^7.0.4": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-7.1.1.tgz#15e19737d946559289b915e5dad3b4c28407735e" + integrity sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw== "@chevrotain/cst-dts-gen@11.0.3": version "11.0.3" @@ -1634,18 +1634,19 @@ resolved "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz" integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== -"@iconify/utils@^2.1.32": - version "2.1.33" - resolved "https://registry.npmjs.org/@iconify/utils/-/utils-2.1.33.tgz" - integrity sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw== +"@iconify/utils@^3.0.1": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-3.0.2.tgz#9599607f20690cd3e7a5d2d459af0eb81a89dc2b" + integrity sha512-EfJS0rLfVuRuJRn4psJHtK2A9TqVnkxPpHY6lYHiB9+8eSuudsxbwMiavocG45ujOo6FJ+CIRlRnlOGinzkaGQ== dependencies: - "@antfu/install-pkg" "^0.4.0" - "@antfu/utils" "^0.7.10" + "@antfu/install-pkg" "^1.1.0" + "@antfu/utils" "^9.2.0" "@iconify/types" "^2.0.0" - debug "^4.3.6" + debug "^4.4.1" + globals "^15.15.0" kolorist "^1.8.0" - local-pkg "^0.5.0" - mlly "^1.7.1" + local-pkg "^1.1.1" + mlly "^1.7.4" "@img/sharp-darwin-arm64@0.33.5": version "0.33.5" @@ -2107,12 +2108,12 @@ dependencies: "@types/mdx" "^2.0.0" -"@mermaid-js/parser@^0.3.0": - version "0.3.0" - resolved "https://registry.npmjs.org/@mermaid-js/parser/-/parser-0.3.0.tgz" - integrity sha512-HsvL6zgE5sUPGgkIDlmAWR1HTNHz2Iy11BAWPTa4Jjabkpguy4Ze2gzfLrg6pdRuBvFwgUYyxiaNqZwrEEXepA== +"@mermaid-js/parser@^0.6.2": + version "0.6.2" + resolved "https://registry.yarnpkg.com/@mermaid-js/parser/-/parser-0.6.2.tgz#6d505a33acb52ddeb592c596b14f9d92a30396a9" + integrity sha512-+PO02uGF6L6Cs0Bw8RpGhikVvMWEysfAyl27qTlroUB8jSWr1lL0Sf6zi78ZxlSnmgSY2AMMKVgghnN9jTtwkQ== dependencies: - langium "3.0.0" + langium "3.3.1" "@next/env@15.1.7": version "15.1.7" @@ -4755,7 +4756,7 @@ dependencies: "@types/ms" "*" -"@types/dompurify@3.0.5", "@types/dompurify@^3.0.5": +"@types/dompurify@3.0.5": version "3.0.5" resolved "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz" integrity sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg== @@ -5387,6 +5388,11 @@ acorn@^8.0.0, acorn@^8.1.0, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.2.4, acorn@^8 resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== +acorn@^8.15.0: + version "8.15.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== + agent-base@6: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" @@ -6155,6 +6161,11 @@ confbox@^0.1.8: resolved "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz" integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== +confbox@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.2.2.tgz#8652f53961c74d9e081784beed78555974a9c110" + integrity sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ== + convert-source-map@^1.5.0: version "1.9.0" resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" @@ -6289,10 +6300,10 @@ cytoscape-fcose@^2.2.0: dependencies: cose-base "^2.2.0" -cytoscape@^3.29.2: - version "3.30.3" - resolved "https://registry.npmjs.org/cytoscape/-/cytoscape-3.30.3.tgz" - integrity sha512-HncJ9gGJbVtw7YXtIs3+6YAFSSiKsom0amWc33Z7QbylbY2JGMrA0yz4EwrdTScZxnwclXeEZHzO5pxoy0ZE4g== +cytoscape@^3.29.3: + version "3.33.1" + resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.33.1.tgz#449e05d104b760af2912ab76482d24c01cdd4c97" + integrity sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ== "d3-array@1 - 2": version "2.12.1" @@ -6623,12 +6634,12 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -dayjs@^1.11.10: - version "1.11.13" - resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz" - integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== +dayjs@^1.11.13: + version "1.11.18" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.18.tgz#835fa712aac52ab9dec8b1494098774ed7070a11" + integrity sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA== -debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6: +debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5: version "4.3.7" resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== @@ -6649,6 +6660,13 @@ debug@^4.4.0: dependencies: ms "^2.1.3" +debug@^4.4.1: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + decimal.js@^10.2.1, decimal.js@^10.4.2: version "10.4.3" resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz" @@ -6854,7 +6872,7 @@ domhandler@^4.2.0, domhandler@^4.3.1: dependencies: domelementtype "^2.2.0" -dompurify@3.2.4, dompurify@^3.0.0, "dompurify@^3.0.11 <3.1.7": +dompurify@3.2.4, dompurify@^3.0.0, dompurify@^3.2.5: version "3.2.4" resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.4.tgz#af5a5a11407524431456cf18836c55d13441cd8e" integrity sha512-ysFSFEDVduQpyhzAob/kkuJjf5zWkZD8/A9ywSp1byueyuCfHamrCBa14/Oc2iiB0e51B+NpxSl5gmzn+Ms/mg== @@ -7634,6 +7652,11 @@ expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" +exsolve@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/exsolve/-/exsolve-1.0.7.tgz#3b74e4c7ca5c5f9a19c3626ca857309fa99f9e9e" + integrity sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw== + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz" @@ -8010,6 +8033,11 @@ globals@^13.19.0: dependencies: type-fest "^0.20.2" +globals@^15.15.0: + version "15.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.15.0.tgz#7c4761299d41c32b075715a4ce1ede7897ff72a8" + integrity sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg== + globalthis@^1.0.3, globalthis@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz" @@ -9619,10 +9647,10 @@ jws@^4.0.0: jwa "^2.0.0" safe-buffer "^5.0.1" -katex@^0.16.9: - version "0.16.21" - resolved "https://registry.npmjs.org/katex/-/katex-0.16.21.tgz" - integrity sha512-XvqR7FgOHtWupfMiigNzmh+MgUVmDGU2kXZm899ZkPfcuoPuFxyHmXsgATDpFZDAXCI8tvinaVcDo8PIIJSo4A== +katex@^0.16.22: + version "0.16.22" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.22.tgz#d2b3d66464b1e6d69e6463b28a86ced5a02c5ccd" + integrity sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg== dependencies: commander "^8.3.0" @@ -9658,10 +9686,10 @@ kolorist@^1.8.0: resolved "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz" integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ== -langium@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/langium/-/langium-3.0.0.tgz" - integrity sha512-+Ez9EoiByeoTu/2BXmEaZ06iPNXM6thWJp02KfBO/raSMyCJ4jw7AkWWa+zBCTm0+Tw1Fj9FOxdqSskyN5nAwg== +langium@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/langium/-/langium-3.3.1.tgz#da745a40d5ad8ee565090fed52eaee643be4e591" + integrity sha512-QJv/h939gDpvT+9SiLVlY7tZC3xB2qK57v0J04Sh9wpMb6MP1q8gB21L3WIo8T5P1MSMg3Ep14L7KkDCFG3y4w== dependencies: chevrotain "~11.0.3" chevrotain-allstar "~0.3.0" @@ -9727,13 +9755,14 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -local-pkg@^0.5.0: - version "0.5.1" - resolved "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz" - integrity sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ== +local-pkg@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-1.1.2.tgz#c03d208787126445303f8161619dc701afa4abb5" + integrity sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A== dependencies: - mlly "^1.7.3" - pkg-types "^1.2.1" + mlly "^1.7.4" + pkg-types "^2.3.0" + quansync "^0.2.11" locate-path@^5.0.0: version "5.0.0" @@ -9863,10 +9892,10 @@ markdown-table@^3.0.0: resolved "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz" integrity sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw== -marked@^13.0.2: - version "13.0.3" - resolved "https://registry.npmjs.org/marked/-/marked-13.0.3.tgz" - integrity sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA== +marked@^15.0.7: + version "15.0.12" + resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.12.tgz#30722c7346e12d0a2d0207ab9b0c4f0102d86c4e" + integrity sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA== match-sorter@^6.3.4: version "6.4.0" @@ -10230,32 +10259,31 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -mermaid@^11.4.0: - version "11.4.0" - resolved "https://registry.npmjs.org/mermaid/-/mermaid-11.4.0.tgz" - integrity sha512-mxCfEYvADJqOiHfGpJXLs4/fAjHz448rH0pfY5fAoxiz70rQiDSzUUy4dNET2T08i46IVpjohPd6WWbzmRHiPA== +mermaid@^11.11.0: + version "11.11.0" + resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-11.11.0.tgz#860830d711663a385c8ddf9abf15beef15fcc675" + integrity sha512-9lb/VNkZqWTRjVgCV+l1N+t4kyi94y+l5xrmBmbbxZYkfRl5hEDaTPMOcaWKCl1McG8nBEaMlWwkcAEEgjhBgg== dependencies: - "@braintree/sanitize-url" "^7.0.1" - "@iconify/utils" "^2.1.32" - "@mermaid-js/parser" "^0.3.0" + "@braintree/sanitize-url" "^7.0.4" + "@iconify/utils" "^3.0.1" + "@mermaid-js/parser" "^0.6.2" "@types/d3" "^7.4.3" - "@types/dompurify" "^3.0.5" - cytoscape "^3.29.2" + cytoscape "^3.29.3" cytoscape-cose-bilkent "^4.1.0" cytoscape-fcose "^2.2.0" d3 "^7.9.0" d3-sankey "^0.12.3" dagre-d3-es "7.0.11" - dayjs "^1.11.10" - dompurify "^3.0.11 <3.1.7" - katex "^0.16.9" + dayjs "^1.11.13" + dompurify "^3.2.5" + katex "^0.16.22" khroma "^2.1.0" lodash-es "^4.17.21" - marked "^13.0.2" + marked "^15.0.7" roughjs "^4.6.6" - stylis "^4.3.1" + stylis "^4.3.6" ts-dedent "^2.2.0" - uuid "^9.0.1" + uuid "^11.1.0" micromark-core-commonmark@^1.0.0, micromark-core-commonmark@^1.0.1: version "1.1.0" @@ -11014,15 +11042,15 @@ minipass@^4.2.4: resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -mlly@^1.7.1, mlly@^1.7.2, mlly@^1.7.3: - version "1.7.3" - resolved "https://registry.npmjs.org/mlly/-/mlly-1.7.3.tgz" - integrity sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A== +mlly@^1.7.4: + version "1.8.0" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.8.0.tgz#e074612b938af8eba1eaf43299cbc89cb72d824e" + integrity sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g== dependencies: - acorn "^8.14.0" - pathe "^1.1.2" - pkg-types "^1.2.1" - ufo "^1.5.4" + acorn "^8.15.0" + pathe "^2.0.3" + pkg-types "^1.3.1" + ufo "^1.6.1" module-details-from-path@^1.0.3: version "1.0.3" @@ -11318,10 +11346,10 @@ package-json-from-dist@^1.0.0: resolved "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz" integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== -package-manager-detector@^0.2.0: - version "0.2.4" - resolved "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.4.tgz" - integrity sha512-H/OUu9/zUfP89z1APcBf2X8Us0tt8dUK4lUmKqz12QNXif3DxAs1/YqjGtcutZi1zQqeNQRWr9C+EbQnnvSSFA== +package-manager-detector@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-1.3.0.tgz#b42d641c448826e03c2b354272456a771ce453c0" + integrity sha512-ZsEbbZORsyHuO00lY1kV3/t72yp6Ysay6Pd17ZAlNGuGwmWDLCJxFpRs0IzfXfj1o4icJOkUEioexFHzyPurSQ== parent-module@^1.0.0: version "1.0.1" @@ -11416,12 +11444,7 @@ path-type@^4.0.0: resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathe@^1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz" - integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== - -pathe@^2.0.3: +pathe@^2.0.1, pathe@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== @@ -11511,14 +11534,23 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkg-types@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz" - integrity sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw== +pkg-types@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.3.1.tgz#bd7cc70881192777eef5326c19deb46e890917df" + integrity sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ== dependencies: confbox "^0.1.8" - mlly "^1.7.2" - pathe "^1.1.2" + mlly "^1.7.4" + pathe "^2.0.1" + +pkg-types@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-2.3.0.tgz#037f2c19bd5402966ff6810e32706558cb5b5726" + integrity sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig== + dependencies: + confbox "^0.2.2" + exsolve "^1.0.7" + pathe "^2.0.3" platformicons@^8.0.4: version "8.0.4" @@ -11748,6 +11780,11 @@ pure-rand@^6.0.0: resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz" integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== +quansync@^0.2.11: + version "0.2.11" + resolved "https://registry.yarnpkg.com/quansync/-/quansync-0.2.11.tgz#f9c3adda2e1272e4f8cf3f1457b04cbdb4ee692a" + integrity sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA== + query-string@^6.13.1: version "6.14.1" resolved "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz" @@ -13172,10 +13209,10 @@ stylis@4.2.0: resolved "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz" integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw== -stylis@^4.3.1: - version "4.3.4" - resolved "https://registry.npmjs.org/stylis/-/stylis-4.3.4.tgz" - integrity sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now== +stylis@^4.3.6: + version "4.3.6" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.6.tgz#7c7b97191cb4f195f03ecab7d52f7902ed378320" + integrity sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ== sucrase@^3.35.0: version "3.35.0" @@ -13209,6 +13246,11 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +svg-pan-zoom@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/svg-pan-zoom/-/svg-pan-zoom-3.6.2.tgz#be136506211b242627a234a9656f8128fcbbabed" + integrity sha512-JwnvRWfVKw/Xzfe6jriFyfey/lWJLq4bUh2jwoR5ChWQuQoOH8FEh1l/bEp46iHHKHEJWIyFJETbazraxNWECg== + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz" @@ -13303,16 +13345,16 @@ tinybench@^2.9.0: resolved "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz" integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== -tinyexec@^0.3.0: - version "0.3.1" - resolved "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz" - integrity sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ== - tinyexec@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.2.tgz#941794e657a85e496577995c6eef66f53f42b3d2" integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA== +tinyexec@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-1.0.1.tgz#70c31ab7abbb4aea0a24f55d120e5990bfa1e0b1" + integrity sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw== + tinypool@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-1.0.2.tgz#706193cc532f4c100f66aa00b01c42173d9051b2" @@ -13549,10 +13591,10 @@ typescript@^5: resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz" integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== -ufo@^1.5.4: - version "1.5.4" - resolved "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz" - integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== +ufo@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.6.1.tgz#ac2db1d54614d1b22c1d603e3aef44a85d8f146b" + integrity sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA== uglify-js@^3.0.0: version "3.19.3" @@ -13871,6 +13913,11 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2: resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +uuid@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-11.1.0.tgz#9549028be1753bb934fc96e2bca09bb4105ae912" + integrity sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A== + uuid@^8.0.0: version "8.3.2" resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz"