@cardenelabs/cdl 0.107.0 → 0.108.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,38 @@ CDL (Chainome Diagram Language) の主要変更履歴。
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.108.0] - 2026-09-30
9
+
10
+ ### Fixed
11
+
12
+ - **絵の中に置く題が、読めない大きさまで縮むのを止めた** (#953)
13
+
14
+ 絵の中に字を置く 34 種 (`shape-person` / `shape-bank` / `shape-file` 等) は、題が箱の幅に
15
+ 収まらない時に字を小さくして収める。 **この縮めに下限が無かった**。
16
+ 幅 300 の箱に 120 字の題を渡すと `shape-person` は 2.4px で描く = 点にしか見えない。
17
+
18
+ 同じ engine でも箱の種別 (`actor` / `card` / `event` / `function` / `storage`) は
19
+ `kinds/compact-title.ts` の `fitTextSize` が 11px で縮めるのをやめる。 絵の中の字だけが
20
+ 下限を持たなかった。 検査の側は 0.107.0 (#951) で挙げられるようになっていたが、
21
+ 描く側には止める仕組みが無かった。
22
+
23
+ 幅で縮める倍率を読める下限 (11px) で止め、**止めた行は入るところまでで切って `…` を付ける**。
24
+ 切る形を採ったのは、箱の中に収める決まり (#433) を全種別の検査が見ているため。
25
+ 横へ出す形も採れるが、120 字を 11px で描くと 1400px になり隣の箱まで覆う。
26
+ `kinds/box-lines.ts` の `幅に収める` が #534 で決めた形と同じになる。
27
+
28
+ 2 つの場合は下限を当てない。
29
+
30
+ | 場合 | 理由 |
31
+ |---|---|
32
+ | 素の大きさが下限以下 | 当てると幅の縮めが 1 度も効かず、横へ大きく出る |
33
+ | `…` すら入らない幅 | 切ると名前が 1 字も残らない = 読めない大きさより悪い |
34
+
35
+ 高さで決まる字の大きさ (`labelPlan` の下限 9) は変えていない。 縦にはみ出すと絵と重なり、
36
+ 字も絵もどちらも読めなくなる。
37
+
38
+ 焼き付けた見た目の記録は 1 件も動いていない。
39
+
8
40
  ## [0.107.0] - 2026-09-30
9
41
 
10
42
  ### Fixed
@@ -4327,7 +4359,8 @@ Initial OSS release.
4327
4359
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
4328
4360
  行き止まりになる。
4329
4361
 
4330
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.107.0...HEAD
4362
+ [Unreleased]: https://github.com/cardene777/cdl/compare/v0.108.0...HEAD
4363
+ [0.108.0]: https://github.com/cardene777/cdl/compare/v0.107.0...v0.108.0
4331
4364
  [0.107.0]: https://github.com/cardene777/cdl/compare/v0.106.0...v0.107.0
4332
4365
  [0.106.0]: https://github.com/cardene777/cdl/compare/v0.105.0...v0.106.0
4333
4366
  [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
  }
@@ -28709,13 +28720,15 @@ function labelBlock(node, pos, size, band) {
28709
28720
  node.eyebrow ? textWidth(node.eyebrow, EYEBROW_SIZE2, EYEBROW_TRACKING) : 0,
28710
28721
  node.subtitle ? textWidth(node.subtitle, SUB_SIZE) : 0
28711
28722
  );
28712
- const { k, x, y: baseline } = fitLabel(band, { \u4E0A, \u4E0B, \u5E45 }, pos);
28723
+ const \u4E0B\u9650 = \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(node.title ?? "", size, 0, band.w, textWidth);
28724
+ const { k, x, y: baseline } = fitLabel(band, { \u4E0A, \u4E0B, \u5E45 }, pos, \u4E0B\u9650);
28713
28725
  return { k, x, baseline, \u4E0A\u7AEF: baseline - \u4E0A * k, \u4E0B\u7AEF: baseline + \u4E0B * k };
28714
28726
  }
28715
28727
  function commonLabel(node, pos, size, band) {
28716
28728
  const \u584A = labelBlock(node, pos, size, band);
28717
28729
  const k = \u584A.k;
28718
28730
  const x = \u584A.x;
28731
+ 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
28732
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
28720
28733
  node.eyebrow && /* @__PURE__ */ jsxRuntime.jsx(
28721
28734
  "text",
@@ -28727,7 +28740,7 @@ function commonLabel(node, pos, size, band) {
28727
28740
  letterSpacing: EYEBROW_TRACKING * k,
28728
28741
  textAnchor: "middle",
28729
28742
  fill: "var(--cdl-tone-accent, #2d6a8f)",
28730
- children: node.eyebrow
28743
+ children: \u5207\u308B(node.eyebrow, EYEBROW_SIZE2, EYEBROW_TRACKING)
28731
28744
  }
28732
28745
  ),
28733
28746
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -28740,7 +28753,7 @@ function commonLabel(node, pos, size, band) {
28740
28753
  fontWeight: 700,
28741
28754
  textAnchor: "middle",
28742
28755
  fill: "var(--cdl-text, #1a1f2a)",
28743
- children: node.title
28756
+ children: \u5207\u308B(node.title ?? "", size)
28744
28757
  }
28745
28758
  ),
28746
28759
  node.subtitle && /* @__PURE__ */ jsxRuntime.jsx(
@@ -28751,7 +28764,7 @@ function commonLabel(node, pos, size, band) {
28751
28764
  fontSize: SUB_SIZE * k,
28752
28765
  textAnchor: "middle",
28753
28766
  fill: "var(--cdl-text-dim, #5a6270)",
28754
- children: node.subtitle
28767
+ children: \u5207\u308B(node.subtitle, SUB_SIZE)
28755
28768
  }
28756
28769
  )
28757
28770
  ] });
