@cardenelabs/cdl 0.15.0 → 0.16.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 +27 -1
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/presets.ts +35 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,31 @@ CDL (Chainome Diagram Language) の主要変更履歴。
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.16.0] - 2026-08-28
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **クラス図の関係の種類から端の形を決めるようにした** (#574)
|
|
13
|
+
|
|
14
|
+
`classDiagram` の `relation` は `extends` / `implements` / `uses` / `aggregates` /
|
|
15
|
+
`composes` の 5 種を受けるのに、**端の形は 1 つも使っていなかった**。
|
|
16
|
+
#560 で足した端の形は「関係の種類を示す」 ためのもので、この preset が第一の使い手になる。
|
|
17
|
+
|
|
18
|
+
| 種類 | 形 | 意味 |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| `extends` / `implements` | 三角 | 継ぐ |
|
|
21
|
+
| `aggregates` / `composes` | 菱 | 持つ |
|
|
22
|
+
| `uses` | 開いた矢 | 使う |
|
|
23
|
+
|
|
24
|
+
**2 種ずつ同じ形になるのは意図**。 UML は線の種類 (実線 / 破線) と塗りの有無で分ける決まりで、
|
|
25
|
+
端の形はそれぞれ 1 種しかない。
|
|
26
|
+
|
|
27
|
+
`relation` に `head` を書けるようにし、**書いた形が勝つ**。 書かなければ種類から決まるので、
|
|
28
|
+
既存の呼出もそのまま種類に応じた形になる。
|
|
29
|
+
|
|
30
|
+
表は `Record<ClassRelationType, EdgeHead>` なので、種類を足すと形も要る。
|
|
31
|
+
|
|
32
|
+
|
|
8
33
|
## [0.15.0] - 2026-08-28
|
|
9
34
|
|
|
10
35
|
### Fixed
|
|
@@ -798,7 +823,8 @@ Initial OSS release.
|
|
|
798
823
|
使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
|
|
799
824
|
行き止まりになる。
|
|
800
825
|
|
|
801
|
-
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.
|
|
826
|
+
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.16.0...HEAD
|
|
827
|
+
[0.16.0]: https://github.com/cardene777/cdl/compare/v0.15.0...v0.16.0
|
|
802
828
|
[0.15.0]: https://github.com/cardene777/cdl/compare/v0.14.0...v0.15.0
|
|
803
829
|
[0.14.0]: https://github.com/cardene777/cdl/compare/v0.13.1...v0.14.0
|
|
804
830
|
[0.13.1]: https://github.com/cardene777/cdl/compare/v0.13.0...v0.13.1
|
package/dist/index.cjs
CHANGED
|
@@ -29429,6 +29429,13 @@ function infrastructure(preset) {
|
|
|
29429
29429
|
};
|
|
29430
29430
|
return api;
|
|
29431
29431
|
}
|
|
29432
|
+
var CLASS_RELATION_HEAD = {
|
|
29433
|
+
extends: "triangle",
|
|
29434
|
+
implements: "triangle",
|
|
29435
|
+
uses: "open",
|
|
29436
|
+
aggregates: "diamond",
|
|
29437
|
+
composes: "diamond"
|
|
29438
|
+
};
|
|
29432
29439
|
function classDiagram(preset) {
|
|
29433
29440
|
const classW = resolveStorageBoxW(preset.classWidth, "classDiagram", "classWidth");
|
|
29434
29441
|
const tone = preset.defaultTone ?? "info";
|
|
@@ -29472,7 +29479,9 @@ function classDiagram(preset) {
|
|
|
29472
29479
|
label,
|
|
29473
29480
|
...sub ? { sub } : {},
|
|
29474
29481
|
tone: r.tone ?? tone,
|
|
29475
|
-
style: "solid"
|
|
29482
|
+
style: "solid",
|
|
29483
|
+
// 関係の種類から端の形を決める (cdl#574)。 書いた形が勝つ
|
|
29484
|
+
head: r.head ?? CLASS_RELATION_HEAD[r.type]
|
|
29476
29485
|
// CAR-531 SSOT ... 旧実装は `labelOffsetY: currentIdx % 2 === 0 ? -60 : 60` で
|
|
29477
29486
|
// 複数 relation label の path 沿い集中を強制分散していた。 CAR-430 で導入した
|
|
29478
29487
|
// engine 側 fan offset (FAN_STEP 40 world) が同 from / to 群を自動分散する現在、
|