@cardenelabs/cdl 0.107.0 → 0.109.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,62 @@ CDL (Chainome Diagram Language) の主要変更履歴。
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.109.0] - 2026-09-30
9
+
10
+ ### Fixed
11
+
12
+ - **頭の帯が、図の描いた題と同じ字をもう 1 度出していた** (#955)
13
+
14
+ `CdlDiagramView` は既定で頭の帯を出し、その左上に図の話題 (`topic`) を小さな字で置く。
15
+ 0.96.0 (#930) から図表 15 種が自分の題を箱の上に描くようになったため、話題と題が同じ
16
+ 文字列の図では同じ字が 2 か所に並んでいた。
17
+
18
+ 実測は `chart-bar` 1 つの図で 2 件 (帯の `div` と図の `text`)。 `hideHeader` を渡す側
19
+ (見本帳) には出ず、**engine の既定で描く側** に出る。 この repo の `thumbnail.tsx` も
20
+ `hideHeader={false}` を渡している。
21
+
22
+ 図が話題と同じ字を既に描いているなら、帯は話題を出さない。 判定は 0.103.0 (#943) で
23
+ 出した `drawsFigureTitle` から導く = 種別の一覧を手で持つと、図表が増えた日にずれる。
24
+
25
+ 落とすのは話題の 1 行だけで、帯そのものと段の印は残る。 印は `ml-auto` で右へ寄せてある
26
+ ので並びも動かない。 話題は図の代替文 (`buildDiagramAltText`) に入るため、読み上げでは
27
+ 引き続き届く。
28
+
29
+ 箱の題 (`node-label`) が話題と同じ場合は出し続ける。 図表と違い箱は図の中の 1 つに
30
+ すぎず、話題を名乗る場所が他に無い。
31
+
32
+ ## [0.108.0] - 2026-09-30
33
+
34
+ ### Fixed
35
+
36
+ - **絵の中に置く題が、読めない大きさまで縮むのを止めた** (#953)
37
+
38
+ 絵の中に字を置く 34 種 (`shape-person` / `shape-bank` / `shape-file` 等) は、題が箱の幅に
39
+ 収まらない時に字を小さくして収める。 **この縮めに下限が無かった**。
40
+ 幅 300 の箱に 120 字の題を渡すと `shape-person` は 2.4px で描く = 点にしか見えない。
41
+
42
+ 同じ engine でも箱の種別 (`actor` / `card` / `event` / `function` / `storage`) は
43
+ `kinds/compact-title.ts` の `fitTextSize` が 11px で縮めるのをやめる。 絵の中の字だけが
44
+ 下限を持たなかった。 検査の側は 0.107.0 (#951) で挙げられるようになっていたが、
45
+ 描く側には止める仕組みが無かった。
46
+
47
+ 幅で縮める倍率を読める下限 (11px) で止め、**止めた行は入るところまでで切って `…` を付ける**。
48
+ 切る形を採ったのは、箱の中に収める決まり (#433) を全種別の検査が見ているため。
49
+ 横へ出す形も採れるが、120 字を 11px で描くと 1400px になり隣の箱まで覆う。
50
+ `kinds/box-lines.ts` の `幅に収める` が #534 で決めた形と同じになる。
51
+
52
+ 2 つの場合は下限を当てない。
53
+
54
+ | 場合 | 理由 |
55
+ |---|---|
56
+ | 素の大きさが下限以下 | 当てると幅の縮めが 1 度も効かず、横へ大きく出る |
57
+ | `…` すら入らない幅 | 切ると名前が 1 字も残らない = 読めない大きさより悪い |
58
+
59
+ 高さで決まる字の大きさ (`labelPlan` の下限 9) は変えていない。 縦にはみ出すと絵と重なり、
60
+ 字も絵もどちらも読めなくなる。
61
+
62
+ 焼き付けた見た目の記録は 1 件も動いていない。
63
+
8
64
  ## [0.107.0] - 2026-09-30
9
65
 
10
66
  ### Fixed
@@ -4327,7 +4383,9 @@ Initial OSS release.
4327
4383
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
4328
4384
  行き止まりになる。
4329
4385
 
4330
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.107.0...HEAD
4386
+ [Unreleased]: https://github.com/cardene777/cdl/compare/v0.109.0...HEAD
4387
+ [0.109.0]: https://github.com/cardene777/cdl/compare/v0.108.0...v0.109.0
4388
+ [0.108.0]: https://github.com/cardene777/cdl/compare/v0.107.0...v0.108.0
4331
4389
  [0.107.0]: https://github.com/cardene777/cdl/compare/v0.106.0...v0.107.0
4332
4390
  [0.106.0]: https://github.com/cardene777/cdl/compare/v0.105.0...v0.106.0
4333
4391
  [0.105.0]: https://github.com/cardene777/cdl/compare/v0.104.0...v0.105.0
package/dist/index.cjs CHANGED
@@ -14701,6 +14701,14 @@ function \u5E45\u306E\u500D\u7387(text, size, letterSpacing, \u5E45) {
14701
14701
  const \u5B9F\u5E45 = textWidth(text, size, letterSpacing);
14702
14702
  return \u5B9F\u5E45 > \u5E45 ? \u5E45 / \u5B9F\u5E45 : 1;
14703
14703
  }
14704
+ function \u8AAD\u3081\u308B\u4E0B\u9650\u306E\u500D\u7387(\u5927\u304D\u3055) {
14705
+ return \u5927\u304D\u3055 > MIN_TITLE_FONT_SIZE ? MIN_TITLE_FONT_SIZE / \u5927\u304D\u3055 : 0;
14706
+ }
14707
+ function \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(\u984C, \u5927\u304D\u3055, \u5B57\u9593, \u5E45\u4E0A\u9650, \u6E2C\u308B) {
14708
+ const \u4E0B\u9650 = \u8AAD\u3081\u308B\u4E0B\u9650\u306E\u500D\u7387(\u5927\u304D\u3055);
14709
+ if (!(\u4E0B\u9650 > 0) || !(\u5E45\u4E0A\u9650 > 0)) return 0;
14710
+ return \u5E45\u3067\u5207\u308B(\u984C, \u5927\u304D\u3055 * \u4E0B\u9650, \u5E45\u4E0A\u9650, (u, f) => \u6E2C\u308B(u, f, \u5B57\u9593 * \u4E0B\u9650)) === "" ? 0 : \u4E0B\u9650;
14711
+ }
14704
14712
  var TITLE_MAX = 18;
14705
14713
  var TITLE_MIN = 9;
14706
14714
  var TITLE_RATIO = 0.17;
@@ -14860,16 +14868,19 @@ function bodyBand(node, opt) {
14860
14868
  const h = Math.max(0, \u7BB1h - \u7E26\u4F59\u767D * ky);
14861
14869
  return { x, y, w, h, cx: x + w / 2, cy: y + h / 2, \u53F3: x + w, \u5E95: y + h };
14862
14870
  }
14863
- function fitLabel(band, block, pos) {
14871
+ function fitLabel(band, block, pos, \u6A2A\u306E\u4E0B\u9650 = 0) {
14864
14872
  const \u7E26 = block.\u4E0A + block.\u4E0B;
14865
14873
  const \u6A2A = Math.max(0, block.\u5E45);
14866
14874
  if (!(\u7E26 > 0)) return { k: 1, x: pos.x, y: pos.y };
14867
14875
  if (!(band.h > 0) || !(band.w > 0)) return { k: 0, x: band.x + band.w / 2, y: band.y };
14868
- const k = Math.min(1, band.h / \u7E26, \u6A2A > 0 ? band.w / \u6A2A : 1);
14876
+ const \u6A2A\u3067 = \u6A2A > 0 ? Math.max(band.w / \u6A2A, \u6A2A\u306E\u4E0B\u9650) : 1;
14877
+ const k = Math.min(1, band.h / \u7E26, \u6A2A\u3067);
14869
14878
  const \u534A = \u6A2A * k / 2;
14870
14879
  return {
14871
14880
  k,
14872
- x: Math.max(band.x + \u534A, Math.min(pos.x, band.x + band.w - \u534A)),
14881
+ // 下限で止めた塊は帯より広い。 その時は帯の中央に置いて左右へ均等に出す =
14882
+ // 寄せの式をそのまま当てると片側だけに出る (`compact-title.ts` と同じ判断)
14883
+ x: \u534A * 2 > band.w ? band.x + band.w / 2 : Math.max(band.x + \u534A, Math.min(pos.x, band.x + band.w - \u534A)),
14873
14884
  y: Math.max(band.y + block.\u4E0A * k, Math.min(pos.y, band.y + band.h - block.\u4E0B * k))
14874
14885
  };
14875
14886
  }
@@ -23465,12 +23476,13 @@ function CdlHeader({
23465
23476
  stateValues,
23466
23477
  states,
23467
23478
  onJumpPhase,
23468
- headingLevel = 3
23479
+ headingLevel = 3,
23480
+ showTopic = true
23469
23481
  }) {
23470
23482
  const HeadingTag = `h${headingLevel}`;
23471
23483
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-[var(--cdl-divider,#d4d4d8)]/35 px-7 py-6", children: [
23472
23484
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-5 flex items-center gap-3", children: [
23473
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] font-bold uppercase tracking-[0.2em]", style: { color: "var(--cdl-text-accent, #2d6a8f)" }, children: topic }),
23485
+ showTopic && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] font-bold uppercase tracking-[0.2em]", style: { color: "var(--cdl-text-accent, #2d6a8f)" }, children: topic }),
23474
23486
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex items-center gap-1.5", children: [
23475
23487
  phases.map((p, idx) => {
23476
23488
  const active = idx === phaseIdx;
@@ -28709,13 +28721,15 @@ function labelBlock(node, pos, size, band) {
28709
28721
  node.eyebrow ? textWidth(node.eyebrow, EYEBROW_SIZE2, EYEBROW_TRACKING) : 0,
28710
28722
  node.subtitle ? textWidth(node.subtitle, SUB_SIZE) : 0
28711
28723
  );
28712
- const { k, x, y: baseline } = fitLabel(band, { \u4E0A, \u4E0B, \u5E45 }, pos);
28724
+ const \u4E0B\u9650 = \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(node.title ?? "", size, 0, band.w, textWidth);
28725
+ const { k, x, y: baseline } = fitLabel(band, { \u4E0A, \u4E0B, \u5E45 }, pos, \u4E0B\u9650);
28713
28726
  return { k, x, baseline, \u4E0A\u7AEF: baseline - \u4E0A * k, \u4E0B\u7AEF: baseline + \u4E0B * k };
28714
28727
  }
28715
28728
  function commonLabel(node, pos, size, band) {
28716
28729
  const \u584A = labelBlock(node, pos, size, band);
28717
28730
  const k = \u584A.k;
28718
28731
  const x = \u584A.x;
28732
+ const \u5207\u308B = (t, \u5927\u304D\u3055, \u5B57\u9593 = 0) => \u5E45\u3067\u5207\u308B(t, \u5927\u304D\u3055 * k, band.w, (u, f) => textWidth(u, f, \u5B57\u9593 * k));
28719
28733
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
28720
28734
  node.eyebrow && /* @__PURE__ */ jsxRuntime.jsx(
28721
28735
  "text",
@@ -28727,7 +28741,7 @@ function commonLabel(node, pos, size, band) {
28727
28741
  letterSpacing: EYEBROW_TRACKING * k,
28728
28742
  textAnchor: "middle",
28729
28743
  fill: "var(--cdl-tone-accent, #2d6a8f)",
28730
- children: node.eyebrow
28744
+ children: \u5207\u308B(node.eyebrow, EYEBROW_SIZE2, EYEBROW_TRACKING)
28731
28745
  }
28732
28746
  ),
28733
28747
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -28740,7 +28754,7 @@ function commonLabel(node, pos, size, band) {
28740
28754
  fontWeight: 700,
28741
28755
  textAnchor: "middle",
28742
28756
  fill: "var(--cdl-text, #1a1f2a)",
28743
- children: node.title
28757
+ children: \u5207\u308B(node.title ?? "", size)
28744
28758
  }
28745
28759
  ),
28746
28760
  node.subtitle && /* @__PURE__ */ jsxRuntime.jsx(
@@ -28751,7 +28765,7 @@ function commonLabel(node, pos, size, band) {
28751
28765
  fontSize: SUB_SIZE * k,
28752
28766
  textAnchor: "middle",
28753
28767
  fill: "var(--cdl-text-dim, #5a6270)",
28754
- children: node.subtitle
28768
+ children: \u5207\u308B(node.subtitle, SUB_SIZE)
28755
28769
  }
28756
28770
  )
28757
28771
  ] });
@@ -29086,7 +29100,9 @@ function planLabel(node, cx, \u5E45\u4E0A\u9650, plan) {
29086
29100
  node.eyebrow && plan.\u80A9\u66F8 ? textWidth(node.eyebrow, plan.\u80A9\u66F8.size, EYEBROW_TRACKING) : 0,
29087
29101
  node.subtitle && plan.\u8AAC\u660E ? textWidth(node.subtitle, plan.\u8AAC\u660E.size) : 0
29088
29102
  );
29089
- const k = \u5E45 > 0 && \u5E45\u4E0A\u9650 > 0 ? Math.min(1, \u5E45\u4E0A\u9650 / \u5E45) : 1;
29103
+ const \u4E0B\u9650 = \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(node.title ?? "", plan.\u540D\u524D.size, 0, \u5E45\u4E0A\u9650, textWidth);
29104
+ const k = \u5E45 > 0 && \u5E45\u4E0A\u9650 > 0 ? Math.min(1, Math.max(\u5E45\u4E0A\u9650 / \u5E45, \u4E0B\u9650)) : 1;
29105
+ const \u5207\u308B = (t, \u5927\u304D\u3055, \u5B57\u9593 = 0) => \u5E45\u3067\u5207\u308B(t, \u5927\u304D\u3055 * k, \u5E45\u4E0A\u9650, (u, f) => textWidth(u, f, \u5B57\u9593 * k));
29090
29106
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
29091
29107
  node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx(
29092
29108
  "text",
@@ -29098,7 +29114,7 @@ function planLabel(node, cx, \u5E45\u4E0A\u9650, plan) {
29098
29114
  letterSpacing: EYEBROW_TRACKING * k,
29099
29115
  textAnchor: "middle",
29100
29116
  fill: "var(--cdl-tone-accent, #2d6a8f)",
29101
- children: node.eyebrow
29117
+ children: \u5207\u308B(node.eyebrow, plan.\u80A9\u66F8.size, EYEBROW_TRACKING)
29102
29118
  }
29103
29119
  ),
29104
29120
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -29111,7 +29127,7 @@ function planLabel(node, cx, \u5E45\u4E0A\u9650, plan) {
29111
29127
  fontWeight: 700,
29112
29128
  textAnchor: "middle",
29113
29129
  fill: "var(--cdl-text, #1a1f2a)",
29114
- children: node.title
29130
+ children: \u5207\u308B(node.title ?? "", plan.\u540D\u524D.size)
29115
29131
  }
29116
29132
  ),
29117
29133
  node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx(
@@ -29122,7 +29138,7 @@ function planLabel(node, cx, \u5E45\u4E0A\u9650, plan) {
29122
29138
  fontSize: plan.\u8AAC\u660E.size * k,
29123
29139
  textAnchor: "middle",
29124
29140
  fill: "var(--cdl-text-dim, #5a6270)",
29125
- children: node.subtitle
29141
+ children: \u5207\u308B(node.subtitle, plan.\u8AAC\u660E.size)
29126
29142
  }
29127
29143
  )
29128
29144
  ] });
@@ -30045,17 +30061,19 @@ var externalLabel = (node, cx, bottomY) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRu
30045
30061
  var LABEL_EYEBROW_SPACING = 2;
30046
30062
  function \u5E45\u306B\u53CE\u3081\u308B2(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
30047
30063
  const \u5E45 = textWidth(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
30048
- const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
30049
- return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
30064
+ const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, Math.max(\u7BB1\u5E45 / \u5E45, \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45, textWidth))) : 1;
30065
+ const size = \u5927\u304D\u3055 * \u500D\u7387;
30066
+ const spacing = \u5B57\u9593 * \u500D\u7387;
30067
+ return { size, spacing, text: \u5E45\u3067\u5207\u308B(\u6587\u5B57\u5217, size, \u7BB1\u5E45, (u, f) => textWidth(u, f, spacing)) };
30050
30068
  }
30051
30069
  function bottomLabel(node, cx, plan) {
30052
30070
  const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B2(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING, node.w);
30053
30071
  const \u540D = \u5E45\u306B\u53CE\u3081\u308B2(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
30054
30072
  const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B2(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
30055
30073
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
30056
- node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u80A9\u66F8.y, fontSize: \u80A9.size, fontWeight: 700, letterSpacing: \u80A9.spacing, textAnchor: "middle", fill: "var(--cdl-tone-accent, #2d6a8f)", children: node.eyebrow }),
30057
- /* @__PURE__ */ jsxRuntime.jsx("text", { "data-cdl-role": "node-label", x: cx, y: plan.\u540D\u524D.y, fontSize: \u540D.size, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text, #1a1f2a)", children: node.title }),
30058
- node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u8AAC\u660E.y, fontSize: \u8AAC.size, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: node.subtitle })
30074
+ node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u80A9\u66F8.y, fontSize: \u80A9.size, fontWeight: 700, letterSpacing: \u80A9.spacing, textAnchor: "middle", fill: "var(--cdl-tone-accent, #2d6a8f)", children: \u80A9.text }),
30075
+ /* @__PURE__ */ jsxRuntime.jsx("text", { "data-cdl-role": "node-label", x: cx, y: plan.\u540D\u524D.y, fontSize: \u540D.size, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text, #1a1f2a)", children: \u540D.text }),
30076
+ node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u8AAC\u660E.y, fontSize: \u8AAC.size, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: \u8AAC.text })
30059
30077
  ] });
