@cardenelabs/cdl 0.30.0 → 0.30.1

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,33 @@ CDL (Chainome Diagram Language) の主要変更履歴。
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.30.1] - 2026-09-05
9
+
10
+ ### Fixed
11
+
12
+ - **折れを持たない線が起点で折れなくなった** (#655)
13
+
14
+ `0.30.0` で入れた助走の伸ばし方が、区間を 1 つしか持たない線では起点まで届いていた。
15
+ その線では最後の区間が最初の区間でもあるため、いっぱいまで伸ばすと折れが起点に生まれる。
16
+
17
+ 起点から `EDGE_STUB_OUT` (40) の直進が要るところ 28 しか残らず、線がどちらへ向かうのかを
18
+ 出だしで読めない形になっていた。
19
+ 消費側の `dragon` の図で `edge-stubout-min` が 6 件落ちている。
20
+
21
+ ```text
22
+ 0.29.0 M 961 181 L 1257 181
23
+ 0.30.0 M 961 181 L 961 153 L 1257 153
24
+ ```
25
+
26
+ 末尾を辺に沿ってずらす助走に、**起点を含む区間だけ** へ掛かる上限を足した。
27
+ 上限を掛けた後の助走が `ENDPOINT_FAN_RUNUP` (40) を割る線は、ずらさず元のままにする。
28
+ 短い助走で無理にずらすと折れが密になるため。
29
+
30
+ **折れを持つ線の助走は変えない**。 最後の区間いっぱいまで伸ばす #649 の直しはそのまま残る。
31
+ 折れの有無で検査の契約を分け、起点の直進と根元の重なりを両立させた。
32
+
33
+ `cdl` 自身の 255 file / 6108 件では出ず、消費側の図で初めて出た。
34
+
8
35
  ## [0.30.0] - 2026-09-05
9
36
 
10
37
  ### Fixed
@@ -1492,7 +1519,8 @@ Initial OSS release.
1492
1519
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
1493
1520
  行き止まりになる。
1494
1521
 
1495
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.30.0...HEAD
1522
+ [Unreleased]: https://github.com/cardene777/cdl/compare/v0.30.1...HEAD
1523
+ [0.30.1]: https://github.com/cardene777/cdl/compare/v0.30.0...v0.30.1
1496
1524
  [0.30.0]: https://github.com/cardene777/cdl/compare/v0.29.0...v0.30.0
1497
1525
  [0.29.0]: https://github.com/cardene777/cdl/compare/v0.28.0...v0.29.0
1498
1526
  [0.28.0]: https://github.com/cardene777/cdl/compare/v0.27.0...v0.28.0
package/dist/index.cjs CHANGED
@@ -19855,7 +19855,11 @@ function \u672B\u5C3E\u3092\u8FBA\u306B\u6CBF\u3063\u3066\u305A\u3089\u3059(e, \
19855
19855
  if (\u9577\u3055 < ENDPOINT_FAN_RUNUP + 1) return null;
19856
19856
  const ux = (last.x1 - last.x2) / \u9577\u3055;
19857
19857
  const uy = (last.y1 - last.y2) / \u9577\u3055;
19858
- const \u4E38\u3081\u305F\u52A9\u8D70 = Math.min(\u52A9\u8D70, \u9577\u3055);
19858
+ const head = segs[0];
19859
+ const \u6700\u5F8C\u306E\u533A\u9593\u304C\u8D77\u70B9\u3092\u542B\u3080 = Math.abs(last.x1 - head.x1) <= 0.5 && Math.abs(last.y1 - head.y1) <= 0.5;
19860
+ const \u52A9\u8D70\u4E0A\u9650 = \u6700\u5F8C\u306E\u533A\u9593\u304C\u8D77\u70B9\u3092\u542B\u3080 ? \u9577\u3055 - EDGE_STUB_OUT : \u9577\u3055;
19861
+ const \u4E38\u3081\u305F\u52A9\u8D70 = Math.min(\u52A9\u8D70, \u52A9\u8D70\u4E0A\u9650);
19862
+ if (\u4E38\u3081\u305F\u52A9\u8D70 < ENDPOINT_FAN_RUNUP) return null;
19859
19863
  const \u6298\u308C1 = { x: last.x2 + ux * \u4E38\u3081\u305F\u52A9\u8D70, y: last.y2 + uy * \u4E38\u3081\u305F\u52A9\u8D70 };
19860
19864
  const \u6298\u308C2 = \u6A2A ? { x: \u6298\u308C1.x, y: \u6298\u308C1.y + d } : { x: \u6298\u308C1.x + d, y: \u6298\u308C1.y };
19861
19865
  const \u7D42\u70B9 = \u6A2A ? { x: last.x2, y: last.y2 + d } : { x: last.x2 + d, y: last.y2 };
@@ -19867,7 +19871,6 @@ function \u672B\u5C3E\u3092\u8FBA\u306B\u6CBF\u3063\u3066\u305A\u3089\u3059(e, \
19867
19871
  if (nodes.some((n) => n.id !== e.from && n.id !== e.to && segmentsCrossRect(\u65B0\u533A\u9593, nodeRect(n)))) {
19868
19872
  return null;
19869
19873
  }
19870
- const head = segs[0];
19871
19874
  const parts = [`M ${head.x1} ${head.y1}`];
19872
19875
  for (let i = 0; i < segs.length - 1; i++) {
19873
19876
  const s = segs[i];