@@ -29086,7 +29099,9 @@ function planLabel(node, cx, \u5E45\u4E0A\u9650, plan) {
29086
29099
  node.eyebrow && plan.\u80A9\u66F8 ? textWidth(node.eyebrow, plan.\u80A9\u66F8.size, EYEBROW_TRACKING) : 0,
29087
29100
  node.subtitle && plan.\u8AAC\u660E ? textWidth(node.subtitle, plan.\u8AAC\u660E.size) : 0
29088
29101
  );
29089
- const k = \u5E45 > 0 && \u5E45\u4E0A\u9650 > 0 ? Math.min(1, \u5E45\u4E0A\u9650 / \u5E45) : 1;
29102
+ const \u4E0B\u9650 = \u5207\u3063\u3066\u53CE\u307E\u308B\u4E0B\u9650(node.title ?? "", plan.\u540D\u524D.size, 0, \u5E45\u4E0A\u9650, textWidth);
29103
+ const k = \u5E45 > 0 && \u5E45\u4E0A\u9650 > 0 ? Math.min(1, Math.max(\u5E45\u4E0A\u9650 / \u5E45, \u4E0B\u9650)) : 1;
29104
+ 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
29105
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
29091
29106
  node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ jsxRuntime.jsx(
29092
29107
  "text",
@@ -29098,7 +29113,7 @@ function planLabel(node, cx, \u5E45\u4E0A\u9650, plan) {
29098
29113
  letterSpacing: EYEBROW_TRACKING * k,
29099
29114
  textAnchor: "middle",
29100
29115
  fill: "var(--cdl-tone-accent, #2d6a8f)",
29101
- children: node.eyebrow
29116
+ children: \u5207\u308B(node.eyebrow, plan.\u80A9\u66F8.size, EYEBROW_TRACKING)
29102
29117
  }
29103
29118
  ),
29104
29119
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -29111,7 +29126,7 @@ function planLabel(node, cx, \u5E45\u4E0A\u9650, plan) {
29111
29126
  fontWeight: 700,
29112
29127
  textAnchor: "middle",
29113
29128
  fill: "var(--cdl-text, #1a1f2a)",
29114
- children: node.title
29129
+ children: \u5207\u308B(node.title ?? "", plan.\u540D\u524D.size)
29115
29130
  }
29116
29131
  ),
29117
29132
  node.subtitle && plan.\u8AAC\u660E && /* @__PURE__ */ jsxRuntime.jsx(
@@ -29122,7 +29137,7 @@ function planLabel(node, cx, \u5E45\u4E0A\u9650, plan) {
29122
29137
  fontSize: plan.\u8AAC\u660E.size * k,
29123
29138
  textAnchor: "middle",
29124
29139
  fill: "var(--cdl-text-dim, #5a6270)",
29125
- children: node.subtitle
29140
+ children: \u5207\u308B(node.subtitle, plan.\u8AAC\u660E.size)
29126
29141
  }
29127
29142
  )
29128
29143
  ] });
@@ -30045,17 +30060,19 @@ var externalLabel = (node, cx, bottomY) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRu
30045
30060
  var LABEL_EYEBROW_SPACING = 2;
30046
30061
  function \u5E45\u306B\u53CE\u3081\u308B2(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
30047
30062
  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 };
30063
+ 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;
30064
+ const size = \u5927\u304D\u3055 * \u500D\u7387;
30065
+ const spacing = \u5B57\u9593 * \u500D\u7387;
30066
+ return { size, spacing, text: \u5E45\u3067\u5207\u308B(\u6587\u5B57\u5217, size, \u7BB1\u5E45, (u, f) => textWidth(u, f, spacing)) };
30050
30067
  }
