@cardenelabs/cdl 0.13.0 → 0.14.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/dist/react.js CHANGED
@@ -5568,10 +5568,10 @@ function fitTextSize(text, maxWidth, targetSize, minSize) {
5568
5568
  }
5569
5569
  var COMPACT_MAX_H = 100;
5570
5570
  var COMPACT_PADDING_X = 16;
5571
- var MIN_SIZE = 11;
5571
+ var MIN_TEXT_SIZE = 11;
5572
5572
  var ASCENT = 0.72;
5573
5573
  var DESCENT = 0.25;
5574
- var MIN_BAND_H = MIN_SIZE * (ASCENT + DESCENT);
5574
+ var MIN_BAND_H = MIN_TEXT_SIZE * (ASCENT + DESCENT);
5575
5575
  var EYEBROW_BASELINE = 38;
5576
5576
  var EYEBROW_SIZE = 18;
5577
5577
  var EYEBROW_GAP = 8;
@@ -5593,10 +5593,10 @@ function titlePlacement(node, \u901A\u5E38, opts = {}) {
5593
5593
  node.title,
5594
5594
  Math.max(0, node.w - COMPACT_PADDING_X),
5595
5595
  \u901A\u5E38.size,
5596
- MIN_SIZE
5596
+ MIN_TEXT_SIZE
5597
5597
  );
5598
5598
  const \u5E2F\u3067 = Math.floor(\u5E2F / (ASCENT + DESCENT));
5599
- const size = Math.max(MIN_SIZE, Math.min(\u5E45\u3067, \u5E2F\u3067));
5599
+ const size = Math.max(MIN_TEXT_SIZE, Math.min(\u5E45\u3067, \u5E2F\u3067));
5600
5600
  const \u5B57\u9AD8 = size * (ASCENT + DESCENT);
5601
5601
  const y = \u5B57\u9AD8 <= \u5E2F ? \u4E0A + \u5E2F / 2 + size * (ASCENT - DESCENT) / 2 : \u4E0A > 0 ? \u4E0A + size * ASCENT : (\u9AD8\u3055 - \u5B57\u9AD8) / 2 + size * ASCENT;
5602
5602
  return { x: node.w / 2, y, size, anchor: "middle" };
