stdraw 0.7.13__tar.gz → 0.7.15__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 (67) hide show
  1. {stdraw-0.7.13/stdraw.egg-info → stdraw-0.7.15}/PKG-INFO +7 -6
  2. {stdraw-0.7.13 → stdraw-0.7.15}/README.md +357 -356
  3. {stdraw-0.7.13 → stdraw-0.7.15}/pyproject.toml +7 -1
  4. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/__init__.py +2 -2
  5. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/__main__.py +7 -4
  6. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/_interactive_js.py +34 -34
  7. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/anchors.py +1 -1
  8. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/bowtielayout.py +7 -2
  9. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/check.py +1 -1
  10. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/columnlayout.py +6 -1
  11. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/layout_auto.py +46 -35
  12. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/layoutdiff.py +1 -1
  13. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/loops.py +1 -1
  14. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/metrics.py +14 -12
  15. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/render.py +48 -39
  16. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/ringlayout.py +6 -1
  17. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/routing.py +664 -49
  18. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/spinewinglayout.py +6 -1
  19. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/symlayout.py +2 -2
  20. stdraw-0.7.15/stdraw/themes.py +185 -0
  21. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/visibility.py +41 -3
  22. {stdraw-0.7.13 → stdraw-0.7.15/stdraw.egg-info}/PKG-INFO +7 -6
  23. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw.egg-info/SOURCES.txt +4 -0
  24. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_auto_viewbox.py +10 -1
  25. stdraw-0.7.15/tests/test_crash_regression.py +108 -0
  26. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_crossing_exact.py +7 -2
  27. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_delivery_contract.py +1 -1
  28. stdraw-0.7.15/tests/test_docs_consistency.py +24 -0
  29. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_dom_truth_gate.py +49 -49
  30. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_fan_frozen_copoint.py +1 -1
  31. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_hit_gate.py +44 -44
  32. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_interactive_segments.py +1 -1
  33. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_layout_modes.py +12 -12
  34. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_manual_layout.py +13 -6
  35. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_mode_decision_trace.py +105 -105
  36. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_mutual_lens_arrow_normal.py +16 -20
  37. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_placement.py +5 -0
  38. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_render_bugs.py +2 -2
  39. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_ring_layout.py +1 -1
  40. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_scalability.py +16 -0
  41. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_standard_anchors.py +1 -1
  42. stdraw-0.7.15/tests/test_theme_tokens.py +165 -0
  43. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_v0711_constraints.py +106 -106
  44. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_v077_features.py +1 -1
  45. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_v078_wide_comb.py +1 -1
  46. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_v079_font_env.py +2 -2
  47. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_visual_crossings.py +4 -4
  48. {stdraw-0.7.13 → stdraw-0.7.15}/LICENSE +0 -0
  49. {stdraw-0.7.13 → stdraw-0.7.15}/setup.cfg +0 -0
  50. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/comblayout.py +0 -0
  51. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/crossing_exact.py +0 -0
  52. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/delivery.py +0 -0
  53. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/dsl.py +0 -0
  54. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/layout3d.py +0 -0
  55. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/model.py +0 -0
  56. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/placement.py +0 -0
  57. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/planar.py +0 -0
  58. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/recipes.py +0 -0
  59. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/regularity.py +0 -0
  60. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/render3d.py +0 -0
  61. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/rendercheck.py +0 -0
  62. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw/textmetrics.py +0 -0
  63. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw.egg-info/dependency_links.txt +0 -0
  64. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw.egg-info/entry_points.txt +0 -0
  65. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw.egg-info/requires.txt +0 -0
  66. {stdraw-0.7.13 → stdraw-0.7.15}/stdraw.egg-info/top_level.txt +0 -0
  67. {stdraw-0.7.13 → stdraw-0.7.15}/tests/test_visibility.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stdraw
3
- Version: 0.7.13
3
+ Version: 0.7.15
4
4
  Summary: Planarity-aware system-thinking (CLD) diagram engine with honest, metric-backed quality certificates
5
5
  Author: stdraw contributors
6
6
  License: MIT
@@ -41,7 +41,7 @@ English | [中文](README_zh-CN.md)
41
41
 
