@cardenelabs/cdl 0.110.0 → 0.111.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,43 @@ CDL (Chainome Diagram Language) の主要変更履歴。
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.111.0] - 2026-09-30
9
+
10
+ ### Fixed
11
+
12
+ - **収まっている行を、測り方の食い違いで切っていた** (#959)
13
+
14
+ `shape-blockchain.tsx` の名前の塊は、縮める倍率を `幅の倍率` (中で `textWidth` を使う) で
15
+ 出し、切る時は `絵の中の字の幅` で測っていた。 後者は等幅の字送りと字形の大きい方を採るので
16
+ 前者以上の値になる。 倍率が「収まる」 と言った行を、切る側が「はみ出す」 と判定していた。
17
+
18
+ 幅 140 の箱に 3 行 (肩書 / 題 / 説明) を渡すと、9 種で説明の行が切れる。
19
+ `shape-smart-contract` / `shape-rpc-node` / `shape-wallet` / `shape-nft` / `shape-token` /
20
+ `shape-blockchain-node` / `shape-bitcoin-chain` / `shape-ethereum-chain` / `shape-blockchain`。
21
+
22
+ 1 つの行の幅を、縮める時と切る時で同じ測り方で見るようにした。
23
+
24
+ ### Added
25
+
26
+ - **全種別に 3 行の名前を渡す検査を足した** (#959)
27
+
28
+ engine の検査は種別を全件描く形をいくつも持つが、**渡す題が 1 行だけ** だった。
29
+ 実際の図は肩書と題と説明の 3 行を持ち、一番広い行が題でない箱が普通にある。
30
+
31
+ その形が 1 度も描かれていなかったため、0.108.0 (#953) で入れた下限が題以外の行まで切る
32
+ 欠陥を engine 単体では見つけられず、引く側 (`cardene777/dragon`) の見本 606 枚を回して
33
+ 初めて出た (#957)。 本検査を足した時点でも、同じ穴が別の理由で 9 種に残っていた。
34
+
35
+ 98 種を 5 つの箱で描き、**渡した 3 つの文字列を切った形だけ** を数える。
36
+ 絵が自分で書く literal (`shape-blockchain` の `0x…` 等) は書き手の字ではないので数えない。
37
+
38
+ 箱を 5 つ使うのは、1 つだと帯の広い種別で空振りするため (260x260 だけを見ていた時に
39
+ 見つかったのは 1 種で、幅 140 を足すと 9 種に増えた)。
40
+
41
+ 切ってよい種別は理由を添えて宣言に書き、**両方向で見る** = 宣言に在って実物が切らなければ
42
+ 落ちる。 現在の宣言は `shape-blockchain-block` 1 件で、箱の中に決まった大きさで字を置く
43
+ 振る舞い (#526) による。
44
+
8
45
  ## [0.110.0] - 2026-09-30
9
46
 
10
47
  ### Fixed
@@ -4417,7 +4454,8 @@ Initial OSS release.
4417
4454
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
4418
4455
  行き止まりになる。
4419
4456
 
4420
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.110.0...HEAD
4457
+ [Unreleased]: https://github.com/cardene777/cdl/compare/v0.111.0...HEAD
4458
+ [0.111.0]: https://github.com/cardene777/cdl/compare/v0.110.0...v0.111.0
4421
4459
  [0.110.0]: https://github.com/cardene777/cdl/compare/v0.109.0...v0.110.0
4422
4460
  [0.109.0]: https://github.com/cardene777/cdl/compare/v0.108.0...v0.109.0
4423
4461
  [0.108.0]: https://github.com/cardene777/cdl/compare/v0.107.0...v0.108.0
package/dist/index.cjs CHANGED
@@ -30877,10 +30877,12 @@ function blockchainNodeExtent(strokeWidth) {
30877
30877
  function bottomLabel2(node, cx, plan) {
30878
30878
  const \u53CE\u3081\u308B = (t, \u5927\u304D\u3055, \u5B57\u9593, \u984C\u304B = false) => {
30879
30879
  const \u6E2C\u308B = (u, f, ls) => \u5B57\u306E\u5E45(u, f) + ls * [...u].length;
30880
+ const \u7D20\u306E\u5E45 = \u6E2C\u308B(t, \u5927\u304D\u3055, \u5B57\u9593);
30881
+ const \u53CE\u307E\u308B = \u7D20\u306E\u5E45 > node.w && node.w > 0 ? node.w / \u7D20\u306E\u5E45 : 1;
30880
30882
  const \u4E0B\u9650 = \u984C\u304B ? \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(t, \u5927\u304D\u3055, \u5B57\u9593, node.w, \u6E2C\u308B) : 0;
30881
- const \u500D\u7387 = Math.max(\u5E45\u306E\u500D\u7387(t, \u5927\u304D\u3055, \u5B57\u9593, node.w), \u4E0B\u9650);
30883
+ const \u500D\u7387 = Math.max(\u53CE\u307E\u308B, \u4E0B\u9650);
30882
30884
  const size = \u5927\u304D\u3055 * \u500D\u7387;
30883
- return { \u500D\u7387, text: \u5E2F\u3067\u5207\u308B(t, size, node.w, (u, f) => \u5B57\u306E\u5E45(u, f) + \u5B57\u9593 * \u500D\u7387 * [...u].length) };
30885
+ return { \u500D\u7387, text: \u5E2F\u3067\u5207\u308B(t, size, node.w, (u, f) => \u6E2C\u308B(u, f, \u5B57\u9593 * \u500D\u7387)) };
30884
30886
  };
30885
30887
  const \u80A9 = node.eyebrow && plan.\u80A9\u66F8 ? \u53CE\u3081\u308B(node.eyebrow, plan.\u80A9\u66F8.size, 2) : { \u500D\u7387: 1, text: node.eyebrow ?? "" };
30886
30888
  const \u540D = \u53CE\u3081\u308B(node.title ?? "", plan.\u540D\u524D.size, 0, true);