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