@cardenelabs/cdl 0.12.1 → 0.13.1
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 +38 -1
- package/dist/index.cjs +52 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +52 -32
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +51 -32
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +51 -32
- package/dist/react.js.map +1 -1
- package/dist/{render-C7FKvMqq.d.cts → render-B5JHcUrb.d.cts} +8 -0
- package/dist/{render-C7FKvMqq.d.ts → render-B5JHcUrb.d.ts} +8 -0
- 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 +14 -7
- package/src/kinds/tree.tsx +12 -7
- package/src/presets.ts +3 -0
- package/src/render/payload-binding.ts +14 -4
- package/src/render/template-fields.ts +1 -0
- package/src/types.ts +8 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M as signal } from './render-
|
|
1
|
+
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-B5JHcUrb.cjs';
|
|
2
|
+
export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M as signal } from './render-B5JHcUrb.cjs';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
|
@@ -3137,6 +3137,8 @@ type MindMapPreset = {
|
|
|
3137
3137
|
/** 中心 topic ID + label */
|
|
3138
3138
|
rootId: string;
|
|
3139
3139
|
rootTitle: string;
|
|
3140
|
+
/** 中心の箱の 2 行目に出す補足 (#530)。 枝の `subtitle` と同じ扱い */
|
|
3141
|
+
rootSubtitle?: string;
|
|
3140
3142
|
branchWidth?: number;
|
|
3141
3143
|
defaultTone?: Tone;
|
|
3142
3144
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M as signal } from './render-
|
|
1
|
+
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-B5JHcUrb.js';
|
|
2
|
+
export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M as signal } from './render-B5JHcUrb.js';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
|
@@ -3137,6 +3137,8 @@ type MindMapPreset = {
|
|
|
3137
3137
|
/** 中心 topic ID + label */
|
|
3138
3138
|
rootId: string;
|
|
3139
3139
|
rootTitle: string;
|
|
3140
|
+
/** 中心の箱の 2 行目に出す補足 (#530)。 枝の `subtitle` と同じ扱い */
|
|
3141
|
+
rootSubtitle?: string;
|
|
3140
3142
|
branchWidth?: number;
|
|
3141
3143
|
defaultTone?: Tone;
|
|
3142
3144
|
};
|
package/dist/index.js
CHANGED
|
@@ -15835,6 +15835,7 @@ function payloadTexts(node) {
|
|
|
15835
15835
|
}
|
|
15836
15836
|
if (node.mindData) {
|
|
15837
15837
|
\u8DB3\u3059(node.mindData.rootTitle);
|
|
15838
|
+
\u8DB3\u3059(node.mindData.rootSubtitle);
|
|
15838
15839
|
for (const b of node.mindData.branches) {
|
|
15839
15840
|
\u8DB3\u3059(b.title);
|
|
15840
15841
|
\u8DB3\u3059(b.subtitle);
|
|
@@ -20265,10 +20266,10 @@ function fitTextSize(text, maxWidth, targetSize, minSize) {
|
|
|
20265
20266
|
}
|
|
20266
20267
|
var COMPACT_MAX_H = 100;
|
|
20267
20268
|
var COMPACT_PADDING_X = 16;
|
|
20268
|
-
var
|
|
20269
|
+
var MIN_TEXT_SIZE = 11;
|
|
20269
20270
|
var ASCENT2 = 0.72;
|
|
20270
20271
|
var DESCENT2 = 0.25;
|
|
20271
|
-
var MIN_BAND_H =
|
|
20272
|
+
var MIN_BAND_H = MIN_TEXT_SIZE * (ASCENT2 + DESCENT2);
|
|
20272
20273
|
var EYEBROW_BASELINE = 38;
|
|
20273
20274
|
var EYEBROW_SIZE = 18;
|
|
20274
20275
|
var EYEBROW_GAP = 8;
|
|
@@ -20290,10 +20291,10 @@ function titlePlacement(node, \u901A\u5E38, opts = {}) {
|
|
|
20290
20291
|
node.title,
|
|
20291
20292
|
Math.max(0, node.w - COMPACT_PADDING_X),
|
|
20292
20293
|
\u901A\u5E38.size,
|
|
20293
|
-
|
|
20294
|
+
MIN_TEXT_SIZE
|
|
20294
20295
|
);
|
|
20295
20296
|
const \u5E2F\u3067 = Math.floor(\u5E2F / (ASCENT2 + DESCENT2));
|
|
20296
|
-
const size = Math.max(
|
|
20297
|
+
const size = Math.max(MIN_TEXT_SIZE, Math.min(\u5E45\u3067, \u5E2F\u3067));
|
|
20297
20298
|
const \u5B57\u9AD8 = size * (ASCENT2 + DESCENT2);
|
|
20298
20299
|
const y = \u5B57\u9AD8 <= \u5E2F ? \u4E0A + \u5E2F / 2 + size * (ASCENT2 - DESCENT2) / 2 : \u4E0A > 0 ? \u4E0A + size * ASCENT2 : (\u9AD8\u3055 - \u5B57\u9AD8) / 2 + size * ASCENT2;
|
|
20299
20300
|
return { x: node.w / 2, y, size, anchor: "middle" };
|
|
@@ -21273,9 +21274,10 @@ function resolveTreeData(nodes, values) {
|
|
|
21273
21274
|
});
|
|
21274
21275
|
}
|
|
21275
21276
|
function resolveMindData(data, values) {
|
|
21276
|
-
const \u8AAD\u3080 = data.rootTitle.includes("{") || data.branches.some((b) => b.title.includes("{") || (b.subtitle?.includes("{") ?? false));
|
|
21277
|
+
const \u8AAD\u3080 = data.rootTitle.includes("{") || (data.rootSubtitle?.includes("{") ?? false) || data.branches.some((b) => b.title.includes("{") || (b.subtitle?.includes("{") ?? false));
|
|
21277
21278
|
if (!\u8AAD\u3080) return data;
|
|
21278
21279
|
const root = resolveBoundText(data.rootTitle, values);
|
|
21280
|
+
const rootSubtitle = data.rootSubtitle === void 0 ? void 0 : resolveBoundText(data.rootSubtitle, values);
|
|
21279
21281
|
const branches = data.branches.map((b) => {
|
|
21280
21282
|
const title = resolveBoundText(b.title, values);
|
|
21281
21283
|
const subtitle = b.subtitle === void 0 ? void 0 : resolveBoundText(b.subtitle, values);
|
|
@@ -21286,8 +21288,13 @@ function resolveMindData(data, values) {
|
|
|
21286
21288
|
};
|
|
21287
21289
|
return title.ok && (subtitle?.ok ?? true) ? \u89E3\u6C7A\u5F8C2 : { ...\u89E3\u6C7A\u5F8C2, unresolved: true };
|
|
21288
21290
|
});
|
|
21289
|
-
const \u89E3\u6C7A\u5F8C = {
|
|
21290
|
-
|
|
21291
|
+
const \u89E3\u6C7A\u5F8C = {
|
|
21292
|
+
...data,
|
|
21293
|
+
rootTitle: root.value,
|
|
21294
|
+
...rootSubtitle ? { rootSubtitle: rootSubtitle.value } : {},
|
|
21295
|
+
branches
|
|
21296
|
+
};
|
|
21297
|
+
return root.ok && (rootSubtitle?.ok ?? true) ? \u89E3\u6C7A\u5F8C : { ...\u89E3\u6C7A\u5F8C, unresolved: true };
|
|
21291
21298
|
}
|
|
21292
21299
|
|
|
21293
21300
|
// src/kinds/draw-progress.ts
|
|
@@ -22017,6 +22024,12 @@ function \u5E45\u3067\u5207\u308B(text, fontSize, \u4F7F\u3048\u308B\u5E452, \u6
|
|
|
22017
22024
|
}
|
|
22018
22025
|
return `${\u51FA}${\u7701\u7565}`;
|
|
22019
22026
|
}
|
|
22027
|
+
var \u7E2E\u3081\u306E\u4E0B\u9650 = MIN_TEXT_SIZE;
|
|
22028
|
+
function \u5E45\u306B\u53CE\u3081\u308B(text, fontSize, \u4F7F\u3048\u308B\u5E452, \u6E2C\u308B = textWidth) {
|
|
22029
|
+
let size = fontSize;
|
|
22030
|
+
while (size > \u7E2E\u3081\u306E\u4E0B\u9650 && \u6E2C\u308B(text, size) > \u4F7F\u3048\u308B\u5E452) size -= 1;
|
|
22031
|
+
return { text: \u5E45\u3067\u5207\u308B(text, size, \u4F7F\u3048\u308B\u5E452, \u6E2C\u308B), fontSize: size };
|
|
22032
|
+
}
|
|
22020
22033
|
function \u66F8\u8A18\u7D20\u306B\u5206\u3051\u308B(text) {
|
|
22021
22034
|
const \u533A\u5207\u308A = Intl.Segmenter;
|
|
22022
22035
|
if (typeof \u533A\u5207\u308A !== "function") return [...text];
|
|
@@ -22030,12 +22043,13 @@ function \u7BB1\u306B\u7A4D\u3080(\u884C, \u7BB1\u306E\u5E45, \u7BB1\u306E\u9AD8
|
|
|
22030
22043
|
const \u6B8B\u3059 = [...\u5019\u88DC];
|
|
22031
22044
|
while (\u6B8B\u3059.length > 1 && \u9AD8\u3055(\u6B8B\u3059) > \u4F7F\u3048\u308B\u9AD8\u3055) \u6B8B\u3059.pop();
|
|
22032
22045
|
const \u5E45 = \u4F7F\u3048\u308B\u5E45(\u7BB1\u306E\u5E45);
|
|
22033
|
-
const \
|
|
22046
|
+
const \u53CE\u3081\u305F = \u6B8B\u3059.map((r) => ({ ...r, ...\u5E45\u306B\u53CE\u3081\u308B(r.text, r.fontSize, \u5E45) }));
|
|
22047
|
+
const \u7DCF\u9AD8 = \u9AD8\u3055(\u53CE\u3081\u305F);
|
|
22034
22048
|
let \u7A4D\u307F = -\u7DCF\u9AD8 / 2;
|
|
22035
|
-
return \
|
|
22049
|
+
return \u53CE\u3081\u305F.map((r) => {
|
|
22036
22050
|
const dy = \u7A4D\u307F + (\u884C\u9001\u308A\u306E\u6BD4 + \u5B57\u306E\u9AD8\u3055\u306E\u6BD4) / 2 * r.fontSize;
|
|
22037
22051
|
\u7A4D\u307F += r.fontSize * \u884C\u9001\u308A\u306E\u6BD4;
|
|
22038
|
-
return { ...r,
|
|
22052
|
+
return { ...r, dy };
|
|
22039
22053
|
});
|
|
22040
22054
|
}
|
|
22041
22055
|
var MIND_TONES = ["accent", "teal", "success", "warning", "info", "error"];
|
|
@@ -22103,6 +22117,7 @@ function MindMapNode({
|
|
|
22103
22117
|
n.h
|
|
22104
22118
|
);
|
|
22105
22119
|
const \u88DC\u8DB3\u3042\u308A = (n.subtitle ?? "").trim() !== "";
|
|
22120
|
+
const \u53CE\u3081\u305F\u540D\u524D = \u88DC\u8DB3\u3042\u308A ? void 0 : \u5E45\u306B\u53CE\u3081\u308B(n.title, n.isRoot ? 15 : 13, \u4F7F\u3048\u308B\u5E45(n.w));
|
|
22106
22121
|
const \u6587\u5B57\u306E\u8272 = n.isRoot ? "var(--cdl-text-on-tone, #ffffff)" : "var(--cdl-chip-text, #1a1f2a)";
|
|
22107
22122
|
return /* @__PURE__ */ jsxs("g", { "data-cdl-unresolved": n.unresolved ? "true" : void 0, children: [
|
|
22108
22123
|
/* @__PURE__ */ jsx(
|
|
@@ -22118,7 +22133,7 @@ function MindMapNode({
|
|
|
22118
22133
|
strokeWidth: n.isRoot ? 2 : 1.75
|
|
22119
22134
|
}
|
|
22120
22135
|
),
|
|
22121
|
-
\
|
|
22136
|
+
\u53CE\u3081\u305F\u540D\u524D === void 0 ? \u884C.map((r) => /* @__PURE__ */ jsx(
|
|
22122
22137
|
"text",
|
|
22123
22138
|
{
|
|
22124
22139
|
"data-cdl-role": r.\u5F79\u5272 === "subtitle" ? "mind-node-subtitle" : void 0,
|
|
@@ -22135,17 +22150,18 @@ function MindMapNode({
|
|
|
22135
22150
|
)) : (
|
|
22136
22151
|
// 補足が無くても **幅に収める** (#526)。 `箱に積む` を通らないこの経路だけが
|
|
22137
22152
|
// 幅を見ておらず、長い名前がそのまま箱の外へ出て枝の線と重なっていた
|
|
22138
|
-
// (実測 = 中心の箱で文字 163px に対し箱 120px)
|
|
22153
|
+
// (実測 = 中心の箱で文字 163px に対し箱 120px)。
|
|
22154
|
+
// 収める手段は縮めるのが先で、切るのは下限まで縮めても入らない時だけ (#534)
|
|
22139
22155
|
/* @__PURE__ */ jsx(
|
|
22140
22156
|
"text",
|
|
22141
22157
|
{
|
|
22142
22158
|
x: n.x,
|
|
22143
22159
|
y: n.y + 5,
|
|
22144
|
-
fontSize:
|
|
22160
|
+
fontSize: \u53CE\u3081\u305F\u540D\u524D.fontSize,
|
|
22145
22161
|
fontWeight: n.isRoot ? 700 : 600,
|
|
22146
22162
|
textAnchor: "middle",
|
|
22147
22163
|
fill: \u6587\u5B57\u306E\u8272,
|
|
22148
|
-
children: \
|
|
22164
|
+
children: \u53CE\u3081\u305F\u540D\u524D.text
|
|
22149
22165
|
}
|
|
22150
22166
|
)
|
|
22151
22167
|
)
|
|
@@ -22161,6 +22177,8 @@ function computeMindMapLayout(mindData, cx, cy, canvasW, canvasH) {
|
|
|
22161
22177
|
nodes.push({
|
|
22162
22178
|
id: mindData.rootId,
|
|
22163
22179
|
title: mindData.rootTitle,
|
|
22180
|
+
// 中心も枝と同じく 2 行に積める (#530)。 高さ 52 に 15px + 9px の 2 行が入る
|
|
22181
|
+
...mindData.rootSubtitle === void 0 ? {} : { subtitle: mindData.rootSubtitle },
|
|
22164
22182
|
x: cx,
|
|
22165
22183
|
y: cy,
|
|
22166
22184
|
w: rootW,
|
|
@@ -22739,6 +22757,7 @@ function TreeNode({
|
|
|
22739
22757
|
n.h
|
|
22740
22758
|
);
|
|
22741
22759
|
const \u88DC\u8DB3\u3042\u308A = (n.subtitle ?? "").trim() !== "";
|
|
22760
|
+
const \u53CE\u3081\u305F\u540D\u524D = \u88DC\u8DB3\u3042\u308A ? void 0 : \u5E45\u306B\u53CE\u3081\u308B(n.title, isRoot ? 13 : 12, \u4F7F\u3048\u308B\u5E45(n.w));
|
|
22742
22761
|
return /* @__PURE__ */ jsx(
|
|
22743
22762
|
"g",
|
|
22744
22763
|
{
|
|
@@ -22757,7 +22776,7 @@ function TreeNode({
|
|
|
22757
22776
|
fill: `url(#${gradientId})`
|
|
22758
22777
|
}
|
|
22759
22778
|
),
|
|
22760
|
-
\
|
|
22779
|
+
\u53CE\u3081\u305F\u540D\u524D === void 0 ? \u7BB1\u306E\u6587\u5B57({
|
|
22761
22780
|
\u884C,
|
|
22762
22781
|
x: n.w / 2,
|
|
22763
22782
|
\u7BB1\u306E\u9AD8\u3055: n.h,
|
|
@@ -22771,11 +22790,11 @@ function TreeNode({
|
|
|
22771
22790
|
{
|
|
22772
22791
|
x: n.w / 2,
|
|
22773
22792
|
y: n.h / 2 + 5,
|
|
22774
|
-
fontSize:
|
|
22793
|
+
fontSize: \u53CE\u3081\u305F\u540D\u524D.fontSize,
|
|
22775
22794
|
fontWeight: 700,
|
|
22776
22795
|
textAnchor: "middle",
|
|
22777
22796
|
fill: "var(--cdl-text-on-tone, #ffffff)",
|
|
22778
|
-
children: \
|
|
22797
|
+
children: \u53CE\u3081\u305F\u540D\u524D.text
|
|
22779
22798
|
}
|
|
22780
22799
|
)
|
|
22781
22800
|
)
|
|
@@ -22795,7 +22814,7 @@ function TreeNode({
|
|
|
22795
22814
|
}
|
|
22796
22815
|
),
|
|
22797
22816
|
/* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: 4, height: n.h, rx: 2, fill: accent }),
|
|
22798
|
-
\
|
|
22817
|
+
\u53CE\u3081\u305F\u540D\u524D === void 0 ? \u7BB1\u306E\u6587\u5B57({
|
|
22799
22818
|
\u884C,
|
|
22800
22819
|
x: n.w / 2 + 2,
|
|
22801
22820
|
\u7BB1\u306E\u9AD8\u3055: n.h,
|
|
@@ -22806,11 +22825,11 @@ function TreeNode({
|
|
|
22806
22825
|
{
|
|
22807
22826
|
x: n.w / 2 + 2,
|
|
22808
22827
|
y: n.h / 2 + 4,
|
|
22809
|
-
fontSize:
|
|
22828
|
+
fontSize: \u53CE\u3081\u305F\u540D\u524D.fontSize,
|
|
22810
22829
|
fontWeight: 600,
|
|
22811
22830
|
textAnchor: "middle",
|
|
22812
22831
|
fill: "var(--cdl-chip-text, #1a1f2a)",
|
|
22813
|
-
children: \
|
|
22832
|
+
children: \u53CE\u3081\u305F\u540D\u524D.text
|
|
22814
22833
|
}
|
|
22815
22834
|
)
|
|
22816
22835
|
] })
|
|
@@ -24515,15 +24534,15 @@ var externalLabel = (node, cx, bottomY) => /* @__PURE__ */ jsxs(Fragment, { chil
|
|
|
24515
24534
|
)
|
|
24516
24535
|
] });
|
|
24517
24536
|
var LABEL_EYEBROW_SPACING = 2;
|
|
24518
|
-
function \u5E45\u306B\u53CE\u3081\
|
|
24537
|
+
function \u5E45\u306B\u53CE\u3081\u308B2(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
|
|
24519
24538
|
const \u5E45 = textWidth(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
|
|
24520
24539
|
const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
|
|
24521
24540
|
return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
|
|
24522
24541
|
}
|
|
24523
24542
|
function bottomLabel(node, cx, plan) {
|
|
24524
|
-
const \u80A9 = \u5E45\u306B\u53CE\u3081\
|
|
24525
|
-
const \u540D = \u5E45\u306B\u53CE\u3081\
|
|
24526
|
-
const \u8AAC = \u5E45\u306B\u53CE\u3081\
|
|
24543
|
+
const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B2(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING, node.w);
|
|
24544
|
+
const \u540D = \u5E45\u306B\u53CE\u3081\u308B2(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
|
|
24545
|
+
const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B2(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
|
|
24527
24546
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24528
24547
|
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 }),
|
|
24529
24548
|
/* @__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 }),
|
|
@@ -25840,15 +25859,15 @@ function \u5B57\u5E45(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593) {
|
|
|
25840
25859
|
}
|
|
25841
25860
|
return \u5E45 + \u5B57\u9593 * \u5B57\u6570;
|
|
25842
25861
|
}
|
|
25843
|
-
function \u5E45\u306B\u53CE\u3081\
|
|
25862
|
+
function \u5E45\u306B\u53CE\u3081\u308B3(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
|
|
25844
25863
|
const \u5E45 = \u5B57\u5E45(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
|
|
25845
25864
|
const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
|
|
25846
25865
|
return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
|
|
25847
25866
|
}
|
|
25848
25867
|
function bottomLabel3(node, cx, plan) {
|
|
25849
|
-
const \u80A9 = \u5E45\u306B\u53CE\u3081\
|
|
25850
|
-
const \u540D = \u5E45\u306B\u53CE\u3081\
|
|
25851
|
-
const \u8AAC = \u5E45\u306B\u53CE\u3081\
|
|
25868
|
+
const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B3(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING2, node.w);
|
|
25869
|
+
const \u540D = \u5E45\u306B\u53CE\u3081\u308B3(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
|
|
25870
|
+
const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B3(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
|
|
25852
25871
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25853
25872
|
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 }),
|
|
25854
25873
|
/* @__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 }),
|
|
@@ -26289,15 +26308,15 @@ function \u5B57\u5E452(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593) {
|
|
|
26289
26308
|
}
|
|
26290
26309
|
return \u5E45 + \u5B57\u9593 * \u5B57\u6570;
|
|
26291
26310
|
}
|
|
26292
|
-
function \u5E45\u306B\u53CE\u3081\
|
|
26311
|
+
function \u5E45\u306B\u53CE\u3081\u308B4(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593, \u7BB1\u5E45) {
|
|
26293
26312
|
const \u5E45 = \u5B57\u5E452(\u6587\u5B57\u5217, \u5927\u304D\u3055, \u5B57\u9593);
|
|
26294
26313
|
const \u500D\u7387 = \u5E45 > 0 && \u7BB1\u5E45 > 0 ? Math.min(1, \u7BB1\u5E45 / \u5E45) : 1;
|
|
26295
26314
|
return { size: \u5927\u304D\u3055 * \u500D\u7387, spacing: \u5B57\u9593 * \u500D\u7387 };
|
|
26296
26315
|
}
|
|
26297
26316
|
function bottomLabel4(node, cx, plan) {
|
|
26298
|
-
const \u80A9 = \u5E45\u306B\u53CE\u3081\
|
|
26299
|
-
const \u540D = \u5E45\u306B\u53CE\u3081\
|
|
26300
|
-
const \u8AAC = \u5E45\u306B\u53CE\u3081\
|
|
26317
|
+
const \u80A9 = \u5E45\u306B\u53CE\u3081\u308B4(node.eyebrow ?? "", plan.\u80A9\u66F8?.size ?? 0, LABEL_EYEBROW_SPACING3, node.w);
|
|
26318
|
+
const \u540D = \u5E45\u306B\u53CE\u3081\u308B4(node.title ?? "", plan.\u540D\u524D.size, 0, node.w);
|
|
26319
|
+
const \u8AAC = \u5E45\u306B\u53CE\u3081\u308B4(node.subtitle ?? "", plan.\u8AAC\u660E?.size ?? 0, 0, node.w);
|
|
26301
26320
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26302
26321
|
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 }),
|
|
26303
26322
|
/* @__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 }),
|
|
@@ -28401,6 +28420,7 @@ function mindMap(preset) {
|
|
|
28401
28420
|
mindData: {
|
|
28402
28421
|
rootId: preset.rootId,
|
|
28403
28422
|
rootTitle: preset.rootTitle,
|
|
28423
|
+
...preset.rootSubtitle === void 0 ? {} : { rootSubtitle: preset.rootSubtitle },
|
|
28404
28424
|
branches: branches.map((br) => ({
|
|
28405
28425
|
id: br.id,
|
|
28406
28426
|
title: br.title,
|