@ankhorage/paradox 0.0.7 → 0.0.8
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/render/renderers/html.js +11 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 46fd38d: Render Mermaid diagrams visually in the generated static documentation app.
|
|
8
|
+
|
|
9
|
+
The generated `paradox/index.html` now loads Mermaid in the browser, renders diagram blocks visually, and keeps the raw Mermaid source available in a collapsible section for offline fallback, copying, and debugging.
|
|
10
|
+
|
|
3
11
|
## 0.0.7
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @ankhorage/paradox
|
|
2
2
|
|
|
3
|
-
         
|
|
4
4
|
|
|
5
5
|
Deterministic documentation generator for TypeScript packages.
|
|
6
6
|
|
|
@@ -100,6 +100,8 @@ export function renderHtml({ diagrams, model, }) {
|
|
|
100
100
|
padding: 1rem;
|
|
101
101
|
}
|
|
102
102
|
.empty { font-style: italic; color: #6f7f9c; }
|
|
103
|
+
.mermaid { margin: 1rem 0; overflow: auto; }
|
|
104
|
+
details > summary { cursor: pointer; color: #5e6d8c; font-size: 0.9rem; margin-top: 0.5rem; user-select: none; }
|
|
103
105
|
@media (max-width: 900px) {
|
|
104
106
|
.layout { grid-template-columns: 1fr; }
|
|
105
107
|
.sidebar { position: static; max-height: none; border-right: 0; border-bottom: 1px solid #d8dfec; }
|
|
@@ -169,6 +171,10 @@ export function renderHtml({ diagrams, model, }) {
|
|
|
169
171
|
}
|
|
170
172
|
});
|
|
171
173
|
</script>
|
|
174
|
+
<script type="module">
|
|
175
|
+
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
|
176
|
+
mermaid.initialize({ startOnLoad: true });
|
|
177
|
+
</script>
|
|
172
178
|
</body>
|
|
173
179
|
</html>
|
|
174
180
|
`,
|
|
@@ -270,7 +276,11 @@ function renderDiagramCard(diagram) {
|
|
|
270
276
|
return `<article class="item" data-search="${escapeAttribute(`${diagram.title} ${diagram.path}`)}">
|
|
271
277
|
<h3>${escapeHtml(diagram.title)}</h3>
|
|
272
278
|
<p class="muted"><code>${escapeHtml(diagram.path)}</code></p>
|
|
273
|
-
<
|
|
279
|
+
<div class="mermaid">${escapeHtml(diagram.content)}</div>
|
|
280
|
+
<details>
|
|
281
|
+
<summary>View Mermaid source</summary>
|
|
282
|
+
<pre>${escapeHtml(diagram.content)}</pre>
|
|
283
|
+
</details>
|
|
274
284
|
</article>`;
|
|
275
285
|
}
|
|
276
286
|
function renderInlineCodeList(values) {
|