@cardenelabs/cdl 0.71.0 → 0.72.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cardenelabs/cdl",
3
- "version": "0.71.0",
3
+ "version": "0.72.0",
4
4
  "description": "CDL (Chainome Diagram Language). Mermaid-like declarative DSL that compiles to animated SVG diagrams. Built for blockchain / Solidity flows, generic enough for sequence / flow / state / ER / topology diagrams.",
5
5
  "license": "MIT",
6
6
  "author": "cardene777",
package/src/presets.ts CHANGED
@@ -2417,12 +2417,20 @@ export function flowchart(preset: FlowchartPreset): FlowchartBuilder {
2417
2417
  // 他 label (通常の process 遷移名) は default (34 world 離す) で読みやすさ優先。
2418
2418
  const label = e.label ?? "";
2419
2419
  const isConditionLabel = /^(true|false|yes|no|はい|いいえ)$/i.test(label.trim());
2420
+ /*
2421
+ * **縦に積む図では重ねない** (#880)。 重ねる形は線が長い時に効く = 横に並べた図の
2422
+ * 分岐は縦列をまたぐので線が長く、道筋の上に字を置いても箱に掛からない。
2423
+ *
2424
+ * 縦 1 本に積むと分岐の線が上下に隣り合う箱の間の短い縦線になり、そこへ重ねた字が
2425
+ * 行き先の箱に乗る (実測 = `承認` と `はい` の隙間が 1.0px、必要な 32px に届かない)。
2426
+ * 重ねなければ engine が段の間隔を字の分だけ広げる (`requiredStackGapForEdgeLabels`)。
2427
+ */
2420
2428
  b.edge(e.from, e.to, {
2421
2429
  id: edgeId,
2422
2430
  label,
2423
2431
  tone: e.tone ?? tone,
2424
2432
  style: "solid",
2425
- overlay: isConditionLabel,
2433
+ overlay: isConditionLabel && !縦に積む,
2426
2434
  });
2427
2435
  phaseActivate.push(edgeId);
2428
2436
  return api;