Skip to content

Commit d5f40eb

Browse files
committed
deploy: bd2d08a
1 parent 4c41629 commit d5f40eb

18 files changed

Lines changed: 481 additions & 294 deletions

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: b18a7ee07ccc31bc93d8b7cfeb065320
3+
config: acb45f7ac4368c58eee6b3fd6c4d93d8
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

.doctrees/environment.pickle

76 Bytes
Binary file not shown.

README.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<link rel="stylesheet" type="text/css" href="_static/autodoc_pydantic.css" />
1616
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
1717
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=8dab3a3b" />
18-
<link rel="stylesheet" type="text/css" href="_static/styles/custom.css?v=45bc7fcc" />
18+
<link rel="stylesheet" type="text/css" href="_static/styles/custom.css?v=6cba18cf" />
1919

2020

2121

_modules/index.html

Lines changed: 90 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<link rel="stylesheet" type="text/css" href="../_static/autodoc_pydantic.css" />
1515
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
1616
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
17-
<link rel="stylesheet" type="text/css" href="../_static/styles/custom.css?v=45bc7fcc" />
17+
<link rel="stylesheet" type="text/css" href="../_static/styles/custom.css?v=6cba18cf" />
1818

1919

2020

@@ -268,27 +268,52 @@ <h1>All modules for which code is available</h1>
268268
<script src="../_static/copybutton.js?v=f281be69"></script>
269269
<script src="../_static/design-tabs.js?v=f930bc37"></script>
270270
<script type="module" src="https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs"></script>
271-
<script type="module" src="https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0.1.4/dist/mermaid-layout-elk.esm.min.mjs"></script>
272-
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";import elkLayouts from "https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0.1.4/dist/mermaid-layout-elk.esm.min.mjs";mermaid.registerLayoutLoaders(elkLayouts);mermaid.initialize({startOnLoad:false});</script>
271+
<script type="module" src="https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0.2.0/dist/mermaid-layout-elk.esm.min.mjs"></script>
272+
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";import elkLayouts from "https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0.2.0/dist/mermaid-layout-elk.esm.min.mjs";mermaid.registerLayoutLoaders(elkLayouts);mermaid.initialize({startOnLoad:false});</script>
273273
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
274274
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
275275

