@alauda/doom 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,9 +9,11 @@ export const Mermaid = ({ className, children }) => {
|
|
|
9
9
|
const containerRef = useRef(null);
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
const container = containerRef.current;
|
|
12
|
-
|
|
12
|
+
// Dark has to be named; `theme: dark` would keep the old palette.
|
|
13
|
+
mermaid.initialize({ theme: isDark ? 'redux-dark-color' : 'redux-color' });
|
|
13
14
|
const render = async () => {
|
|
14
|
-
|
|
15
|
+
// Measure labels with the same document styles used to display the SVG.
|
|
16
|
+
const { svg, diagramType, bindFunctions } = await mermaid.render(`mermaid-${id.slice(1, -1)}`, children, container);
|
|
15
17
|
container.classList.add(diagramType);
|
|
16
18
|
container.innerHTML = svg;
|
|
17
19
|
bindFunctions?.(container);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"mdast-util-phrasing": "^4.1.0",
|
|
82
82
|
"mdast-util-to-markdown": "^2.1.2",
|
|
83
83
|
"mdast-util-to-string": "^4.0.0",
|
|
84
|
-
"mermaid": "^
|
|
84
|
+
"mermaid": "^12.2.0",
|
|
85
85
|
"openai": "^6.38.0",
|
|
86
86
|
"openapi-types": "^12.1.3",
|
|
87
87
|
"p-ratelimit": "^1.0.1",
|