@cardenelabs/cdl 0.33.0 → 0.34.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,21 @@ CDL (Chainome Diagram Language) の主要変更履歴。
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.34.0] - 2026-09-07
9
+
10
+ ### Changed
11
+
12
+ - **傾き図の名札の役割を値と名前で分けた** (#693)
13
+
14
+ `chart-slope-label` を `chart-slope-value` (軸の脇に置く値) と `chart-slope-name`
15
+ (その外に置く系列の名前) の 2 つにした。 古い役割は残していない。
16
+
17
+ 1 つにまとめていると、使う側が値だけに字体を当てられず、寸法を記録する側も級 14 と
18
+ 級 9-13 の 2 つを 1 行に潰してしまう。 他の図表 (`chart-stat` / `chart-stacked-bar`) も
19
+ 字を役割で分けている。
20
+
21
+ `chart-slope` は `0.33.0` で入ったばかりで、この役割で selector を書いている消費側は無い。
22
+
8
23
  ## [0.33.0] - 2026-09-07
9
24
 
10
25
  ### Added
@@ -1648,7 +1663,8 @@ Initial OSS release.
1648
1663
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
1649
1664
  行き止まりになる。
1650
1665
 
1651
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.33.0...HEAD
1666
+ [Unreleased]: https://github.com/cardene777/cdl/compare/v0.34.0...HEAD
1667
+ [0.34.0]: https://github.com/cardene777/cdl/compare/v0.33.0...v0.34.0
1652
1668
  [0.33.0]: https://github.com/cardene777/cdl/compare/v0.32.0...v0.33.0
1653
1669
  [0.32.0]: https://github.com/cardene777/cdl/compare/v0.31.1...v0.32.0
1654
1670
  [0.31.1]: https://github.com/cardene777/cdl/compare/v0.31.0...v0.31.1
package/README.md CHANGED
@@ -293,6 +293,9 @@ phase 切替に連動して `status: idle` → `status: running` のように描
293
293
 
294
294
  段の `draw` にこの node を載せると、線が左の軸から右の軸へ伸びる。
295
295
 
296
+ 名札の字は値と名前で role が分かれる (`chart-slope-value` / `chart-slope-name`)。
297
+ 値だけに字体を当てられるようにするため。
298
+
296
299
  ## 円グラフの見せ方
297
300
 
298
301
  `chart-pie` は `chartPieForm` で見せ方を選ぶ。 欄を書かない図は `ring` と同じ。
@@ -336,9 +339,13 @@ cdl は形だけを描き、 色や影は持たない (geometry only、 style
336
339
 
337
340
  明暗の切替は consumer 側の仕組み (`html` の class 等) で行う = cdl は明暗の概念を持たない。
338
341
 
339
- **`CdlRole` 型は実装にある role の全部ではない**。 実装には 32 種の role があり、
340
- 型に載っているのは 12 種。 残り 20 種 (`chart-line` / `tree-edge` / `funnel-stage` /
341
- `edge-glow` 等) は型を持たないが、 属性は付くので selector は書ける。
342
+ **`CdlRole` 型は実装にある role の全部ではない**。 型に載っているのは共通の描画で使う
343
+ ものだけで、 種別ごとの role (`chart-line` / `tree-edge` / `funnel-stage` / `edge-glow` 等)
344
+ は型を持たないが、 属性は付くので selector は書ける。
345
+
346
+ **件数は書かない**。 role は種別を足すたびに増えるため、 数を書くと必ずずれる
347
+ (実際に 32 種と書いてあった時点の実物は 85 種だった)。 一覧が要る時は source を
348
+ `data-cdl-role=` で検索する。
342
349
 
343
350
  型の内外は「共通か kind 固有か」 では分かれていない (共通の描画で使う `edge-glow` が型の外に
344
351
  あり、 枝分かれ図でしか使わない `mind-edge` も型の外にある)。 **型に載っているかどうかは
package/dist/index.cjs CHANGED
@@ -25680,7 +25680,7 @@ function ChartSlopeNode({
25680
25680
  /* @__PURE__ */ jsxRuntime.jsx(
25681
25681
  "text",
25682
25682
  {
25683
- "data-cdl-role": "chart-slope-label",
25683
+ "data-cdl-role": "chart-slope-value",
25684
25684
  x: \u5DE6\u8EF8x - \u8EF8\u304B\u3089\u5024\u307E\u3067,
25685
25685
  y: \u5DE6y + 5,
25686
25686
  textAnchor: "end",
@@ -25693,7 +25693,7 @@ function ChartSlopeNode({
25693
25693
  /* @__PURE__ */ jsxRuntime.jsx(
25694
25694
  "text",
25695
25695
  {
25696
- "data-cdl-role": "chart-slope-label",
25696
+ "data-cdl-role": "chart-slope-name",
25697
25697
  x: \u5DE6\u8EF8x - \u8EF8\u304B\u3089\u5024\u307E\u3067 - \u5DE6\u5024\u5E45 - \u5024\u304B\u3089\u540D\u524D\u307E\u3067,
25698
25698
  y: \u5DE6y + 5,
25699
25699
  textAnchor: "end",
@@ -25705,7 +25705,7 @@ function ChartSlopeNode({
25705
25705
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(
25706
25706
  "text",
25707
25707
  {
25708
- "data-cdl-role": "chart-slope-label",
25708
+ "data-cdl-role": "chart-slope-name",
25709
25709
  x: \u5DE6\u8EF8x - \u8EF8\u304B\u3089\u5024\u307E\u3067,
25710
25710
  y: \u53F3y + 5,
25711
25711
  textAnchor: "end",
@@ -25718,7 +25718,7 @@ function ChartSlopeNode({
25718
25718
  /* @__PURE__ */ jsxRuntime.jsx(
25719
25719
  "text",
25720
25720
  {
25721
- "data-cdl-role": "chart-slope-label",
25721
+ "data-cdl-role": "chart-slope-value",
25722
25722
  x: \u53F3\u8EF8x + \u8EF8\u304B\u3089\u5024\u307E\u3067,
25723
25723
  y: \u53F3y + 5,
25724
25724
  fontSize: \u5024\u306E\u7D1A,
@@ -25730,7 +25730,7 @@ function ChartSlopeNode({
25730
25730
  \u524D\u3042\u308A && /* @__PURE__ */ jsxRuntime.jsx(
25731
25731
  "text",
25732
25732
  {
25733
- "data-cdl-role": "chart-slope-label",
25733
+ "data-cdl-role": "chart-slope-name",
25734
25734
  x: \u53F3\u8EF8x + \u8EF8\u304B\u3089\u5024\u307E\u3067 + \u53F3\u5024\u5E45 + \u5024\u304B\u3089\u540D\u524D\u307E\u3067,
25735
25735
  y: \u53F3y + 5,
25736
25736
  fontSize: \u540D\u524D\u306E\u7D1A,