"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["57301"],{10317:function(e,r,t){t.r(r),t.d(r,{metadata:()=>n,contentTitle:()=>s,default:()=>f,assets:()=>c,toc:()=>d,frontMatter:()=>l});var n=JSON.parse('{"id":"api/themes/theme-mermaid","title":"\uD83D\uDCE6 theme-mermaid","description":"This theme provides a @theme/Mermaid component that is powered by mermaid. You can read more on diagrams documentation.","source":"@site/docs/api/themes/theme-mermaid.mdx","sourceDirName":"api/themes","slug":"/api/themes/@docusaurus/theme-mermaid","permalink":"/docs/api/themes/@docusaurus/theme-mermaid","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/main/website/docs/api/themes/theme-mermaid.mdx","tags":[],"version":"current","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1729684612000,"sidebarPosition":5,"frontMatter":{"sidebar_position":5,"slug":"/api/themes/@docusaurus/theme-mermaid"},"sidebar":"api","previous":{"title":"\uD83D\uDCE6 theme-search-algolia","permalink":"/docs/api/themes/@docusaurus/theme-search-algolia"},"next":{"title":"\uD83D\uDCE6 create-docusaurus","permalink":"/docs/api/misc/create-docusaurus"}}'),a=t("24246"),o=t("80980"),u=t("15398"),i=t("58636");let l={sidebar_position:5,slug:"/api/themes/@docusaurus/theme-mermaid"},s="\uD83D\uDCE6 theme-mermaid",c={},d=[{value:"Configuration",id:"configuration",level:2}];function m(e){let r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.header,{children:(0,a.jsx)(r.h1,{id:"-theme-mermaid",children:"\uD83D\uDCE6 theme-mermaid"})}),"\n",(0,a.jsxs)(r.p,{children:["This theme provides a ",(0,a.jsx)(r.code,{children:"@theme/Mermaid"})," component that is powered by ",(0,a.jsx)(r.a,{href:"https://mermaid-js.github.io/",children:"mermaid"}),". You can read more on ",(0,a.jsx)(r.a,{href:"/docs/markdown-features/diagrams",children:"diagrams"})," documentation."]}),"\n",(0,a.jsxs)(u.Z,{groupId:"npm2yarn",children:[(0,a.jsx)(i.Z,{value:"npm",children:(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-bash",children:"npm install --save @docusaurus/theme-mermaid\n"})})}),(0,a.jsx)(i.Z,{value:"yarn",label:"Yarn",children:(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-bash",children:"yarn add @docusaurus/theme-mermaid\n"})})}),(0,a.jsx)(i.Z,{value:"pnpm",label:"pnpm",children:(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-bash",children:"pnpm add @docusaurus/theme-mermaid\n"})})})]}),"\n",(0,a.jsx)(r.h2,{id:"configuration",children:"Configuration"}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-js",metastring:'title="docusaurus.config.js"',children:"export default {\n themes: ['@docusaurus/theme-mermaid'],\n // In order for Mermaid code blocks in Markdown to work,\n // you also need to enable the Remark plugin with this option\n markdown: {\n mermaid: true,\n },\n};\n"})})]})}function f(e={}){let{wrapper:r}={...(0,o.a)(),...e.components};return r?(0,a.jsx)(r,{...e,children:(0,a.jsx)(m,{...e})}):m(e)}},58636:function(e,r,t){t.d(r,{Z:()=>u});var n=t("24246");t("27378");var a=t("90496");let o="tabItem_pnkT";function u(e){var r=e.children,t=e.hidden,u=e.className;return(0,n.jsx)("div",{role:"tabpanel",className:(0,a.Z)(o,u),hidden:t,children:r})}},15398:function(e,r,t){t.d(r,{Z:()=>k});var n=t("24246"),a=t("27378"),o=t("90496"),u=t("54947"),i=t("3620"),l=t("844"),s=t("97486"),c=t("32263"),d=t("16971");function m(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t child <".concat("string"==typeof e.type?e.type:e.type.name,'>: all children of the component should be , and every should have a unique "value" prop.'))}))||void 0===r?void 0:r.filter(Boolean))&&void 0!==t?t:[]}function h(e){var r=e.value;return e.tabValues.some(function(e){return e.value===r})}var b=t("71607");let v="tabList_Qoir",y="tabItem_AQgk";function g(e){for(var r=1;r0)throw Error('Docusaurus error: Duplicate values "'.concat(r.map(function(e){return e.value}).join(", "),'" found in . Every value needs to be unique.'))}(e),e},[t,n])),V=f((0,a.useState)(function(){return function(e){var r,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw Error('Docusaurus error: The has a defaultValue "'.concat(t,'" but none of its children has the corresponding value. Available values are: ').concat(n.map(function(e){return e.value}).join(", "),". If you intend to show no default tab, use defaultValue={null} instead."));return t}var a=null!==(r=n.find(function(e){return e.default}))&&void 0!==r?r:n[0];if(!a)throw Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:k,tabValues:I})}),2),E=V[0],T=V[1];var N=f((u=(o={queryString:void 0!==S&&S,groupId:P}).queryString,m=o.groupId,b=(0,i.k6)(),v=function(e){var r=e.queryString,t=void 0!==r&&r,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:void 0!==u&&u,groupId:m}),[(0,s._X)(v),(0,a.useCallback)(function(e){if(!!v){var r,t,n=new URLSearchParams(b.location.search);n.set(v,e),b.replace((r=function(e){for(var r=1;r