@cardenelabs/cdl 0.45.0 → 0.46.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,30 @@ CDL (Chainome Diagram Language) の主要変更履歴。
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.46.0] - 2026-09-11
9
+
10
+ ### Fixed
11
+
12
+ - **上向きに曲がる線の角に突起が出るのを直した** (#801)
13
+
14
+ 縦の対の辺 (`fromSide` と `toSide` が上下) は、角を「手前 14 で直線を止め、弧で 14 先へ
15
+ 抜ける」 形で丸める。 その手前と先を上下に固定していたため、**相手が上にある辺**
16
+ (`fromSide === "top"`) では直線が角を 14 通り過ぎ、弧が戻る形になっていた。
17
+ 戻りが画面上の突起として見える。
18
+
19
+ 見本帳 `class-complex-demo` の実物で並べると差が読める。
20
+
21
+ ```
22
+ 正しい (下向き) 壊れていた (上向き)
23
+ L 903 1244 <- 角の 14 手前 L 1613 1244 <- 角を 14 通り過ぎている
24
+ Q 903 1258, 917 1258 Q 1613 1258, 1627 1258
25
+ ```
26
+
27
+ 角の丸めを **進む向き** から決めるようにした。 同じ誤りは `CAR-482` が別の分岐で
28
+ 1 度直しており、本件はその時に見落とされた 2 つ目の分岐。
29
+
30
+ 下向きの辺 (`fromSide === "bottom"`) の `d` は 1 文字も変わらない。
31
+
8
32
  ## [0.45.0] - 2026-09-11
9
33
 
10
34
  ### Added
@@ -2296,7 +2320,8 @@ Initial OSS release.
2296
2320
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
2297
2321
  行き止まりになる。
2298
2322
 
2299
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.45.0...HEAD
2323
+ [Unreleased]: https://github.com/cardene777/cdl/compare/v0.46.0...HEAD
2324
+ [0.46.0]: https://github.com/cardene777/cdl/compare/v0.45.0...v0.46.0
2300
2325
  [0.45.0]: https://github.com/cardene777/cdl/compare/v0.44.0...v0.45.0
2301
2326
  [0.44.0]: https://github.com/cardene777/cdl/compare/v0.43.0...v0.44.0
2302
2327
  [0.43.0]: https://github.com/cardene777/cdl/compare/v0.42.0...v0.43.0
package/dist/index.cjs CHANGED
@@ -18182,6 +18182,9 @@ var LANE_PAD_MIN = 25;
18182
18182
  // src/layout/edges.ts
18183
18183
  var VERTICAL_DETOUR_GAP = 50;
18184
18184
  var VERTICAL_DETOUR_CORNER = 14;
18185
+ function verticalCornerDir(from, to) {
18186
+ return to < from ? -1 : 1;
18187
+ }
18185
18188
  var VERTICAL_DETOUR_EXIT = 45;
18186
18189
  function nearestBoxDistance(anchorX, dir, verticalTop, verticalBottom, boxes) {
18187
18190
  let nearest = Infinity;
@@ -19363,12 +19366,14 @@ function routePath(from, to, fromSide, toSide, obstacles = [], detourSide, _from
19363
19366
  midY2 = retreatBelowMidBlockers(midY2);
19364
19367
  const corner = 14;
19365
19368
  const labelY = midY2 - labelInit;
19369
+ const \u7E26\u306E\u5411\u304DA = verticalCornerDir(A.y, midY2);
19370
+ const \u7E26\u306E\u5411\u304DB = verticalCornerDir(midY2, B.y);
19366
19371
  return {
19367
19372
  d: `M ${A.x} ${A.y}
19368
- L ${A.x} ${midY2 - corner}
19373
+ L ${A.x} ${midY2 - \u7E26\u306E\u5411\u304DA * corner}
19369
19374
  Q ${A.x} ${midY2}, ${A.x + xDir * corner} ${midY2}
19370
19375
  L ${B.x - xDir * corner} ${midY2}
19371
- Q ${B.x} ${midY2}, ${B.x} ${midY2 + corner}
19376
+ Q ${B.x} ${midY2}, ${B.x} ${midY2 + \u7E26\u306E\u5411\u304DB * corner}
19372
19377
  L ${B.x} ${B.y}`,
19373
19378
  labelX: (A.x + B.x) / 2,
19374
19379
  labelY,