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.
Files changed (35) hide show
  1. {context_mapper-0.22.0 → context_mapper-0.22.1}/PKG-INFO +1 -1
  2. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/template/download.js +5 -0
  3. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/PKG-INFO +1 -1
  4. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/scm_version.json +2 -2
  5. {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/test_build.py +1 -0
  6. {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/test_mermaid.py +1 -0
  7. {context_mapper-0.22.0 → context_mapper-0.22.1}/.github/workflows/ci.yml +0 -0
  8. {context_mapper-0.22.0 → context_mapper-0.22.1}/.github/workflows/pages.yml +0 -0
  9. {context_mapper-0.22.0 → context_mapper-0.22.1}/.github/workflows/publish.yml +0 -0
  10. {context_mapper-0.22.0 → context_mapper-0.22.1}/.gitignore +0 -0
  11. {context_mapper-0.22.0 → context_mapper-0.22.1}/LICENSE +0 -0
  12. {context_mapper-0.22.0 → context_mapper-0.22.1}/README.md +0 -0
  13. {context_mapper-0.22.0 → context_mapper-0.22.1}/docs/screenshot.png +0 -0
  14. {context_mapper-0.22.0 → context_mapper-0.22.1}/example/context-map.style.yml +0 -0
  15. {context_mapper-0.22.0 → context_mapper-0.22.1}/example/context-map.yml +0 -0
  16. {context_mapper-0.22.0 → context_mapper-0.22.1}/pyproject.toml +0 -0
  17. {context_mapper-0.22.0 → context_mapper-0.22.1}/setup.cfg +0 -0
  18. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/__init__.py +0 -0
  19. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/__main__.py +0 -0
  20. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/build.py +0 -0
  21. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/graph.py +0 -0
  22. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/mermaid.py +0 -0
  23. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/serve.py +0 -0
  24. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/template/app.js +0 -0
  25. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/template/index.html +0 -0
  26. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper/template/style.css +0 -0
  27. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/SOURCES.txt +0 -0
  28. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/dependency_links.txt +0 -0
  29. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/entry_points.txt +0 -0
  30. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/requires.txt +0 -0
  31. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/scm_file_list.json +0 -0
  32. {context_mapper-0.22.0 → context_mapper-0.22.1}/src/context_mapper.egg-info/top_level.txt +0 -0
  33. {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/conftest.py +0 -0
  34. {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/test_graph.py +0 -0
  35. {context_mapper-0.22.0 → context_mapper-0.22.1}/tests/test_serve.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: context-mapper
3
- Version: 0.22.0
3
+ Version: 0.22.1
4
4
  Summary: Builds an interactive context map and Mermaid diagrams from a YAML domain model.
5
5
  Author-email: Henrique Moody <henriquemoody@gmail.com>
6
6
  License-Expression: ISC
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: context-mapper
3
- Version: 0.22.0
3
+ Version: 0.22.1
4
4
  Summary: Builds an interactive context map and Mermaid diagrams from a YAML domain model.
5
5
  Author-email: Henrique Moody <henriquemoody@gmail.com>
6
6
  License-Expression: ISC
@@ -1,7 +1,7 @@
1
1
  {
2
- "tag": "0.22.0",
2
+ "tag": "0.22.1",
3
3
  "distance": 0,
4
- "node": "g8bd3abf42e6c18f94ff586ce2951a648887d83f7",
4
+ "node": "g82c63e077ff38cead0fd126b07a76e983d1dd1f8",
5
5
  "dirty": false,
6
6
  "branch": "HEAD",
7
7
  "node_date": "2026-11-18"
@@ -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