30060
30078
  }
30061
30079
  var RACK_SLOT_TOP = 20;
@@ -30850,13 +30868,22 @@ function blockchainNodeExtent(strokeWidth) {
30850
30868
  return { \u4E0A: \u7E26, \u4E0B: \u7E26, \u5DE6: \u6A2A, \u53F3: \u6A2A };
30851
30869
  }
30852
30870
  function bottomLabel2(node, cx, plan) {
30853
- const \u80A9\u66F8\u500D\u7387 = node.eyebrow && plan.\u80A9\u66F8 ? \u5E45\u306E\u500D\u7387(node.eyebrow, plan.\u80A9\u66F8.size, 2, node.w) : 1;
30854
- const \u540D\u524D\u500D\u7387 = \u5E45\u306E\u500D\u7387(node.title, plan.\u540D\u524D.size, 0, node.w);
30855
- const \u8AAC\u660E\u500D\u7387 = node.subtitle && plan.\u8AAC\u660E ? \u5E45\u306E\u500D\u7387(node.subtitle, plan.\u8AAC\u660E.size, 0, node.w) : 1;
30871
+ const \u53CE\u3081\u308B = (t, \u5927\u304D\u3055, \u5B57\u9593) => {
30872
+ const \u6E2C\u308B = (u, f, ls) => \u5B57\u306E\u5E45(u, f) + ls * [...u].length;
30873
+ const \u500D\u7387 = Math.max(\u5E45\u306E\u500D\u7387(t, \u5927\u304D\u3055, \u5B57\u9593, node.w), \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(t, \u5927\u304D\u3055, \u5B57\u9593, node.w, \u6E2C\u308B));
30874
+ const size = \u5927\u304D\u3055 * \u500D\u7387;
30875
+ return { \u500D\u7387, text: \u5E45\u3067\u5207\u308B(t, size, node.w, (u, f) => \u5B57\u306E\u5E45(u, f) + \u5B57\u9593 * \u500D\u7387 * [...u].length) };
30876
+ };
30877
+ const \u80A9 = node.eyebrow && plan.\u80A9\u66F8 ? \u53CE\u3081\u308B(node.eyebrow, plan.\u80A9\u66F8.size, 2) : { \u500D\u7387: 1, text: node.eyebrow ?? "" };
30878
+ const \u540D = \u53CE\u3081\u308B(node.title ?? "", plan.\u540D\u524D.size, 0);
30879
+ const \u8AAC = node.subtitle && plan.\u8AAC\u660E ? \u53CE\u3081\u308B(node.subtitle, plan.\u8AAC\u660E.size, 0) : { \u500D\u7387: 1, text: node.subtitle ?? "" };
30880
+ const \u80A9\u66F8\u500D\u7387 = \u80A9.\u500D\u7387;
30881
+ const \u540D\u524D\u500D\u7387 = \u540D.\u500D\u7387;
30882
+ const \u8AAC\u660E\u500D\u7387 = \u8AAC.\u500D\u7387;
30856
30883
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
30857
- node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u80A9\u66F8.y, fontSize: plan.\u80A9\u66F8.size * \u80A9\u66F8\u500D\u7387, fontWeight: 700, letterSpacing: 2 * \u80A9\u66F8\u500D\u7387, textAnchor: "middle", fill: "var(--cdl-tone-accent, #2d6a8f)", children: node.eyebrow }),
30858
- /* @__PURE__ */ jsxRuntime.jsx("text", { "data-cdl-role": "node-label", x: cx, y: plan.\u540D\u524D.y, fontSize: plan.\u540D\u524D.size * \u540D\u524D\u500D\u7387, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text, #1a1f2a)", children: node.title }),
30859
- node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u8AAC\u660E.y, fontSize: plan.\u8AAC\u660E.size * \u8AAC\u660E\u500D\u7387, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: node.subtitle })
30884
+ node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u80A9\u66F8.y, fontSize: plan.\u80A9\u66F8.size * \u80A9\u66F8\u500D\u7387, fontWeight: 700, letterSpacing: 2 * \u80A9\u66F8\u500D\u7387, textAnchor: "middle", fill: "var(--cdl-tone-accent, #2d6a8f)", children: \u80A9.text }),
30885
+ /* @__PURE__ */ jsxRuntime.jsx("text", { "data-cdl-role": "node-label", x: cx, y: plan.\u540D\u524D.y, fontSize: plan.\u540D\u524D.size * \u540D\u524D\u500D\u7387, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text, #1a1f2a)", children: \u540D.text }),
30886
+ node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u8AAC\u660E.y, fontSize: plan.\u8AAC\u660E.size * \u8AAC\u660E\u500D\u7387, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: \u8AAC.text })
30860
30887
  ] });
