@cardenelabs/cdl 0.52.0 → 0.54.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 +42 -1
- package/README.md +2 -2
- package/dist/index.cjs +138 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +138 -105
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +88 -78
- 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 +88 -78
- package/dist/react.js.map +1 -1
- package/dist/{render-C0PJ2weJ.d.cts → render-Cp41meYv.d.cts} +7 -6
- package/dist/{render-C0PJ2weJ.d.ts → render-Cp41meYv.d.ts} +7 -6
- package/package.json +1 -1
- package/src/layout/head-label.ts +26 -2
- package/src/layout/nodes.ts +7 -3
- package/src/presets.ts +67 -34
- package/src/render/relation-focus.ts +1 -1
- package/src/types.ts +7 -6
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 EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlEventTarget, j as Computed, k as CdlDerivedValue, l as CdlScrollTrigger, L as LaidDiagram, m as CdlDiagramViewProps, n as LaidEdge, o as LaidNode, p as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as ChartPieForm, w as ChartSlopeForm, x as EDGE_HEADS, y as EDGE_HEAD_DEFAULT, z as EDGE_HEAD_FILLS, A as EDGE_HEAD_FILL_DEFAULT, D as EDGE_REVEALS, F as EDGE_REVEAL_DEFAULT, G as EDGE_STYLES, H as EdgeReveal, I as InteractiveHandlerMap, K as InteractiveSignalsAccessor, M as LaidLane, O as NODE_KINDS, P as RELATION_FOCUSES, U as RELATION_FOCUS_DEFAULT, V as RelationFocus, W as ScrollProgressHandle, X as TONES, Y as computeEventBindingKey, Z as computeFormulaKey, _ as computeInputSignalKey, $ as computeScrollTriggerKey, a0 as computed, a1 as createInteractiveSignalsAccessor, a2 as createScrollProgressHandle, a3 as createScrollProgressSignals, a4 as hasInteractivePrimitives, a5 as sequenceBoardMetrics, a6 as sequenceStepId, a7 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 EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlEventTarget, j as Computed, k as CdlDerivedValue, l as CdlScrollTrigger, L as LaidDiagram, m as CdlDiagramViewProps, n as LaidEdge, o as LaidNode, p as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-Cp41meYv.cjs';
|
|
2
|
+
export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as ChartPieForm, w as ChartSlopeForm, x as EDGE_HEADS, y as EDGE_HEAD_DEFAULT, z as EDGE_HEAD_FILLS, A as EDGE_HEAD_FILL_DEFAULT, D as EDGE_REVEALS, F as EDGE_REVEAL_DEFAULT, G as EDGE_STYLES, H as EdgeReveal, I as InteractiveHandlerMap, K as InteractiveSignalsAccessor, M as LaidLane, O as NODE_KINDS, P as RELATION_FOCUSES, U as RELATION_FOCUS_DEFAULT, V as RelationFocus, W as ScrollProgressHandle, X as TONES, Y as computeEventBindingKey, Z as computeFormulaKey, _ as computeInputSignalKey, $ as computeScrollTriggerKey, a0 as computed, a1 as createInteractiveSignalsAccessor, a2 as createScrollProgressHandle, a3 as createScrollProgressSignals, a4 as hasInteractivePrimitives, a5 as sequenceBoardMetrics, a6 as sequenceStepId, a7 as signal } from './render-Cp41meYv.cjs';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
|
@@ -2932,7 +2932,7 @@ declare function flow(preset: FlowPreset): FlowBuilder;
|
|
|
2932
2932
|
* | `return` | 破線 | 開いた矢 | 呼ばれた側から戻る。 新しい仕事ではないので線を切る |
|
|
2933
2933
|
* | `fire` | 実線 | 開いた矢 | 返事を待たない。 実線だが矢を閉じないことで待たないと示す |
|
|
2934
2934
|
*
|
|
2935
|
-
*
|
|
2935
|
+
* 印の形はクラス図の「継承」 と「関連」 で使った形そのもの。 **意味は違う** (あちらは親を
|
|
2936
2936
|
* 指す / こちらは返事を待つか) が、形の並びは共有できる。
|
|
2937
2937
|
*/
|
|
2938
2938
|
type SequenceMessageKind = "call" | "return" | "fire";
|
|
@@ -3369,12 +3369,12 @@ type ClassRelationType = "extends" | "implements" | "uses" | "aggregates" | "com
|
|
|
3369
3369
|
*
|
|
3370
3370
|
* | 種類 | 線 | 形 | 塗り | 側 | 意味 |
|
|
3371
3371
|
* |---|---|---|---|---|---|
|
|
3372
|
-
* | `extends` | 実線 | 三角 | 白抜き | 行き先 |
|
|
3373
|
-
* | `implements` | 破線 | 三角 | 白抜き | 行き先 |
|
|
3374
|
-
* | `aggregates` | 実線 | 菱 | 白抜き | 出どころ |
|
|
3375
|
-
* | `composes` | 実線 | 菱 | 塗る | 出どころ |
|
|
3376
|
-
* | `associates` | 実線 | 開いた矢 | — | 行き先 |
|
|
3377
|
-
* | `uses` | 破線 | 開いた矢 | — | 行き先 |
|
|
3372
|
+
* | `extends` | 実線 | 三角 | 白抜き | 行き先 | 継承 |
|
|
3373
|
+
* | `implements` | 破線 | 三角 | 白抜き | 行き先 | 実装 |
|
|
3374
|
+
* | `aggregates` | 実線 | 菱 | 白抜き | 出どころ | 集約 |
|
|
3375
|
+
* | `composes` | 実線 | 菱 | 塗る | 出どころ | コンポジション |
|
|
3376
|
+
* | `associates` | 実線 | 開いた矢 | — | 行き先 | 関連 |
|
|
3377
|
+
* | `uses` | 破線 | 開いた矢 | — | 行き先 | 依存 |
|
|
3378
3378
|
*
|
|
3379
3379
|
* **側が種で割れるのが要点**。 三角は「この先が親」 を指すので行き先に立ち、菱は
|
|
3380
3380
|
* 「この箱が持っている」 を指すので出どころに立つ。 1 つの決まりで書こうとするとどちらかが
|
|
@@ -3895,7 +3895,7 @@ declare function stateMachine2(preset: StateMachine2Preset): StateMachine2Builde
|
|
|
3895
3895
|
* 問いにその場で答えられる。
|
|
3896
3896
|
*
|
|
3897
3897
|
* 集合は 3 つで作る = 触れた箱 / その箱に繋がる線 / 線の相手の箱。
|
|
3898
|
-
* **線の向きは問わない** =
|
|
3898
|
+
* **線の向きは問わない** = クラス図の「継承」 は子から親へ、 ER の「注文する」 は利用者から注文へ向くが、
|
|
3899
3899
|
* 読み手にとってはどちらも「この箱の関係」 で、向きで見え方が変わる理由が無い。
|
|
3900
3900
|
*/
|
|
3901
3901
|
/** 集合を作るのに要る線の情報だけを取る */
|
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 EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlEventTarget, j as Computed, k as CdlDerivedValue, l as CdlScrollTrigger, L as LaidDiagram, m as CdlDiagramViewProps, n as LaidEdge, o as LaidNode, p as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as ChartPieForm, w as ChartSlopeForm, x as EDGE_HEADS, y as EDGE_HEAD_DEFAULT, z as EDGE_HEAD_FILLS, A as EDGE_HEAD_FILL_DEFAULT, D as EDGE_REVEALS, F as EDGE_REVEAL_DEFAULT, G as EDGE_STYLES, H as EdgeReveal, I as InteractiveHandlerMap, K as InteractiveSignalsAccessor, M as LaidLane, O as NODE_KINDS, P as RELATION_FOCUSES, U as RELATION_FOCUS_DEFAULT, V as RelationFocus, W as ScrollProgressHandle, X as TONES, Y as computeEventBindingKey, Z as computeFormulaKey, _ as computeInputSignalKey, $ as computeScrollTriggerKey, a0 as computed, a1 as createInteractiveSignalsAccessor, a2 as createScrollProgressHandle, a3 as createScrollProgressSignals, a4 as hasInteractivePrimitives, a5 as sequenceBoardMetrics, a6 as sequenceStepId, a7 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 EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlEventTarget, j as Computed, k as CdlDerivedValue, l as CdlScrollTrigger, L as LaidDiagram, m as CdlDiagramViewProps, n as LaidEdge, o as LaidNode, p as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-Cp41meYv.js';
|
|
2
|
+
export { q as CdlDiagramView, r as CdlEventBinding, s as CdlEventKind, t as CdlFormula, u as CdlPhase, v as ChartPieForm, w as ChartSlopeForm, x as EDGE_HEADS, y as EDGE_HEAD_DEFAULT, z as EDGE_HEAD_FILLS, A as EDGE_HEAD_FILL_DEFAULT, D as EDGE_REVEALS, F as EDGE_REVEAL_DEFAULT, G as EDGE_STYLES, H as EdgeReveal, I as InteractiveHandlerMap, K as InteractiveSignalsAccessor, M as LaidLane, O as NODE_KINDS, P as RELATION_FOCUSES, U as RELATION_FOCUS_DEFAULT, V as RelationFocus, W as ScrollProgressHandle, X as TONES, Y as computeEventBindingKey, Z as computeFormulaKey, _ as computeInputSignalKey, $ as computeScrollTriggerKey, a0 as computed, a1 as createInteractiveSignalsAccessor, a2 as createScrollProgressHandle, a3 as createScrollProgressSignals, a4 as hasInteractivePrimitives, a5 as sequenceBoardMetrics, a6 as sequenceStepId, a7 as signal } from './render-Cp41meYv.js';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
|
@@ -2932,7 +2932,7 @@ declare function flow(preset: FlowPreset): FlowBuilder;
|
|
|
2932
2932
|
* | `return` | 破線 | 開いた矢 | 呼ばれた側から戻る。 新しい仕事ではないので線を切る |
|
|
2933
2933
|
* | `fire` | 実線 | 開いた矢 | 返事を待たない。 実線だが矢を閉じないことで待たないと示す |
|
|
2934
2934
|
*
|
|
2935
|
-
*
|
|
2935
|
+
* 印の形はクラス図の「継承」 と「関連」 で使った形そのもの。 **意味は違う** (あちらは親を
|
|
2936
2936
|
* 指す / こちらは返事を待つか) が、形の並びは共有できる。
|
|
2937
2937
|
*/
|
|
2938
2938
|
type SequenceMessageKind = "call" | "return" | "fire";
|
|
@@ -3369,12 +3369,12 @@ type ClassRelationType = "extends" | "implements" | "uses" | "aggregates" | "com
|
|
|
3369
3369
|
*
|
|
3370
3370
|
* | 種類 | 線 | 形 | 塗り | 側 | 意味 |
|
|
3371
3371
|
* |---|---|---|---|---|---|
|
|
3372
|
-
* | `extends` | 実線 | 三角 | 白抜き | 行き先 |
|
|
3373
|
-
* | `implements` | 破線 | 三角 | 白抜き | 行き先 |
|
|
3374
|
-
* | `aggregates` | 実線 | 菱 | 白抜き | 出どころ |
|
|
3375
|
-
* | `composes` | 実線 | 菱 | 塗る | 出どころ |
|
|
3376
|
-
* | `associates` | 実線 | 開いた矢 | — | 行き先 |
|
|
3377
|
-
* | `uses` | 破線 | 開いた矢 | — | 行き先 |
|
|
3372
|
+
* | `extends` | 実線 | 三角 | 白抜き | 行き先 | 継承 |
|
|
3373
|
+
* | `implements` | 破線 | 三角 | 白抜き | 行き先 | 実装 |
|
|
3374
|
+
* | `aggregates` | 実線 | 菱 | 白抜き | 出どころ | 集約 |
|
|
3375
|
+
* | `composes` | 実線 | 菱 | 塗る | 出どころ | コンポジション |
|
|
3376
|
+
* | `associates` | 実線 | 開いた矢 | — | 行き先 | 関連 |
|
|
3377
|
+
* | `uses` | 破線 | 開いた矢 | — | 行き先 | 依存 |
|
|
3378
3378
|
*
|
|
3379
3379
|
* **側が種で割れるのが要点**。 三角は「この先が親」 を指すので行き先に立ち、菱は
|
|
3380
3380
|
* 「この箱が持っている」 を指すので出どころに立つ。 1 つの決まりで書こうとするとどちらかが
|
|
@@ -3895,7 +3895,7 @@ declare function stateMachine2(preset: StateMachine2Preset): StateMachine2Builde
|
|
|
3895
3895
|
* 問いにその場で答えられる。
|
|
3896
3896
|
*
|
|
3897
3897
|
* 集合は 3 つで作る = 触れた箱 / その箱に繋がる線 / 線の相手の箱。
|
|
3898
|
-
* **線の向きは問わない** =
|
|
3898
|
+
* **線の向きは問わない** = クラス図の「継承」 は子から親へ、 ER の「注文する」 は利用者から注文へ向くが、
|
|
3899
3899
|
* 読み手にとってはどちらも「この箱の関係」 で、向きで見え方が変わる理由が無い。
|
|
3900
3900
|
*/
|
|
3901
3901
|
/** 集合を作るのに要る線の情報だけを取る */
|
package/dist/index.js
CHANGED
|
@@ -20530,6 +20530,87 @@ function requiredRowsWidth(rows, kind) {
|
|
|
20530
20530
|
return Math.ceil(kind === "storage" ? storage : generic);
|
|
20531
20531
|
}
|
|
20532
20532
|
|
|
20533
|
+
// src/layout/head-label.ts
|
|
20534
|
+
var \u7AEF\u306E\u5B57\u3092\u623B\u3059\u8DDD\u96E2 = 22;
|
|
20535
|
+
var \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593 = 8;
|
|
20536
|
+
var \u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055 = EDGE_LABEL_TEXT.sub.fontSize;
|
|
20537
|
+
var \u7BB1\u306E\u9AD8\u3055 = Math.round(\u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055 * 1.2);
|
|
20538
|
+
var BASELINE_RATIO = 0.8;
|
|
20539
|
+
var \u4E21\u7AEF\u306E\u5B57\u306E\u9593 = \u7AEF\u306E\u5B57\u3092\u623B\u3059\u8DDD\u96E2 * 2;
|
|
20540
|
+
function \u7AEF\u306E\u5B57\u306B\u8981\u308B\u7DDA\u306E\u9577\u3055(edge) {
|
|
20541
|
+
const \u4E00\u3064\u5206 = \u7AEF\u306E\u5B57\u3092\u623B\u3059\u8DDD\u96E2 + \u7BB1\u306E\u9AD8\u3055;
|
|
20542
|
+
const \u6570 = [edge.headLabel, edge.tailLabel].filter((t) => t?.trim()).length;
|
|
20543
|
+
if (\u6570 === 0) return 0;
|
|
20544
|
+
if (\u6570 === 1) return \u4E00\u3064\u5206;
|
|
20545
|
+
return \u4E00\u3064\u5206 * 2 + \u4E21\u7AEF\u306E\u5B57\u306E\u9593;
|
|
20546
|
+
}
|
|
20547
|
+
function \u5411\u304D\u3092\u53D6\u308B(end, \u5019\u88DC) {
|
|
20548
|
+
for (const p of \u5019\u88DC) {
|
|
20549
|
+
if (!p) continue;
|
|
20550
|
+
const dx = end.x - p.x;
|
|
20551
|
+
const dy = end.y - p.y;
|
|
20552
|
+
const len = Math.hypot(dx, dy);
|
|
20553
|
+
if (len > 1e-6) return { end, ux: dx / len, uy: dy / len };
|
|
20554
|
+
}
|
|
20555
|
+
return null;
|
|
20556
|
+
}
|
|
20557
|
+
function \u7AEF\u3067\u306E\u5411\u304D(d, \u7AEF) {
|
|
20558
|
+
const segs = extractPathSegments(d);
|
|
20559
|
+
if (segs.length === 0) return null;
|
|
20560
|
+
if (\u7AEF === "head") {
|
|
20561
|
+
const last = segs[segs.length - 1];
|
|
20562
|
+
const end2 = { x: last.x2, y: last.y2 };
|
|
20563
|
+
const \u5019\u88DC2 = segs.slice().reverse().flatMap((s) => [s.cmd === "Q" ? s.ctrl?.[0] : s.cmd === "C" ? s.ctrl?.[1] : void 0, { x: s.x1, y: s.y1 }]);
|
|
20564
|
+
return \u5411\u304D\u3092\u53D6\u308B(end2, \u5019\u88DC2);
|
|
20565
|
+
}
|
|
20566
|
+
const first = segs[0];
|
|
20567
|
+
const end = { x: first.x1, y: first.y1 };
|
|
20568
|
+
const \u5019\u88DC = segs.flatMap((s) => [...s.ctrl ?? [], { x: s.x2, y: s.y2 }]);
|
|
20569
|
+
return \u5411\u304D\u3092\u53D6\u308B(end, \u5019\u88DC);
|
|
20570
|
+
}
|
|
20571
|
+
function \u7AEF\u306E\u5B57\u3092\u7F6E\u304F(edge, \u7AEF = "head") {
|
|
20572
|
+
const text = (\u7AEF === "head" ? edge.headLabel : edge.tailLabel)?.trim();
|
|
20573
|
+
if (!text) return null;
|
|
20574
|
+
const \u5411\u304D = \u7AEF\u3067\u306E\u5411\u304D(edge.d, \u7AEF);
|
|
20575
|
+
if (!\u5411\u304D) return null;
|
|
20576
|
+
const { end, ux, uy } = \u5411\u304D;
|
|
20577
|
+
const bx = end.x - ux * \u7AEF\u306E\u5B57\u3092\u623B\u3059\u8DDD\u96E2;
|
|
20578
|
+
const by = end.y - uy * \u7AEF\u306E\u5B57\u3092\u623B\u3059\u8DDD\u96E2;
|
|
20579
|
+
const w = measureTextWidth(text, {
|
|
20580
|
+
fontSize: \u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055,
|
|
20581
|
+
fontWeight: EDGE_LABEL_TEXT.sub.fontWeight,
|
|
20582
|
+
fontFamily: "mono"
|
|
20583
|
+
});
|
|
20584
|
+
const h = \u7BB1\u306E\u9AD8\u3055;
|
|
20585
|
+
const \u672D = hasRenderedLabel(edge) && edge.labelX !== void 0 && edge.labelY !== void 0 ? { x: edge.labelX, y: edge.labelY } : null;
|
|
20586
|
+
let anchor;
|
|
20587
|
+
let box;
|
|
20588
|
+
if (Math.abs(ux) >= Math.abs(uy)) {
|
|
20589
|
+
const \u53F3\u3078\u9032\u3080 = ux > 0;
|
|
20590
|
+
const \u4E0A\u306B\u7F6E\u304F = \u672D !== null && \u672D.y > by;
|
|
20591
|
+
anchor = \u53F3\u3078\u9032\u3080 ? "end" : "start";
|
|
20592
|
+
box = {
|
|
20593
|
+
x: \u53F3\u3078\u9032\u3080 ? bx - w : bx,
|
|
20594
|
+
y: \u4E0A\u306B\u7F6E\u304F ? by - \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593 - h : by + \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593,
|
|
20595
|
+
w,
|
|
20596
|
+
h
|
|
20597
|
+
};
|
|
20598
|
+
} else {
|
|
20599
|
+
const \u4E0B\u3078\u9032\u3080 = uy > 0;
|
|
20600
|
+
const \u53F3\u306B\u7F6E\u304F = \u672D !== null && \u672D.x < bx;
|
|
20601
|
+
anchor = \u53F3\u306B\u7F6E\u304F ? "start" : "end";
|
|
20602
|
+
box = {
|
|
20603
|
+
x: \u53F3\u306B\u7F6E\u304F ? bx + \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593 : bx - \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593 - w,
|
|
20604
|
+
y: \u4E0B\u3078\u9032\u3080 ? by - h : by,
|
|
20605
|
+
w,
|
|
20606
|
+
h
|
|
20607
|
+
};
|
|
20608
|
+
}
|
|
20609
|
+
const x = anchor === "start" ? box.x : box.x + box.w;
|
|
20610
|
+
const y = box.y + (h - \u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055) / 2 + \u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055 * BASELINE_RATIO;
|
|
20611
|
+
return { x, y, anchor, box };
|
|
20612
|
+
}
|
|
20613
|
+
|
|
20533
20614
|
// src/layout/nodes.ts
|
|
20534
20615
|
function autoStorageHeight(n, defaultH) {
|
|
20535
20616
|
if (n.kind !== "storage") return n.h ?? defaultH;
|
|
@@ -20551,7 +20632,7 @@ function autoRowsWidth(n, defaultW) {
|
|
|
20551
20632
|
const required = requiredRowsWidth(n.rows, n.kind);
|
|
20552
20633
|
return Math.max(defaultW, required);
|
|
20553
20634
|
}
|
|
20554
|
-
function \u7BB1\u306E\u9AD8\
|
|
20635
|
+
function \u7BB1\u306E\u9AD8\u30552(n, \u65E2\u5B9Ah) {
|
|
20555
20636
|
if (n.h != null) return n.h;
|
|
20556
20637
|
if (n.kind === "storage") return autoStorageHeight(n, \u65E2\u5B9Ah);
|
|
20557
20638
|
return \u4E2D\u8EAB\u304B\u3089\u51FA\u3059\u9AD8\u3055(n.kind, \u65E2\u5B9Ah, {
|
|
@@ -20565,8 +20646,8 @@ function requiredStackGapForEdgeLabels(diag, allStacks) {
|
|
|
20565
20646
|
const byId = new Map(diag.nodes.map((n) => [n.id, n]));
|
|
20566
20647
|
const rankOf = new Map(allStacks.map((stack, i) => [stack, i]));
|
|
20567
20648
|
const pillHsByGap = /* @__PURE__ */ new Map();
|
|
20649
|
+
let \u7AEF\u306E\u5B57\u306E\u8981\u6C42 = 0;
|
|
20568
20650
|
for (const e of diag.edges) {
|
|
20569
|
-
if (!hasRenderedLabel(e)) continue;
|
|
20570
20651
|
const from = byId.get(e.from);
|
|
20571
20652
|
const to = byId.get(e.to);
|
|
20572
20653
|
if (!from || !to) continue;
|
|
@@ -20575,10 +20656,12 @@ function requiredStackGapForEdgeLabels(diag, allStacks) {
|
|
|
20575
20656
|
const toRank = rankOf.get(to.stack);
|
|
20576
20657
|
if (fromRank === void 0 || toRank === void 0) continue;
|
|
20577
20658
|
if (Math.abs(fromRank - toRank) !== 1) continue;
|
|
20659
|
+
\u7AEF\u306E\u5B57\u306E\u8981\u6C42 = Math.max(\u7AEF\u306E\u5B57\u306E\u8981\u6C42, \u7AEF\u306E\u5B57\u306B\u8981\u308B\u7DDA\u306E\u9577\u3055(e));
|
|
20660
|
+
if (!hasRenderedLabel(e)) continue;
|
|
20578
20661
|
const key = `${from.lane}::${Math.min(fromRank, toRank)}`;
|
|
20579
20662
|
pillHsByGap.set(key, [...pillHsByGap.get(key) ?? [], labelPillH(e.sub)]);
|
|
20580
20663
|
}
|
|
20581
|
-
let required =
|
|
20664
|
+
let required = \u7AEF\u306E\u5B57\u306E\u8981\u6C42;
|
|
20582
20665
|
for (const pillHs of pillHsByGap.values()) {
|
|
20583
20666
|
required = Math.max(required, requiredVerticalLabelGap(pillHs));
|
|
20584
20667
|
}
|
|
@@ -20590,7 +20673,7 @@ function layoutNodes(diag, lanes) {
|
|
|
20590
20673
|
const rowH = /* @__PURE__ */ new Map();
|
|
20591
20674
|
for (const stack of allStacks) {
|
|
20592
20675
|
const nodesAtStack = diag.nodes.filter((n) => n.stack === stack);
|
|
20593
|
-
const h = Math.max(...nodesAtStack.map((n) => \u7BB1\u306E\u9AD8\
|
|
20676
|
+
const h = Math.max(...nodesAtStack.map((n) => \u7BB1\u306E\u9AD8\u30552(n, NODE_SIZE[n.kind].h)));
|
|
20594
20677
|
rowH.set(stack, h);
|
|
20595
20678
|
}
|
|
20596
20679
|
const rowCy = /* @__PURE__ */ new Map();
|
|
@@ -20644,7 +20727,7 @@ function layoutNodes(diag, lanes) {
|
|
|
20644
20727
|
const \u6BB5\u306E\u82AF = rowCy.get(n.stack);
|
|
20645
20728
|
const \u6BB5\u306E\u9AD8\u3055 = rowH.get(n.stack);
|
|
20646
20729
|
const \u81EA\u524D\u306E\u9AD8\u3055 = n.rowMarks !== void 0;
|
|
20647
|
-
const h = n.h ?? (\u81EA\u524D\u306E\u9AD8\u3055 ? \u7BB1\u306E\u9AD8\
|
|
20730
|
+
const h = n.h ?? (\u81EA\u524D\u306E\u9AD8\u3055 ? \u7BB1\u306E\u9AD8\u30552(n, size.h) : \u6BB5\u306E\u9AD8\u3055);
|
|
20648
20731
|
const cy = \u6BB5\u306E\u82AF;
|
|
20649
20732
|
const w = autoRowsWidth(n, size.w);
|
|
20650
20733
|
out.push({
|
|
@@ -22933,79 +23016,6 @@ function \u7B49\u5E45\u306E\u5B57(text, fontSize) {
|
|
|
22933
23016
|
});
|
|
22934
23017
|
return out;
|
|
22935
23018
|
}
|
|
22936
|
-
|
|
22937
|
-
// src/layout/head-label.ts
|
|
22938
|
-
var \u7AEF\u306E\u5B57\u3092\u623B\u3059\u8DDD\u96E2 = 22;
|
|
22939
|
-
var \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593 = 8;
|
|
22940
|
-
var \u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055 = EDGE_LABEL_TEXT.sub.fontSize;
|
|
22941
|
-
var \u7BB1\u306E\u9AD8\u30552 = Math.round(\u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055 * 1.2);
|
|
22942
|
-
var BASELINE_RATIO = 0.8;
|
|
22943
|
-
function \u5411\u304D\u3092\u53D6\u308B(end, \u5019\u88DC) {
|
|
22944
|
-
for (const p of \u5019\u88DC) {
|
|
22945
|
-
if (!p) continue;
|
|
22946
|
-
const dx = end.x - p.x;
|
|
22947
|
-
const dy = end.y - p.y;
|
|
22948
|
-
const len = Math.hypot(dx, dy);
|
|
22949
|
-
if (len > 1e-6) return { end, ux: dx / len, uy: dy / len };
|
|
22950
|
-
}
|
|
22951
|
-
return null;
|
|
22952
|
-
}
|
|
22953
|
-
function \u7AEF\u3067\u306E\u5411\u304D(d, \u7AEF) {
|
|
22954
|
-
const segs = extractPathSegments(d);
|
|
22955
|
-
if (segs.length === 0) return null;
|
|
22956
|
-
if (\u7AEF === "head") {
|
|
22957
|
-
const last = segs[segs.length - 1];
|
|
22958
|
-
const end2 = { x: last.x2, y: last.y2 };
|
|
22959
|
-
const \u5019\u88DC2 = segs.slice().reverse().flatMap((s) => [s.cmd === "Q" ? s.ctrl?.[0] : s.cmd === "C" ? s.ctrl?.[1] : void 0, { x: s.x1, y: s.y1 }]);
|
|
22960
|
-
return \u5411\u304D\u3092\u53D6\u308B(end2, \u5019\u88DC2);
|
|
22961
|
-
}
|
|
22962
|
-
const first = segs[0];
|
|
22963
|
-
const end = { x: first.x1, y: first.y1 };
|
|
22964
|
-
const \u5019\u88DC = segs.flatMap((s) => [...s.ctrl ?? [], { x: s.x2, y: s.y2 }]);
|
|
22965
|
-
return \u5411\u304D\u3092\u53D6\u308B(end, \u5019\u88DC);
|
|
22966
|
-
}
|
|
22967
|
-
function \u7AEF\u306E\u5B57\u3092\u7F6E\u304F(edge, \u7AEF = "head") {
|
|
22968
|
-
const text = (\u7AEF === "head" ? edge.headLabel : edge.tailLabel)?.trim();
|
|
22969
|
-
if (!text) return null;
|
|
22970
|
-
const \u5411\u304D = \u7AEF\u3067\u306E\u5411\u304D(edge.d, \u7AEF);
|
|
22971
|
-
if (!\u5411\u304D) return null;
|
|
22972
|
-
const { end, ux, uy } = \u5411\u304D;
|
|
22973
|
-
const bx = end.x - ux * \u7AEF\u306E\u5B57\u3092\u623B\u3059\u8DDD\u96E2;
|
|
22974
|
-
const by = end.y - uy * \u7AEF\u306E\u5B57\u3092\u623B\u3059\u8DDD\u96E2;
|
|
22975
|
-
const w = measureTextWidth(text, {
|
|
22976
|
-
fontSize: \u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055,
|
|
22977
|
-
fontWeight: EDGE_LABEL_TEXT.sub.fontWeight,
|
|
22978
|
-
fontFamily: "mono"
|
|
22979
|
-
});
|
|
22980
|
-
const h = \u7BB1\u306E\u9AD8\u30552;
|
|
22981
|
-
const \u672D = hasRenderedLabel(edge) && edge.labelX !== void 0 && edge.labelY !== void 0 ? { x: edge.labelX, y: edge.labelY } : null;
|
|
22982
|
-
let anchor;
|
|
22983
|
-
let box;
|
|
22984
|
-
if (Math.abs(ux) >= Math.abs(uy)) {
|
|
22985
|
-
const \u53F3\u3078\u9032\u3080 = ux > 0;
|
|
22986
|
-
const \u4E0A\u306B\u7F6E\u304F = \u672D !== null && \u672D.y > by;
|
|
22987
|
-
anchor = \u53F3\u3078\u9032\u3080 ? "end" : "start";
|
|
22988
|
-
box = {
|
|
22989
|
-
x: \u53F3\u3078\u9032\u3080 ? bx - w : bx,
|
|
22990
|
-
y: \u4E0A\u306B\u7F6E\u304F ? by - \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593 - h : by + \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593,
|
|
22991
|
-
w,
|
|
22992
|
-
h
|
|
22993
|
-
};
|
|
22994
|
-
} else {
|
|
22995
|
-
const \u4E0B\u3078\u9032\u3080 = uy > 0;
|
|
22996
|
-
const \u53F3\u306B\u7F6E\u304F = \u672D !== null && \u672D.x < bx;
|
|
22997
|
-
anchor = \u53F3\u306B\u7F6E\u304F ? "start" : "end";
|
|
22998
|
-
box = {
|
|
22999
|
-
x: \u53F3\u306B\u7F6E\u304F ? bx + \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593 : bx - \u7AEF\u306E\u5B57\u3068\u7DDA\u306E\u9699\u9593 - w,
|
|
23000
|
-
y: \u4E0B\u3078\u9032\u3080 ? by - h : by,
|
|
23001
|
-
w,
|
|
23002
|
-
h
|
|
23003
|
-
};
|
|
23004
|
-
}
|
|
23005
|
-
const x = anchor === "start" ? box.x : box.x + box.w;
|
|
23006
|
-
const y = box.y + (h - \u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055) / 2 + \u7AEF\u306E\u5B57\u306E\u5927\u304D\u3055 * BASELINE_RATIO;
|
|
23007
|
-
return { x, y, anchor, box };
|
|
23008
|
-
}
|
|
23009
23019
|
function defaultEdgeWidth(active) {
|
|
23010
23020
|
return active ? 2.5 : 1.25;
|
|
23011
23021
|
}
|
|
@@ -32157,7 +32167,7 @@ function flow(preset) {
|
|
|
32157
32167
|
build() {
|
|
32158
32168
|
b.phase(
|
|
32159
32169
|
"flow",
|
|
32160
|
-
{ duration: 2400, title: preset.topic, body: "\
|
|
32170
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u6BB5\u3092\u4E0A\u304B\u3089\u9806\u306B\u901A\u3063\u305F\u6D41\u308C\u3002" },
|
|
32161
32171
|
(p) => p.activate(...phaseActivate).badge("flow")
|
|
32162
32172
|
);
|
|
32163
32173
|
return b.build();
|
|
@@ -32215,7 +32225,7 @@ function sequence(preset) {
|
|
|
32215
32225
|
});
|
|
32216
32226
|
b.phase(
|
|
32217
32227
|
"sequence",
|
|
32218
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32228
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u3084\u308A\u53D6\u308A\u3092\u6642\u9593\u306E\u9806\u306B\u4E26\u3079\u305F\u59FF\u3002" },
|
|
32219
32229
|
(p) => p.activate(preset.id).badge("sequence")
|
|
32220
32230
|
);
|
|
32221
32231
|
return b.build();
|
|
@@ -32276,7 +32286,7 @@ function topology(preset) {
|
|
|
32276
32286
|
build() {
|
|
32277
32287
|
b.phase(
|
|
32278
32288
|
"topo",
|
|
32279
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32289
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u69CB\u6210\u8981\u7D20\u3068\u63A5\u7D9A\u3092\u4E26\u3079\u305F\u69CB\u6210\u3002" },
|
|
32280
32290
|
(p) => p.activate(...phaseActivate).badge("topology")
|
|
32281
32291
|
);
|
|
32282
32292
|
return b.build();
|
|
@@ -32364,7 +32374,7 @@ function er(preset) {
|
|
|
32364
32374
|
build() {
|
|
32365
32375
|
b.phase(
|
|
32366
32376
|
"er",
|
|
32367
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32377
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u8868\u3068\u95A2\u4FC2\u3092\u4E26\u3079\u305F\u69CB\u9020\u3002" },
|
|
32368
32378
|
(p) => p.activate(...phaseActivate).badge("er")
|
|
32369
32379
|
);
|
|
32370
32380
|
return b.build();
|
|
@@ -32482,7 +32492,7 @@ function stateMachine(preset) {
|
|
|
32482
32492
|
});
|
|
32483
32493
|
b.phase(
|
|
32484
32494
|
"fsm",
|
|
32485
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32495
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u72B6\u614B\u3068\u9077\u79FB\u3092\u4E26\u3079\u305F\u59FF\u3002" },
|
|
32486
32496
|
(p) => p.activate(...phaseActivate).badge("fsm")
|
|
32487
32497
|
);
|
|
32488
32498
|
return b.build();
|
|
@@ -32537,7 +32547,7 @@ function infrastructure(preset) {
|
|
|
32537
32547
|
build() {
|
|
32538
32548
|
b.phase(
|
|
32539
32549
|
"infra",
|
|
32540
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32550
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u69CB\u6210\u8981\u7D20\u3068\u63A5\u7D9A\u3092\u4E26\u3079\u305F\u69CB\u6210\u3002" },
|
|
32541
32551
|
(p) => p.activate(...phaseActivate).badge("infrastructure")
|
|
32542
32552
|
);
|
|
32543
32553
|
return b.build();
|
|
@@ -32654,7 +32664,7 @@ function classDiagram(preset) {
|
|
|
32654
32664
|
});
|
|
32655
32665
|
b.phase(
|
|
32656
32666
|
"class",
|
|
32657
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32667
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3068\u95A2\u4FC2\u3092\u4E26\u3079\u305F\u69CB\u9020\u3002" },
|
|
32658
32668
|
(p) => p.activate(...phaseActivate).badge("class")
|
|
32659
32669
|
);
|
|
32660
32670
|
return b.build();
|
|
@@ -32692,7 +32702,7 @@ function tree(preset) {
|
|
|
32692
32702
|
});
|
|
32693
32703
|
b.phase(
|
|
32694
32704
|
"tree",
|
|
32695
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32705
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u9805\u76EE\u3092\u89AA\u5B50\u306E\u968E\u5C64\u3067\u4E26\u3079\u305F\u6728\u3002" },
|
|
32696
32706
|
(p) => p.activate(nodeId).badge("tree")
|
|
32697
32707
|
);
|
|
32698
32708
|
return b.build();
|
|
@@ -32731,7 +32741,7 @@ function userJourney(preset) {
|
|
|
32731
32741
|
});
|
|
32732
32742
|
b.phase(
|
|
32733
32743
|
"journey",
|
|
32734
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32744
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u6BB5\u968E\u3092\u3001\u6C17\u6301\u3061\u306E\u66F2\u7DDA\u3068\u63A5\u70B9\u3067\u4E26\u3079\u305F\u4F53\u9A13\u3002" },
|
|
32735
32745
|
(p) => p.activate(nodeId).badge("journey")
|
|
32736
32746
|
);
|
|
32737
32747
|
return b.build();
|
|
@@ -32775,7 +32785,7 @@ function mindMap(preset) {
|
|
|
32775
32785
|
});
|
|
32776
32786
|
b.phase(
|
|
32777
32787
|
"mindmap",
|
|
32778
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32788
|
+
{ duration: 2400, title: preset.topic, body: "\u4E2D\u5FC3\u306E\u4E3B\u984C\u304B\u3089\u3001\u3059\u3079\u3066\u306E\u679D\u3092\u653E\u5C04\u72B6\u306B\u5E83\u3052\u305F\u59FF\u3002" },
|
|
32779
32789
|
(p) => p.activate(nodeId).badge("mindmap")
|
|
32780
32790
|
);
|
|
32781
32791
|
return b.build();
|
|
@@ -32813,7 +32823,7 @@ function funnel(preset) {
|
|
|
32813
32823
|
});
|
|
32814
32824
|
b.phase(
|
|
32815
32825
|
"funnel",
|
|
32816
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32826
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u6BB5\u968E\u3092\u3001\u4EBA\u6570\u3068\u3068\u3082\u306B\u4E0A\u304B\u3089\u7D5E\u308A\u8FBC\u3093\u3060\u59FF\u3002" },
|
|
32817
32827
|
(p) => p.activate(nodeId).badge("funnel")
|
|
32818
32828
|
);
|
|
32819
32829
|
return b.build();
|
|
@@ -32862,7 +32872,7 @@ function quadrant(preset) {
|
|
|
32862
32872
|
});
|
|
32863
32873
|
b.phase(
|
|
32864
32874
|
"quadrant",
|
|
32865
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32875
|
+
{ duration: 2400, title: preset.topic, body: "2 \u672C\u306E\u8EF8\u3067\u5206\u3051\u305F 4 \u3064\u306E\u67A0\u306B\u3001\u3059\u3079\u3066\u306E\u9805\u76EE\u3092\u7F6E\u3044\u305F\u59FF\u3002" },
|
|
32866
32876
|
(p) => p.activate(nodeId).badge("quadrant")
|
|
32867
32877
|
);
|
|
32868
32878
|
return b.build();
|
|
@@ -32913,7 +32923,7 @@ function chart(preset) {
|
|
|
32913
32923
|
});
|
|
32914
32924
|
b.phase(
|
|
32915
32925
|
"chart",
|
|
32916
|
-
{ duration: 2400, title: preset.topic, body:
|
|
32926
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u5024\u3092\u63CF\u3044\u305F\u30B0\u30E9\u30D5\u3002" },
|
|
32917
32927
|
(p) => p.activate(nodeId).badge(preset.type)
|
|
32918
32928
|
);
|
|
32919
32929
|
return b.build();
|
|
@@ -32966,7 +32976,7 @@ function gantt(preset) {
|
|
|
32966
32976
|
});
|
|
32967
32977
|
b.phase(
|
|
32968
32978
|
"gantt",
|
|
32969
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
32979
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u4F5C\u696D\u3092\u3001\u671F\u9593\u306E\u5E2F\u3068\u524D\u5F8C\u95A2\u4FC2\u306E\u77E2\u5370\u3067\u4E26\u3079\u305F\u5DE5\u7A0B\u3002" },
|
|
32970
32980
|
(p) => p.activate(nodeId).badge("gantt")
|
|
32971
32981
|
);
|
|
32972
32982
|
return b.build();
|
|
@@ -32982,11 +32992,11 @@ var SHAPE_KIND = {
|
|
|
32982
32992
|
loop: "card"
|
|
32983
32993
|
};
|
|
32984
32994
|
var SHAPE_EYEBROW = {
|
|
32985
|
-
process: "
|
|
32986
|
-
decision: "
|
|
32987
|
-
start: "
|
|
32988
|
-
end: "
|
|
32989
|
-
loop: "
|
|
32995
|
+
process: "\u51E6\u7406",
|
|
32996
|
+
decision: "\u5224\u65AD",
|
|
32997
|
+
start: "\u958B\u59CB",
|
|
32998
|
+
end: "\u7D42\u4E86",
|
|
32999
|
+
loop: "\u7E70\u308A\u8FD4\u3057"
|
|
32990
33000
|
};
|
|
32991
33001
|
function flowchart(preset) {
|
|
32992
33002
|
const laneW = preset.laneWidth ?? 380;
|
|
@@ -33034,7 +33044,7 @@ function flowchart(preset) {
|
|
|
33034
33044
|
build() {
|
|
33035
33045
|
b.phase(
|
|
33036
33046
|
"flowchart",
|
|
33037
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
33047
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u51E6\u7406\u3068\u5206\u5C90\u3092\u3001\u62C5\u5F53\u3054\u3068\u306E\u30EC\u30FC\u30F3\u306B\u4E26\u3079\u305F\u6D41\u308C\u3002" },
|
|
33038
33048
|
(p) => p.activate(...phaseActivate).badge("flowchart")
|
|
33039
33049
|
);
|
|
33040
33050
|
return b.build();
|
|
@@ -33049,6 +33059,13 @@ var NET_KIND_MAP = {
|
|
|
33049
33059
|
server: "backend",
|
|
33050
33060
|
client: "actor"
|
|
33051
33061
|
};
|
|
33062
|
+
var NET_KIND_LABEL = {
|
|
33063
|
+
router: "\u30EB\u30FC\u30BF\u30FC",
|
|
33064
|
+
switch: "\u30B9\u30A4\u30C3\u30C1",
|
|
33065
|
+
firewall: "\u30D5\u30A1\u30A4\u30A2\u30A6\u30A9\u30FC\u30EB",
|
|
33066
|
+
server: "\u30B5\u30FC\u30D0\u30FC",
|
|
33067
|
+
client: "\u7AEF\u672B"
|
|
33068
|
+
};
|
|
33052
33069
|
function network(preset) {
|
|
33053
33070
|
const laneW = preset.laneWidth ?? 320;
|
|
33054
33071
|
const tone = preset.defaultTone ?? "info";
|
|
@@ -33064,7 +33081,7 @@ function network(preset) {
|
|
|
33064
33081
|
b.lane(laneId, { width: laneW });
|
|
33065
33082
|
colLaneIds.set(d.col, laneId);
|
|
33066
33083
|
}
|
|
33067
|
-
const eyebrowParts = [d.kind];
|
|
33084
|
+
const eyebrowParts = [NET_KIND_LABEL[d.kind]];
|
|
33068
33085
|
if (d.segment) eyebrowParts.push(d.segment);
|
|
33069
33086
|
b.node(d.id, {
|
|
33070
33087
|
lane: laneId,
|
|
@@ -33090,7 +33107,7 @@ function network(preset) {
|
|
|
33090
33107
|
build() {
|
|
33091
33108
|
b.phase(
|
|
33092
33109
|
"network",
|
|
33093
|
-
{ duration: 2400, title: preset.topic, body: "
|
|
33110
|
+
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u6A5F\u5668\u3068\u63A5\u7D9A\u3092\u4E26\u3079\u305F\u69CB\u6210\u3002" },
|
|
33094
33111
|
(p) => p.activate(...phaseActivate).badge("network")
|
|
33095
33112
|
);
|
|
33096
33113
|
return b.build();
|
|
@@ -33106,18 +33123,21 @@ function stateMachine2(preset) {
|
|
|
33106
33123
|
const stateOrder = /* @__PURE__ */ new Map();
|
|
33107
33124
|
const phaseActivate = [];
|
|
33108
33125
|
let transIdx = 0;
|
|
33126
|
+
const \u984C = /* @__PURE__ */ new Map();
|
|
33127
|
+
const \u89AA = /* @__PURE__ */ new Map();
|
|
33109
33128
|
const api = {
|
|
33110
33129
|
state(s) {
|
|
33111
33130
|
const laneId = `lane-${s.id}`;
|
|
33112
33131
|
b.lane(laneId, { width: laneW });
|
|
33132
|
+
\u984C.set(s.id, s.title);
|
|
33133
|
+
if (s.parent) \u89AA.set(s.id, s.parent);
|
|
33113
33134
|
const eyebrowParts = [];
|
|
33114
33135
|
if (s.initial) eyebrowParts.push("\u521D\u671F");
|
|
33115
33136
|
else if (s.final) eyebrowParts.push("\u6700\u7D42");
|
|
33116
33137
|
else eyebrowParts.push("\u72B6\u614B");
|
|
33117
|
-
if (s.parent) eyebrowParts.push(`nested in ${s.parent}`);
|
|
33118
33138
|
const subtitleParts = [];
|
|
33119
|
-
if (s.entry) subtitleParts.push(
|
|
33120
|
-
if (s.exit) subtitleParts.push(
|
|
33139
|
+
if (s.entry) subtitleParts.push(`\u5165\u308B\u6642: ${s.entry}`);
|
|
33140
|
+
if (s.exit) subtitleParts.push(`\u51FA\u308B\u6642: ${s.exit}`);
|
|
33121
33141
|
b.node(s.id, {
|
|
33122
33142
|
lane: laneId,
|
|
33123
33143
|
stack: 0,
|
|
@@ -33150,10 +33170,23 @@ function stateMachine2(preset) {
|
|
|
33150
33170
|
build() {
|
|
33151
33171
|
b.phase(
|
|
33152
33172
|
"sm2",
|
|
33153
|
-
{
|
|
33173
|
+
{
|
|
33174
|
+
duration: 2400,
|
|
33175
|
+
title: preset.topic,
|
|
33176
|
+
body: "\u5165\u308C\u5B50\u306E\u72B6\u614B\u3068\u3001\u5165\u308B\u6642\u30FB\u51FA\u308B\u6642\u306E\u51E6\u7406\u3092\u542B\u3081\u305F\u3001\u3059\u3079\u3066\u306E\u72B6\u614B\u3068\u9077\u79FB\u3002"
|
|
33177
|
+
},
|
|
33154
33178
|
(p) => p.activate(...phaseActivate).badge("statemachine2")
|
|
33155
33179
|
);
|
|
33156
|
-
|
|
33180
|
+
const d = b.build();
|
|
33181
|
+
return {
|
|
33182
|
+
...d,
|
|
33183
|
+
nodes: d.nodes.map((n) => {
|
|
33184
|
+
const \u89AA\u306E\u8B58\u5225\u5B50 = \u89AA.get(n.id);
|
|
33185
|
+
if (\u89AA\u306E\u8B58\u5225\u5B50 === void 0) return n;
|
|
33186
|
+
const \u89AA\u306E\u984C = \u984C.get(\u89AA\u306E\u8B58\u5225\u5B50) ?? \u89AA\u306E\u8B58\u5225\u5B50;
|
|
33187
|
+
return { ...n, eyebrow: `${n.eyebrow ?? "\u72B6\u614B"} / ${\u89AA\u306E\u984C}\u306E\u4E2D` };
|
|
33188
|
+
})
|
|
33189
|
+
};
|
|
33157
33190
|
}
|
|
33158
33191
|
};
|
|
33159
33192
|
return api;
|