@anlijiu/markmap 1.0.2 → 1.0.3
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/markmap.core.mjs
CHANGED
|
@@ -47065,7 +47065,16 @@ __name(partition, "partition");
|
|
|
47065
47065
|
|
|
47066
47066
|
// src/markmap-renderer.ts
|
|
47067
47067
|
cytoscape2.use(import_cytoscape_cose_bilkent.default);
|
|
47068
|
+
function assertMindmapNode(node2) {
|
|
47069
|
+
if (!node2 || typeof node2 !== "object" || Array.isArray(node2)) {
|
|
47070
|
+
throw new TypeError(
|
|
47071
|
+
`Expected a MindmapNode object, received ${typeof node2}: ${JSON.stringify(node2)}`
|
|
47072
|
+
);
|
|
47073
|
+
}
|
|
47074
|
+
}
|
|
47075
|
+
__name(assertMindmapNode, "assertMindmapNode");
|
|
47068
47076
|
function drawNodes(svg3, mindmap, opts, section, index = 0) {
|
|
47077
|
+
assertMindmapNode(mindmap);
|
|
47069
47078
|
drawNode(svg3, mindmap, opts, section, index);
|
|
47070
47079
|
if (mindmap.children) {
|
|
47071
47080
|
mindmap.children.forEach((child, index2) => {
|