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 CHANGED
@@ -28264,7 +28264,7 @@ var MermaidClient = ({ chart, theme }) => {
28264
28264
  } else if (theme === "light") {
28265
28265
  mermaidTheme = "default";
28266
28266
  } else {
28267
- if (typeof window !== "undefined") {
28267
+ if (typeof window !== "undefined" || typeof document === "undefined") {
28268
28268
  mermaidTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "default";
28269
28269
  }
28270
28270
  }
@@ -28300,7 +28300,7 @@ var MermaidClient = ({ chart, theme }) => {
28300
28300
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "mermaid", dangerouslySetInnerHTML: { __html: svg5 } });
28301
28301
  };
28302
28302
  var Mermaid = ({ chart, theme }) => {
28303
- if (typeof window === "undefined") {
28303
+ if (typeof window === "undefined" || typeof document === "undefined") {
28304
28304
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("pre", { className: "mermaid", children: chart });
28305
28305
  }
28306
28306
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MermaidClient, { chart, theme });
@@ -28458,7 +28458,7 @@ var NestedMarkdown = ({
28458
28458
  const isMermaid = match && match[1] === "mermaid";
28459
28459
  if (!inline2 && isMermaid) {
28460
28460
  const chart = String(children3).replace(/\n$/, "");
28461
- if (typeof window === "undefined") {
28461
+ if (typeof window === "undefined" || typeof document === "undefined") {
28462
28462
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("pre", { className: "nmd-pre", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
28463
28463
  "code",
28464
28464
  {