30861
30888
  }
30862
30889
  function EthereumDiamond({ cx, cy, h, colors }) {
@@ -31465,17 +31492,19 @@ function \u5B57\u5E45(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593) {
31465
31492
  }
31466
31493
  function \u5E45\u306B\u53CE\u3081\u308B3(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
31467
31494
  const \u5E45 = \u5B57\u5E45(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
31468
- const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
31469
- return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
31495
+ const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, Math.max(\u7BB1\u5E45 / \u5E45, \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45, \u5B57\u5E45))) : 1;
31496
+ const size = \u5927\u304D\u3055 * \u500D\u7387;
31497
+ const spacing = \u5B57\u9593 * \u500D\u7387;
31498
+ return { size, spacing, text: \u5E45\u3067\u5207\u308B(\u6587\u5B57\u5217, size, \u7BB1\u5E45, (u, f) => \u5B57\u5E45(u, f, spacing)) };
31470
31499
  }
31471
31500
  function bottomLabel3(node, cx, plan) {
31472
31501
  const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B3(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING2, node.w);
31473
31502
  const \u540D = \u5E45\u306B\u53CE\u3081\u308B3(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
31474
31503
  const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B3(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
31475
31504
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
31476
- node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u80A9\u66F8.y, fontSize: \u80A9.size, fontWeight: 700, letterSpacing: \u80A9.spacing, textAnchor: "middle", fill: "var(--cdl-tone-accent, #2d6a8f)", children: node.eyebrow }),
31477
- /* @__PURE__ */ jsxRuntime.jsx("text", { "data-cdl-role": "node-label", x: cx, y: plan.\u540D\u524D.y, fontSize: \u540D.size, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text, #1a1f2a)", children: node.title }),
31478
- node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u8AAC\u660E.y, fontSize: \u8AAC.size, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: node.subtitle })
31505
+ node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u80A9\u66F8.y, fontSize: \u80A9.size, fontWeight: 700, letterSpacing: \u80A9.spacing, textAnchor: "middle", fill: "var(--cdl-tone-accent, #2d6a8f)", children: \u80A9.text }),
31506
+ /* @__PURE__ */ jsxRuntime.jsx("text", { "data-cdl-role": "node-label", x: cx, y: plan.\u540D\u524D.y, fontSize: \u540D.size, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text, #1a1f2a)", children: \u540D.text }),
31507
+ node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u8AAC\u660E.y, fontSize: \u8AAC.size, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: \u8AAC.text })
31479
31508
  ] });