42
42
  [![CI](https://github.com/jacky510/stdraw/actions/workflows/ci.yml/badge.svg)](https://github.com/jacky510/stdraw/actions/workflows/ci.yml)
43
43
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
44
- [![Version](https://img.shields.io/badge/version-0.7.13-blue.svg)](pyproject.toml)
44
+ [![Version](https://img.shields.io/badge/version-0.7.15-blue.svg)](pyproject.toml)
45
45
  [![Stars](https://img.shields.io/github/stars/jacky510/stdraw.svg?style=flat)](https://github.com/jacky510/stdraw/stargazers)
46
46
 
47
47
  [Install](#install) · [Gallery](#gallery) · [Quickstart](#quickstart) · [DSL](#dsl-in-one-minute) · [Certificates](#certificates--quality-gates) · [Agent Integration](#agent-integration)
@@ -56,7 +56,7 @@ pip install stdraw
56
56
 
57
57
  Mainstream diagram tools stop at "crossing minimization" heuristics, and **none of them make a verifiable promise about their own output**. stdraw is built the other way around:
58
58
 
59
- - **auto-v2 (default recipe)**: **structure-aware mode layout** — a deterministic priority chain (bowtie-vertex → spine-wing → column-chain → ring-cycle → layered) picks one arrangement template per graph structure, each with a trial gate (non-triggering graphs stay byte-identical); plus straight/arc-first routing (optional CP-SAT refinement), enforced by **hard quality gates**: box-over-line = 0 (any angle), edge-to-box clearance ≥ 16px, smooth border anchors, and mode-specific regularity gates — see [docs/layout-modes.md](docs/layout-modes.md) (zh original; self-contained English edition: [docs/layout-modes.en.md](docs/layout-modes.en.md));
59
+ - **auto-v2 (default recipe)**: **structure-aware mode layout** — a deterministic priority chain (symmetric → bowtie-vertex → spine-wing → comb-bilateral → column-chain → ring-cycle → layered) picks one arrangement template per graph structure, each with a trial gate (non-triggering graphs stay byte-identical); plus straight/arc-first routing (optional CP-SAT refinement), enforced by **hard quality gates**: box-over-line = 0 (any angle), edge-to-box clearance ≥ 16px, smooth border anchors, and mode-specific regularity gates — see [docs/layout-modes.md](docs/layout-modes.md) (zh original; self-contained English edition: [docs/layout-modes.en.md](docs/layout-modes.en.md));
60
60
  - **Ring layout for loop-dominated small graphs (v0.5.0)**: when a small graph (≤ 12 nodes) has a dominant simple cycle covering ≥ n−2 nodes (or ≥ 90% of its edges lie on cycles), the main loop is placed on **regular-polygon ring slots** in cycle order (declared loop order preferred, so R/B polarity colors read along the ring), chords route inside the ring, and residual nodes get deterministic inner/outer slots; the certificate switches to **ring-appropriate metrics** (ring-spacing CV + polygon template-fit error) instead of row alignment — layout mode is stated honestly, never judged by row-gate yardsticks; non-triggering graphs keep the layered path byte-identical;
61
61
  - **Anchor-band hard gate (v0.7.3)**: delivered edge anchors clamped to the mid-band (edge midpoint ± 1/4 edge length, corner hits = 0) are now enforced per-figure in CI — spine-wing figures require 100% in-band; mutual-pair edges whose band-clamped anchors cannot pass the hard gates get a deterministic band-anchored local re-route (anchor-band candidates + nested-arc escape hatch + own-box interior check); other engines are locked to their v0.7.2 baseline ratios (ring mutual corridors / bowtie ±12px spoke corridors are registered legacy) — see [docs/layout-modes.md](docs/layout-modes.md) (zh original; self-contained English edition: [docs/layout-modes.en.md](docs/layout-modes.en.md));
62
62
  - **Layout aesthetics v3.1 (v0.7.1)**: **spine-wing mode** — graphs with a dominant hub pair (an edge whose endpoints share ≥3 common neighbors = a midline "wing band") plus a constructible secondary cluster get the vertical-spine + midline-wing layout (jacky's hand-drawn classic-cld reference): spine strictly vertical on the axis, wings pressed to the horizontal midline, outer mirror pair symmetric about it; deterministic trigger (hub-pair common-neighbor count + rest-cluster pairing + spine length ratio ≤0.5), equivalent certificate gates (spine-axis ≤2px, midline ≤2px, mirror ≤2px); corpus sweep: only classic-cld-growth-and-burden switches, all other 18 byte-identical — see [docs/layout-modes.md](docs/layout-modes.md) (zh original; self-contained English edition: [docs/layout-modes.en.md](docs/layout-modes.en.md));
@@ -75,7 +75,7 @@ Mainstream diagram tools stop at "crossing minimization" heuristics, and **none
75
75
 
76
76
  ## Gallery
77
77
 
78
- All images are real renderings produced by the current engine (v0.7.13) from the in-repo corpus — no mock-ups, no stale artifacts (click through to each demo).
78
+ All images are real renderings produced by the current engine (v0.7.15) from the in-repo corpus — no mock-ups, no stale artifacts (click through to each demo).
79
79
 
80
80
  <table>
81
81
  <tr>
@@ -129,9 +129,10 @@ stdraw/
129
129
  │ ├── loops.py # loop-semantics audit (lint)
130
130
  │ ├── dsl.py # .cld DSL parser
131
131
  │ ├── model.py # graph data model
132
- │ ├── render.py # 2D HTML rendering (inline SVG, v1/v2 forms)
132
+ │ ├── render.py # 2D HTML rendering (inline SVG, v1/v2 forms, --theme light|dark)
133
133
  │ ├── render3d.py # 3D HTML rendering (three.js)
134
- │ └── __main__.py # CLI: stdraw layout ... [--recipe auto|ortho] [--linestyle straight|arc]
134
+ │ ├── themes.py # design tokens: single source for the light/dark palettes (viewer/themes.js is generated from it)
135
+ │ └── __main__.py # CLI: stdraw layout ... [--recipe auto|ortho] [--linestyle straight|arc] [--theme light|dark]
135
136
  ├── examples/ # .cld cases (limits-to-growth / classic-cld-growth-and-burden)
136
137
  ├── demos/ # deliverable form: 2D/3D demos + certificate JSON
137
138
  ├── viewer/ # zero-dependency interactive viewer (four forms + live certificate)