276-
const style = document.createElement('style');
277-
style.textContent = `.mermaid-container {
278-
position: relative !important;
279-
display: inline-block;
276+
const defaultStyle = document.createElement('style');
277+
defaultStyle.textContent = `pre.mermaid {
278+
/* Same as .mermaid-container > pre */
279+
display: block;
280280
width: 100%;
281281
}
282282
283+
pre.mermaid > svg {
284+
/* Same as .mermaid-container > pre > svg */
285+
height: 500px;
286+
width: 100%;
287+
max-width: 100% !important;
288+
}
289+
`;
290+
document.head.appendChild(defaultStyle);
291+
292+
const fullscreenStyle = document.createElement('style');
293+
fullscreenStyle.textContent = `.mermaid-container {
294+
display: flex;
295+
flex-direction: row;
296+
width: 100%;
297+
}
298+
299+
.mermaid-container > pre {
300+
display: block;
301+
width: 100%;
302+
}
303+
304+
.mermaid-container > pre > svg {
305+
height: 500px;
306+
width: 100%;
307+
max-width: 100% !important;
308+
}
309+
283310
.mermaid-fullscreen-btn {
284-
position: absolute !important;
285311
width: 28px;
286312
height: 28px;
287313
background: rgba(255, 255, 255, 0.95);
288314
border: 1px solid rgba(0, 0, 0, 0.3);
289315
border-radius: 4px;
290316
cursor: pointer;
291-
z-index: 100;
292317
display: flex;
293318
align-items: center;
294319
justify-content: center;
@@ -323,7 +348,7 @@ <h1>All modules for which code is available</h1>
323348
position: fixed !important;
324349
top: 0 !important;
325350
left: 0 !important;
326-
width: 100vw;
351+
width: 95vw;
327352
height: 100vh;
328353
background: rgba(255, 255, 255, 0.98);
329354
z-index: 9999;
@@ -341,7 +366,7 @@ <h1>All modules for which code is available</h1>
341366
justify-content: center;
342367
}
343368
344-
.mermaid-fullscreen-content {
369+
.mermaid-container-fullscreen {
345370
position: relative;
346371
width: 95vw;
347372
height: 90vh;
@@ -357,24 +382,22 @@ <h1>All modules for which code is available</h1>
357382
justify-content: center;
358383
}
359384
360-
.mermaid-fullscreen-content.dark-theme {
385+
.mermaid-container-fullscreen.dark-theme {
361386
background: #1a1a1a;
362387
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
363388
}
364389
365-
.mermaid-fullscreen-content .mermaid {
390+
.mermaid-container-fullscreen pre.mermaid {
366391
width: 100%;
367392
height: 100%;
368393
display: flex;
369394
align-items: center;
370395
justify-content: center;
371396
}
372397
373-
.mermaid-fullscreen-content .mermaid svg {
374-
width: 100%;
375-
height: auto;
376-
max-width: 100%;
377-
max-height: 85vh;
398+
.mermaid-container-fullscreen .mermaid svg {
399+
height: 100% !important;
400+
width: 100% !important;
378401
cursor: grab;
379402
}
380403
@@ -418,9 +441,8 @@ <h1>All modules for which code is available</h1>
418441
419442
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
420443
display: none !important;
421-
}
422-
`;
423-
document.head.appendChild(style);
444+
}`;
445+
document.head.appendChild(fullscreenStyle);
424446

425447
// Detect if page has dark background
426448
const isDarkTheme = () => {
@@ -438,44 +460,55 @@ <h1>All modules for which code is available</h1>
438460

439461
const load = async () => {
440462
await mermaid.run();
463+
441464
const all_mermaids = document.querySelectorAll(".mermaid");
442-
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
443465
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
444-
if(mermaids_to_add_zoom > 0) {
445-
var svgs = d3.selectAll(".mermaid svg");
446-
if(all_mermaids.length !== mermaids_processed.length) {
447-
setTimeout(load, 200);
448-
return;
449-
} else if(svgs.size() !== mermaids_to_add_zoom) {
450-
setTimeout(load, 200);
451-
return;
452-
} else {
453-
svgs.each(function() {
454-
var svg = d3.select(this);
455-
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
456-
var inner = svg.select("g");
457-
var zoom = d3.zoom().on("zoom", function(event) {
458-
inner.attr("transform", event.transform);
466+
467+
if ("True" === "True") {
468+
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
469+
if(mermaids_to_add_zoom > 0) {
470+
var svgs = d3.selectAll(".mermaid svg");
471+
if(all_mermaids.length !== mermaids_processed.length) {
472+
setTimeout(load, 200);
473+
return;
474+
} else if(svgs.size() !== mermaids_to_add_zoom) {
475+
setTimeout(load, 200);
476+
return;
477+
} else {
478+
svgs.each(function() {
479+
var svg = d3.select(this);
480+
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
481+
var inner = svg.select("g");
482+
var zoom = d3.zoom().on("zoom", function(event) {
483+
inner.attr("transform", event.transform);
484+
});
485+
svg.call(zoom);
459486
});
460-
svg.call(zoom);
461-
});
487+
}
462488
}
489+
} else if(all_mermaids.length !== mermaids_processed.length) {
490+
// Wait for mermaid to process all diagrams
491+
setTimeout(load, 200);
492+
return;
463493
}
464494

465495
const darkTheme = isDarkTheme();
466496

497+
// Stop here if not adding fullscreen capability
498+
if ("True" !== "True") return;
499+
467500
const modal = document.createElement('div');
468501
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
469502
modal.setAttribute('role', 'dialog');
470503
modal.setAttribute('aria-modal', 'true');
471504
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
472505
modal.innerHTML = `
473506
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
474-
<div class="mermaid-fullscreen-content${darkTheme ? ' dark-theme' : ''}"></div>
507+
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
475508
`;
476509
document.body.appendChild(modal);
477510

478-
const modalContent = modal.querySelector('.mermaid-fullscreen-content');
511+
const modalContent = modal.querySelector('.mermaid-container-fullscreen');
479512
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
480513

481514
let previousScrollOffset = [window.scrollX, window.scrollY];
@@ -538,20 +571,22 @@ <h1>All modules for which code is available</h1>
538571
svg.style.width = '100%';
539572
svg.style.height = 'auto';
540573
svg.style.maxWidth = '100%';
541-
svg.style.display = 'block';
542-
543-
setTimeout(() => {
544-
const g = svg.querySelector('g');
545-
if (g) {
546-
var svgD3 = d3.select(svg);
547-
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
548-
var inner = svgD3.select("g");
549-
var zoom = d3.zoom().on("zoom", function(event) {
550-
inner.attr("transform", event.transform);
551-
});
552-
svgD3.call(zoom);
553-
}
554-
}, 100);
574+
svg.style.sdisplay = 'block';
575+
576+
if ("True" === "True") {
577+
setTimeout(() => {
578+
const g = svg.querySelector('g');
579+
if (g) {
580+
var svgD3 = d3.select(svg);
581+
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
582+
var inner = svgD3.select("g");
583+
var zoom = d3.zoom().on("zoom", function(event) {
584+
inner.attr("transform", event.transform);
585+
});
586+
svgD3.call(zoom);
587+
}
588+
}, 100);
589+
}
555590
}
556591

557592
modal.classList.add('active');

0 commit comments

Comments
 (0)