react-super-mermaid 0.3.0 → 0.4.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/README.md +6 -5
- package/dist/index.cjs +409 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -11
- package/dist/index.d.ts +45 -11
- package/dist/index.js +408 -59
- package/dist/index.js.map +1 -1
- package/llms.txt +3 -3
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -11,10 +11,10 @@ Key facts:
|
|
|
11
11
|
|
|
12
12
|
## Components and hooks
|
|
13
13
|
|
|
14
|
-
- `MermaidViewer` — full viewer with toolbar (theme picker, search, zoom, export, fullscreen, background). Props: `code` (required string), `theme`, `dark`, `toolbar`, `panZoom`, `search`, `exportable`, `background
|
|
14
|
+
- `MermaidViewer` — full viewer with toolbar (theme picker, search, zoom, export, fullscreen, background). Props: `code` (required string), `theme`, `dark`, `toolbar`, `panZoom`, `search`, `exportable`, `background` (show the background picker), `pattern` (`none|dots|grid`, default `dots`), `solidColor` (`string|null`; canvas surface color, `null` = transparent/follow page), `fullscreen`, `onFullscreenChange`, `keyboard`, `seed`, `fontUrl`, `mermaid` (`{instance?,cdnUrl?}`), `svgPanZoom`, `mermaidConfig`, `injectStyles`, `className`, `style`, `onRender`, `onError`. The background picker = preset surface swatches + a custom color well + an independent none/dots/grid pattern toggle (`BACKGROUND_PRESETS` / `PATTERN_OPTIONS` are exported).
|
|
15
15
|
- `MermaidDiagram` — diagram only (equivalent to `<MermaidViewer toolbar={false} />`).
|
|
16
16
|
- `useMermaidViewer` — hook backing the components for custom UIs.
|
|
17
|
-
- Imperative ref handle (`MermaidViewerHandle`): `zoomIn / zoomOut / fit / reset / actualSize / getZoomPercent / search / next / prev / clearSearch / exportSvg / exportPng / downloadSvg / downloadPng / getSvg / enterFullscreen / exitFullscreen / toggleFullscreen / isFullscreen /
|
|
17
|
+
- Imperative ref handle (`MermaidViewerHandle`): `zoomIn / zoomOut / fit / reset / actualSize / getZoomPercent / search / next / prev / clearSearch / exportSvg / exportPng / downloadSvg / downloadPng / getSvg / enterFullscreen / exitFullscreen / toggleFullscreen / isFullscreen / setPattern / cyclePattern / getPattern / setSolidColor / getSolidColor`.
|
|
18
18
|
|
|
19
19
|
## Framework-agnostic core API
|
|
20
20
|
|
|
@@ -32,7 +32,7 @@ Key facts:
|
|
|
32
32
|
|
|
33
33
|
## Keyboard shortcuts
|
|
34
34
|
|
|
35
|
-
Focus the viewer: `/` or `Ctrl/Cmd+F` search · `+`/`-` zoom · `0` fit · `1` actual size · `w` fit width · `f` fullscreen · `b` cycle background · `Esc` close search / exit fullscreen.
|
|
35
|
+
Focus the viewer: `/` or `Ctrl/Cmd+F` search · `+`/`-` zoom · `0` fit · `1` actual size · `w` fit width · `f` fullscreen · `b` cycle background pattern (none / dots / grid) · `Esc` close search / exit fullscreen.
|
|
36
36
|
|
|
37
37
|
## Links
|
|
38
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-super-mermaid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Drop-in React Mermaid viewer: beautified colorful + Excalidraw sketch themes, pan/zoom, in-diagram search, and SVG/PNG export. Loads mermaid externally (injected, peer, or CDN). Zero-config styling, TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|