31480
31509
  }
31481
31510
  var BANK_PEDIMENT_H = 44;
@@ -31948,17 +31977,19 @@ function \u5B57\u5E452(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593) {
31948
31977
  }
31949
31978
  function \u5E45\u306B\u53CE\u3081\u308B4(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
31950
31979
  const \u5E45 = \u5B57\u5E452(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
31951
- const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
31952
- return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
31980
+ const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, Math.max(\u7BB1\u5E45 / \u5E45, \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45, \u5B57\u5E452))) : 1;
31981
+ const size = \u5927\u304D\u3055 * \u500D\u7387;
31982
+ const spacing = \u5B57\u9593 * \u500D\u7387;
31983
+ return { size, spacing, text: \u5E45\u3067\u5207\u308B(\u6587\u5B57\u5217, size, \u7BB1\u5E45, (u, f) => \u5B57\u5E452(u, f, spacing)) };
31953
31984
  }
31954
31985
  function bottomLabel4(node, cx, plan) {
31955
31986
  const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B4(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING3, node.w);
31956
31987
  const \u540D = \u5E45\u306B\u53CE\u3081\u308B4(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
31957
31988
  const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B4(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
31958
31989
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
31959
- node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u80A9\u66F8.y, fontSize: \u80A9.size, fontWeight: 700, letterSpacing: \u80A9.spacing, textAnchor: "middle", fill: "var(--cdl-tone-accent, #2d6a8f)", children: node.eyebrow }),
31960
- /* @__PURE__ */ jsxRuntime.jsx("text", { "data-cdl-role": "node-label", x: cx, y: plan.\u540D\u524D.y, fontSize: \u540D.size, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text, #1a1f2a)", children: node.title }),
31961
- node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u8AAC\u660E.y, fontSize: \u8AAC.size, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: node.subtitle })
31990
+ node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u80A9\u66F8.y, fontSize: \u80A9.size, fontWeight: 700, letterSpacing: \u80A9.spacing, textAnchor: "middle", fill: "var(--cdl-tone-accent, #2d6a8f)", children: \u80A9.text }),
31991
+ /* @__PURE__ */ jsxRuntime.jsx("text", { "data-cdl-role": "node-label", x: cx, y: plan.\u540D\u524D.y, fontSize: \u540D.size, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text, #1a1f2a)", children: \u540D.text }),
31992
+ node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: plan.\u8AAC\u660E.y, fontSize: \u8AAC.size, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: \u8AAC.text })
31962
31993
  ] });
