@hanzo/ui 5.0.1 → 5.0.2
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.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/primitives/mermaid.tsx +13 -8
package/dist/index.mjs
CHANGED
|
@@ -52,7 +52,6 @@ import rehypeKatex from 'rehype-katex';
|
|
|
52
52
|
import remarkGfm from 'remark-gfm';
|
|
53
53
|
import remarkMath from 'remark-math';
|
|
54
54
|
import mermaid from 'mermaid';
|
|
55
|
-
import svgPanZoom from 'svg-pan-zoom';
|
|
56
55
|
import NextImage from 'next/image';
|
|
57
56
|
import Link2 from 'next/link';
|
|
58
57
|
|
|
@@ -7808,13 +7807,17 @@ var MermaidDiagram = /* @__PURE__ */ __name(({
|
|
|
7808
7807
|
svgElement.style.position = "absolute";
|
|
7809
7808
|
svgElement.style.top = "0";
|
|
7810
7809
|
svgElement.style.left = "0";
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7810
|
+
if (typeof window !== "undefined") {
|
|
7811
|
+
const svgPanZoomModule = await import('svg-pan-zoom');
|
|
7812
|
+
const svgPanZoom = svgPanZoomModule.default || svgPanZoomModule;
|
|
7813
|
+
const panZoomInstance = svgPanZoom(svgElement);
|
|
7814
|
+
panZoomInstance.fit();
|
|
7815
|
+
panZoomInstance.center();
|
|
7816
|
+
panZoomInstance.zoomAtPoint(1, { x: 0, y: 0 });
|
|
7817
|
+
panZoomInstance.disablePan();
|
|
7818
|
+
panZoomInstance.disableZoom();
|
|
7819
|
+
setInstance(panZoomInstance);
|
|
7820
|
+
}
|
|
7818
7821
|
}
|
|
7819
7822
|
}
|
|
7820
7823
|
lastCode.current = code;
|