30051
30068
  function bottomLabel(node, cx, plan) {
30052
30069
  const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B2(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING, node.w);
30053
30070
  const \u540D = \u5E45\u306B\u53CE\u3081\u308B2(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
30054
30071
  const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B2(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
30055
30072
  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 })
30073
+ 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 }),
30074
+ /* @__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 }),
30075
+ 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
30076
  ] });
30060
30077
  }
30061
30078
  var RACK_SLOT_TOP = 20;
@@ -30850,13 +30867,22 @@ function blockchainNodeExtent(strokeWidth) {
30850
30867
  return { \u4E0A: \u7E26, \u4E0B: \u7E26, \u5DE6: \u6A2A, \u53F3: \u6A2A };
30851
30868
  }
30852
30869
  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;
30870
+ const \u53CE\u3081\u308B = (t, \u5927\u304D\u3055, \u5B57\u9593) => {
30871
+ const \u6E2C\u308B = (u, f, ls) => \u5B57\u306E\u5E45(u, f) + ls * [...u].length;
30872
+ 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));
30873
+ const size = \u5927\u304D\u3055 * \u500D\u7387;
30874
+ 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) };
30875
+ };
30876
+ const \u80A9 = node.eyebrow && plan.\u80A9\u66F8 ? \u53CE\u3081\u308B(node.eyebrow, plan.\u80A9\u66F8.size, 2) : { \u500D\u7387: 1, text: node.eyebrow ?? "" };
30877
+ const \u540D = \u53CE\u3081\u308B(node.title ?? "", plan.\u540D\u524D.size, 0);
30878
+ const \u8AAC = node.subtitle && plan.\u8AAC\u660E ? \u53CE\u3081\u308B(node.subtitle, plan.\u8AAC\u660E.size, 0) : { \u500D\u7387: 1, text: node.subtitle ?? "" };
30879
+ const \u80A9\u66F8\u500D\u7387 = \u80A9.\u500D\u7387;
30880
+ const \u540D\u524D\u500D\u7387 = \u540D.\u500D\u7387;
30881
+ const \u8AAC\u660E\u500D\u7387 = \u8AAC.\u500D\u7387;
30856
30882
  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 })
30883
+ 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 }),
30884
+ /* @__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 }),
30885
+ 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
30886
  ] });
30861
30887
  }
30862
30888
  function EthereumDiamond({ cx, cy, h, colors }) {
@@ -31465,17 +31491,19 @@ function \u5B57\u5E45(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593) {
31465
31491
  }
31466
31492
  function \u5E45\u306B\u53CE\u3081\u308B3(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
31467
31493
  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 };
31494
+ 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;
31495
+ const size = \u5927\u304D\u3055 * \u500D\u7387;
31496
+ const spacing = \u5B57\u9593 * \u500D\u7387;
31497
+ return { size, spacing, text: \u5E45\u3067\u5207\u308B(\u6587\u5B57\u5217, size, \u7BB1\u5E45, (u, f) => \u5B57\u5E45(u, f, spacing)) };
31470
31498
  }
31471
31499
  function bottomLabel3(node, cx, plan) {
31472
31500
  const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B3(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING2, node.w);
31473
31501
  const \u540D = \u5E45\u306B\u53CE\u3081\u308B3(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
31474
31502
  const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B3(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
31475
31503
  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 })
31504
+ 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 }),
31505
+ /* @__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 }),
31506
+ 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
31507
  ] });
31480
31508
  }
31481
31509
  var BANK_PEDIMENT_H = 44;
@@ -31948,17 +31976,19 @@ function \u5B57\u5E452(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593) {
31948
31976
  }
31949
31977
  function \u5E45\u306B\u53CE\u3081\u308B4(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
31950
31978
  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 };
31979
+ 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;
31980
+ const size = \u5927\u304D\u3055 * \u500D\u7387;
31981
+ const spacing = \u5B57\u9593 * \u500D\u7387;
31982
+ return { size, spacing, text: \u5E45\u3067\u5207\u308B(\u6587\u5B57\u5217, size, \u7BB1\u5E45, (u, f) => \u5B57\u5E452(u, f, spacing)) };
31953
31983
  }
31954
31984
  function bottomLabel4(node, cx, plan) {
31955
31985
  const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B4(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING3, node.w);
31956
31986
  const \u540D = \u5E45\u306B\u53CE\u3081\u308B4(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
31957
31987
  const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B4(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
31958
31988
  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 })
31989
+ 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 }),
31990
+ /* @__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 }),
31991
+ 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
31992
  ] });
31963
31993
  }
31964
31994
  var DROP_SHADOW_D = 4;