31963
31994
  }
31964
31995
  var DROP_SHADOW_D = 4;
@@ -33557,6 +33588,11 @@ function CdlDiagramView({ diagram: diagram2, laid: laidProp, hideHeader = false,
33557
33588
  return mergeStateValues(baseStateValues, interactive.stateOverrides);
33558
33589
  }, [isInteractive, baseStateValues, interactive.stateOverrides]);
33559
33590
  const \u5024\u306E\u540D\u524D = react.useMemo(() => \u5024\u306E\u540D\u524D\u306E\u8868\u3092\u4F5C\u308B(diagram2.inputs), [diagram2.inputs]);
33591
+ const \u56F3\u304C\u8A71\u984C\u3092\u63CF\u304F = react.useMemo(() => {
33592
+ const \u8A71\u984C = laid.topic.trim();
33593
+ if (\u8A71\u984C === "") return false;
33594
+ return laid.nodes.some((n) => drawsFigureTitle(n.kind) && (n.title ?? "").trim() === \u8A71\u984C);
33595
+ }, [laid.nodes, laid.topic]);
33560
33596
  return /* @__PURE__ */ jsxRuntime.jsxs(
33561
33597
  "div",
33562
33598
  {
@@ -33581,7 +33617,8 @@ function CdlDiagramView({ diagram: diagram2, laid: laidProp, hideHeader = false,
33581
33617
  timeline.goto(idx);
33582
33618
  timeline.play();
33583
33619
  },
33584
- headingLevel
33620
+ headingLevel,
33621
+ showTopic: !\u56F3\u304C\u8A71\u984C\u3092\u63CF\u304F
33585
33622
  }
33586
33623
  ),
33587
33624
  isInteractive && interactive.panel,