@cardenelabs/cdl 0.69.0 → 0.70.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.69.0",
3
+ "version": "0.70.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",
@@ -137,11 +137,23 @@ function renderRect(
137
137
  clipPath={`url(#dyn-rect-clip-${node.id})`}
138
138
  style={{ transition: "all 200ms ease-out" }}
139
139
  />
140
- {/* value label */}
140
+ {/*
141
+ 読み取り値。 **箱の右端に揃える** (#870)。
142
+
143
+ 中央に置くと、同じ帯の上下を繋ぐ矢印と必ず重なる。 矢印は受け手の上端の中央へ
144
+ 真下から入り、読み取り値は上端の中央の真上に出るので、置き場所が同じになる。
145
+ 利用側の 4 枚が 4 枚とも、矢印の先が数字の区切りに刺さって `10 ⯆ 10` に見えていた。
146
+
147
+ 右端へ寄せると、中央の縦の通り道が空く。 矢印の側ではなく数字の側を動かすのは、
148
+ 矢印の取り付き点が 2 本並んだ時の振り分けを既に持っており、そこへ別の理由で
149
+ ずらす条件を足すと両方が効いた時の位置が読めなくなるため。
150
+
151
+ 揃える先を右にしたのは、箱の右上が空いている図が多いから (左上には枠の題が来る)。
152
+ */}
141
153
  <text
142
- x={x + w / 2}
154
+ x={x + w}
143
155
  y={y - 6}
144
- textAnchor="middle"
156
+ textAnchor="end"
145
157
  fontSize={11}
146
158
  fontFamily="monospace"
147
159
  fill="var(--cdl-text-dim, #5a6270)"