@cardenelabs/cdl 0.116.0 → 0.117.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/CHANGELOG.md CHANGED
@@ -5,6 +5,34 @@ CDL (Chainome Diagram Language) の主要変更履歴。
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.117.0] - 2026-10-01
9
+
10
+ ### Fixed
11
+
12
+ - **位置を手で書いた箱に、自動で並べた時の揃えの規則を当てていた** (#972)
13
+
14
+ 揃えを見る 2 軸が「レーンの中の箱は縦 1 列に並ぶ」 前提を持っていた。
15
+
16
+ | 軸 | 何を見るか | 重さ |
17
+ |---|---|---|
18
+ | `alignment` (軸 5) | 同じレーンの箱の中心の横位置が揃っているか | error |
19
+ | `column-alignment` (軸 58) | 同じ縦列の箱の中心の横位置が許容 1 以内で揃っているか | error |
20
+
21
+ `posX` と `posY` を両方書いた箱は **その並びから外して置く** ためにある。
22
+ 外して置いたこと自体を違反として数えるので、意図どおりの図が毎回落ちていた。
23
+
24
+ 同じ条件は軸 15 (`lane-cx-consistency`) が元から持っており、そちらだけ直っていた。
25
+ その 1 行を `位置を手で書いた` として括り出し、3 軸で同じ条件を使う。
26
+
27
+ **基準の箱も先に外す**。 判定だけを外すと、レーンの先頭の箱が手で置かれていた時に
28
+ 自動で置いた箱が全部その位置と比べられて落ちる。
29
+
30
+ 片方だけ書いた箱は外さない。 採用の条件が
31
+ `posX !== undefined && posY !== undefined` なので、片方だけでは自動の配置が生きており、
32
+ 並びから外す指定にならない。
33
+
34
+ 描く位置は変えていない。 変えたのは判定だけで、焼き付けた見た目は動かない。
35
+
8
36
  ## [0.116.0] - 2026-10-01
9
37
 
10
38
  ### Fixed
@@ -4618,7 +4646,8 @@ Initial OSS release.
4618
4646
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
4619
4647
  行き止まりになる。
4620
4648
 
4621
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.116.0...HEAD
4649
+ [Unreleased]: https://github.com/cardene777/cdl/compare/v0.117.0...HEAD
4650
+ [0.117.0]: https://github.com/cardene777/cdl/compare/v0.116.0...v0.117.0
4622
4651
  [0.116.0]: https://github.com/cardene777/cdl/compare/v0.115.0...v0.116.0
4623
4652
  [0.115.0]: https://github.com/cardene777/cdl/compare/v0.114.0...v0.115.0
4624
4653
  [0.114.0]: https://github.com/cardene777/cdl/compare/v0.113.0...v0.114.0
package/dist/index.cjs CHANGED
@@ -17347,6 +17347,9 @@ function visualValidateInner(laid, diag, violations, counts, push, profile, skip
17347
17347
  return { diagramId: safeDiagramId(diag), ok: false, violations, counts, profile, skippedAxes };
17348
17348
  }
17349
17349
  }
17350
+ function \u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n) {
17351
+ return n.posX !== void 0 && n.posY !== void 0;
17352
+ }
17350
17353
  function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5668) {
17351
17354
  const LIFELINE_W_THRESHOLD = 8;
17352
17355
  for (const n of laid.nodes) {
@@ -17420,6 +17423,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
17420
17423
  }
17421
17424
  const byLane = /* @__PURE__ */ new Map();
17422
17425
  for (const n of laid.nodes) {
17426
+ if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
17423
17427
  const list = byLane.get(n.lane) ?? [];
17424
17428
  list.push(n);
17425
17429
  byLane.set(n.lane, list);
@@ -17764,6 +17768,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
17764
17768
  const byLaneCol = /* @__PURE__ */ new Map();
17765
17769
  for (const n of laid.nodes) {
17766
17770
  if (n.id.endsWith("-spacer") || /^s\d+-/.test(n.id)) continue;
17771
+ if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
17767
17772
  const list = byLaneCol.get(n.lane) ?? [];
17768
17773
  list.push(n);
17769
17774
  byLaneCol.set(n.lane, list);
@@ -17840,7 +17845,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
17840
17845
  for (const l of laid.lanes) laneById.set(l.id, l);
17841
17846
  for (const n of laid.nodes) {
17842
17847
  if (n.id.endsWith("-spacer") || /^s\d+-/.test(n.id)) continue;
17843
- if (n.posX !== void 0 && n.posY !== void 0) continue;
17848
+ if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
17844
17849
  const lane = laneById.get(n.lane);
17845
17850
  if (!lane) continue;
17846
17851
  const laneCx = lane.x + lane.width / 2;