diff --git a/patches/mermaid@11.2.1.patch b/patches/mermaid@11.2.1.patch index 6e9d1fc..e309fba 100644 --- a/patches/mermaid@11.2.1.patch +++ b/patches/mermaid@11.2.1.patch @@ -6,7 +6,7 @@ index 13603a2204ed75e59cdd3b59f1dad2a50a0ca1d3..946475ca2dc3522e669f56752b3e5cc1 const firstChild = svg.firstChild; const diagramClassDefs = diag.renderer.getClasses?.(text, diag); const rules = createUserStyles(config, diagramType, diagramClassDefs, idSelector); -+ const rulesDark = createUserStyles({...config2, themeVariables: theme.dark.getThemeVariables({})}, diagramType, diagramClassDefs, idSelector); ++ const rulesDark = createUserStyles({...config, themeVariables: theme.dark.getThemeVariables({})}, diagramType, diagramClassDefs, idSelector); const style1 = document.createElement("style"); - style1.innerHTML = rules; + style1.innerHTML = rules + `@media (prefers-color-scheme: dark) {${rulesDark}}`; @@ -21,7 +21,7 @@ index 2f09b512ef847144a4bcff16ab39853061f45eb4..bee36b4162e605eaa6a45f7506a40286 const firstChild = svg.firstChild; const diagramClassDefs = diag.renderer.getClasses?.(text, diag); const rules = createUserStyles(config, diagramType, diagramClassDefs, idSelector); -+ const rulesDark = createUserStyles({...config2, themeVariables: theme.dark.getThemeVariables({})}, diagramType, diagramClassDefs, idSelector); ++ const rulesDark = createUserStyles({...config, themeVariables: theme.dark.getThemeVariables({})}, diagramType, diagramClassDefs, idSelector); const style1 = document.createElement("style"); - style1.innerHTML = rules; + style1.innerHTML = rules + `@media (prefers-color-scheme: dark) {${rulesDark}}`; @@ -36,7 +36,7 @@ index 36adb8de5ea722a4c23798b47045faf08a8c7e4f..7f06dd6cfc71bb0b0cb8ac2c62fcc485 const firstChild = svg.firstChild; const diagramClassDefs = diag.renderer.getClasses?.(text2, diag); const rules = createUserStyles(config6, diagramType, diagramClassDefs, idSelector); -+ const rulesDark = createUserStyles({...config2, themeVariables: theme.dark.getThemeVariables({})}, diagramType, diagramClassDefs, idSelector); ++ const rulesDark = createUserStyles({...config6, themeVariables: theme.dark.getThemeVariables({})}, diagramType, diagramClassDefs, idSelector); const style1 = document.createElement("style"); - style1.innerHTML = rules; + style1.innerHTML = rules + `@media (prefers-color-scheme: dark) {${rulesDark}}`; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 08f8238..b72e1a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: patchedDependencies: mermaid@11.2.1: - hash: bay2jxhes346iob5ldnhs6vake + hash: e6uknvsvtfunb4ysvwdugjzooa path: patches/mermaid@11.2.1.patch pjax@0.2.8: hash: iuixa4ml5tqviea274csqnnr7a @@ -90,7 +90,7 @@ importers: version: 2.1.2 mermaid: specifier: ^11.2.1 - version: 11.2.1(patch_hash=bay2jxhes346iob5ldnhs6vake) + version: 11.2.1(patch_hash=e6uknvsvtfunb4ysvwdugjzooa) nprogress: specifier: ^0.2.0 version: 0.2.0 @@ -4793,7 +4793,7 @@ snapshots: merge2@1.4.1: {} - mermaid@11.2.1(patch_hash=bay2jxhes346iob5ldnhs6vake): + mermaid@11.2.1(patch_hash=e6uknvsvtfunb4ysvwdugjzooa): dependencies: '@braintree/sanitize-url': 7.1.0 '@iconify/utils': 2.1.33