context-mapper 0.22.0__tar.gz → 0.22.1__tar.gz
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.
- {context_mapper-0.22.0 → context_mapper-0.22.1}/PKG-INFO +1 -1
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/template/download.js +5 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/PKG-INFO +1 -1
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/scm_version.json +2 -2
- {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/test_build.py +1 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/test_mermaid.py +1 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/.github/workflows/ci.yml +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/.github/workflows/pages.yml +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/.github/workflows/publish.yml +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/.gitignore +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/LICENSE +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/README.md +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/docs/screenshot.png +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/example/context-map.style.yml +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/example/context-map.yml +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/pyproject.toml +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/setup.cfg +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/__init__.py +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/__main__.py +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/build.py +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/graph.py +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/mermaid.py +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/serve.py +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/template/app.js +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/template/index.html +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/template/style.css +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/SOURCES.txt +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/dependency_links.txt +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/entry_points.txt +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/requires.txt +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/scm_file_list.json +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/top_level.txt +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/conftest.py +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/test_graph.py +0 -0
- {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/test_serve.py +0 -0
|
@@ -31,6 +31,11 @@ function standaloneSvg(svg) {
|
|
|
31
31
|
clone.setAttribute("width", Math.round(width));
|
|
32
32
|
clone.setAttribute("height", Math.round(height));
|
|
33
33
|
clone.removeAttribute("style");
|
|
34
|
+
// The font the labels show on the page is the page's own — Mermaid writes
|
|
35
|
+
// no font-family into the drawing — and the page's stylesheet doesn't
|
|
36
|
+
// travel with the file. Bake in the family the live diagram computes, so
|
|
37
|
+
// the download keeps what the screen shows.
|
|
38
|
+
clone.style.fontFamily = getComputedStyle(svg).fontFamily;
|
|
34
39
|
// The page paints the diagram's background; a file of its own needs one of
|
|
35
40
|
// its own, the same color, or a dark slide or a dark-mode README turns it
|
|
36
41
|
// into dark text on a dark page. The viewBox need not start at 0, so the
|
|
@@ -227,6 +227,7 @@ def test_the_interactive_page_can_download_the_diagram(tmp_path):
|
|
|
227
227
|
assert '<option value="svg">SVG</option>' in text
|
|
228
228
|
assert '<button id="download">Download</button>' in text
|
|
229
229
|
assert "function downloadDiagram" in text # the shared export script, spliced in
|
|
230
|
+
assert "getComputedStyle(svg).fontFamily" in text # the page's font travels with the file
|
|
230
231
|
assert "/*__DOWNLOAD__*/" not in text # never left behind
|
|
231
232
|
|
|
232
233
|
|
|
@@ -535,6 +535,7 @@ def test_build_writes_the_download_links_into_the_page(tmp_path, example_data, e
|
|
|
535
535
|
assert 'data-download="png"' in page
|
|
536
536
|
assert 'data-download="svg"' in page
|
|
537
537
|
assert "function downloadDiagram" in page # the shared export script, spliced in
|
|
538
|
+
assert "getComputedStyle(svg).fontFamily" in page # the page's font travels with the file
|
|
538
539
|
assert "__DOWNLOAD__" not in page # never left behind
|
|
539
540
|
assert 'downloadDiagram(svg, a.dataset.download, "overview")' in page
|
|
540
541
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/scm_file_list.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|