@@ -6646,20 +6646,20 @@ function ChartLineNode({
6646
6646
  const x0 = node.cx - node.w / 2;
6647
6647
  const y0 = node.cy - node.h / 2;
6648
6648
  const data = resolveChartData(node.chartData ?? [], stateValues);
6649
- const PAD_TOP = 36;
6650
- const PAD_RIGHT = 40;
6651
- const PAD_BOTTOM = 56;
6652
- const PAD_LEFT = 72;
6653
- const canvasW = node.w - PAD_LEFT - PAD_RIGHT;
6654
- const canvasH = node.h - PAD_TOP - PAD_BOTTOM;
6649
+ const PAD_TOP2 = 36;
6650
+ const PAD_RIGHT2 = 40;
6651
+ const PAD_BOTTOM2 = 56;
6652
+ const PAD_LEFT2 = 72;
6653
+ const canvasW = node.w - PAD_LEFT2 - PAD_RIGHT2;
6654
+ const canvasH = node.h - PAD_TOP2 - PAD_BOTTOM2;
6655
6655
  const values = data.map((d) => d.value);
6656
6656
  const vMin = values.length > 0 ? Math.min(...values) : 0;
6657
6657
  const vMax = values.length > 0 ? Math.max(...values) : 1;
6658
6658
  const vRange = vMax - vMin || 1;
6659
6659
  const LABEL_ROOM = 20;
6660
- const plotTop = PAD_TOP + LABEL_ROOM;
6660
+ const plotTop = PAD_TOP2 + LABEL_ROOM;
6661
6661
  const plotH = Math.max(canvasH - LABEL_ROOM * 2, 1);
6662
- const xAt = (idx) => PAD_LEFT + (data.length <= 1 ? canvasW / 2 : canvasW * idx / (data.length - 1));
6662
+ const xAt = (idx) => PAD_LEFT2 + (data.length <= 1 ? canvasW / 2 : canvasW * idx / (data.length - 1));
6663
6663
  const yAt = (v) => plotTop + plotH - (v - vMin) / vRange * plotH;
6664
6664
  const points = data.map((d, idx) => `${xAt(idx)},${yAt(d.value)}`).join(" ");
6665
6665
  const \u70B9\u307E\u3067\u306E\u9577\u3055 = [];
@@ -6704,9 +6704,9 @@ function ChartLineNode({
6704
6704
  /* @__PURE__ */ jsx(
6705
6705
  "line",
6706
6706
  {
6707
- x1: PAD_LEFT,
6707
+ x1: PAD_LEFT2,
6708
6708
  y1: t.y,
6709
- x2: PAD_LEFT + canvasW,
6709
+ x2: PAD_LEFT2 + canvasW,
6710
6710
  y2: t.y,
6711
6711
  stroke: "var(--cdl-divider, #d4d4d8)",
6712
6712
  strokeWidth: 0.75,
@@ -6717,7 +6717,7 @@ function ChartLineNode({
6717
6717
  /* @__PURE__ */ jsx(
6718
6718
  "text",
6719
6719
  {
6720
- x: PAD_LEFT - 8,
6720
+ x: PAD_LEFT2 - 8,
6721
6721
  y: t.y + 4,
6722
6722
  fontSize: 11,
6723
6723
  textAnchor: "end",
@@ -6729,9 +6729,9 @@ function ChartLineNode({
6729
6729
  /* @__PURE__ */ jsx(
6730
6730
  "line",
6731
6731
  {
6732
- x1: PAD_LEFT,
6732
+ x1: PAD_LEFT2,
6733
6733
  y1: plotTop + plotH,
6734
- x2: PAD_LEFT + canvasW,
6734
+ x2: PAD_LEFT2 + canvasW,
6735
6735
  y2: plotTop + plotH,
6736
6736
  stroke: "var(--cdl-text-mute, #8a8678)",
6737
6737
  strokeWidth: 1.25
@@ -6740,9 +6740,9 @@ function ChartLineNode({
6740
6740
  /* @__PURE__ */ jsx(
6741
6741
  "line",
6742
6742
  {
6743
- x1: PAD_LEFT,
6743
+ x1: PAD_LEFT2,
6744
6744
  y1: plotTop,
6745
- x2: PAD_LEFT,
6745
+ x2: PAD_LEFT2,
6746
6746
  y2: plotTop + plotH,
6747
6747
  stroke: "var(--cdl-text-mute, #8a8678)",
6748
6748
  strokeWidth: 1.25
@@ -6810,7 +6810,7 @@ function ChartLineNode({
6810
6810
  "text",
6811
6811
  {
6812
6812
  x: cx,
6813
- y: PAD_TOP + canvasH + 20,
6813
+ y: PAD_TOP2 + canvasH + 20,
6814
6814
  fontSize: 12,
6815
6815
  textAnchor: "middle",
6816
6816
  fill: "var(--cdl-text-dim, #5a6270)",
@@ -6833,13 +6833,13 @@ function ChartPieNode({
6833
6833
  const y0 = node.cy - node.h / 2;
6834
6834
  const data = resolveChartData(node.chartData ?? [], stateValues);
6835
6835
  const total = data.reduce((acc, d) => acc + d.value, 0) || 1;
6836
- const PAD_TOP = 20;
6837
- const PAD_BOTTOM = 20;
6838
- const chartAreaH = node.h - PAD_TOP - PAD_BOTTOM;
6836
+ const PAD_TOP2 = 20;
6837
+ const PAD_BOTTOM2 = 20;
6838
+ const chartAreaH = node.h - PAD_TOP2 - PAD_BOTTOM2;
6839
6839
  const pieAreaW = node.w * 0.5;
6840
6840
  const radius = Math.min(pieAreaW, chartAreaH) / 2 - 12;
6841
6841
  const cx = pieAreaW / 2;
6842
- const cy = PAD_TOP + chartAreaH / 2;
6842
+ const cy = PAD_TOP2 + chartAreaH / 2;
6843
6843
  let cumAngle = -Math.PI / 2;
6844
6844
  let cumFrac = 0;
6845
6845
  const slices = data.map((d) => {
@@ -6863,7 +6863,7 @@ function ChartPieNode({
6863
6863
  const \u958B\u304D\u59CB\u3081\u305F = (startFrac) => !drawing || \u958B\u304D > startFrac;
6864
6864
  const legendX = pieAreaW + 8;
6865
6865
  const legendGap = Math.min(28, chartAreaH / Math.max(data.length, 1));
6866
- const legendStartY = PAD_TOP + (chartAreaH - legendGap * data.length) / 2 + legendGap / 2;
6866
+ const legendStartY = PAD_TOP2 + (chartAreaH - legendGap * data.length) / 2 + legendGap / 2;
6867
6867
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
6868
6868
  /* @__PURE__ */ jsx(
6869
6869
  "rect",
@@ -6955,26 +6955,26 @@ function ChartBarNode({
6955
6955
  const x0 = node.cx - node.w / 2;
6956
6956
  const y0 = node.cy - node.h / 2;
6957
6957
  const data = resolveChartData(node.chartData ?? [], stateValues);
6958
- const PAD_TOP = 20;
6959
- const PAD_RIGHT = 24;
6960
- const PAD_BOTTOM = 44;
6961
- const PAD_LEFT = 60;
6962
- const canvasW = node.w - PAD_LEFT - PAD_RIGHT;
6963
- const canvasH = node.h - PAD_TOP - PAD_BOTTOM;
6958
+ const PAD_TOP2 = 20;
6959
+ const PAD_RIGHT2 = 24;
6960
+ const PAD_BOTTOM2 = 44;
6961
+ const PAD_LEFT2 = 60;
6962
+ const canvasW = node.w - PAD_LEFT2 - PAD_RIGHT2;
6963
+ const canvasH = node.h - PAD_TOP2 - PAD_BOTTOM2;
6964
6964
  const vMax = data.length > 0 ? Math.max(...data.map((d) => d.value)) : 1;
6965
6965
  const vRange = vMax || 1;
6966
6966
  const barGap = 10;
6967
6967
  const barCount = data.length || 1;
6968
6968
  const barW = (canvasW - barGap * (barCount + 1)) / barCount;
6969
- const yAt = (v) => PAD_TOP + canvasH - v / vRange * canvasH;
6970
- const xAt = (idx) => PAD_LEFT + barGap + idx * (barW + barGap);
6969
+ const yAt = (v) => PAD_TOP2 + canvasH - v / vRange * canvasH;
6970
+ const xAt = (idx) => PAD_LEFT2 + barGap + idx * (barW + barGap);
6971
6971
  const gridCount = 4;
6972
6972
  const gridTicks = Array.from({ length: gridCount + 1 }, (_, i) => {
6973
6973
  const v = vMax * i / gridCount;
6974
6974
  return { y: yAt(v), value: v };
6975
6975
  });
6976
6976
  const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
6977
- const \u6A2A\u8EF8\u306Ey = PAD_TOP + canvasH;
6977
+ const \u6A2A\u8EF8\u306Ey = PAD_TOP2 + canvasH;
6978
6978
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
6979
6979
  /* @__PURE__ */ jsx(
6980
6980
  "rect",
@@ -6994,9 +6994,9 @@ function ChartBarNode({
6994
6994
  /* @__PURE__ */ jsx(
6995
6995
  "line",
6996
6996
  {
6997
- x1: PAD_LEFT,
6997
+ x1: PAD_LEFT2,
6998
6998
  y1: t.y,
6999
- x2: PAD_LEFT + canvasW,
6999
+ x2: PAD_LEFT2 + canvasW,
7000
7000
  y2: t.y,
7001
7001
  stroke: "var(--cdl-divider, #d4d4d8)",
7002
7002
  strokeWidth: 0.75,
@@ -7007,7 +7007,7 @@ function ChartBarNode({
7007
7007
  /* @__PURE__ */ jsx(
7008
7008
  "text",
7009
7009
  {
7010
- x: PAD_LEFT - 8,
7010
+ x: PAD_LEFT2 - 8,
7011
7011
  y: t.y + 4,
7012
7012
  fontSize: 11,
7013
7013
  textAnchor: "end",
@@ -7019,10 +7019,10 @@ function ChartBarNode({
7019
7019
  /* @__PURE__ */ jsx(
7020
7020
  "line",
7021
7021
  {
7022
- x1: PAD_LEFT,
7023
- y1: PAD_TOP + canvasH,
7024
- x2: PAD_LEFT + canvasW,
7025
- y2: PAD_TOP + canvasH,
7022
+ x1: PAD_LEFT2,
7023
+ y1: PAD_TOP2 + canvasH,
7024
+ x2: PAD_LEFT2 + canvasW,
7025
+ y2: PAD_TOP2 + canvasH,
7026
7026
  stroke: "var(--cdl-text-mute, #8a8678)",
7027
7027
  strokeWidth: 1.25
7028
7028
  }
@@ -7030,7 +7030,7 @@ function ChartBarNode({
7030
7030
  data.map((d, idx) => {
7031
7031
  const bx = xAt(idx);
7032
7032
  const by = yAt(d.value);
7033
- const bh = PAD_TOP + canvasH - by;
7033
+ const bh = PAD_TOP2 + canvasH - by;
7034
7034
  const \u898B\u3048\u3066\u3044\u308B\u982D = \u6A2A\u8EF8\u306Ey - (\u6A2A\u8EF8\u306Ey - by) * \u4F38\u3073;
7035
7035
  const \u68D2 = /* @__PURE__ */ jsx(
7036
7036
  "rect",
@@ -7063,7 +7063,7 @@ function ChartBarNode({
7063
7063
  "text",
7064
7064
  {
7065
7065
  x: bx + barW / 2,
7066
- y: PAD_TOP + canvasH + 18,
7066
+ y: PAD_TOP2 + canvasH + 18,
7067
7067
  fontSize: 12,
7068
7068
  textAnchor: "middle",
7069
7069
  fill: "var(--cdl-text-dim, #5a6270)",
@@ -7084,12 +7084,12 @@ function GanttNode({
7084
7084
  const x0 = node.cx - node.w / 2;
7085
7085
  const y0 = node.cy - node.h / 2;
7086
7086
  const tasks = resolveGanttData(node.ganttData ?? [], stateValues);
7087
- const PAD_TOP = 32;
7088
- const PAD_RIGHT = 48;
7089
- const PAD_BOTTOM = 44;
7090
- const PAD_LEFT = 156;
7091
- const canvasW = node.w - PAD_LEFT - PAD_RIGHT;
7092
- const canvasH = node.h - PAD_TOP - PAD_BOTTOM;
7087
+ const PAD_TOP2 = 32;
7088
+ const PAD_RIGHT2 = 48;
7089
+ const PAD_BOTTOM2 = 44;
7090
+ const PAD_LEFT2 = 156;
7091
+ const canvasW = node.w - PAD_LEFT2 - PAD_RIGHT2;
7092
+ const canvasH = node.h - PAD_TOP2 - PAD_BOTTOM2;
7093
7093
  const rowGap = 20;
7094
7094
  const rowCount = tasks.length || 1;
7095
7095
  const rowH = Math.max(28, (canvasH - rowGap * (rowCount + 1)) / rowCount);
@@ -7116,8 +7116,8 @@ function GanttNode({
7116
7116
  const \u76EE\u76DB\u308A\u306E\u4E0A\u9650 = 200;
7117
7117
  const \u76EE\u76DB\u308A\u306E\u9593\u9694 = Math.max(1, Math.ceil(maxIdx / \u76EE\u76DB\u308A\u306E\u4E0A\u9650));
7118
7118
  const \u76EE\u76DB\u308A\u306E\u672C\u6570 = Math.ceil(maxIdx / \u76EE\u76DB\u308A\u306E\u9593\u9694);
7119
- const xAt = (idx) => PAD_LEFT + idx * cellW;
7120
- const yAt = (row) => PAD_TOP + rowGap + row * (rowH + rowGap);
7119
+ const xAt = (idx) => PAD_LEFT2 + idx * cellW;
7120
+ const yAt = (row) => PAD_TOP2 + rowGap + row * (rowH + rowGap);
7121
7121
  const \u540D\u524D = { \u6574\u6570\u306E\u958B\u59CB: /* @__PURE__ */ new Map(), \u6574\u6570\u306E\u7D42\u4E86: /* @__PURE__ */ new Map(), \u7AEF\u6570\u306E\u958B\u59CB: /* @__PURE__ */ new Map(), \u7AEF\u6570\u306E\u7D42\u4E86: /* @__PURE__ */ new Map() };
7122
7122
  const \u7F6E\u304F = (\u8868, \u4F4D\u7F6E, label) => {
7123
7123
  if (label !== "" && Number.isFinite(\u4F4D\u7F6E) && !\u8868.has(\u4F4D\u7F6E)) \u8868.set(\u4F4D\u7F6E, label);
@@ -7162,9 +7162,9 @@ function GanttNode({
7162
7162
  {
7163
7163
  "data-cdl-role": "gantt-grid",
7164
7164
  x1: xAt(i),
7165
- y1: PAD_TOP,
7165
+ y1: PAD_TOP2,
7166
7166
  x2: xAt(i),
7167
- y2: PAD_TOP + canvasH,
7167
+ y2: PAD_TOP2 + canvasH,
7168
7168
  stroke: "var(--cdl-divider, #d4d4d8)",
7169
7169
  strokeWidth: 0.75,
7170
7170
  strokeDasharray: "3 3",
@@ -7176,7 +7176,7 @@ function GanttNode({
7176
7176
  {
7177
7177
  "data-cdl-role": "gantt-tick",
7178
7178
  x: xAt(i) + cellW / 2,
7179
- y: PAD_TOP + canvasH + 18,
7179
+ y: PAD_TOP2 + canvasH + 18,
7180
7180
  fontSize: 11,
7181
7181
  textAnchor: "middle",
7182
7182
  fill: "var(--cdl-text-dim, #5a6270)",
@@ -7188,9 +7188,9 @@ function GanttNode({
7188
7188
  "line",
7189
7189
  {
7190
7190
  x1: xAt(maxIdx),
7191
- y1: PAD_TOP,
7191
+ y1: PAD_TOP2,
7192
7192
  x2: xAt(maxIdx),
7193
- y2: PAD_TOP + canvasH,
7193
+ y2: PAD_TOP2 + canvasH,
7194
7194
  stroke: "var(--cdl-divider, #d4d4d8)",
7195
7195
  strokeWidth: 0.75,
7196
7196
  opacity: 0.5
@@ -7199,7 +7199,7 @@ function GanttNode({
7199
7199
  \u6574\u3048\u305F.map((t, row) => /* @__PURE__ */ jsx(
7200
7200
  "text",
7201
7201
  {
7202
- x: PAD_LEFT - 12,
7202
+ x: PAD_LEFT2 - 12,
7203
7203
  y: yAt(row) + rowH / 2 + 4,
7204
7204
  fontSize: 12,
7205
7205
  textAnchor: "end",
@@ -7326,6 +7326,12 @@ function \u5E45\u3067\u5207\u308B(text, fontSize, \u4F7F\u3048\u308B\u5E452, \u6
7326
7326
  }
7327
7327
  return `${\u51FA}${\u7701\u7565}`;
7328
7328
  }
7329
+ var \u7E2E\u3081\u306E\u4E0B\u9650 = MIN_TEXT_SIZE;
7330
+ function \u5E45\u306B\u53CE\u3081\u308B(text, fontSize, \u4F7F\u3048\u308B\u5E452, \u6E2C\u308B = textWidth) {
7331
+ let size = fontSize;
7332
+ while (size > \u7E2E\u3081\u306E\u4E0B\u9650 && \u6E2C\u308B(text, size) > \u4F7F\u3048\u308B\u5E452) size -= 1;
7333
+ return { text: \u5E45\u3067\u5207\u308B(text, size, \u4F7F\u3048\u308B\u5E452, \u6E2C\u308B), fontSize: size };
7334
+ }
7329
7335
  function \u66F8\u8A18\u7D20\u306B\u5206\u3051\u308B(text) {
7330
7336
  const \u533A\u5207\u308A = Intl.Segmenter;
7331
7337
  if (typeof \u533A\u5207\u308A !== "function") return [...text];
@@ -7339,16 +7345,35 @@ function \u7BB1\u306B\u7A4D\u3080(\u884C, \u7BB1\u306E\u5E45, \u7BB1\u306E\u9AD8
7339
7345
  const \u6B8B\u3059 = [...\u5019\u88DC];
7340
7346
  while (\u6B8B\u3059.length > 1 && \u9AD8\u3055(\u6B8B\u3059) > \u4F7F\u3048\u308B\u9AD8\u3055) \u6B8B\u3059.pop();
7341
7347
  const \u5E45 = \u4F7F\u3048\u308B\u5E45(\u7BB1\u306E\u5E45);
7342
- const \u7DCF\u9AD8 = \u9AD8\u3055(\u6B8B\u3059);
7348
+ const \u53CE\u3081\u305F = \u6B8B\u3059.map((r) => ({ ...r, ...\u5E45\u306B\u53CE\u3081\u308B(r.text, r.fontSize, \u5E45) }));
7349
+ const \u7DCF\u9AD8 = \u9AD8\u3055(\u53CE\u3081\u305F);
7343
7350
  let \u7A4D\u307F = -\u7DCF\u9AD8 / 2;
7344
- return \u6B8B\u3059.map((r) => {
7351
+ return \u53CE\u3081\u305F.map((r) => {
7345
7352
  const dy = \u7A4D\u307F + (\u884C\u9001\u308A\u306E\u6BD4 + \u5B57\u306E\u9AD8\u3055\u306E\u6BD4) / 2 * r.fontSize;
7346
7353
  \u7A4D\u307F += r.fontSize * \u884C\u9001\u308A\u306E\u6BD4;
7347
- return { ...r, text: \u5E45\u3067\u5207\u308B(r.text, r.fontSize, \u5E45), dy };
7354
+ return { ...r, dy };
7348
7355
  });
7349
7356
  }
7350
7357
  var MIND_TONES = ["accent", "teal", "success", "warning", "info", "error"];
7351
7358
  var MIND_BOX_GAP = 24;
7359
+ var MIND_PAD = 40;
7360
+ function \u653E\u5C04\u306E\u4E2D\u8EAB(node, stateValues = {}) {
7361
+ const mindData = node.mindData ? resolveMindData(node.mindData, stateValues) : void 0;
7362
+ if (!mindData) return void 0;
7363
+ return computeMindMapLayout(
7364
+ mindData,
7365
+ node.w / 2,
7366
+ node.h / 2,
7367
+ node.w - MIND_PAD * 2,
7368
+ node.h - MIND_PAD * 2
7369
+ );
7370
+ }
7371
+ function \u653E\u5C04\u306E\u884C(n) {
7372
+ return [
7373
+ { \u5F79\u5272: "title", text: n.title, fontSize: n.isRoot ? 15 : 13 },
7374
+ { \u5F79\u5272: "subtitle", text: n.subtitle ?? "", fontSize: 9 }
7375
+ ];
7376
+ }
7352
7377
  function MindMapNode({
7353
7378
  node,
7354
7379
  active,
@@ -7358,14 +7383,8 @@ function MindMapNode({
7358
7383
  }) {
7359
7384
  const x0 = node.cx - node.w / 2;
7360
7385
  const y0 = node.cy - node.h / 2;
7361
- const mindData = node.mindData ? resolveMindData(node.mindData, stateValues) : void 0;
7362
- if (!mindData) return /* @__PURE__ */ jsx("g", { transform: `translate(${x0} ${y0})` });
7363
- const PAD = 40;
7364
- const canvasCx = node.w / 2;
7365
- const canvasCy = node.h / 2;
7366
- const canvasW = node.w - PAD * 2;
7367
- const canvasH = node.h - PAD * 2;
7368
- const layout2 = computeMindMapLayout(mindData, canvasCx, canvasCy, canvasW, canvasH);
7386
+ const layout2 = \u653E\u5C04\u306E\u4E2D\u8EAB(node, stateValues);
7387
+ if (!layout2) return /* @__PURE__ */ jsx("g", { transform: `translate(${x0} ${y0})` });
7369
7388
  const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
7370
7389
  const \u6700\u5927\u6DF1\u3055 = layout2.nodes.reduce((m, n) => Math.max(m, n.depth), 0);
7371
7390
  const \u7BB1\u304C\u51FA\u308B = (\u6DF1\u3055) => !drawing || \u6BB5\u306E\u4F38\u3073(\u4F38\u3073, \u6DF1\u3055, \u6700\u5927\u6DF1\u3055) >= 1;
@@ -7403,15 +7422,11 @@ function MindMapNode({
7403
7422
  }),
7404
7423
  layout2.nodes.map((n) => {
7405
7424
  if (!\u7BB1\u304C\u51FA\u308B(n.depth)) return null;
7406
- const \u884C = \u7BB1\u306B\u7A4D\u3080(
7407
- [
7408
- { \u5F79\u5272: "title", text: n.title, fontSize: n.isRoot ? 15 : 13 },
7409
- { \u5F79\u5272: "subtitle", text: n.subtitle ?? "", fontSize: 9 }
7410
- ],
7411
- n.w,
7412
- n.h
7413
- );
7425
+ const \u6750\u6599 = \u653E\u5C04\u306E\u884C(n);
7426
+ const \u884C = \u7BB1\u306B\u7A4D\u3080(\u6750\u6599, n.w, n.h);
7414
7427
  const \u88DC\u8DB3\u3042\u308A = (n.subtitle ?? "").trim() !== "";
7428
+ const \u540D\u524D = \u6750\u6599[0];
7429
+ const \u53CE\u3081\u305F\u540D\u524D = \u88DC\u8DB3\u3042\u308A ? void 0 : \u5E45\u306B\u53CE\u3081\u308B(\u540D\u524D.text, \u540D\u524D.fontSize, \u4F7F\u3048\u308B\u5E45(n.w));
7415
7430
  const \u6587\u5B57\u306E\u8272 = n.isRoot ? "var(--cdl-text-on-tone, #ffffff)" : "var(--cdl-chip-text, #1a1f2a)";
7416
7431
  return /* @__PURE__ */ jsxs("g", { "data-cdl-unresolved": n.unresolved ? "true" : void 0, children: [
7417
7432
  /* @__PURE__ */ jsx(
@@ -7427,7 +7442,7 @@ function MindMapNode({
7427
7442
  strokeWidth: n.isRoot ? 2 : 1.75
7428
7443
  }
7429
7444
  ),
7430
- \u88DC\u8DB3\u3042\u308A ? \u884C.map((r) => /* @__PURE__ */ jsx(
7445
+ \u53CE\u3081\u305F\u540D\u524D === void 0 ? \u884C.map((r) => /* @__PURE__ */ jsx(
7431
7446
  "text",
7432
7447
  {
7433
7448
  "data-cdl-role": r.\u5F79\u5272 === "subtitle" ? "mind-node-subtitle" : void 0,
@@ -7444,17 +7459,18 @@ function MindMapNode({
7444
7459
  )) : (
7445
7460
  // 補足が無くても **幅に収める** (#526)。 `箱に積む` を通らないこの経路だけが
7446
7461
  // 幅を見ておらず、長い名前がそのまま箱の外へ出て枝の線と重なっていた
7447
- // (実測 = 中心の箱で文字 163px に対し箱 120px)
7462
+ // (実測 = 中心の箱で文字 163px に対し箱 120px)
7463
+ // 収める手段は縮めるのが先で、切るのは下限まで縮めても入らない時だけ (#534)
7448
7464
  /* @__PURE__ */ jsx(
7449
7465
  "text",
7450
7466
  {
7451
7467
  x: n.x,
7452
7468
  y: n.y + 5,
7453
- fontSize: n.isRoot ? 15 : 13,
7469
+ fontSize: \u53CE\u3081\u305F\u540D\u524D.fontSize,
7454
7470
  fontWeight: n.isRoot ? 700 : 600,
7455
7471
  textAnchor: "middle",
7456
7472
  fill: \u6587\u5B57\u306E\u8272,
7457
- children: \u5E45\u3067\u5207\u308B(n.title, n.isRoot ? 15 : 13, \u4F7F\u3048\u308B\u5E45(n.w))
7473
+ children: \u53CE\u3081\u305F\u540D\u524D.text
7458
7474
  }
7459
7475
  )
7460
7476
  )
@@ -7689,13 +7705,13 @@ function FunnelNode({
7689
7705
  const x0 = node.cx - node.w / 2;
7690
7706
  const y0 = node.cy - node.h / 2;
7691
7707
  const stages = resolveFunnelData(node.funnelData ?? [], stateValues);
7692
- const PAD_TOP = 32;
7693
- const PAD_RIGHT = 24;
7694
- const PAD_BOTTOM = 32;
7695
- const PAD_LEFT = 24;
7708
+ const PAD_TOP2 = 32;
7709
+ const PAD_RIGHT2 = 24;
7710
+ const PAD_BOTTOM2 = 32;
7711
+ const PAD_LEFT2 = 24;
7696
7712
  const legendW = 160;
7697
- const canvasW = node.w - PAD_LEFT - PAD_RIGHT - legendW;
7698
- const canvasH = node.h - PAD_TOP - PAD_BOTTOM;
7713
+ const canvasW = node.w - PAD_LEFT2 - PAD_RIGHT2 - legendW;
7714
+ const canvasH = node.h - PAD_TOP2 - PAD_BOTTOM2;
7699
7715
  const stageCount = stages.length || 1;
7700
7716
  const gap = 4;
7701
7717
  const stageH = (canvasH - gap * (stageCount - 1)) / stageCount;
@@ -7715,15 +7731,15 @@ function FunnelNode({
7715
7731
  const \u6BB5 = stages.map((s, idx) => {
7716
7732
  const prev = idx > 0 ? stages[idx - 1] : null;
7717
7733
  const dropRate = prev && prev.count > 0 ? (prev.count - s.count) / prev.count * 100 : 0;
7718
- const y = PAD_TOP + idx * (stageH + gap);
7734
+ const y = PAD_TOP2 + idx * (stageH + gap);
7719
7735
  const topW = widthAtStep(idx);
7720
7736
  const bottomW = widthAtStep(idx + 1);
7721
- const cx = PAD_LEFT + canvasW / 2;
7737
+ const cx = PAD_LEFT2 + canvasW / 2;
7722
7738
  const topX = cx - topW / 2;
7723
7739
  const bottomX = cx - bottomW / 2;
7724
7740
  const points = `${topX},${y} ${topX + topW},${y} ${bottomX + bottomW},${y + stageH} ${bottomX},${y + stageH}`;
7725
7741
  const tone = toneByIndex(idx);
7726
- const legendX = PAD_LEFT + canvasW + 24;
7742
+ const legendX = PAD_LEFT2 + canvasW + 24;
7727
7743
  return /* @__PURE__ */ jsxs("g", { children: [
7728
7744
  /* @__PURE__ */ jsx(
7729
7745
  "polygon",
@@ -7787,7 +7803,7 @@ function FunnelNode({
7787
7803
  strokeWidth: active ? 3 : 1.25
7788
7804
  }
7789
7805
  ),
7790
- drawing && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: \u5207\u308A\u629C\u304Did, children: /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: node.w, height: PAD_TOP + canvasH * \u4F38\u3073 }) }) }),
7806
+ drawing && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: \u5207\u308A\u629C\u304Did, children: /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: node.w, height: PAD_TOP2 + canvasH * \u4F38\u3073 }) }) }),
7791
7807
  drawing ? /* @__PURE__ */ jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u6BB5 }) : \u6BB5
7792
7808
  ] });
7793
7809
  }
@@ -7812,8 +7828,8 @@ function QuadrantNode({
7812
7828
  const raw = node.quadrantData;
7813
7829
  if (!raw) return /* @__PURE__ */ jsx("g", { transform: `translate(${x0} ${y0})` });
7814
7830
  const data = resolveQuadrantData(raw, stateValues);
7815
- const PAD_TOP = 40;
7816
- const PAD_BOTTOM = 56;
7831
+ const PAD_TOP2 = 40;
7832
+ const PAD_BOTTOM2 = 56;
7817
7833
  const AXIS_LABEL_FONT = 12;
7818
7834
  const PAD_MIN = 60;
7819
7835
  const ITEM_FONT = 13;
@@ -7825,12 +7841,12 @@ function QuadrantNode({
7825
7841
  const wantRight = axisLabelPad(data.xAxis.right) - PAD_MIN;
7826
7842
  const wantTotal = wantLeft + wantRight;
7827
7843
  const padScale = wantTotal > padBudget && wantTotal > 0 ? padBudget / wantTotal : 1;
7828
- const PAD_LEFT = PAD_MIN + wantLeft * padScale;
7829
- const PAD_RIGHT = PAD_MIN + wantRight * padScale;
7830
- const canvasW = node.w - PAD_LEFT - PAD_RIGHT;
7831
- const canvasH = node.h - PAD_TOP - PAD_BOTTOM;
7832
- const cx = PAD_LEFT + canvasW / 2;
7833
- const cy = PAD_TOP + canvasH / 2;
7844
+ const PAD_LEFT2 = PAD_MIN + wantLeft * padScale;
7845
+ const PAD_RIGHT2 = PAD_MIN + wantRight * padScale;
7846
+ const canvasW = node.w - PAD_LEFT2 - PAD_RIGHT2;
7847
+ const canvasH = node.h - PAD_TOP2 - PAD_BOTTOM2;
7848
+ const cx = PAD_LEFT2 + canvasW / 2;
7849
+ const cy = PAD_TOP2 + canvasH / 2;
7834
7850
  const halfW = canvasW / 2;
7835
7851
  const halfH = canvasH / 2;
7836
7852
  const itemsBy = {
@@ -7866,16 +7882,16 @@ function QuadrantNode({
7866
7882
  strokeWidth: active ? 3 : 1.25
7867
7883
  }
7868
7884
  ),
7869
- /* @__PURE__ */ jsx("rect", { "data-cdl-role": "quadrant-bg", x: PAD_LEFT, y: PAD_TOP, width: halfW, height: halfH, ...quadrantColor.topLeft }),
7870
- /* @__PURE__ */ jsx("rect", { "data-cdl-role": "quadrant-bg", x: cx, y: PAD_TOP, width: halfW, height: halfH, ...quadrantColor.topRight }),
7871
- /* @__PURE__ */ jsx("rect", { "data-cdl-role": "quadrant-bg", x: PAD_LEFT, y: cy, width: halfW, height: halfH, ...quadrantColor.bottomLeft }),
7885
+ /* @__PURE__ */ jsx("rect", { "data-cdl-role": "quadrant-bg", x: PAD_LEFT2, y: PAD_TOP2, width: halfW, height: halfH, ...quadrantColor.topLeft }),
7886
+ /* @__PURE__ */ jsx("rect", { "data-cdl-role": "quadrant-bg", x: cx, y: PAD_TOP2, width: halfW, height: halfH, ...quadrantColor.topRight }),
7887
+ /* @__PURE__ */ jsx("rect", { "data-cdl-role": "quadrant-bg", x: PAD_LEFT2, y: cy, width: halfW, height: halfH, ...quadrantColor.bottomLeft }),
7872
7888
  /* @__PURE__ */ jsx("rect", { "data-cdl-role": "quadrant-bg", x: cx, y: cy, width: halfW, height: halfH, ...quadrantColor.bottomRight }),
7873
7889
  /* @__PURE__ */ jsx(
7874
7890
  "rect",
7875
7891
  {
7876
7892
  "data-cdl-role": "quadrant-canvas",
7877
- x: PAD_LEFT,
7878
- y: PAD_TOP,
7893
+ x: PAD_LEFT2,
7894
+ y: PAD_TOP2,
7879
7895
  width: canvasW,
7880
7896
  height: canvasH,
7881
7897
  fill: "none",
@@ -7884,25 +7900,25 @@ function QuadrantNode({
7884
7900
  rx: 8
7885
7901
  }
7886
7902
  ),
7887
- /* @__PURE__ */ jsx("line", { x1: cx, y1: PAD_TOP, x2: cx, y2: PAD_TOP + canvasH, stroke: "var(--cdl-text-mute, #8a8678)", strokeWidth: 1.5 }),
7888
- /* @__PURE__ */ jsx("line", { x1: PAD_LEFT, y1: cy, x2: PAD_LEFT + canvasW, y2: cy, stroke: "var(--cdl-text-mute, #8a8678)", strokeWidth: 1.5 }),
7889
- /* @__PURE__ */ jsx("text", { x: PAD_LEFT + halfW / 2, y: PAD_TOP + 22, fontSize: 13, fontWeight: 700, textAnchor: "middle", fill: quadrantAccent.topLeft, children: data.quadrantLabels.topLeft }),
7890
- /* @__PURE__ */ jsx("text", { x: cx + halfW / 2, y: PAD_TOP + 22, fontSize: 13, fontWeight: 700, textAnchor: "middle", fill: quadrantAccent.topRight, children: data.quadrantLabels.topRight }),
7891
- /* @__PURE__ */ jsx("text", { x: PAD_LEFT + halfW / 2, y: PAD_TOP + canvasH - 12, fontSize: 13, fontWeight: 700, textAnchor: "middle", fill: quadrantAccent.bottomLeft, children: data.quadrantLabels.bottomLeft }),
7892
- /* @__PURE__ */ jsx("text", { x: cx + halfW / 2, y: PAD_TOP + canvasH - 12, fontSize: 13, fontWeight: 700, textAnchor: "middle", fill: quadrantAccent.bottomRight, children: data.quadrantLabels.bottomRight }),
7893
- /* @__PURE__ */ jsxs("text", { x: cx, y: PAD_TOP - 12, fontSize: 12, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: [
7903
+ /* @__PURE__ */ jsx("line", { x1: cx, y1: PAD_TOP2, x2: cx, y2: PAD_TOP2 + canvasH, stroke: "var(--cdl-text-mute, #8a8678)", strokeWidth: 1.5 }),
7904
+ /* @__PURE__ */ jsx("line", { x1: PAD_LEFT2, y1: cy, x2: PAD_LEFT2 + canvasW, y2: cy, stroke: "var(--cdl-text-mute, #8a8678)", strokeWidth: 1.5 }),
7905
+ /* @__PURE__ */ jsx("text", { x: PAD_LEFT2 + halfW / 2, y: PAD_TOP2 + 22, fontSize: 13, fontWeight: 700, textAnchor: "middle", fill: quadrantAccent.topLeft, children: data.quadrantLabels.topLeft }),
7906
+ /* @__PURE__ */ jsx("text", { x: cx + halfW / 2, y: PAD_TOP2 + 22, fontSize: 13, fontWeight: 700, textAnchor: "middle", fill: quadrantAccent.topRight, children: data.quadrantLabels.topRight }),
7907
+ /* @__PURE__ */ jsx("text", { x: PAD_LEFT2 + halfW / 2, y: PAD_TOP2 + canvasH - 12, fontSize: 13, fontWeight: 700, textAnchor: "middle", fill: quadrantAccent.bottomLeft, children: data.quadrantLabels.bottomLeft }),
7908
+ /* @__PURE__ */ jsx("text", { x: cx + halfW / 2, y: PAD_TOP2 + canvasH - 12, fontSize: 13, fontWeight: 700, textAnchor: "middle", fill: quadrantAccent.bottomRight, children: data.quadrantLabels.bottomRight }),
7909
+ /* @__PURE__ */ jsxs("text", { x: cx, y: PAD_TOP2 - 12, fontSize: 12, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: [
7894
7910
  "\u2191 ",
7895
7911
  data.yAxis.top
7896
7912
  ] }),
7897
- /* @__PURE__ */ jsxs("text", { x: cx, y: PAD_TOP + canvasH + 24, fontSize: 12, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: [
7913
+ /* @__PURE__ */ jsxs("text", { x: cx, y: PAD_TOP2 + canvasH + 24, fontSize: 12, fontWeight: 700, textAnchor: "middle", fill: "var(--cdl-text-dim, #5a6270)", children: [
7898
7914
  "\u2193 ",
7899
7915
  data.yAxis.bottom
7900
7916
  ] }),
7901
- /* @__PURE__ */ jsxs("text", { x: PAD_LEFT - 12, y: cy + 4, fontSize: AXIS_LABEL_FONT, fontWeight: 700, textAnchor: "end", fill: "var(--cdl-text-dim, #5a6270)", children: [
7917
+ /* @__PURE__ */ jsxs("text", { x: PAD_LEFT2 - 12, y: cy + 4, fontSize: AXIS_LABEL_FONT, fontWeight: 700, textAnchor: "end", fill: "var(--cdl-text-dim, #5a6270)", children: [
7902
7918
  "\u2190 ",
7903
7919
  data.xAxis.left
7904
7920
  ] }),
7905
- /* @__PURE__ */ jsxs("text", { x: PAD_LEFT + canvasW + 12, y: cy + 4, fontSize: AXIS_LABEL_FONT, fontWeight: 700, textAnchor: "start", fill: "var(--cdl-text-dim, #5a6270)", children: [
7921
+ /* @__PURE__ */ jsxs("text", { x: PAD_LEFT2 + canvasW + 12, y: cy + 4, fontSize: AXIS_LABEL_FONT, fontWeight: 700, textAnchor: "start", fill: "var(--cdl-text-dim, #5a6270)", children: [
7906
7922
  data.xAxis.right,
7907
7923
  " \u2192"
7908
7924
  ] }),
@@ -7911,8 +7927,8 @@ function QuadrantNode({
7911
7927
  if (items.length === 0) return null;
7912
7928
  const isLeft = q === "topLeft" || q === "bottomLeft";
7913
7929
  const isTop = q === "topLeft" || q === "topRight";
7914
- const qxStart = (isLeft ? PAD_LEFT : cx) + 18;
7915
- const qyStart = (isTop ? PAD_TOP : cy) + 44;
7930
+ const qxStart = (isLeft ? PAD_LEFT2 : cx) + 18;
7931
+ const qyStart = (isTop ? PAD_TOP2 : cy) + 44;
7916
7932
  const qHalfW = halfW - 36;
7917
7933
  const \u67A0\u306E\u4F59\u5730 = qHalfW;
7918
7934
  if (\u67A0\u306E\u4F59\u5730 <= 0) return null;
@@ -7971,6 +7987,24 @@ function \u7BB1\u306E\u6587\u5B57({
7971
7987
  r.\u5F79\u5272
7972
7988
  ));
7973
7989
  }
7990
+ var PAD_TOP = 40;
7991
+ var PAD_RIGHT = 24;
7992
+ var PAD_BOTTOM = 40;
7993
+ var PAD_LEFT = 24;
7994
+ function \u6728\u306E\u4E2D\u8EAB(node, stateValues = {}) {
7995
+ const treeNodes = resolveTreeData(node.treeData ?? [], stateValues);
7996
+ return computeTreeLayout(
7997
+ treeNodes,
7998
+ node.w - PAD_LEFT - PAD_RIGHT,
7999
+ node.h - PAD_TOP - PAD_BOTTOM
8000
+ );
8001
+ }
8002
+ function \u6728\u306E\u884C(n) {
8003
+ return [
8004
+ { \u5F79\u5272: "title", text: n.title, fontSize: n.depth === 0 ? 13 : 12 },
8005
+ { \u5F79\u5272: "subtitle", text: n.subtitle ?? "", fontSize: 9 }
8006
+ ];
8007
+ }
7974
8008
  function TreeNode({
7975
8009
  node,
7976
8010
  active,
@@ -7980,15 +8014,8 @@ function TreeNode({
7980
8014
  }) {
7981
8015
  const x0 = node.cx - node.w / 2;
7982
8016
  const y0 = node.cy - node.h / 2;
7983
- const treeNodes = resolveTreeData(node.treeData ?? [], stateValues);
7984
8017
  const gradientId = `tree-root-grad-${node.id}`;
7985
- const PAD_TOP = 40;
7986
- const PAD_RIGHT = 24;
7987
- const PAD_BOTTOM = 40;
7988
- const PAD_LEFT = 24;
7989
- const canvasW = node.w - PAD_LEFT - PAD_RIGHT;
7990
- const canvasH = node.h - PAD_TOP - PAD_BOTTOM;
7991
- const layout2 = computeTreeLayout(treeNodes, canvasW, canvasH);
8018
+ const layout2 = \u6728\u306E\u4E2D\u8EAB(node, stateValues);
7992
8019
  const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
7993
8020
  const \u6700\u5927\u6DF1\u3055 = layout2.nodes.reduce((m, n) => Math.max(m, n.depth), 0);
7994
8021
  const \u7BB1\u304C\u51FA\u308B = (\u6DF1\u3055) => !drawing || \u6BB5\u306E\u4F38\u3073(\u4F38\u3073, \u6DF1\u3055, \u6700\u5927\u6DF1\u3055) >= 1;
@@ -8041,15 +8068,11 @@ function TreeNode({
8041
8068
  if (!\u7BB1\u304C\u51FA\u308B(n.depth)) return null;
8042
8069
  const accent = depthColors[Math.min(n.depth, depthColors.length - 1)] ?? depthColors[0];
8043
8070
  const isRoot = n.depth === 0;
8044
- const \u884C = \u7BB1\u306B\u7A4D\u3080(
8045
- [
8046
- { \u5F79\u5272: "title", text: n.title, fontSize: isRoot ? 13 : 12 },
8047
- { \u5F79\u5272: "subtitle", text: n.subtitle ?? "", fontSize: 9 }
8048
- ],
8049
- n.w,
8050
- n.h
8051
- );
8071
+ const \u6750\u6599 = \u6728\u306E\u884C(n);
8072
+ const \u884C = \u7BB1\u306B\u7A4D\u3080(\u6750\u6599, n.w, n.h);
8052
8073
  const \u88DC\u8DB3\u3042\u308A = (n.subtitle ?? "").trim() !== "";
8074
+ const \u540D\u524D = \u6750\u6599[0];
8075
+ const \u53CE\u3081\u305F\u540D\u524D = \u88DC\u8DB3\u3042\u308A ? void 0 : \u5E45\u306B\u53CE\u3081\u308B(\u540D\u524D.text, \u540D\u524D.fontSize, \u4F7F\u3048\u308B\u5E45(n.w));
8053
8076
  return /* @__PURE__ */ jsx(
8054
8077
  "g",
8055
8078
  {
@@ -8068,7 +8091,7 @@ function TreeNode({
8068
8091
  fill: `url(#${gradientId})`
8069
8092
  }
8070
8093
  ),
8071
- \u88DC\u8DB3\u3042\u308A ? \u7BB1\u306E\u6587\u5B57({
8094
+ \u53CE\u3081\u305F\u540D\u524D === void 0 ? \u7BB1\u306E\u6587\u5B57({
8072
8095
  \u884C,
8073
8096
  x: n.w / 2,
8074
8097
  \u7BB1\u306E\u9AD8\u3055: n.h,
@@ -8082,11 +8105,11 @@ function TreeNode({
8082
8105
  {
8083
8106
  x: n.w / 2,
8084
8107
  y: n.h / 2 + 5,
8085
- fontSize: 13,
8108
+ fontSize: \u53CE\u3081\u305F\u540D\u524D.fontSize,
8086
8109
  fontWeight: 700,
8087
8110
  textAnchor: "middle",
8088
8111
  fill: "var(--cdl-text-on-tone, #ffffff)",
8089
- children: \u5E45\u3067\u5207\u308B(n.title, 13, \u4F7F\u3048\u308B\u5E45(n.w))
8112
+ children: \u53CE\u3081\u305F\u540D\u524D.text
8090
8113
  }
8091
8114
  )
8092
8115
  )
@@ -8106,7 +8129,7 @@ function TreeNode({
8106
8129
  }
8107
8130
  ),
8108
8131
  /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: 4, height: n.h, rx: 2, fill: accent }),
8109
- \u88DC\u8DB3\u3042\u308A ? \u7BB1\u306E\u6587\u5B57({
8132
+ \u53CE\u3081\u305F\u540D\u524D === void 0 ? \u7BB1\u306E\u6587\u5B57({
8110
8133
  \u884C,
8111
8134
  x: n.w / 2 + 2,
8112
8135
  \u7BB1\u306E\u9AD8\u3055: n.h,
@@ -8117,11 +8140,11 @@ function TreeNode({
8117
8140
  {
8118
8141
  x: n.w / 2 + 2,
8119
8142
  y: n.h / 2 + 4,
8120
- fontSize: 12,
8143
+ fontSize: \u53CE\u3081\u305F\u540D\u524D.fontSize,
8121
8144
  fontWeight: 600,
8122
8145
  textAnchor: "middle",
8123
8146
  fill: "var(--cdl-chip-text, #1a1f2a)",
8124
- children: \u5E45\u3067\u5207\u308B(n.title, 12, \u4F7F\u3048\u308B\u5E45(n.w))
8147
+ children: \u53CE\u3081\u305F\u540D\u524D.text
8125
8148
  }
8126
8149
  )
8127
8150
  ] })
@@ -8255,12 +8278,12 @@ function UserJourneyNode({
8255
8278
  const x0 = node.cx - node.w / 2;
8256
8279
  const y0 = node.cy - node.h / 2;
8257
8280
  const steps = resolveJourneyData(node.journeyData ?? [], stateValues);
8258
- const PAD_TOP = 20;
8259
- const PAD_RIGHT = 32;
8260
- const PAD_BOTTOM = 108;
8261
- const PAD_LEFT = 108;
8262
- const canvasW = node.w - PAD_LEFT - PAD_RIGHT;
8263
- const canvasH = node.h - PAD_TOP - PAD_BOTTOM;
8281
+ const PAD_TOP2 = 20;
8282
+ const PAD_RIGHT2 = 32;
8283
+ const PAD_BOTTOM2 = 108;
8284
+ const PAD_LEFT2 = 108;
8285
+ const canvasW = node.w - PAD_LEFT2 - PAD_RIGHT2;
8286
+ const canvasH = node.h - PAD_TOP2 - PAD_BOTTOM2;
8264
8287
  const emotionRows = ["delighted", "happy", "neutral", "frustrated", "angry"];
8265
8288
  const emotionScore = {
8266
8289
  delighted: 4,
@@ -8285,8 +8308,8 @@ function UserJourneyNode({
8285
8308
  };
8286
8309
  const rowH = canvasH / 5;
8287
8310
  const colW = canvasW / Math.max(steps.length, 1);
8288
- const xAt = (idx) => PAD_LEFT + (steps.length <= 1 ? canvasW / 2 : colW / 2 + colW * idx);
8289
- const yAt = (emotion) => PAD_TOP + rowH / 2 + (4 - emotionScore[emotion]) * rowH;
8311
+ const xAt = (idx) => PAD_LEFT2 + (steps.length <= 1 ? canvasW / 2 : colW / 2 + colW * idx);
8312
+ const yAt = (emotion) => PAD_TOP2 + rowH / 2 + (4 - emotionScore[emotion]) * rowH;
8290
8313
  const pts = steps.map((s, i) => ({ x: xAt(i), y: yAt(s.emotion) }));
8291
8314
  const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
8292
8315
  const \u6BB5\u307E\u3067\u306E\u5272\u5408 = \u30D9\u30B8\u30A8\u306E\u7D2F\u7A4D\u5272\u5408(pts, (\u524D, \u5F8C) => {
@@ -8320,8 +8343,8 @@ function UserJourneyNode({
8320
8343
  "rect",
8321
8344
  {
8322
8345
  "data-cdl-role": "journey-band",
8323
- x: PAD_LEFT,
8324
- y: PAD_TOP + i * rowH,
8346
+ x: PAD_LEFT2,
8347
+ y: PAD_TOP2 + i * rowH,
8325
8348
  width: canvasW,
8326
8349
  height: rowH,
8327
8350
  fill: emotionColor[e],
@@ -8331,8 +8354,8 @@ function UserJourneyNode({
8331
8354
  /* @__PURE__ */ jsx(
8332
8355
  "text",
8333
8356
  {
8334
- x: PAD_LEFT - 84,
8335
- y: PAD_TOP + i * rowH + rowH / 2 + 5,
8357
+ x: PAD_LEFT2 - 84,
8358
+ y: PAD_TOP2 + i * rowH + rowH / 2 + 5,
8336
8359
  fontSize: 18,
8337
8360
  textAnchor: "middle",
8338
8361
  children: emotionEmoji[e]
@@ -8341,8 +8364,8 @@ function UserJourneyNode({
8341
8364
  /* @__PURE__ */ jsx(
8342
8365
  "text",
8343
8366
  {
8344
- x: PAD_LEFT - 14,
8345
- y: PAD_TOP + i * rowH + rowH / 2 + 4,
8367
+ x: PAD_LEFT2 - 14,
8368
+ y: PAD_TOP2 + i * rowH + rowH / 2 + 4,
8346
8369
  fontSize: 12,
8347
8370
  fontWeight: 600,
8348
8371
  textAnchor: "end",
@@ -8356,9 +8379,9 @@ function UserJourneyNode({
8356
8379
  {
8357
8380
  "data-cdl-role": "node-column-divider",
8358
8381
  x1: xAt(idx),
8359
- y1: PAD_TOP,
8382
+ y1: PAD_TOP2,
8360
8383
  x2: xAt(idx),
8361
- y2: PAD_TOP + canvasH,
8384
+ y2: PAD_TOP2 + canvasH,
8362
8385
  stroke: "var(--cdl-row-divider, #7e848e)",
8363
8386
  strokeDasharray: "4 4"
8364
8387
  },
@@ -8422,7 +8445,7 @@ function UserJourneyNode({
8422
8445
  "text",
8423
8446
  {
8424
8447
  x: xAt(idx),
8425
- y: PAD_TOP + canvasH + 24,
8448
+ y: PAD_TOP2 + canvasH + 24,
8426
8449
  fontSize: 12,
8427
8450
  fontWeight: 700,
8428
8451
  textAnchor: "middle",
@@ -8436,7 +8459,7 @@ function UserJourneyNode({
8436
8459
  {
8437
8460
  "data-cdl-role": "journey-chip",
8438
8461
  x: xAt(idx) - 40,
8439
- y: PAD_TOP + canvasH + 34,
8462
+ y: PAD_TOP2 + canvasH + 34,
8440
8463
  width: 80,
8441
8464
  height: 20,
8442
8465
  rx: 10,
@@ -8451,7 +8474,7 @@ function UserJourneyNode({
8451
8474
  "text",
8452
8475
  {
8453
8476
  x: xAt(idx),
8454
- y: PAD_TOP + canvasH + 48,
8477
+ y: PAD_TOP2 + canvasH + 48,
8455
8478
  fontSize: 10,
8456
8479
  fontWeight: 600,
8457
8480
  textAnchor: "middle",
@@ -8465,7 +8488,7 @@ function UserJourneyNode({
8465
8488
  "rect",
8466
8489
  {
8467
8490
  x: xAt(idx) - 55,
8468
- y: PAD_TOP + canvasH + 62,
8491
+ y: PAD_TOP2 + canvasH + 62,
8469
8492
  width: 110,
8470
8493
  height: 26,
8471
8494
  rx: 13,
@@ -8478,7 +8501,7 @@ function UserJourneyNode({
8478
8501
  "text",
8479
8502
  {
8480
8503
  x: xAt(idx),
8481
- y: PAD_TOP + canvasH + 79,
8504
+ y: PAD_TOP2 + canvasH + 79,
8482
8505
  fontSize: 10,
8483
8506
  textAnchor: "middle",
8484
8507
  fill: "var(--cdl-note-text, #7a5320)",
@@ -10007,15 +10030,15 @@ var externalLabel = (node, cx, bottomY) => /* @__PURE__ */ jsxs(Fragment, { chil
10007
10030
  )
10008
10031
  ] });
10009
10032
  var LABEL_EYEBROW_SPACING = 2;
10010
- function \u5E45\u306B\u53CE\u3081\u308B(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
10033
+ function \u5E45\u306B\u53CE\u3081\u308B2(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
10011
10034
  const \u5E45 = textWidth(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
10012
10035
  const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
10013
10036
  return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
10014
10037
  }
10015
10038
  function bottomLabel(node, cx, plan) {
10016
- const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING, node.w);
10017
- const \u540D = \u5E45\u306B\u53CE\u3081\u308B(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
10018
- const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
10039
+ const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B2(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING, node.w);
10040
+ const \u540D = \u5E45\u306B\u53CE\u3081\u308B2(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
10041
+ const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B2(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
10019
10042
  return /* @__PURE__ */ jsxs(Fragment, { children: [
10020
10043
  node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ 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 }),
10021
10044
  /* @__PURE__ */ 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 }),
@@ -11332,15 +11355,15 @@ function \u5B57\u5E45(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593) {
11332
11355
  }
11333
11356
  return \u5E45 + \u5B57\u9593 * \u5B57\u6570;
11334
11357
  }
11335
- function \u5E45\u306B\u53CE\u3081\u308B2(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
11358
+ function \u5E45\u306B\u53CE\u3081\u308B3(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
11336
11359
  const \u5E45 = \u5B57\u5E45(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
11337
11360
  const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
11338
11361
  return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
11339
11362
  }
11340
11363
  function bottomLabel3(node, cx, plan) {
11341
- const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B2(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING2, node.w);
11342
- const \u540D = \u5E45\u306B\u53CE\u3081\u308B2(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
11343
- const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B2(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
11364
+ const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B3(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING2, node.w);
11365
+ const \u540D = \u5E45\u306B\u53CE\u3081\u308B3(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
11366
+ const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B3(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
11344
11367
  return /* @__PURE__ */ jsxs(Fragment, { children: [
11345
11368
  node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ 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 }),
11346
11369
  /* @__PURE__ */ 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 }),
@@ -11781,15 +11804,15 @@ function \u5B57\u5E452(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593) {
11781
11804
  }
11782
11805
  return \u5E45 + \u5B57\u9593 * \u5B57\u6570;
11783
11806
  }
11784
- function \u5E45\u306B\u53CE\u3081\u308B3(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
11807
+ function \u5E45\u306B\u53CE\u3081\u308B4(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
11785
11808
  const \u5E45 = \u5B57\u5E452(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
11786
11809
  const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
11787
11810
  return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
11788
11811
  }
11789
11812
  function bottomLabel4(node, cx, plan) {
11790
- const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B3(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING3, node.w);
11791
- const \u540D = \u5E45\u306B\u53CE\u3081\u308B3(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
11792
- const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B3(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
11813
+ const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B4(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING3, node.w);
11814
+ const \u540D = \u5E45\u306B\u53CE\u3081\u308B4(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
11815
+ const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B4(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
11793
11816
  return /* @__PURE__ */ jsxs(Fragment, { children: [
11794
11817
  node.eyebrow && plan.\u80A9\u66F8 && /* @__PURE__ */ 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 }),
11795
11818
  /* @__PURE__ */ 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 }),
@@ -21742,6 +21765,7 @@ function emptyCounts() {
21742
21765
  "node-inside-viewbox": 0,
21743
21766
  "node-inside-lane": 0,
21744
21767
  "shape-label-dropped": 0,
21768
+ "box-line-dropped": 0,
21745
21769
  "edge-inside-viewbox": 0,
21746
21770
  "lane-label-inside-viewbox": 0,
21747
21771
  "lane-label-overlap": 0,
@@ -21759,6 +21783,12 @@ function emptyCounts() {
21759
21783
  "validation-interrupted": 0
21760
21784
  };
21761
21785
  }
21786
+ function \u7A4D\u3080\u7BB1\u3092\u96C6\u3081\u308B(n) {
21787
+ const \u7BB1 = (b, \u884C) => ({ \u884C, w: b.w, h: b.h });
21788
+ if (n.kind === "tree-hierarchy") return \u6728\u306E\u4E2D\u8EAB(n).nodes.map((b) => \u7BB1(b, \u6728\u306E\u884C(b)));
21789
+ if (n.kind === "mind-map") return (\u653E\u5C04\u306E\u4E2D\u8EAB(n)?.nodes ?? []).map((b) => \u7BB1(b, \u653E\u5C04\u306E\u884C(b)));
21790
+ return [];
21791
+ }
21762
21792
  function measureStubOut(segs) {
21763
21793
  const first = segs[0];
21764
21794
  const dx0 = first.x2 - first.x1;
@@ -22661,6 +22691,31 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
22661
22691
  "warn"
22662
22692
  );
22663
22693
  }
22694
+ for (const n of laid.nodes) {
22695
+ const \u7BB1 = \u7A4D\u3080\u7BB1\u3092\u96C6\u3081\u308B(n);
22696
+ if (\u7BB1.length === 0) continue;
22697
+ let \u5BFE\u8C61 = 0;
22698
+ const \u843D\u3061\u305F = [];
22699
+ for (const b of \u7BB1) {
22700
+ const \u5BA3\u8A00 = b.\u884C.slice(1).filter((r) => r.text.trim() !== "");
22701
+ if (\u5BA3\u8A00.length === 0) continue;
22702
+ \u5BFE\u8C61 += 1;
22703
+ const \u6B8B\u3063\u305F = new Set(\u7BB1\u306B\u7A4D\u3080(b.\u884C, b.w, b.h).map((r) => r.\u5F79\u5272));
22704
+ if (\u5BA3\u8A00.every((r) => \u6B8B\u3063\u305F.has(r.\u5F79\u5272))) continue;
22705
+ \u843D\u3061\u305F.push({ title: b.\u884C[0]?.text ?? "", h: b.h });
22706
+ }
22707
+ if (\u843D\u3061\u305F.length === 0) continue;
22708
+ const \u540D\u524D = \u843D\u3061\u305F.map((d) => `"${d.title}"`);
22709
+ const \u898B\u305B\u308B = \u540D\u524D.slice(0, 5).join(" / ");
22710
+ const \u6B8B\u308A = \u540D\u524D.length > 5 ? ` \u4ED6 ${\u540D\u524D.length - 5} \u4EF6` : "";
22711
+ const \u4F4E = Math.min(...\u843D\u3061\u305F.map((d) => d.h)).toFixed(1);
22712
+ const \u9AD8 = Math.max(...\u843D\u3061\u305F.map((d) => d.h)).toFixed(1);
22713
+ push(
22714
+ "box-line-dropped",
22715
+ `node "${n.id}" (${n.kind}) \u306F\u7BB1\u304C\u4F4E\u304F\u3001 \u66F8\u3044\u305F\u88DC\u8DB3\u304C ${\u843D\u3061\u305F.length}/${\u5BFE\u8C61} \u7BB1\u3067\u63CF\u304B\u308C\u306A\u3044 (${\u898B\u305B\u308B}${\u6B8B\u308A}\u3001 \u7BB1\u306E\u9AD8\u3055 ${\u4F4E === \u9AD8 ? \u4F4E : `${\u4F4E}\u301C${\u9AD8}`})\u3002 \u56F3\u3092\u9AD8\u304F\u3059\u308B\u304B\u6BB5\u3092\u6E1B\u3089\u3059\u304B\u3001 \u88DC\u8DB3\u3092\u6D88\u3059`,
22716
+ "warn"
22717
+ );
22718
+ }
22664
22719
  for (const e of laid.edges) {
22665
22720
  const segs = flattenPathSegments(extractPathSegments(e.d));
22666
22721
  if (segs.length === 0) continue;