UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

20 lines (17 loc) 534 B
import { __name } from "./chunk-3XYRH5AP.mjs"; // src/rendering-util/insertElementsForSize.js import { select } from "d3"; var getDiagramElement = /* @__PURE__ */ __name((id, securityLevel) => { let sandboxElement; if (securityLevel === "sandbox") { sandboxElement = select("#i" + id); } const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); const svg = root.select(`[id="${id}"]`); return svg; }, "getDiagramElement"); export { getDiagramElement };