nested-markdown 0.0.11 → 0.0.12
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.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28253,7 +28253,7 @@ var MermaidClient = ({ chart, theme }) => {
|
|
|
28253
28253
|
} else if (theme === "light") {
|
|
28254
28254
|
mermaidTheme = "default";
|
|
28255
28255
|
} else {
|
|
28256
|
-
if (typeof window !== "undefined") {
|
|
28256
|
+
if (typeof window !== "undefined" || typeof document === "undefined") {
|
|
28257
28257
|
mermaidTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "default";
|
|
28258
28258
|
}
|
|
28259
28259
|
}
|
|
@@ -28289,7 +28289,7 @@ var MermaidClient = ({ chart, theme }) => {
|
|
|
28289
28289
|
return /* @__PURE__ */ jsx2("div", { className: "mermaid", dangerouslySetInnerHTML: { __html: svg5 } });
|
|
28290
28290
|
};
|
|
28291
28291
|
var Mermaid = ({ chart, theme }) => {
|
|
28292
|
-
if (typeof window === "undefined") {
|
|
28292
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
28293
28293
|
return /* @__PURE__ */ jsx2("pre", { className: "mermaid", children: chart });
|
|
28294
28294
|
}
|
|
28295
28295
|
return /* @__PURE__ */ jsx2(MermaidClient, { chart, theme });
|
|
@@ -28447,7 +28447,7 @@ var NestedMarkdown = ({
|
|
|
28447
28447
|
const isMermaid = match && match[1] === "mermaid";
|
|
28448
28448
|
if (!inline2 && isMermaid) {
|
|
28449
28449
|
const chart = String(children3).replace(/\n$/, "");
|
|
28450
|
-
if (typeof window === "undefined") {
|
|
28450
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
28451
28451
|
return /* @__PURE__ */ jsx3("pre", { className: "nmd-pre", children: /* @__PURE__ */ jsx3(
|
|
28452
28452
|
"code",
|
|
28453
28453
|
{
|