@cardenelabs/dragon 0.30.0 → 0.32.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.
Files changed (55) hide show
  1. package/README.md +314 -12
  2. package/dist/index.cjs +6966 -1438
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +2150 -118
  5. package/dist/index.d.ts +2150 -118
  6. package/dist/index.js +6950 -1440
  7. package/dist/index.js.map +1 -1
  8. package/package.json +12 -13
  9. package/src/compile/actor-ids.ts +6 -15
  10. package/src/compile/actor-option-notice.ts +379 -0
  11. package/src/compile/actors.ts +32 -3
  12. package/src/compile/c4.ts +0 -3
  13. package/src/compile/chain.ts +43 -4
  14. package/src/compile/chart-fields.ts +16 -1
  15. package/src/compile/direction.ts +50 -11
  16. package/src/compile/edge-option-notice.ts +112 -0
  17. package/src/compile/flowchart.ts +344 -0
  18. package/src/compile/funnel.ts +14 -2
  19. package/src/compile/gantt.ts +141 -36
  20. package/src/compile/generic.ts +473 -61
  21. package/src/compile/journey.ts +14 -5
  22. package/src/compile/kinds.ts +5 -13
  23. package/src/compile/lanes.ts +95 -13
  24. package/src/compile/metro.ts +271 -0
  25. package/src/compile/mind.ts +55 -5
  26. package/src/compile/notice.ts +51 -4
  27. package/src/compile/order.ts +62 -0
  28. package/src/compile/parts.ts +107 -33
  29. package/src/compile/placement-apply.ts +27 -11
  30. package/src/compile/quadrant.ts +171 -16
  31. package/src/compile/record.ts +75 -0
  32. package/src/compile/row-marks.ts +128 -0
  33. package/src/compile/sequence.ts +105 -26
  34. package/src/compile/slug.ts +9 -1
  35. package/src/compile/stages.ts +247 -0
  36. package/src/compile/subtitle.ts +15 -2
  37. package/src/compile/swimlane-marks.ts +87 -0
  38. package/src/compile/swimlane.ts +13 -14
  39. package/src/compile/timeline.ts +213 -0
  40. package/src/compile/topology.ts +3 -9
  41. package/src/compile/tree.ts +13 -4
  42. package/src/compile/value-chart.ts +179 -25
  43. package/src/compile.ts +1550 -370
  44. package/src/focus.ts +2 -2
  45. package/src/index.ts +34 -2
  46. package/src/json-parser.ts +1407 -48
  47. package/src/keywords.ts +251 -17
  48. package/src/notation-lint.ts +41 -64
  49. package/src/schemas/diagram.json +643 -20
  50. package/src/types.ts +336 -35
  51. package/src/v05/parser.ts +2451 -271
  52. package/src/compile/class.ts +0 -100
  53. package/src/compile/er.ts +0 -44
  54. package/src/compile/solidity.ts +0 -39
  55. package/src/compile/state.ts +0 -71
package/dist/index.d.ts CHANGED
@@ -1,6 +1,124 @@
1
- import { NodeKind, Tone, CdlDiagram, EdgeStyle, EdgeHead, EdgeHeadFill, ClassRelationType, SequenceMessageKind, EdgeReveal, RelationFocus, LaidDiagram } from '@cardenelabs/cdl';
1
+ import { LegendMark, NodeKind, Tone, CdlNode, BarCornerRadii, CdlDiagram, CdlLegendItem, RowWell, EdgeStyle, EdgeHead, EdgeHeadFill, ClassRelationType, SequenceMessageKind, EdgeReveal, RelationFocus, LaidDiagram } from '@cardenelabs/cdl';
2
2
  export { CdlDiagram } from '@cardenelabs/cdl';
3
3
 
4
+ /**
5
+ * Text DSL i18n キーワード一覧
6
+ * 日本語 / 英語両対応 (大文字小文字無視)
7
+ */
8
+
9
+ /**
10
+ * 図の並ぶ向き (`direction:`、 #1494)。
11
+ *
12
+ * 縦列 (`lane`) は横、段 (`stack`) は縦に置かれるので、向きは「1 つの縦列に積む」 か
13
+ * 「1 人ずつ縦列を作る」 かの選択になる。 どちらも組み立て側に既にある経路で、
14
+ * 記法から名指しできる言葉が無かった。
15
+ */
16
+ declare const DIRECTIONS: readonly ["縦", "横"];
17
+ type DslDirection = (typeof DIRECTIONS)[number];
18
+ /**
19
+ * 向きの別名。 色 (`色` / `color` / `tone`) と同じく日本語と英語の両方で書ける。
20
+ *
21
+ * 正規の語を鍵にも入れておく = 引く側が別名かどうかを気にせず 1 度で解決できる。
22
+ */
23
+ declare const DIRECTION_ALIAS: Record<string, DslDirection>;
24
+ /**
25
+ * 箱を並べる順 (`order:`、 #2655)。
26
+ *
27
+ * 書かなければ **書いた順** のまま。 `種類` と書くと箱の種類で並べ替えてから置く。
28
+ *
29
+ * これは図の型として持っていた差を語に出したもの。 並べ替えの鍵しか持たない型
30
+ * (`solidity`) が在り、`compile.ts` は「順序図 または その型」 という条件を 6 か所で
31
+ * 書いていた。 **型が 1 つ増えるたびに条件を 2 つ並べる形**になるので、差が並べ替えだけなら
32
+ * 型ではなく語で表す。
33
+ */
34
+ declare const ORDERS: readonly ["種類"];
35
+ type DslOrder = (typeof ORDERS)[number];
36
+ /**
37
+ * 並び順の別名。 向きと同じく日本語と英語の両方で書ける。
38
+ *
39
+ * 正規の語を鍵にも入れておく = 引く側が別名かどうかを気にせず 1 度で解決できる。
40
+ */
41
+ declare const ORDER_ALIAS: Record<string, DslOrder>;
42
+ /**
43
+ * 数を描く図の形 (`shape:`、 #2657)。
44
+ *
45
+ * 数の書き方 (`- 名前: "45"` の 1 行 1 値) は 9 つとも同じで、違うのは描かれる形だけ。
46
+ * 差が形だけなので型ではなく語で表す (並べ替えの語 #2655 と同じ判断)。
47
+ *
48
+ * **日本語の別名は持たない**。 いま `type:` に書く語が英語なので、語を移した先で
49
+ * 書き手が覚える綴りが増えない形にする。
50
+ */
51
+ declare const SHAPES: readonly ["pie", "bar", "line", "gauge", "radial", "stat", "waffle", "stacked", "slope"];
52
+ type DslShape = (typeof SHAPES)[number];
53
+ /** 泳法図の形 (`shape:`、 #2797)。 後続の形も chart と混ぜずここへ足す。 */
54
+ declare const SWIMLANE_SHAPES: readonly ["stages", "metro", "timeline"];
55
+ type DslSwimlaneShape = (typeof SWIMLANE_SHAPES)[number];
56
+ /** 最上位の `shape:` が取り得る語。 図種ごとの集合は `DIAGRAM_SHAPES` が決める。 */
57
+ type DslDiagramShape = DslShape | DslSwimlaneShape;
58
+ /**
59
+ * `shape:` を選べる図種と、その図種で書ける語 (#2797)。
60
+ *
61
+ * 解析・組み立て・schema の照合はこの表から導く。 集合を別々の場所で対応付けると、形を
62
+ * 足した時に一方だけが古くなり、同じ語が入口によって通ったり落ちたりする。
63
+ */
64
+ declare const DIAGRAM_SHAPES: {
65
+ readonly chart: readonly ["pie", "bar", "line", "gauge", "radial", "stat", "waffle", "stacked", "slope"];
66
+ readonly swimlane: readonly ["stages", "metro", "timeline"];
67
+ };
68
+ /** 全図種の `shape:` の語。 図種を決める前の読み取りと schema の照合に使う。 */
69
+ declare const ALL_DIAGRAM_SHAPES: readonly DslDiagramShape[];
70
+ /**
71
+ * 図の意匠 (`theme:`、 #1553 / #2790 / #2791 / #2792 / #2793 / #2794 / #2795 / #2796)。
72
+ *
73
+ * cdl は色を持たない (形だけを描く)。 名前を `data-cdl-palette` として markup に出すので、
74
+ * dragon の `cdl-theme.css` がその名前を見て 9 つの口
75
+ * (台 / 行の面 / 縞 / 枠 / 字 / 型名 / 線 / 所有 / 向きだけ) に色を当てる。
76
+ *
77
+ * **名前を自由文字列にしない**。 書き間違えると既定の色みのまま出るので、書き手には
78
+ * 「効かない」 としか見えない。 語を絞れば読めない語をその場で知らせられる。
79
+ */
80
+ declare const THEMES: readonly ["kinari", "celadon", "blueprint", "letterpress", "catalog", "terminal", "sketch", "neon", "relief"];
81
+ type DslTheme = (typeof THEMES)[number];
82
+ /**
83
+ * 意匠の別名 (#2790 / #2791 / #2792 / #2793 / #2794 / #2795 / #2796)。 向きと同じく日本語と英語の両方で書ける。
84
+ *
85
+ * `kinari` = 生成りに茶、 `celadon` = 青磁に墨、 `blueprint` = 図面、 `letterpress` = 活版、
86
+ * `catalog` = 図録、 `terminal` = 端末、 `sketch` = 手描き、 `neon` = 電飾、 `relief` = 浮彫。
87
+ *
88
+ * record は用途を一つに決められないため既定の意匠を持たない。UML クラス図に生成り色が要る時も
89
+ * 書き手が `theme:` を明記する。
90
+ */
91
+ declare const THEME_ALIAS: Record<string, DslTheme>;
92
+ /** 書いた意匠を正規の語に直す。 読めない語は `null`。 */
93
+ declare function resolveTheme(s: string): DslTheme | null;
94
+ /** 凡例の印の日本語名を描画側の名前へ直す表。 */
95
+ declare const LEGEND_MARK_ALIAS: Readonly<Record<string, LegendMark>>;
96
+ /** 凡例の印を描画側の名前へ直す。 読めない語は `null`。 */
97
+ declare function resolveLegendMark(s: string): LegendMark | null;
98
+ /**
99
+ * 意匠から字の測り方を引く (#2818 / #2918)。
100
+ *
101
+ * 意匠を替えても骨組みを変えず、端末の等幅字も箱へ収めるため、比例・等幅の広い方で測る。
102
+ * 公開済みの関数なので窓口を残し、どの意匠でも組み立てと同じ値を返す。
103
+ */
104
+ declare function 意匠の字の測り方(_theme: DslTheme): "widest";
105
+ /** 意匠と節から、見本に合わせた円の区画間の弧の長さを引く (#2871)。 */
106
+ declare function 意匠の円の区画の間(theme: DslTheme, node: Pick<CdlNode, "kind">): number | undefined;
107
+ /** `barCornerRadii` が効く棒を描く節か。 */
108
+ declare function 棒を描く節か(node: Pick<CdlNode, "kind" | "funnelForm">): boolean;
109
+ /**
110
+ * 意匠と節から、見本に合わせた棒の 4 隅の丸みを引く (#2863)。
111
+ *
112
+ * 手描きの見本は楕円の角 (`10px 14px 6px 12px / 14px 8px 12px 6px`) だが、cdl は
113
+ * 円の角だけを持つため、各隅の横と縦の平均を丸めて 12 / 11 / 9 / 9 とする。
114
+ * 生成りと青磁には見本が無いため値を返さず、記法で組み立てた形を保つ。
115
+ */
116
+ declare function 意匠の棒の角(theme: DslTheme, node: Pick<CdlNode, "kind" | "funnelForm">): BarCornerRadii | undefined;
117
+ /** NodeKind 別名 (日本語 → English) */
118
+ declare const NODE_KIND_ALIAS: Record<string, NodeKind>;
119
+ /** Tone 別名 */
120
+ declare const TONE_ALIAS: Record<string, Tone>;
121
+
4
122
  /**
5
123
  * Text DSL v0.5 parser
6
124
  *
@@ -58,9 +176,34 @@ type V05ParseResult = {
58
176
  * 書くと、項目を足した時に案内か一覧のどちらかが取り残される (実際に `states` / `values` が
59
177
  * 一覧に 1 件も無い状態で放置されていた)。
60
178
  */
61
- declare const TOP_LEVEL_KEYS: readonly ["title", "type", "actors", "flow", "states", "values", "animation", "viewport", "lanes", "groups", "eyebrow", "axes", "readouts", "inputs", "formulas", "events", "scrolls", "bands", "reveal", "relations", "direction", "palette"];
179
+ declare const TOP_LEVEL_KEYS: readonly ["title", "type", "actors", "flow", "states", "values", "animation", "viewport", "lanes", "groups", "eyebrow", "axes", "regions", "readouts", "inputs", "formulas", "events", "scrolls", "bands", "reveal", "relations", "direction", "order", "shape", "form", "ticks", "ganttToday", "ganttTickLabels", "ganttBarEnd", "ganttBarThickness", "chartSeriesSkipMuted", "chartLineSeries", "chartPieCenterLabel", "chartPieTableColumns", "chartPieRingWidth", "chartSlopePeriods", "chartSlopeEmphasisIds", "chartSlopeUnit", "chartStackedPeriods", "chartStackedRateId", "chartStackedLegendPosition", "chartGaugeValue", "chartWaffleLegendPosition", "funnelForm", "funnelRate", "quadrantPointLabelSide", "treeNodeForm", "treeSize", "treeEdgeTone", "treeEdgeHead", "mindForm", "mindSize", "journeyForm", "journeyLineForm", "journeyLabels", "journeySize", "sequenceActorForm", "sequenceLabelForm", "sequenceReturnHead", "sequenceKindLabels", "sequenceRowGap", "sequenceGutter", "sequenceBandWidth", "sequenceSelfLoop", "figureCard", "figureSize", "terminalDecoration", "cornerForm", "figureKindLabel", "figureInset", "chartBarSize", "chartBarShape", "chartLineSize", "chartPieSize", "chartWaffleSize", "chartSlopeLabelTemplate", "chartSlopeSize", "chartStackedLayout", "chartGaugeSize", "ganttSize", "quadrantLabelPosition", "quadrantSize", "stageLayout", "theme", "legend", "legendOffset", "legendFontSize", "edgeEndGap", "stageHeader"];
62
180
  /** 受け付ける図種。 記法一覧はここを見る。 */
63
181
  declare const PRESET_TYPES: ReadonlySet<PresetType>;
182
+ /**
183
+ * 図種の別名 (#2655 / #2657)。
184
+ *
185
+ * **差が語 1 つしかない図種を、畳んだ先の型とその語に読み替える**。
186
+ *
187
+ * | 古い綴り | 読み替え先 | 差 |
188
+ * |---|---|---|
189
+ * | `solidity` | `sequence` + `order: 種類` | 箱を種類で並べ替えるだけで、独自の組み立てを持たない |
190
+ * | 数を描く 9 つ | `chart` + `shape: <綴り>` | 同じ組み立て関数に渡す文字列 2 つしか違わない |
191
+ *
192
+ * 型として持つと、同じ扱いをする条件と表が型の数だけ増える。 `solidity` は
193
+ * 「順序図 または その型」 という条件を 12 か所に増やし、数を描く 9 つは 4 つの表に
194
+ * 同じ値の行を 9 行ずつ並べていた (足す人が 1 か所書き忘れると黙って外れる)。
195
+ *
196
+ * **読み替えは読み取りの入口 1 か所に閉じる**。 ここを通った後は古い綴りが
197
+ * どこにも残らないので、組み立て側は畳んだ先の型として 1 通りに扱える。
198
+ *
199
+ * 古い名前で書いた記法はそのまま動く = 別名を消すのは別の回にする。
200
+ */
201
+ type 読み替え先 = {
202
+ type: PresetType;
203
+ order?: DslOrder;
204
+ shape?: DslShape;
205
+ };
206
+ declare const TYPE_ALIASES: ReadonlyMap<string, 読み替え先>;
64
207
  /**
65
208
  * 記法だけが持つ種類。 描画側には無いが、 図種ごとの組み立てで意味を持つ。
66
209
  *
@@ -71,7 +214,7 @@ declare const PRESET_TYPES: ReadonlySet<PresetType>;
71
214
  * 図の組み立てが落ちる = 描画側は知らない種類の大きさを引けない (#1420 で実測、
72
215
  * `Cannot read properties of undefined (reading 'h')`)。
73
216
  */
74
- declare const DSL_ONLY_KINDS: readonly ["entity", "state", "contract", "eoa", "multisig", "proxy", "library", "interface"];
217
+ declare const DSL_ONLY_KINDS: readonly ["entity", "state", "contract", "eoa", "multisig", "proxy", "library", "interface", "loop"];
75
218
  /** 記法だけが持つ種類。 描画側の `NodeKind` には含まれない */
76
219
  type DslOnlyKind = (typeof DSL_ONLY_KINDS)[number];
77
220
  /**
@@ -134,48 +277,18 @@ declare const PHASE_ITEM_WORDS: readonly ["focus", "badge", "body", "description
134
277
  *
135
278
  * いまは語と図種が同じ綴りだが、**同じものとして扱わない**。 語は書き手が書く名前で、
136
279
  * 図種は `type:` が取る値。 片方だけ別名を足したくなった時に、対応が表に残っている形にする。
280
+ *
281
+ * **数を描く図は形まで指す** (#2657)。 9 つの型を `chart` 1 つに畳んだので、型だけを
282
+ * 指すと `draw: pie` を棒の図に書いても咎められなくなる = 語ごとの相手を型から形へ
283
+ * 下ろして、畳む前と同じ細かさで判定する。
137
284
  */
138
- declare const DRAW_TARGETS: ReadonlyMap<string, PresetType>;
285
+ declare const DRAW_TARGETS: ReadonlyMap<string, {
286
+ type: PresetType;
287
+ shape?: DslShape;
288
+ }>;
139
289
  /** `draw:` に書ける語。 表から導く (#1314) */
140
290
  declare const DRAW_WORDS: ReadonlySet<string>;
141
291
 
142
- /**
143
- * Text DSL i18n キーワード一覧
144
- * 日本語 / 英語両対応 (大文字小文字無視)
145
- */
146
-
147
- /**
148
- * 図の並ぶ向き (`direction:`、 #1494)。
149
- *
150
- * 縦列 (`lane`) は横、段 (`stack`) は縦に置かれるので、向きは「1 つの縦列に積む」 か
151
- * 「1 人ずつ縦列を作る」 かの選択になる。 どちらも組み立て側に既にある経路で、
152
- * 記法から名指しできる言葉が無かった。
153
- */
154
- declare const DIRECTIONS: readonly ["縦", "横"];
155
- type DslDirection = (typeof DIRECTIONS)[number];
156
- /**
157
- * 向きの別名。 色 (`色` / `color` / `tone`) と同じく日本語と英語の両方で書ける。
158
- *
159
- * 正規の語を鍵にも入れておく = 引く側が別名かどうかを気にせず 1 度で解決できる。
160
- */
161
- declare const DIRECTION_ALIAS: Record<string, DslDirection>;
162
- /**
163
- * 図の配色 (`palette:`、 #1553)。
164
- *
165
- * cdl は色を持たない (形だけを描く)。 名前を `data-cdl-palette` として markup に出すので、
166
- * dragon の `cdl-theme.css` がその名前を見て 7 つの口 (台 / 行の面 / 縞 / 枠 / 字 / 型名 / 線)
167
- * に色を当てる。
168
- *
169
- * **名前を自由文字列にしない**。 書き間違えると既定の色みのまま出るので、書き手には
170
- * 「効かない」 としか見えない。 語を絞れば読めない語をその場で知らせられる。
171
- */
172
- declare const PALETTES: readonly ["kinari", "celadon"];
173
- type DslPalette = (typeof PALETTES)[number];
174
- /** NodeKind 別名 (日本語 → English) */
175
- declare const NODE_KIND_ALIAS: Record<string, NodeKind>;
176
- /** Tone 別名 */
177
- declare const TONE_ALIAS: Record<string, Tone>;
178
-
179
292
  /**
180
293
  * 位置を他の要素からの相対で書くための解決。
181
294
  *
@@ -286,8 +399,16 @@ type DslNodeKind = NodeKind | DslOnlyKind;
286
399
  * 写して持つと欄が増えた時にずれる。 指した先が変われば型検査が教える。
287
400
  */
288
401
  type DslDynShape = NonNullable<CdlDiagram["nodes"][number]["shape"]>;
289
- /** 値を見せる部品 (#1374)。 図形と同じ理由で描画側の型をそのまま使う */
290
- type DslReadout = NonNullable<CdlDiagram["readouts"]>[number];
402
+ /**
403
+ * 値を見せる部品 (#1374)。 図形と同じ理由で描画側の型をそのまま使う。
404
+ *
405
+ * `pos` は書いた行 (#2405)。 読む元の名前を突き合わせた知らせが、直す行を指すのに使う。
406
+ * **図へ載せる時に外す** (`compile.ts` の読み取り値を載せる所) = 残すと、行を足しただけで
407
+ * 組み上がる図が変わる。 JSON から読んだ文書は行を持たないため `undefined` になる。
408
+ */
409
+ type DslReadout = NonNullable<CdlDiagram["readouts"]>[number] & {
410
+ pos?: Position;
411
+ };
291
412
  /** 読む人が動かすつまみ (#1389)。 部品と同じ理由で描画側の型をそのまま使う */
292
413
  type DslInput = NonNullable<CdlDiagram["inputs"]>[number];
293
414
  /** つまみの値から決まる値 (#1391)。 描画側の型に、知らせ用の記述位置だけを足す。 */
@@ -324,7 +445,27 @@ type DslEventBinding = {
324
445
  handlerId: string;
325
446
  pos: Position;
326
447
  };
327
- type PresetType = "sequence" | "flow" | "swimlane" | "er" | "state" | "topology" | "solidity" | "gantt" | "class" | "pie" | "bar" | "line" | "gauge" | "radial" | "stat" | "waffle" | "stacked" | "slope" | "funnel" | "tree" | "journey" | "quadrant" | "c4" | "mind";
448
+ type PresetType = "sequence" | "flow" | "flowchart" | "swimlane"
449
+ /**
450
+ * 箱が行を持ち、箱どうしが関係を持つ図 (#2782)。
451
+ *
452
+ * 畳む前は `er` / `state` / `class` の 3 つに分かれていたが、描画側へ渡す形は同じだった。
453
+ * 箱はいずれも `storage`、行頭の印はいずれも 形 (四角 / 山形) × 塗り (塗る / 中空) の
454
+ * 2 軸で、違うのはその軸を何と呼ぶかだけだった (`pk` / `fk` / `opt` と
455
+ * `entry` / `exit` / `do` / `internal`)。
456
+ *
457
+ * dragon の語は 3 つ (`鍵` / `外` / `条件`) で、印の 3 軸と 1 対 1 に対応する。
458
+ * 古い語は読み取りの入口でこの 3 語へ読み替える (`compile/row-marks.ts` の `行頭の語の別名`)。
459
+ */
460
+ | "record" | "topology" | "gantt"
461
+ /**
462
+ * 数を描く図 (#2657)。 形は `shape:` が決める。
463
+ *
464
+ * 畳む前は形ごとに 9 つの型 (`pie` / `bar` / …) を持っていたが、書き方も組み立ても
465
+ * 同じで、渡す文字列 2 つしか違わなかった。 古い綴りは読み替えの入口で この型と
466
+ * 形の語の組に読み替える。
467
+ */
468
+ | "chart" | "funnel" | "tree" | "journey" | "quadrant" | "c4" | "mind";
328
469
  type Position = {
329
470
  line: number;
330
471
  column?: number;
@@ -352,6 +493,159 @@ type LayoutMode = "auto" | "manual";
352
493
  type DslDocument = {
353
494
  title: string;
354
495
  type: PresetType;
496
+ /** 円グラフの見せ方。 読めない語も組み立ての知らせにするため、入口では文字列で保持する。 */
497
+ form?: string;
498
+ /** `form` を書いた行。 */
499
+ formPos?: Position;
500
+ /** ガントチャートの目盛り。 書かなければ工程の始まりから作る従来の規則を使う。 */
501
+ ticks?: string[];
502
+ /** `ticks` を書いた行。 */
503
+ ticksPos?: Position;
504
+ /** ガントチャートの今日の線の位置と札。 */
505
+ ganttToday?: {
506
+ index: number;
507
+ label: string;
508
+ };
509
+ /** 工程の端とは独立して描く目盛り名。 */
510
+ ganttTickLabels?: string[];
511
+ /** 帯の終わりを位置として扱う。 */
512
+ ganttBarEnd?: "position";
513
+ /** 行の字に対して見本の比で細くする。 */
514
+ ganttBarThickness?: "thin";
515
+ /** 図表の系列色で `muted` の項目を数えない。 */
516
+ chartSeriesSkipMuted?: NonNullable<CdlDiagram["nodes"][number]["chartSeriesSkipMuted"]>;
517
+ /** 折れ線の複数系列。 */
518
+ chartLineSeries?: NonNullable<CdlDiagram["nodes"][number]["chartLineSeries"]>;
519
+ /** 円の中心で合計の下に置く字。 */
520
+ chartPieCenterLabel?: NonNullable<CdlDiagram["nodes"][number]["chartPieCenterLabel"]>;
521
+ /** 円の表に置く列。 */
522
+ chartPieTableColumns?: NonNullable<CdlDiagram["nodes"][number]["chartPieTableColumns"]>;
523
+ /** 円の輪の太さ。 */
524
+ chartPieRingWidth?: NonNullable<CdlDiagram["nodes"][number]["chartPieRingWidth"]>;
525
+ /** 傾き図の左右の時点名。 */
526
+ chartSlopePeriods?: NonNullable<CdlDiagram["nodes"][number]["chartSlopePeriods"]>;
527
+ /** 傾き図で主役にする項目の id。 */
528
+ chartSlopeEmphasisIds?: NonNullable<CdlDiagram["nodes"][number]["chartSlopeEmphasisIds"]>;
529
+ /** 傾き図の値に付ける単位。 */
530
+ chartSlopeUnit?: NonNullable<CdlDiagram["nodes"][number]["chartSlopeUnit"]>;
531
+ /** 内訳の帯の期間。 */
532
+ chartStackedPeriods?: NonNullable<CdlDiagram["nodes"][number]["chartStackedPeriods"]>;
533
+ /** 内訳の帯の右に率を描く項目の id。 */
534
+ chartStackedRateId?: NonNullable<CdlDiagram["nodes"][number]["chartStackedRateId"]>;
535
+ /** 内訳の帯の凡例の位置。 */
536
+ chartStackedLegendPosition?: NonNullable<CdlDiagram["nodes"][number]["chartStackedLegendPosition"]>;
537
+ /** 半円を固定の尺で読む値。 */
538
+ chartGaugeValue?: NonNullable<CdlDiagram["nodes"][number]["chartGaugeValue"]>;
539
+ /** 升目の一覧を置く側。 */
540
+ chartWaffleLegendPosition?: NonNullable<CdlDiagram["nodes"][number]["chartWaffleLegendPosition"]>;
541
+ /** 漏斗の形。 */
542
+ funnelForm?: NonNullable<CdlDiagram["nodes"][number]["funnelForm"]>;
543
+ /** 漏斗に描く率。 */
544
+ funnelRate?: NonNullable<CdlDiagram["nodes"][number]["funnelRate"]>;
545
+ /** 座標で置いた四象限の点の名前を置く側。 */
546
+ quadrantPointLabelSide?: NonNullable<CdlDiagram["nodes"][number]["quadrantPointLabelSide"]>;
547
+ /** 木の箱を根まで同じ枠で描くか。 */
548
+ treeNodeForm?: NonNullable<CdlDiagram["nodes"][number]["treeNodeForm"]>;
549
+ /** 木の札・字・枝間の寸法。 */
550
+ treeSize?: NonNullable<CdlDiagram["nodes"][number]["treeSize"]>;
551
+ /** 木の枝色を 1 色にするか、段ごとに分けるか。 */
552
+ treeEdgeTone?: NonNullable<CdlDiagram["nodes"][number]["treeEdgeTone"]>;
553
+ /** 木の枝先の印。 */
554
+ treeEdgeHead?: NonNullable<CdlDiagram["nodes"][number]["treeEdgeHead"]>;
555
+ /** 放射の中心・枝・葉を、面か輪郭のどちらで描くか。 */
556
+ mindForm?: NonNullable<CdlDiagram["nodes"][number]["mindForm"]>;
557
+ /** 放射の札・字・枝間の寸法。 */
558
+ mindSize?: NonNullable<CdlDiagram["nodes"][number]["mindSize"]>;
559
+ /** ジャーニーの段を帯か罫で描くか。 */
560
+ journeyForm?: NonNullable<CdlDiagram["nodes"][number]["journeyForm"]>;
561
+ /** ジャーニーの点を曲線か直線で結ぶか。 */
562
+ journeyLineForm?: NonNullable<CdlDiagram["nodes"][number]["journeyLineForm"]>;
563
+ /** ジャーニーの 5 段に描く名前。 */
564
+ journeyLabels?: NonNullable<CdlDiagram["nodes"][number]["journeyLabels"]>;
565
+ /** ジャーニーの描画面と点列の左右余白。 */
566
+ journeySize?: NonNullable<CdlDiagram["nodes"][number]["journeySize"]>;
567
+ /** 図表の見出し帯と足。 */
568
+ figureCard?: NonNullable<CdlDiagram["nodes"][number]["figureCard"]>;
569
+ /** 端末意匠用の窓操作・字送り・行番号。 */
570
+ terminalDecoration?: NonNullable<CdlDiagram["nodes"][number]["terminalDecoration"]>;
571
+ /** 矩形札の一様角と手描き角を意匠で選ぶ。 */
572
+ cornerForm?: NonNullable<CdlDiagram["nodes"][number]["cornerForm"]>;
573
+ /** 階層図とマインドマップの種類札。 */
574
+ figureKindLabel?: NonNullable<CdlDiagram["nodes"][number]["figureKindLabel"]>;
575
+ /** 図表札の見出しと足の間に置く飾りの凹み面。 */
576
+ figureInset?: {
577
+ top?: number;
578
+ right?: number;
579
+ bottom?: number;
580
+ left?: number;
581
+ radius?: number;
582
+ };
583
+ /** 棒グラフの見本寸法。 */
584
+ chartBarSize?: NonNullable<CdlDiagram["nodes"][number]["chartBarSize"]>;
585
+ /** 棒グラフの棒を分割するか、上だけ丸めて一体にするか。 */
586
+ chartBarShape?: NonNullable<CdlDiagram["nodes"][number]["chartBarShape"]>;
587
+ /** 折れ線グラフの見本寸法。 */
588
+ chartLineSize?: NonNullable<CdlDiagram["nodes"][number]["chartLineSize"]>;
589
+ /** 円グラフの見本寸法。 */
590
+ chartPieSize?: NonNullable<CdlDiagram["nodes"][number]["chartPieSize"]>;
591
+ /** 升目図の左端と升目の送り。 */
592
+ chartWaffleSize?: NonNullable<CdlDiagram["nodes"][number]["chartWaffleSize"]>;
593
+ /** 傾き図の左右の札の書式。 */
594
+ chartSlopeLabelTemplate?: NonNullable<CdlDiagram["nodes"][number]["chartSlopeLabelTemplate"]>;
595
+ /** 傾き図の見本寸法。 */
596
+ chartSlopeSize?: NonNullable<CdlDiagram["nodes"][number]["chartSlopeSize"]>;
597
+ /** 内訳の帯の見本配置。 */
598
+ chartStackedLayout?: NonNullable<CdlDiagram["nodes"][number]["chartStackedLayout"]>;
599
+ /** 半円図の見本寸法。 */
600
+ chartGaugeSize?: NonNullable<CdlDiagram["nodes"][number]["chartGaugeSize"]>;
601
+ /** ガント図の見本寸法。 */
602
+ ganttSize?: NonNullable<CdlDiagram["nodes"][number]["ganttSize"]>;
603
+ /** 四象限の区画名を置く位置。 */
604
+ quadrantLabelPosition?: NonNullable<CdlDiagram["nodes"][number]["quadrantLabelPosition"]>;
605
+ /** 四象限の見本寸法。 */
606
+ quadrantSize?: NonNullable<CdlDiagram["nodes"][number]["quadrantSize"]>;
607
+ /**
608
+ * 図全体を 1 箱にする図種の札の大きさ。
609
+ *
610
+ * `viewport` は図全体の画布なので分ける。`width` / `height` は既存の viewport と lane の
611
+ * 綴りに揃え、描画側だけが使う短い `w` / `h` を記法へ漏らさない。
612
+ */
613
+ figureSize?: {
614
+ width: number;
615
+ height: number;
616
+ };
617
+ /** 図の下へ指定順に置く凡例。 */
618
+ legend?: CdlLegendItem[];
619
+ /** 図全体の凡例の位置を既定位置からずらす。 */
620
+ legendOffset?: NonNullable<CdlDiagram["legendOffset"]>;
621
+ /** 線の両端と発着する箱の縁との隙間。 */
622
+ edgeEndGap?: NonNullable<CdlDiagram["edgeEndGap"]>;
623
+ /** 順序図の参加者を枠で囲む。 */
624
+ sequenceActorForm?: "box";
625
+ /** 順序図の段へ種類印と種類名を添える。 */
626
+ sequenceLabelForm?: "kind";
627
+ /** 順序図の返す言づてにも塗った三角の矢じりを使う。 */
628
+ sequenceReturnHead?: "solid";
629
+ /** 順序図の言づての段の間。 */
630
+ sequenceRowGap?: number;
631
+ /** 順序図の左の札の列幅。 */
632
+ sequenceGutter?: number;
633
+ /** 順序図の動いている間の帯幅。 */
634
+ sequenceBandWidth?: number;
635
+ /** 順序図の自分へ戻る線の形と寸法。 */
636
+ sequenceSelfLoop?: {
637
+ form?: "orthogonal";
638
+ width?: number;
639
+ drop?: number;
640
+ };
641
+ /** 順序図の種類名の表示語。 */
642
+ sequenceKindLabels?: Partial<Record<"call" | "return" | "fire", string>>;
643
+ /** 図の凡例の字の大きさ。 */
644
+ legendFontSize?: number;
645
+ /** 段の箱で全意匠に共通して使う見出しの寸法。 */
646
+ stageHeader?: DslStageHeader;
647
+ /** 段の列幅・列間と戻る線の迂回寸法。 */
648
+ stageLayout?: NonNullable<CdlDiagram["stageLayout"]>;
355
649
  /**
356
650
  * 図全体を 1 箱にする図種 (`pie` / `bar` / `line` / `funnel` / `tree` / `journey` /
357
651
  * `quadrant` / `mind` / `gantt`) で、 その箱の上に出す小見出し (#1247)。
@@ -378,6 +672,14 @@ type DslDocument = {
378
672
  axes?: DslAxes;
379
673
  /** `axes` を書いた行 (#1251)。 知らせの行番号に使う */
380
674
  axesPos?: Position;
675
+ /**
676
+ * 2 軸で仕分ける図の区画の名前 (#2667)。
677
+ *
678
+ * `axes` が軸の両端の名前を持つのに対し、こちらは区画の中に出す名前を持つ。
679
+ * 軸の掛け合わせ (`効果が大きい × 手間が小さい`) から一段離れた言い方
680
+ * (`すぐやる`) を書くための欄。
681
+ */
682
+ regions?: DslRegions;
381
683
  actors: DslActor[];
382
684
  flow: DslStep[];
383
685
  animate?: DslAnimate;
@@ -411,14 +713,14 @@ type DslDocument = {
411
713
  * 既定 (`off`) は何もしない。 `hover` と書くと、箱に触れた時に その箱 ・ 繋がる線 ・
412
714
  * 相手の箱だけが光り、他が沈む。 描き手の `CdlDiagram.relationFocus` にそのまま渡る。
413
715
  *
414
- * クラス図と ER 図は **順番を持たない** 図で、段を追う見せ方は「どの順で読ませるか」 しか
716
+ * UML の関係や表の関係を描く record は **順番を持たない** 図で、段を追う見せ方は「どの順で読ませるか」 しか
415
717
  * 運ばない。 触れた箱の関係を光らせれば、読み手の問いにその場で答えられる。
416
718
  */
417
719
  relations?: RelationFocus;
418
720
  /**
419
721
  * 図の並ぶ向き (`direction:`、 #1494)。
420
722
  *
421
- * `縦` は 1 つの縦列に積み、`横` は 1 人ずつ縦列を作る。 効くのは流れ図と泳法図だけで、
723
+ * `縦` は 1 つの縦列に積み、`横` は 1 人ずつ縦列を作る。 効くのはフローと泳法図だけで、
422
724
  * 他の図種は並び方そのものが読み方を担うため書いても効かない (知らせを出す)。
423
725
  *
424
726
  * 全ての箱が縦列を書いた形では、書いた縦列が勝つ (同じく知らせを出す)。
@@ -429,15 +731,39 @@ type DslDocument = {
429
731
  line: number;
430
732
  };
431
733
  /**
432
- * 図の配色 (`palette:`、 #1553)。
734
+ * 箱を並べる順 (`order:`、 #2655)。
735
+ *
736
+ * 書かなければ書いた順のまま。 `種類` と書くと箱の種類で並べ替えてから置く。
737
+ * 効くのは順序図だけで、他の図種は並び方そのものが読み方を担うため書いても効かない
738
+ * (知らせを出す)。
739
+ *
740
+ * 並べ替えの鍵しか持たない図種 (`solidity`) を畳んだ先。 読み取りの入口で
741
+ * 順序図 + この語 に読み替えるので、古い名前で書いた記法はそのまま動く。
742
+ */
743
+ order?: DslOrder;
744
+ /** `order:` を書いた行。 効かない時の知らせで、書いた場所を指すために持つ */
745
+ orderPos?: {
746
+ line: number;
747
+ };
748
+ /** 図種ごとに選ぶ形 (#2657 / #2797)。 書ける語は `DIAGRAM_SHAPES` が決める */
749
+ shape?: DslDiagramShape;
750
+ /** `shape:` を書いた行。 効かない時の知らせで、書いた場所を指すために持つ */
751
+ shapePos?: {
752
+ line: number;
753
+ };
754
+ /**
755
+ * 図の意匠 (`theme:`、 #1553 / #2790)。
433
756
  *
434
757
  * 名前だけを持つ。 実際の色は消費側 (`cdl-theme.css`) が決めるので、ここには値を書かない。
435
- * ER 図とクラス図は書かなくても `kinari` (生成りに茶) になる。 どちらも箱の作りが同じ
436
- * (行頭の印 + 左に名前 + 右に型) で、名前と型が離れて並ぶため、行を横に追う目印
437
- * (行の縞) が要る。 縞の色は配色からしか来ないので、既定が無いと縞が箱の面と同じ色に
438
- * 落ちて 1 本も出ない。 書き手が `palette:` を書いた時はそちらが勝つ。
758
+ * `palette:` も同じ意匠を書く別名として読む。record の用途は一つに決められないため、
759
+ * UML クラス図の生成り色が要る時も本文で明記する。
439
760
  */
440
- palette?: DslPalette;
761
+ theme?: DslTheme;
762
+ /** `theme:` と別名の `palette:` を両方書いた時の行 (#2790)。 */
763
+ themeAlsoPalettePos?: {
764
+ themeLine: number;
765
+ paletteLine: number;
766
+ };
441
767
  groups?: Record<string, DslGroup>;
442
768
  /**
443
769
  * 値を見せる部品 (`readouts:`、 #1374)。 割合の輪や数え上げを図の脇に出す。
@@ -486,11 +812,32 @@ type DslAxes = {
486
812
  x?: {
487
813
  left?: string;
488
814
  right?: string;
489
- };
815
+ label?: never;
816
+ direction?: never;
817
+ } | DslAxisDirection;
490
818
  y?: {
491
819
  bottom?: string;
492
820
  top?: string;
493
- };
821
+ label?: never;
822
+ direction?: never;
823
+ } | DslAxisDirection;
824
+ };
825
+ /** 端の名前ではなく、向き付きの軸名を 1 つだけ描く形。 */
826
+ type DslAxisDirection = {
827
+ label: string;
828
+ direction: true;
829
+ };
830
+ /**
831
+ * 2 軸で仕分ける図の区画の名前 (#2667)。
832
+ *
833
+ * 欄の名前は描画側の区画の綴りに揃える。 記法では `左上` のような語で書き、
834
+ * 解析の時にここへ直す = 区画を指す語を 2 通り持たないため。
835
+ */
836
+ type DslRegions = {
837
+ topLeft?: string;
838
+ topRight?: string;
839
+ bottomLeft?: string;
840
+ bottomRight?: string;
494
841
  };
495
842
  /** 登場人物 (v0.5+ ... inline option 拡張) */
496
843
  type DslActor = {
@@ -507,6 +854,38 @@ type DslActor = {
507
854
  kindWritten?: boolean;
508
855
  /** v0.5+ inline option */
509
856
  subtitle?: string;
857
+ /** kind の意味を保ったまま共通の部品箱で描く。 */
858
+ kindForm?: "icon";
859
+ /** 共通の部品箱へ描く線画。 */
860
+ icon?: "person" | "box" | "database" | "lightning" | "cloud" | "terminal";
861
+ /** 行を持たない表の箱で行の代わりに描く注記。 */
862
+ emptyRowsNote?: string;
863
+ /** 表の箱の名前と小見出しを中央へ揃える。 */
864
+ titleAlign?: "center";
865
+ /** 表の箱の行の間に罫線を引く。 */
866
+ rowRules?: boolean;
867
+ /** 表の箱の行へ交互の縞を敷く。 */
868
+ rowStripe?: boolean;
869
+ /** 表の箱の題と行の baseline。 */
870
+ rowLayout?: NonNullable<CdlDiagram["nodes"][number]["rowLayout"]>;
871
+ /** 表の箱の見出し下の線を左右端まで引く。 */
872
+ rowDividerForm?: "full";
873
+ /** 表の箱の行のまとまりを収める透明な面。 */
874
+ rowWell?: RowWell;
875
+ /** 表の箱の行頭の印を色の段で分ける。 */
876
+ rowMarkForm?: "tone";
877
+ /** 表の箱を内側へ抱える親の表の箱の名前。 */
878
+ nestIn?: string;
879
+ /** 表または共通の部品箱の足。 */
880
+ figureCard?: NonNullable<CdlDiagram["nodes"][number]["figureCard"]>;
881
+ /** 路線図の駅名を駅の上下どちらへ置くか。 */
882
+ stationNamePosition?: "bottom";
883
+ /** 時間軸の担当を札のどちらへ置くか。 */
884
+ subtitlePlacement?: "right";
885
+ /** 流れ図の function の札の題の大きさ。 */
886
+ titleFontSize?: number;
887
+ /** 流れ図の始まり・終わりの印と次の箱との間。 */
888
+ markGap?: number;
510
889
  eyebrow?: string;
511
890
  value?: string;
512
891
  /**
@@ -527,7 +906,10 @@ type DslActor = {
527
906
  * `entry` / `exit` / `do` / `internal`。 印の 2 軸 (形 × 塗り) は共通だが、その軸が
528
907
  * 何を指すかは種類ごとに違う。
529
908
  */
530
- marks?: string[];
909
+ marks?: Array<string | {
910
+ mark: string;
911
+ tone?: "primary" | "muted";
912
+ }>;
531
913
  /**
532
914
  * 箱の中に描く図形 (`shape:`、 #1374)。 水位や角度を状態で動かせる。
533
915
  *
@@ -586,20 +968,45 @@ type DslActor = {
586
968
  * 他の図種では相手が無いため、書かれていたら組み立て側が知らせる。
587
969
  */
588
970
  end?: string;
971
+ /** 工程の始まりに出す札。節目の位置名とは独立して書ける。 */
972
+ startLabel?: string;
973
+ /** 帯を菱形の節目として描く。 */
974
+ milestone?: boolean;
975
+ /** 工程の帯を主役として描く。 */
976
+ emphasis?: "primary";
589
977
  /**
590
- * 体験の道筋 (`type: journey`) で、その段階が起きる場所 (#1251)。
978
+ * 四象限の点を置く座標。 左下が (0, 0)、右上が (1, 1)。
979
+ * 数のほか `{名前}` を受け、描画側の BoundNumber へそのまま渡す。
980
+ */
981
+ at?: {
982
+ x?: number | string;
983
+ y?: number | string;
984
+ raw: string;
985
+ };
986
+ /** `at` を書いた行。 */
987
+ atPos?: Position;
988
+ /**
989
+ * ユーザージャーニー (`type: journey`) で、その段階が起きる場所 (#1251)。
591
990
  *
592
991
  * 「どこで起きたか」 を段の下に出す。 他の図種では相手が無いため、書かれていたら
593
992
  * 組み立て側が知らせる。
594
993
  */
595
994
  touchpoint?: string;
596
995
  /**
597
- * 体験の道筋 (`type: journey`) で、その段階の改善の余地 (#1251)。
996
+ * ユーザージャーニー (`type: journey`) で、その段階の改善の余地 (#1251)。
598
997
  *
599
998
  * 気持ちが落ちる段に「何を直せるか」 を添える。 他の図種では相手が無いため、
600
999
  * 書かれていたら組み立て側が知らせる。
601
1000
  */
602
1001
  opportunity?: string;
1002
+ /** ジャーニーの改善注記を置く場所。 */
1003
+ opportunityPosition?: NonNullable<NonNullable<CdlDiagram["nodes"][number]["journeyData"]>[number]["opportunityPosition"]>;
1004
+ /**
1005
+ * 段階ごとの箱 (`type: swimlane` + `shape: stages`) で、この箱を入れる段階 (#2797)。
1006
+ *
1007
+ * 書かなければ担当 (`lane`)、担当も無ければ箱の名前を段階として使う。
1008
+ */
1009
+ stage?: string;
603
1010
  lane?: string;
604
1011
  stack?: number;
605
1012
  initial?: boolean;
@@ -701,6 +1108,9 @@ type DslStep = {
701
1108
  dashOffsetBind?: string;
702
1109
  /** 矢印がどの辺から出るか (#1385)。 書かなければ描画側が自動で選ぶ */
703
1110
  side?: "top" | "right" | "bottom" | "left";
1111
+ /** 矢印の出どころと行き先で、個別に使う辺。 */
1112
+ fromSide?: "top" | "right" | "bottom" | "left";
1113
+ toSide?: "top" | "right" | "bottom" | "left";
704
1114
  /**
705
1115
  * 矢印の先の形 (#1462)。 書かなければ従来どおり塗った三角。
706
1116
  *
@@ -718,13 +1128,14 @@ type DslStep = {
718
1128
  /** 出どころ側の印の塗り (#1466) */
719
1129
  tailHeadFill?: EdgeHeadFill;
720
1130
  /**
721
- * クラス図の出どころ側の多重度 (#1771)。 `sub` (行き先の端の多重度) と対。
1131
+ * UML の関係を持つ record の出どころ側の多重度 (#1771 / #2783)。
1132
+ * `sub` (行き先の端の多重度) と対。
722
1133
  *
723
- * クラス図でだけ効く (関係の語 `relation` と同じ)。 engine が出どころの端の近くに添える。
1134
+ * `relation` を書いた edge で効き、engine が出どころの端の近くに添える。
724
1135
  */
725
1136
  tailSub?: string;
726
1137
  /**
727
- * クラス図の関係の種類 (#1466)。 書くと線と端の形と塗りと付く側がまとめて決まる。
1138
+ * UML の関係の種類 (#1466 / #2783)。record に書くと線と端の形と塗りと付く側がまとめて決まる。
728
1139
  *
729
1140
  * 4 つを個別に書かせないのは、組合せが 6 通りしか無く、1 つでも書き違えると読み手に
730
1141
  * 別の意味で伝わるため (菱を逆に置くと持ち主が入れ替わる)。
@@ -742,6 +1153,17 @@ type DslStep = {
742
1153
  labelPlate?: boolean;
743
1154
  labelOffsetX?: number;
744
1155
  labelOffsetY?: number;
1156
+ /** cdl の固定直線経路。4 欄が全て揃った時だけ描画側が採用する。 */
1157
+ posX1?: number;
1158
+ posY1?: number;
1159
+ posX2?: number;
1160
+ posY2?: number;
1161
+ /** 固定した両端の間を通る直角の折れ線の点。 */
1162
+ waypoints?: NonNullable<CdlDiagram["edges"][number]["waypoints"]>;
1163
+ /** 線の名札を自動回避するか、作者の位置に固定するか。 */
1164
+ labelCollision?: NonNullable<CdlDiagram["edges"][number]["labelCollision"]>;
1165
+ /** 線の名札の幅・高さ・字の大きさ。 */
1166
+ labelSize?: NonNullable<CdlDiagram["edges"][number]["labelSize"]>;
745
1167
  /** true で説明文を矢印の線の上に重ねる。 分岐図の条件ラベル用。 */
746
1168
  overlay?: boolean;
747
1169
  /**
@@ -766,6 +1188,8 @@ type DslLane = {
766
1188
  x?: number;
767
1189
  width?: number;
768
1190
  label?: string;
1191
+ /** 路線図の担当の名札で、名前の下へ出す補足。 */
1192
+ subtitle?: string;
769
1193
  contain?: boolean;
770
1194
  lifeline?: boolean;
771
1195
  /**
@@ -776,6 +1200,15 @@ type DslLane = {
776
1200
  layoutPos?: LayoutPos;
777
1201
  pos: Position;
778
1202
  };
1203
+ /** 段の箱の列見出しの寸法。 */
1204
+ type DslStageHeader = {
1205
+ leftPad?: number;
1206
+ topPad: number;
1207
+ numberSize: number;
1208
+ gap: number;
1209
+ nameSize: number;
1210
+ bottomPad: number;
1211
+ };
779
1212
  /**
780
1213
  * 組の宣言 (v0.5+ top-level groups section)。
781
1214
  *
@@ -793,6 +1226,8 @@ type DslGroup = {
793
1226
  type DslViewport = {
794
1227
  width?: number;
795
1228
  height?: number;
1229
+ /** 描画内容だけを画布の中で横へずらす。 */
1230
+ contentOffsetX?: number;
796
1231
  /**
797
1232
  * 図全体の倍率 (default 1)。 箱 / 文字 / 線 / 間隔のすべてが等比で拡大縮小される。
798
1233
  *
@@ -869,11 +1304,20 @@ type DslValue = {
869
1304
  /** 動く長さ (ms) */
870
1305
  durationMs: number;
871
1306
  });
872
- /** 動いている間の帯 (#1466)。 順序図で、面がいつ動いているかを段の番号で持つ */
1307
+ /**
1308
+ * 動いている間の帯 (#1466)。 順序図で、面がいつ動いているかを言づての番号で持つ。
1309
+ *
1310
+ * `from` / `to` が指すのは **板に載る言づての行** で、0 から数える (#2404 で実測)。
1311
+ * 段 (`animation` の `step`) ではない = 数も起点も違う。
1312
+ *
1313
+ * `pos` は書いた行 (#2404)。 名前と番号を突き合わせた知らせが、直す行を指すのに使う。
1314
+ * JSON から読んだ文書は行を持たないため `undefined` になる (矢印の飾りの知らせと同じ扱い)。
1315
+ */
873
1316
  type DslBand = {
874
1317
  actor: string;
875
1318
  from: number;
876
1319
  to: number;
1320
+ pos?: Position;
877
1321
  };
878
1322
  /** ステップ (phase) */
879
1323
  type DslPhase = {
@@ -967,7 +1411,7 @@ declare function parseTextDsl(src: string): ParseResult;
967
1411
  */
968
1412
  /** 図は出せるが書いた通りにならなかった、 という知らせ。 */
969
1413
  type CompileNotice = {
970
- kind: "relative-position-ignored" | "focus-target-missing" | "state-override-rejected" | "external-paint-dropped" | "part-not-drawn" | "direction-not-honored" | "scale-reserved" | "part-color-ignored" | "part-state-missing" | "part-edge-dropped" | "part-not-found" | "part-node-ignored" | "part-lane-ignored" | "chart-value-unreadable" | "chart-edge-dropped" | "value-shadows-state" | "value-unresolved" | "value-duplicate" | "flow-actor-missing" | "value-trigger-unresolved" | "lane-not-honored" | "lane-declared-empty" | "eyebrow-not-honored" | "flow-endpoint-not-honored" | "draw-not-honored" | "draw-target-mismatch" | "formula-unresolved" | "event-target-missing" | "actor-kind-not-honored" | "message-option-not-honored" | "position-offset-ignored" | "group-lane-missing" | "group-lanes-apart" | "cardinality-not-honored" | "edge-option-not-honored" | "gantt-end-before-start";
1414
+ kind: "relative-position-ignored" | "focus-target-missing" | "state-override-rejected" | "external-paint-dropped" | "part-not-drawn" | "direction-not-honored" | "direction-same-as-default" | "order-not-honored" | "shape-not-honored" | "stage-from-lane" | "track-from-name" | "theme-palette-both" | "scale-reserved" | "part-color-ignored" | "part-state-missing" | "part-edge-dropped" | "part-not-found" | "part-node-ignored" | "part-lane-ignored" | "chart-value-unreadable" | "chart-edge-dropped" | "value-shadows-state" | "state-shadowed-by-input" | "value-unresolved" | "value-duplicate" | "flow-actor-missing" | "band-not-honored" | "band-actor-missing" | "band-row-out-of-range" | "value-trigger-unresolved" | "lane-not-honored" | "lane-option-not-honored" | "lane-declared-empty" | "eyebrow-not-honored" | "flow-endpoint-not-honored" | "draw-not-honored" | "draw-target-mismatch" | "formula-unresolved" | "readout-source-missing" | "event-target-missing" | "event-target-not-honored" | "focus-target-not-honored" | "actor-kind-not-honored" | "actor-option-not-honored" | "message-option-not-honored" | "position-offset-ignored" | "position-axis-missing" | "group-lane-missing" | "group-lanes-apart" | "cardinality-not-honored" | "edge-option-not-honored" | "gantt-end-before-start";
971
1415
  /** 対象の名前。 光らせる相手なら書かれた指定そのまま */
972
1416
  actor: string;
973
1417
  /** 書かれていた行 */
@@ -1081,9 +1525,10 @@ declare function partRenderSize(part: CdlDiagram): {
1081
1525
  * `readouts` を図の中では扱わないため、図として重ねても何も出ない。 位置決めのための
1082
1526
  * 1x1 の箱が 1 つあるだけになる。
1083
1527
  *
1084
- * catalog 80 件を測ると、この 2 群は `readouts` の有無で完全に分かれた。
1085
- * `readouts` を持つ 17 件は箱と図枠の面積比が全件 0.0000 (箱は 1x1)、
1086
- * 持たない 63 件は最小でも 0.1877。 境目に入る件は無い。
1528
+ * catalog を測ると、この 2 群は `readouts` の有無で完全に分かれる。
1529
+ * `readouts` を持つ 17 件は箱と図枠の面積比が全件 0.00007 (箱は 1x1 で図枠は 120x120)、
1530
+ * 持たない群は最小でも 0.37662。 境目に入る件は無い
1531
+ * (#2681 で図枠が中身に寄るようになり、どちらの群も値が上がったが隔たりは残った)。
1087
1532
  *
1088
1533
  * 判定は面積の閾値ではなく **`readouts` を持ち、かつ箱が図枠に対して極小** の 2 条件で行う。
1089
1534
  * 閾値だけで見ると、小さい箱を意図して置いた見本を巻き込む。 `readouts` だけで見ると、
@@ -1111,6 +1556,13 @@ declare function partBoxInFrame(part: CdlDiagram): {
1111
1556
  left: number;
1112
1557
  top: number;
1113
1558
  };
1559
+ /**
1560
+ * 測るためだけの配置が受け取った知らせの数 (#2312)。
1561
+ *
1562
+ * 読み込み時の知らせを 0 行で固定する検査が、母数として読む。 0 件なら「知らせが無い」 では
1563
+ * なく「測るための配置を 1 度も通っていない」 = 検査が空振りしている。
1564
+ */
1565
+ declare function 測るために受け取った知らせの数(): number;
1114
1566
  /**
1115
1567
  * パーツ 1 個の箱の外接矩形。
1116
1568
  *
@@ -1229,6 +1681,33 @@ interface CompileToCdlOpts {
1229
1681
  }
1230
1682
  declare function compileToCdl(doc: DslDocument, opts?: CompileToCdlOpts): CdlDiagram;
1231
1683
 
1684
+ /**
1685
+ * 行頭の印を dragon の語で決める (#2782)。
1686
+ *
1687
+ * 描画側が持つ印は 3 軸しかない。 形 (四角 / 山形) と 塗り (塗る / 中空) と
1688
+ * 名前の下線で、この 3 軸に 1 対 1 で当たる語を dragon 自身が持つ。
1689
+ *
1690
+ * | 語 | 軸 | 意味 |
1691
+ * |---|---|---|
1692
+ * | `鍵` | 名前に下線を引く | その行で箱を見分ける |
1693
+ * | `外` | 行頭を山形にする | その行は箱の外とつながる |
1694
+ * | `条件` | 行頭を中空にする | その行は条件が揃った時だけ効く |
1695
+ *
1696
+ * 畳む前は 図種ごとに語を持っていた (表の図は `pk` / `fk` / `opt`、移り変わりの図は
1697
+ * `entry` / `exit` / `do` / `internal`)。 2 つの語彙は同じ 2 軸の格子を別の名前で
1698
+ * 呼んでいただけで、格子の 4 隅は 1 対 1 に重なる。
1699
+ *
1700
+ * | | 塗る | 中空 |
1701
+ * |---|---|---|
1702
+ * | 四角 | 語なし / `do` | `条件` / `opt` / `internal` |
1703
+ * | 山形 | `外` / `fk` / `entry` | `外 条件` / `fk opt` / `exit` |
1704
+ *
1705
+ * 古い語から dragon の語への読み替えは本 file の `行頭の語へ読み替える` が持ち、
1706
+ * 読み取りの入口 (記法 / JSON の 2 経路) が通す。 印にする時点で古い語は 1 つも残っていない。
1707
+ */
1708
+ declare const 行頭の語: readonly ["鍵", "外", "条件"];
1709
+ type 行頭の語 = (typeof 行頭の語)[number];
1710
+
1232
1711
  /**
1233
1712
  * 記法の検査 (図を書く人向けの修正システム)。
1234
1713
  *
@@ -1322,12 +1801,12 @@ declare function rectsOverlap(a: DiagramBoundingBox, b: DiagramBoundingBox): boo
1322
1801
  * 書き方は 2 通り。 箱の名前 1 つか、 矢印 (`A -> B`) で 2 者を指す形。
1323
1802
  *
1324
1803
  * 読み方をここに 1 つだけ置く。 id の形は図種で違う (順序図は縦列の上端 / 下端 / 手順箱、
1325
- * 流れ図は箱 1 個) ため id への解決は図種ごとに残すが、 「どちらの書き方か」 の判断を
1804
+ * フローは箱 1 個) ため id への解決は図種ごとに残すが、 「どちらの書き方か」 の判断を
1326
1805
  * 図種ごとに持つと、 同じ記述が図種によって別の意味になる。
1327
1806
  *
1328
1807
  * 以前は図種ごとに判定していて、 順序図と汎用の 2 経路が `-` 1 文字を矢印と見なしていた。
1329
1808
  * その結果 `api-gateway` のような名前が「api から gateway への矢印」 と読まれ、 順序図では
1330
- * 光らず、 流れ図では名前に部分一致した別の矢印が光っていた (実測)。
1809
+ * 光らず、 フローでは名前に部分一致した別の矢印が光っていた (実測)。
1331
1810
  */
1332
1811
  /** 光らせる相手の指定。 */
1333
1812
  type FocusEntry = {
@@ -1603,18 +2082,95 @@ declare function 書いた場所の鍵(...道: readonly (string | number)[]): st
1603
2082
  * YAML `animation: [step: "..."]` ⇔ JSON `{animation: [{step: "...", duration: 1.4, focus: [...]}]}`
1604
2083
  */
1605
2084
 
2085
+ /** 古い綴りで書いた図種 (#2655 / #2657)。 受ける値は `TYPE_ALIASES` が SSOT */
2086
+ type 図種の別名 = "solidity" | DslShape;
1606
2087
  /**
1607
2088
  * LLM 向け JSON DSL の入力 shape。 YAML DSL と 1:1 対応、 top-level は flat な object。
1608
2089
  */
1609
2090
  interface DragonJson {
1610
2091
  /** 図の title (必須) */
1611
2092
  title: string;
1612
- /** preset type (必須): sequence / flow / swimlane / er / state / topology / solidity / gantt / class / pie / c4 / mind */
1613
- type: PresetType;
2093
+ /**
2094
+ * preset type (必須)。 受け付ける値は `PRESET_TYPES` と `TYPE_ALIASES` が SSOT。
2095
+ *
2096
+ * 別名 (#2655 / #2657) は読み取りで図種と語の 2 つに開く = `solidity` と書いた JSON は
2097
+ * 順序図 + 種類で並べ替え、`pie` と書いた JSON は 数を描く図 + 円の形 として読まれる。
2098
+ */
2099
+ type: PresetType | 図種の別名;
2100
+ /** 円グラフの見せ方。 */
2101
+ form?: string;
2102
+ /** `form` の和名。両方あれば `form` を採る。 */
2103
+ 見せ方?: string;
2104
+ /** ガントチャートの目盛り。 */
2105
+ ticks?: string[];
2106
+ /** `ticks` の和名。両方あれば `ticks` を採る。 */
2107
+ 目盛り?: string[];
2108
+ /** ガントチャートの今日の線の位置と札。 */
2109
+ ganttToday?: {
2110
+ index: number;
2111
+ label: string;
2112
+ };
2113
+ /** 工程の端とは独立した目盛り名。 */
2114
+ ganttTickLabels?: string[];
2115
+ ganttBarEnd?: "position";
2116
+ ganttBarThickness?: "thin";
2117
+ chartSeriesSkipMuted?: DslDocument["chartSeriesSkipMuted"];
2118
+ chartLineSeries?: DslDocument["chartLineSeries"];
2119
+ chartPieCenterLabel?: DslDocument["chartPieCenterLabel"];
2120
+ chartPieTableColumns?: DslDocument["chartPieTableColumns"];
2121
+ chartPieRingWidth?: DslDocument["chartPieRingWidth"];
2122
+ chartSlopePeriods?: DslDocument["chartSlopePeriods"];
2123
+ chartSlopeEmphasisIds?: DslDocument["chartSlopeEmphasisIds"];
2124
+ chartSlopeUnit?: DslDocument["chartSlopeUnit"];
2125
+ chartStackedPeriods?: DslDocument["chartStackedPeriods"];
2126
+ chartStackedRateId?: DslDocument["chartStackedRateId"];
2127
+ chartStackedLegendPosition?: DslDocument["chartStackedLegendPosition"];
2128
+ chartGaugeValue?: DslDocument["chartGaugeValue"];
2129
+ chartWaffleLegendPosition?: DslDocument["chartWaffleLegendPosition"];
2130
+ funnelForm?: DslDocument["funnelForm"];
2131
+ funnelRate?: DslDocument["funnelRate"];
2132
+ quadrantPointLabelSide?: DslDocument["quadrantPointLabelSide"];
2133
+ treeNodeForm?: DslDocument["treeNodeForm"];
2134
+ treeSize?: DslDocument["treeSize"];
2135
+ treeEdgeTone?: DslDocument["treeEdgeTone"];
2136
+ treeEdgeHead?: DslDocument["treeEdgeHead"];
2137
+ mindForm?: DslDocument["mindForm"];
2138
+ mindSize?: DslDocument["mindSize"];
2139
+ edgeEndGap?: DslDocument["edgeEndGap"];
2140
+ journeyForm?: DslDocument["journeyForm"];
2141
+ journeyLineForm?: DslDocument["journeyLineForm"];
2142
+ journeyLabels?: DslDocument["journeyLabels"];
2143
+ journeySize?: DslDocument["journeySize"];
2144
+ sequenceActorForm?: DslDocument["sequenceActorForm"];
2145
+ sequenceLabelForm?: DslDocument["sequenceLabelForm"];
2146
+ sequenceReturnHead?: DslDocument["sequenceReturnHead"];
2147
+ sequenceKindLabels?: DslDocument["sequenceKindLabels"];
2148
+ sequenceRowGap?: DslDocument["sequenceRowGap"];
2149
+ sequenceGutter?: DslDocument["sequenceGutter"];
2150
+ sequenceBandWidth?: DslDocument["sequenceBandWidth"];
2151
+ sequenceSelfLoop?: DslDocument["sequenceSelfLoop"];
2152
+ figureCard?: DslDocument["figureCard"];
2153
+ figureSize?: DslDocument["figureSize"];
2154
+ terminalDecoration?: DslDocument["terminalDecoration"];
2155
+ cornerForm?: DslDocument["cornerForm"];
2156
+ figureKindLabel?: DslDocument["figureKindLabel"];
2157
+ figureInset?: DslDocument["figureInset"];
2158
+ chartBarSize?: DslDocument["chartBarSize"];
2159
+ chartBarShape?: DslDocument["chartBarShape"];
2160
+ chartLineSize?: DslDocument["chartLineSize"];
2161
+ chartPieSize?: DslDocument["chartPieSize"];
2162
+ chartWaffleSize?: DslDocument["chartWaffleSize"];
2163
+ chartSlopeLabelTemplate?: DslDocument["chartSlopeLabelTemplate"];
2164
+ chartSlopeSize?: DslDocument["chartSlopeSize"];
2165
+ chartStackedLayout?: DslDocument["chartStackedLayout"];
2166
+ chartGaugeSize?: DslDocument["chartGaugeSize"];
2167
+ ganttSize?: DslDocument["ganttSize"];
2168
+ quadrantLabelPosition?: DslDocument["quadrantLabelPosition"];
2169
+ quadrantSize?: DslDocument["quadrantSize"];
1614
2170
  /**
1615
2171
  * 図表の箱の上に出す小見出し (optional)。 記法の最上位 `eyebrow:` と同じ (#1247)。
1616
2172
  *
1617
- * 効くのは図全体を 1 箱にする図種 (`pie` / `bar` / `line` / `funnel` / `tree` / `journey` /
2173
+ * 効くのは図全体を 1 箱にする図種 (`chart` / `funnel` / `tree` / `journey` /
1618
2174
  * `quadrant` / `mind` / `gantt`) だけ。 箱ごとに分かれる図種では相手が決まらないため、
1619
2175
  * 組み立て側が知らせを出す。 そちらは `actors[].eyebrow` に書く。
1620
2176
  */
@@ -1628,6 +2184,19 @@ interface DragonJson {
1628
2184
  * 他の図種には軸が無いため、書かれていたら組み立て側が知らせる。
1629
2185
  */
1630
2186
  axes?: JsonAxes;
2187
+ /**
2188
+ * 2 軸で仕分ける図の区画の名前 (#2667)。 記法の `regions:` と同じ。
2189
+ *
2190
+ * 鍵は項目の欄と同じ 4 語 (`左上` / `右上` / `左下` / `右下`)。 別の言い方を足すと
2191
+ * 同じ区画を 2 通りで呼ぶことになる。
2192
+ */
2193
+ regions?: JsonRegions;
2194
+ /** 図の凡例の字の大きさ。 */
2195
+ legendFontSize?: number;
2196
+ legendOffset?: DslDocument["legendOffset"];
2197
+ /** 段の箱で全意匠に共通して使う見出しの寸法。 */
2198
+ stageHeader?: DslStageHeader;
2199
+ stageLayout?: DslDocument["stageLayout"];
1631
2200
  /** 登場人物 (必須): 文字列 or { name, kind, ... } object */
1632
2201
  actors: (string | JsonActor)[];
1633
2202
  /** flow step 配列 (必須): { from, to, label, ... } */
@@ -1710,6 +2279,8 @@ interface DragonJson {
1710
2279
  x?: number;
1711
2280
  width?: number;
1712
2281
  label?: string;
2282
+ /** 路線図の担当の名札で、名前の下へ出す補足。 */
2283
+ subtitle?: string;
1713
2284
  contain?: boolean;
1714
2285
  lifeline?: boolean;
1715
2286
  /**
@@ -1735,16 +2306,16 @@ interface DragonJson {
1735
2306
  relations?: RelationFocus;
1736
2307
  /** 図の並ぶ向き (#1494)。 記法の最上位 `direction:` と同じ。 JSON は英語の語で書く */
1737
2308
  direction?: "vertical" | "horizontal";
1738
- /**
1739
- * 図の配色 (#1553)。 記法の最上位 `palette:` と同じ。
1740
- *
1741
- * 名前だけを図に載せる = cdl は色を持たず、値は `cdl-theme.css` が決める。
1742
- * ER 図とクラス図は書かなくても `kinari` (生成りに茶) になる。 どちらも箱の作りが同じ
1743
- * (行頭の印 + 左に名前 + 右に型) で、名前と型が離れて並ぶため、行を横に追う目印
1744
- * (行の縞) が要る。 縞の色は配色からしか来ないので、既定が無いと縞が箱の面と同じ色に
1745
- * 落ちて 1 本も出ない。 書き手が `palette:` を書いた時はそちらが勝つ。
1746
- */
1747
- palette?: DslPalette;
2309
+ /** 箱を並べ替える軸 (#2655)。 記法の最上位 `order:` と同じ。 JSON は英語の語で書く */
2310
+ order?: "kind";
2311
+ /** 図種ごとに選ぶ形 (#2657 / #2797)。 記法の最上位 `shape:` と同じ */
2312
+ shape?: DslDiagramShape;
2313
+ /** 図の意匠 (#1553 / #2790)。 記法の最上位 `theme:` と同じ。 */
2314
+ theme?: string;
2315
+ /** `theme` の別名。 両方書いた時は `theme` を使う。 */
2316
+ palette?: string;
2317
+ /** 図の下へ置く凡例。 印は記法と同じ英語名または和名で書く。 */
2318
+ legend?: CdlLegendItem[];
1748
2319
  }
1749
2320
  /**
1750
2321
  * 位置を他の要素からの相対で書く指定の、JSON 側の形 (#2039)。
@@ -1800,6 +2371,22 @@ interface JsonActor {
1800
2371
  */
1801
2372
  kind?: NodeKind | (string & {});
1802
2373
  subtitle?: string;
2374
+ kindForm?: "icon";
2375
+ icon?: DslActor["icon"];
2376
+ emptyRowsNote?: string;
2377
+ titleAlign?: "center";
2378
+ rowRules?: boolean;
2379
+ rowStripe?: boolean;
2380
+ rowLayout?: DslActor["rowLayout"];
2381
+ rowDividerForm?: DslActor["rowDividerForm"];
2382
+ rowWell?: DslActor["rowWell"];
2383
+ rowMarkForm?: "tone";
2384
+ nestIn?: string;
2385
+ figureCard?: DslActor["figureCard"];
2386
+ stationNamePosition?: "bottom";
2387
+ subtitlePlacement?: "right";
2388
+ titleFontSize?: number;
2389
+ markGap?: number;
1803
2390
  eyebrow?: string;
1804
2391
  value?: string;
1805
2392
  /**
@@ -1810,6 +2397,8 @@ interface JsonActor {
1810
2397
  */
1811
2398
  previous?: string;
1812
2399
  rows?: string[];
2400
+ /** 段階ごとの箱で、この箱を入れる段階。 記法の `stage` / `段階` と同じ (#2797)。 */
2401
+ stage?: string;
1813
2402
  lane?: string;
1814
2403
  stack?: number;
1815
2404
  initial?: boolean;
@@ -1865,14 +2454,22 @@ interface JsonActor {
1865
2454
  * (記法側と同じ扱い)。
1866
2455
  */
1867
2456
  end?: string;
2457
+ startLabel?: string;
2458
+ milestone?: boolean;
2459
+ emphasis?: "primary";
2460
+ /** 四象限の座標 `[x, y]`。 */
2461
+ at?: [number | string, number | string];
2462
+ /** `at` の和名。両方あれば `at` を採る。 */
2463
+ 点の位置?: [number | string, number | string];
1868
2464
  /**
1869
- * 体験の道筋 (`type: journey`) で、その段階が起きる場所 (#1294)。 記法の `touchpoint:` と同じ。
2465
+ * ユーザージャーニー (`type: journey`) で、その段階が起きる場所 (#1294)。 記法の `touchpoint:` と同じ。
1870
2466
  */
1871
2467
  touchpoint?: string;
1872
2468
  /**
1873
- * 体験の道筋 (`type: journey`) で、その段階の改善の余地 (#1294)。 記法の `opportunity:` と同じ。
2469
+ * ユーザージャーニー (`type: journey`) で、その段階の改善の余地 (#1294)。 記法の `opportunity:` と同じ。
1874
2470
  */
1875
2471
  opportunity?: string;
2472
+ opportunityPosition?: DslActor["opportunityPosition"];
1876
2473
  /**
1877
2474
  * 箱を置く絶対座標と大きさ (#1294)。 記法の `posX:` / `posY:` / `posW:` / `posH:` と同じ。
1878
2475
  *
@@ -1901,19 +2498,39 @@ interface JsonActor {
1901
2498
  */
1902
2499
  phase?: boolean;
1903
2500
  /** 行頭の印 (#1466)。 行と対で読む。 語の意味は図の種類が決める */
1904
- marks?: string[];
2501
+ marks?: Array<string | {
2502
+ mark: string;
2503
+ tone?: "primary" | "muted";
2504
+ }>;
1905
2505
  }
1906
2506
  /** 2 軸で仕分ける図の軸の名前 (#1294)。 記法の `axes:` と同じ形 */
1907
2507
  interface JsonAxes {
1908
2508
  x?: {
1909
2509
  left?: string;
1910
2510
  right?: string;
2511
+ label?: never;
2512
+ direction?: never;
2513
+ } | {
2514
+ label: string;
2515
+ direction: true;
1911
2516
  };
1912
2517
  y?: {
1913
2518
  bottom?: string;
1914
2519
  top?: string;
2520
+ label?: never;
2521
+ direction?: never;
2522
+ } | {
2523
+ label: string;
2524
+ direction: true;
1915
2525
  };
1916
2526
  }
2527
+ /** 2 軸で仕分ける図の区画の名前 (#2667)。 記法の `regions:` と同じ形 */
2528
+ interface JsonRegions {
2529
+ 左上?: string;
2530
+ 右上?: string;
2531
+ 左下?: string;
2532
+ 右下?: string;
2533
+ }
1917
2534
  interface JsonStep {
1918
2535
  from: string;
1919
2536
  to: string;
@@ -1921,6 +2538,8 @@ interface JsonStep {
1921
2538
  sub?: string;
1922
2539
  /** 矢印がどの辺から出るか (#1385)。 記法の `side:` と同じ */
1923
2540
  side?: "top" | "right" | "bottom" | "left";
2541
+ fromSide?: "top" | "right" | "bottom" | "left";
2542
+ toSide?: "top" | "right" | "bottom" | "left";
1924
2543
  /**
1925
2544
  * 矢印の先の形 (#1462)。 記法の `{ head: triangle }` と同じ。
1926
2545
  *
@@ -1932,7 +2551,7 @@ interface JsonStep {
1932
2551
  tailHead?: EdgeHead;
1933
2552
  headFill?: EdgeHeadFill;
1934
2553
  tailHeadFill?: EdgeHeadFill;
1935
- /** クラス図の出どころ側の多重度 (#1771)。 記法の `{ tailSub: "1" }` と同じ */
2554
+ /** UML 関係の出どころ側の多重度 (#1771 / #2783)。記法の `{ tailSub: "1" }` と同じ */
1936
2555
  tailSub?: string;
1937
2556
  /**
1938
2557
  * 辺の役目 (cdl#618)。 記法の `{ role: main }` と同じ。
@@ -1942,7 +2561,7 @@ interface JsonStep {
1942
2561
  role?: "main";
1943
2562
  /** 名前の下地を敷くか (cdl#618)。 記法の `{ labelPlate: false }` と同じ。 既定は敷く */
1944
2563
  labelPlate?: boolean;
1945
- /** クラス図の関係の語 (#1466)。 書くと端の形 / 塗り / 線種がまとめて決まる */
2564
+ /** record の UML 関係の語 (#1466 / #2783)。書くと端の形 / 塗り / 線種がまとめて決まる */
1946
2565
  relation?: ClassRelationType;
1947
2566
  /** 順序図の言づての種類 (#1466)。 `call` / `return` / `fire` */
1948
2567
  kind?: SequenceMessageKind;
@@ -1964,6 +2583,13 @@ interface JsonStep {
1964
2583
  dashOffsetBind?: string;
1965
2584
  labelOffsetX?: number;
1966
2585
  labelOffsetY?: number;
2586
+ posX1?: number;
2587
+ posY1?: number;
2588
+ posX2?: number;
2589
+ posY2?: number;
2590
+ waypoints?: DslStep["waypoints"];
2591
+ labelCollision?: DslStep["labelCollision"];
2592
+ labelSize?: DslStep["labelSize"];
1967
2593
  /** true で説明文を矢印の線の上に重ねる。 分岐図の条件ラベル用。 */
1968
2594
  overlay?: boolean;
1969
2595
  /**
@@ -1986,6 +2612,13 @@ interface JsonPhase {
1986
2612
  focus?: string[];
1987
2613
  /** body 説明文 */
1988
2614
  body?: string;
2615
+ /**
2616
+ * 説明文の別名 (#2621)。 記法が `description:` を受けるので JSON でも受ける。
2617
+ *
2618
+ * **正の語は `body`**。 両方書いた段は `body` を採る = 正の語を優先すると決めておくと、
2619
+ * 読み手が「どちらが効くのか」 を実装を読まずに判断できる。
2620
+ */
2621
+ description?: string;
1989
2622
  /** badge label */
1990
2623
  badge?: string;
1991
2624
  /**
@@ -2093,6 +2726,12 @@ declare const diagramJsonSchema: {
2093
2726
  title: string;
2094
2727
  description: string;
2095
2728
  type: string;
2729
+ $defs: {
2730
+ positiveNumber: {
2731
+ type: string;
2732
+ exclusiveMinimum: number;
2733
+ };
2734
+ };
2096
2735
  required: string[];
2097
2736
  additionalProperties: boolean;
2098
2737
  properties: {
@@ -2106,51 +2745,1051 @@ declare const diagramJsonSchema: {
2106
2745
  enum: string[];
2107
2746
  description: string;
2108
2747
  };
2109
- eyebrow: {
2748
+ form: {
2110
2749
  type: string;
2750
+ enum: string[];
2111
2751
  description: string;
2112
2752
  };
2113
- axes: {
2753
+ 見せ方: {
2114
2754
  type: string;
2115
- additionalProperties: boolean;
2755
+ enum: string[];
2756
+ description: string;
2757
+ };
2758
+ ticks: {
2759
+ type: string;
2760
+ minItems: number;
2761
+ items: {
2762
+ type: string;
2763
+ minLength: number;
2764
+ };
2765
+ description: string;
2766
+ };
2767
+ 目盛り: {
2768
+ type: string;
2769
+ minItems: number;
2770
+ items: {
2771
+ type: string;
2772
+ minLength: number;
2773
+ };
2116
2774
  description: string;
2775
+ };
2776
+ ganttToday: {
2777
+ type: string;
2778
+ additionalProperties: boolean;
2779
+ required: string[];
2117
2780
  properties: {
2118
- x: {
2781
+ index: {
2119
2782
  type: string;
2120
- additionalProperties: boolean;
2121
- properties: {
2122
- left: {
2123
- type: string;
2124
- };
2125
- right: {
2126
- type: string;
2127
- };
2128
- };
2129
2783
  };
2130
- y: {
2784
+ label: {
2131
2785
  type: string;
2132
- additionalProperties: boolean;
2133
- properties: {
2134
- bottom: {
2135
- type: string;
2136
- };
2137
- top: {
2138
- type: string;
2139
- };
2140
- };
2141
2786
  };
2142
2787
  };
2788
+ description: string;
2143
2789
  };
2144
- actors: {
2790
+ ganttTickLabels: {
2145
2791
  type: string;
2146
2792
  minItems: number;
2793
+ items: {
2794
+ type: string;
2795
+ };
2796
+ description: string;
2797
+ };
2798
+ ganttBarEnd: {
2799
+ type: string;
2800
+ enum: string[];
2801
+ description: string;
2802
+ };
2803
+ ganttBarThickness: {
2804
+ type: string;
2805
+ enum: string[];
2147
2806
  description: string;
2807
+ };
2808
+ chartSeriesSkipMuted: {
2809
+ type: string;
2810
+ };
2811
+ chartLineSeries: {
2812
+ type: string;
2813
+ minItems: number;
2148
2814
  items: {
2149
- oneOf: ({
2150
- type: string;
2151
- description: string;
2152
- required?: undefined;
2153
- additionalProperties?: undefined;
2815
+ type: string;
2816
+ additionalProperties: boolean;
2817
+ required: string[];
2818
+ properties: {
2819
+ label: {
2820
+ type: string;
2821
+ };
2822
+ tone: {
2823
+ type: string;
2824
+ };
2825
+ dash: {
2826
+ type: string;
2827
+ enum: string[];
2828
+ };
2829
+ marker: {
2830
+ type: string;
2831
+ enum: string[];
2832
+ };
2833
+ valueIndexes: {
2834
+ type: string;
2835
+ items: {
2836
+ type: string;
2837
+ minimum: number;
2838
+ };
2839
+ };
2840
+ points: {
2841
+ type: string;
2842
+ minItems: number;
2843
+ items: {
2844
+ type: string;
2845
+ additionalProperties: boolean;
2846
+ required: string[];
2847
+ properties: {
2848
+ label: {
2849
+ type: string;
2850
+ };
2851
+ value: {
2852
+ type: string[];
2853
+ };
2854
+ };
2855
+ };
2856
+ };
2857
+ };
2858
+ };
2859
+ };
2860
+ chartPieCenterLabel: {
2861
+ type: string;
2862
+ };
2863
+ chartPieTableColumns: {
2864
+ type: string;
2865
+ enum: string[];
2866
+ };
2867
+ chartPieRingWidth: {
2868
+ type: string;
2869
+ enum: string[];
2870
+ };
2871
+ chartSlopePeriods: {
2872
+ type: string;
2873
+ minItems: number;
2874
+ maxItems: number;
2875
+ items: {
2876
+ type: string;
2877
+ minLength: number;
2878
+ };
2879
+ };
2880
+ chartSlopeEmphasisIds: {
2881
+ type: string;
2882
+ minItems: number;
2883
+ items: {
2884
+ type: string;
2885
+ minLength: number;
2886
+ };
2887
+ };
2888
+ chartSlopeUnit: {
2889
+ type: string;
2890
+ };
2891
+ chartStackedPeriods: {
2892
+ type: string;
2893
+ minItems: number;
2894
+ items: {
2895
+ type: string;
2896
+ additionalProperties: boolean;
2897
+ required: string[];
2898
+ properties: {
2899
+ label: {
2900
+ type: string;
2901
+ };
2902
+ values: {
2903
+ type: string;
2904
+ items: {
2905
+ type: string[];
2906
+ };
2907
+ };
2908
+ };
2909
+ };
2910
+ };
2911
+ chartStackedRateId: {
2912
+ type: string;
2913
+ };
2914
+ chartStackedLegendPosition: {
2915
+ type: string;
2916
+ enum: string[];
2917
+ };
2918
+ chartGaugeValue: {
2919
+ type: string;
2920
+ additionalProperties: boolean;
2921
+ required: string[];
2922
+ properties: {
2923
+ max: {
2924
+ type: string;
2925
+ exclusiveMinimum: number;
2926
+ };
2927
+ current: {
2928
+ anyOf: ({
2929
+ type: string;
2930
+ pattern?: undefined;
2931
+ } | {
2932
+ type: string;
2933
+ pattern: string;
2934
+ })[];
2935
+ };
2936
+ target: {
2937
+ anyOf: ({
2938
+ type: string;
2939
+ pattern?: undefined;
2940
+ } | {
2941
+ type: string;
2942
+ pattern: string;
2943
+ })[];
2944
+ };
2945
+ previous: {
2946
+ anyOf: ({
2947
+ type: string;
2948
+ pattern?: undefined;
2949
+ } | {
2950
+ type: string;
2951
+ pattern: string;
2952
+ })[];
2953
+ };
2954
+ previousLabel: {
2955
+ type: string;
2956
+ };
2957
+ };
2958
+ };
2959
+ chartWaffleLegendPosition: {
2960
+ type: string;
2961
+ enum: string[];
2962
+ };
2963
+ funnelForm: {
2964
+ type: string;
2965
+ enum: string[];
2966
+ };
2967
+ funnelRate: {
2968
+ type: string;
2969
+ enum: string[];
2970
+ };
2971
+ quadrantPointLabelSide: {
2972
+ type: string;
2973
+ enum: string[];
2974
+ };
2975
+ treeNodeForm: {
2976
+ type: string;
2977
+ enum: string[];
2978
+ };
2979
+ treeSize: {
2980
+ type: string;
2981
+ additionalProperties: boolean;
2982
+ properties: {
2983
+ nodeWidths: {
2984
+ type: string;
2985
+ minItems: number;
2986
+ items: {
2987
+ type: string;
2988
+ exclusiveMinimum: number;
2989
+ };
2990
+ };
2991
+ nodeHeight: {
2992
+ type: string;
2993
+ exclusiveMinimum: number;
2994
+ };
2995
+ titleFontSize: {
2996
+ type: string;
2997
+ exclusiveMinimum: number;
2998
+ };
2999
+ subtitleFontSize: {
3000
+ type: string;
3001
+ exclusiveMinimum: number;
3002
+ };
3003
+ siblingGap: {
3004
+ type: string;
3005
+ minimum: number;
3006
+ };
3007
+ levelGap: {
3008
+ type: string;
3009
+ minimum: number;
3010
+ };
3011
+ };
3012
+ };
3013
+ treeEdgeTone: {
3014
+ type: string;
3015
+ enum: string[];
3016
+ };
3017
+ treeEdgeHead: {
3018
+ type: string;
3019
+ enum: string[];
3020
+ };
3021
+ mindForm: {
3022
+ type: string;
3023
+ enum: string[];
3024
+ };
3025
+ mindSize: {
3026
+ type: string;
3027
+ additionalProperties: boolean;
3028
+ properties: {
3029
+ contentOffset: {
3030
+ type: string;
3031
+ additionalProperties: boolean;
3032
+ required: string[];
3033
+ properties: {
3034
+ x: {
3035
+ type: string;
3036
+ };
3037
+ y: {
3038
+ type: string;
3039
+ };
3040
+ };
3041
+ };
3042
+ root: {
3043
+ type: string;
3044
+ additionalProperties: boolean;
3045
+ properties: {
3046
+ width: {
3047
+ type: string;
3048
+ exclusiveMinimum: number;
3049
+ };
3050
+ height: {
3051
+ type: string;
3052
+ exclusiveMinimum: number;
3053
+ };
3054
+ fontSize: {
3055
+ type: string;
3056
+ exclusiveMinimum: number;
3057
+ };
3058
+ };
3059
+ };
3060
+ branch: {
3061
+ type: string;
3062
+ additionalProperties: boolean;
3063
+ properties: {
3064
+ width: {
3065
+ type: string;
3066
+ exclusiveMinimum: number;
3067
+ };
3068
+ height: {
3069
+ type: string;
3070
+ exclusiveMinimum: number;
3071
+ };
3072
+ fontSize: {
3073
+ type: string;
3074
+ exclusiveMinimum: number;
3075
+ };
3076
+ };
3077
+ };
3078
+ leaf: {
3079
+ type: string;
3080
+ additionalProperties: boolean;
3081
+ properties: {
3082
+ fontSize: {
3083
+ type: string;
3084
+ exclusiveMinimum: number;
3085
+ };
3086
+ };
3087
+ };
3088
+ rootBranchGap: {
3089
+ type: string;
3090
+ minimum: number;
3091
+ };
3092
+ branchLeafGap: {
3093
+ type: string;
3094
+ minimum: number;
3095
+ };
3096
+ branchRowGap: {
3097
+ type: string;
3098
+ minimum: number;
3099
+ };
3100
+ branchRowOffset: {
3101
+ type: string;
3102
+ };
3103
+ leafRowGap: {
3104
+ type: string;
3105
+ minimum: number;
3106
+ };
3107
+ leafRowOffset: {
3108
+ type: string;
3109
+ };
3110
+ };
3111
+ };
3112
+ journeyForm: {
3113
+ type: string;
3114
+ enum: string[];
3115
+ };
3116
+ journeyLineForm: {
3117
+ type: string;
3118
+ enum: string[];
3119
+ };
3120
+ journeyLabels: {
3121
+ type: string;
3122
+ additionalProperties: boolean;
3123
+ required: string[];
3124
+ properties: {
3125
+ delighted: {
3126
+ type: string;
3127
+ minLength: number;
3128
+ };
3129
+ happy: {
3130
+ type: string;
3131
+ minLength: number;
3132
+ };
3133
+ neutral: {
3134
+ type: string;
3135
+ minLength: number;
3136
+ };
3137
+ frustrated: {
3138
+ type: string;
3139
+ minLength: number;
3140
+ };
3141
+ angry: {
3142
+ type: string;
3143
+ minLength: number;
3144
+ };
3145
+ };
3146
+ };
3147
+ sequenceActorForm: {
3148
+ type: string;
3149
+ enum: string[];
3150
+ };
3151
+ sequenceLabelForm: {
3152
+ type: string;
3153
+ enum: string[];
3154
+ };
3155
+ sequenceReturnHead: {
3156
+ type: string;
3157
+ enum: string[];
3158
+ };
3159
+ sequenceRowGap: {
3160
+ type: string;
3161
+ exclusiveMinimum: number;
3162
+ };
3163
+ sequenceGutter: {
3164
+ type: string;
3165
+ exclusiveMinimum: number;
3166
+ };
3167
+ sequenceBandWidth: {
3168
+ type: string;
3169
+ exclusiveMinimum: number;
3170
+ };
3171
+ sequenceSelfLoop: {
3172
+ type: string;
3173
+ additionalProperties: boolean;
3174
+ properties: {
3175
+ form: {
3176
+ type: string;
3177
+ enum: string[];
3178
+ };
3179
+ width: {
3180
+ type: string;
3181
+ exclusiveMinimum: number;
3182
+ };
3183
+ drop: {
3184
+ type: string;
3185
+ exclusiveMinimum: number;
3186
+ };
3187
+ };
3188
+ };
3189
+ sequenceKindLabels: {
3190
+ type: string;
3191
+ additionalProperties: boolean;
3192
+ properties: {
3193
+ call: {
3194
+ type: string;
3195
+ };
3196
+ return: {
3197
+ type: string;
3198
+ };
3199
+ fire: {
3200
+ type: string;
3201
+ };
3202
+ };
3203
+ };
3204
+ figureCard: {
3205
+ type: string;
3206
+ additionalProperties: boolean;
3207
+ required: string[];
3208
+ properties: {
3209
+ label: {
3210
+ type: string;
3211
+ };
3212
+ note: {
3213
+ type: string;
3214
+ };
3215
+ };
3216
+ };
3217
+ figureSize: {
3218
+ type: string;
3219
+ additionalProperties: boolean;
3220
+ required: string[];
3221
+ properties: {
3222
+ width: {
3223
+ type: string;
3224
+ exclusiveMinimum: number;
3225
+ };
3226
+ height: {
3227
+ type: string;
3228
+ exclusiveMinimum: number;
3229
+ };
3230
+ };
3231
+ };
3232
+ terminalDecoration: {
3233
+ type: string;
3234
+ additionalProperties: boolean;
3235
+ properties: {
3236
+ windowControls: {
3237
+ type: string;
3238
+ };
3239
+ cursor: {
3240
+ type: string;
3241
+ };
3242
+ rowOrdinal: {
3243
+ type: string;
3244
+ };
3245
+ };
3246
+ };
3247
+ cornerForm: {
3248
+ type: string;
3249
+ enum: string[];
3250
+ };
3251
+ chartBarShape: {
3252
+ type: string;
3253
+ enum: string[];
3254
+ };
3255
+ figureKindLabel: {
3256
+ type: string;
3257
+ additionalProperties: boolean;
3258
+ required: string[];
3259
+ properties: {
3260
+ text: {
3261
+ type: string;
3262
+ minLength: number;
3263
+ };
3264
+ x: {
3265
+ type: string;
3266
+ };
3267
+ y: {
3268
+ type: string;
3269
+ };
3270
+ fontSize: {
3271
+ type: string;
3272
+ exclusiveMinimum: number;
3273
+ };
3274
+ fontWeight: {
3275
+ type: string;
3276
+ exclusiveMinimum: number;
3277
+ };
3278
+ letterSpacing: {
3279
+ type: string;
3280
+ minimum: number;
3281
+ };
3282
+ };
3283
+ };
3284
+ figureInset: {
3285
+ type: string;
3286
+ additionalProperties: boolean;
3287
+ properties: {
3288
+ top: {
3289
+ type: string;
3290
+ minimum: number;
3291
+ };
3292
+ right: {
3293
+ type: string;
3294
+ minimum: number;
3295
+ };
3296
+ bottom: {
3297
+ type: string;
3298
+ minimum: number;
3299
+ };
3300
+ left: {
3301
+ type: string;
3302
+ minimum: number;
3303
+ };
3304
+ radius: {
3305
+ type: string;
3306
+ minimum: number;
3307
+ };
3308
+ };
3309
+ };
3310
+ journeySize: {
3311
+ type: string;
3312
+ additionalProperties: boolean;
3313
+ properties: {
3314
+ plotPadding: {
3315
+ type: string;
3316
+ additionalProperties: boolean;
3317
+ properties: {
3318
+ left: {
3319
+ type: string;
3320
+ minimum: number;
3321
+ };
3322
+ right: {
3323
+ type: string;
3324
+ minimum: number;
3325
+ };
3326
+ };
3327
+ };
3328
+ pointPadding: {
3329
+ type: string;
3330
+ additionalProperties: boolean;
3331
+ properties: {
3332
+ left: {
3333
+ type: string;
3334
+ minimum: number;
3335
+ };
3336
+ right: {
3337
+ type: string;
3338
+ minimum: number;
3339
+ };
3340
+ };
3341
+ };
3342
+ };
3343
+ };
3344
+ chartBarSize: {
3345
+ type: string;
3346
+ additionalProperties: boolean;
3347
+ properties: {
3348
+ tickFontSize: {
3349
+ $ref: string;
3350
+ };
3351
+ valueFontSize: {
3352
+ $ref: string;
3353
+ };
3354
+ labelFontSize: {
3355
+ $ref: string;
3356
+ };
3357
+ plotPadding: {
3358
+ type: string;
3359
+ additionalProperties: boolean;
3360
+ properties: {
3361
+ top: {
3362
+ type: string;
3363
+ minimum: number;
3364
+ };
3365
+ right: {
3366
+ type: string;
3367
+ minimum: number;
3368
+ };
3369
+ bottom: {
3370
+ type: string;
3371
+ minimum: number;
3372
+ };
3373
+ left: {
3374
+ type: string;
3375
+ minimum: number;
3376
+ };
3377
+ };
3378
+ };
3379
+ barWidth: {
3380
+ $ref: string;
3381
+ };
3382
+ cornerRadius: {
3383
+ type: string;
3384
+ minimum: number;
3385
+ };
3386
+ };
3387
+ };
3388
+ chartLineSize: {
3389
+ type: string;
3390
+ additionalProperties: boolean;
3391
+ properties: {
3392
+ valueLabelOffset: {
3393
+ type: string;
3394
+ additionalProperties: boolean;
3395
+ properties: {
3396
+ above: {
3397
+ type: string;
3398
+ minimum: number;
3399
+ };
3400
+ below: {
3401
+ type: string;
3402
+ minimum: number;
3403
+ };
3404
+ };
3405
+ };
3406
+ tickFontSize: {
3407
+ $ref: string;
3408
+ };
3409
+ periodFontSize: {
3410
+ $ref: string;
3411
+ };
3412
+ pointRadius: {
3413
+ $ref: string;
3414
+ };
3415
+ plotPadding: {
3416
+ type: string;
3417
+ additionalProperties: boolean;
3418
+ properties: {
3419
+ top: {
3420
+ type: string;
3421
+ minimum: number;
3422
+ };
3423
+ right: {
3424
+ type: string;
3425
+ minimum: number;
3426
+ };
3427
+ bottom: {
3428
+ type: string;
3429
+ minimum: number;
3430
+ };
3431
+ left: {
3432
+ type: string;
3433
+ minimum: number;
3434
+ };
3435
+ };
3436
+ };
3437
+ tickGap: {
3438
+ type: string;
3439
+ minimum: number;
3440
+ };
3441
+ pointPadding: {
3442
+ type: string;
3443
+ additionalProperties: boolean;
3444
+ properties: {
3445
+ left: {
3446
+ type: string;
3447
+ minimum: number;
3448
+ };
3449
+ right: {
3450
+ type: string;
3451
+ minimum: number;
3452
+ };
3453
+ };
3454
+ };
3455
+ periodY: {
3456
+ type: string;
3457
+ minimum: number;
3458
+ };
3459
+ };
3460
+ };
3461
+ chartPieSize: {
3462
+ type: string;
3463
+ additionalProperties: boolean;
3464
+ properties: {
3465
+ tableWidth: {
3466
+ $ref: string;
3467
+ };
3468
+ tableLabelFontSize: {
3469
+ $ref: string;
3470
+ };
3471
+ tableValueFontSize: {
3472
+ $ref: string;
3473
+ };
3474
+ tableRowGap: {
3475
+ type: string;
3476
+ minimum: number;
3477
+ };
3478
+ tablePaddingInline: {
3479
+ type: string;
3480
+ minimum: number;
3481
+ };
3482
+ outerRadius: {
3483
+ $ref: string;
3484
+ };
3485
+ centerX: {
3486
+ type: string;
3487
+ minimum: number;
3488
+ };
3489
+ };
3490
+ };
3491
+ chartWaffleSize: {
3492
+ type: string;
3493
+ additionalProperties: boolean;
3494
+ properties: {
3495
+ gridLeft: {
3496
+ type: string;
3497
+ minimum: number;
3498
+ };
3499
+ cellPitch: {
3500
+ $ref: string;
3501
+ };
3502
+ };
3503
+ };
3504
+ chartSlopeLabelTemplate: {
3505
+ type: string;
3506
+ additionalProperties: boolean;
3507
+ properties: {
3508
+ left: {
3509
+ type: string;
3510
+ };
3511
+ right: {
3512
+ type: string;
3513
+ };
3514
+ };
3515
+ };
3516
+ chartSlopeSize: {
3517
+ type: string;
3518
+ additionalProperties: boolean;
3519
+ properties: {
3520
+ pointRadius: {
3521
+ $ref: string;
3522
+ };
3523
+ periodFontSize: {
3524
+ $ref: string;
3525
+ };
3526
+ labelFontSize: {
3527
+ $ref: string;
3528
+ };
3529
+ leftAxisX: {
3530
+ type: string;
3531
+ minimum: number;
3532
+ };
3533
+ axisGap: {
3534
+ $ref: string;
3535
+ };
3536
+ labelAxisGap: {
3537
+ type: string;
3538
+ minimum: number;
3539
+ };
3540
+ plotPadding: {
3541
+ type: string;
3542
+ additionalProperties: boolean;
3543
+ properties: {
3544
+ top: {
3545
+ type: string;
3546
+ minimum: number;
3547
+ };
3548
+ bottom: {
3549
+ type: string;
3550
+ minimum: number;
3551
+ };
3552
+ };
3553
+ };
3554
+ pointPadding: {
3555
+ type: string;
3556
+ additionalProperties: boolean;
3557
+ properties: {
3558
+ top: {
3559
+ type: string;
3560
+ minimum: number;
3561
+ };
3562
+ bottom: {
3563
+ type: string;
3564
+ minimum: number;
3565
+ };
3566
+ };
3567
+ };
3568
+ };
3569
+ };
3570
+ chartStackedLayout: {
3571
+ type: string;
3572
+ additionalProperties: boolean;
3573
+ properties: {
3574
+ legendColumns: {
3575
+ type: string;
3576
+ minimum: number;
3577
+ };
3578
+ legendColumnGap: {
3579
+ type: string;
3580
+ minimum: number;
3581
+ };
3582
+ segmentGap: {
3583
+ type: string;
3584
+ minimum: number;
3585
+ };
3586
+ barThickness: {
3587
+ $ref: string;
3588
+ };
3589
+ barWidth: {
3590
+ $ref: string;
3591
+ };
3592
+ legendMarkSize: {
3593
+ $ref: string;
3594
+ };
3595
+ legendFontSize: {
3596
+ $ref: string;
3597
+ };
3598
+ periodFontSize: {
3599
+ $ref: string;
3600
+ };
3601
+ rateFontSize: {
3602
+ $ref: string;
3603
+ };
3604
+ legendOffsetY: {
3605
+ type: string;
3606
+ };
3607
+ };
3608
+ };
3609
+ chartGaugeSize: {
3610
+ type: string;
3611
+ additionalProperties: boolean;
3612
+ properties: {
3613
+ arcThickness: {
3614
+ $ref: string;
3615
+ };
3616
+ outerRadius: {
3617
+ $ref: string;
3618
+ };
3619
+ plotTop: {
3620
+ type: string;
3621
+ minimum: number;
3622
+ };
3623
+ valueFontSize: {
3624
+ $ref: string;
3625
+ };
3626
+ };
3627
+ };
3628
+ ganttSize: {
3629
+ type: string;
3630
+ additionalProperties: boolean;
3631
+ properties: {
3632
+ taskLabelFontSize: {
3633
+ $ref: string;
3634
+ };
3635
+ taskLabelAlign: {
3636
+ type: string;
3637
+ enum: string[];
3638
+ };
3639
+ taskLabelX: {
3640
+ type: string;
3641
+ minimum: number;
3642
+ };
3643
+ tickFontSize: {
3644
+ $ref: string;
3645
+ };
3646
+ tickCount: {
3647
+ type: string;
3648
+ minimum: number;
3649
+ };
3650
+ barThickness: {
3651
+ $ref: string;
3652
+ };
3653
+ milestoneFontSize: {
3654
+ $ref: string;
3655
+ };
3656
+ milestoneRadius: {
3657
+ $ref: string;
3658
+ };
3659
+ dependencyStrokeWidth: {
3660
+ $ref: string;
3661
+ };
3662
+ taskColumnWidth: {
3663
+ type: string;
3664
+ minimum: number;
3665
+ };
3666
+ timelinePaddingRight: {
3667
+ type: string;
3668
+ minimum: number;
3669
+ };
3670
+ };
3671
+ };
3672
+ quadrantLabelPosition: {
3673
+ type: string;
3674
+ enum: string[];
3675
+ };
3676
+ quadrantSize: {
3677
+ type: string;
3678
+ additionalProperties: boolean;
3679
+ properties: {
3680
+ plotOffset: {
3681
+ type: string;
3682
+ additionalProperties: boolean;
3683
+ properties: {
3684
+ x: {
3685
+ type: string;
3686
+ minimum: number;
3687
+ };
3688
+ y: {
3689
+ type: string;
3690
+ minimum: number;
3691
+ };
3692
+ };
3693
+ };
3694
+ plotSize: {
3695
+ $ref: string;
3696
+ };
3697
+ pointRadius: {
3698
+ $ref: string;
3699
+ };
3700
+ pointFontSize: {
3701
+ $ref: string;
3702
+ };
3703
+ pointLabelGap: {
3704
+ type: string;
3705
+ minimum: number;
3706
+ };
3707
+ quadrantFontSize: {
3708
+ $ref: string;
3709
+ };
3710
+ axisFontSize: {
3711
+ $ref: string;
3712
+ };
3713
+ };
3714
+ };
3715
+ eyebrow: {
3716
+ type: string;
3717
+ description: string;
3718
+ };
3719
+ axes: {
3720
+ type: string;
3721
+ additionalProperties: boolean;
3722
+ description: string;
3723
+ properties: {
3724
+ x: {
3725
+ type: string;
3726
+ additionalProperties: boolean;
3727
+ properties: {
3728
+ left: {
3729
+ type: string;
3730
+ };
3731
+ right: {
3732
+ type: string;
3733
+ };
3734
+ label: {
3735
+ type: string;
3736
+ };
3737
+ direction: {
3738
+ type: string;
3739
+ enum: boolean[];
3740
+ };
3741
+ };
3742
+ };
3743
+ y: {
3744
+ type: string;
3745
+ additionalProperties: boolean;
3746
+ properties: {
3747
+ bottom: {
3748
+ type: string;
3749
+ };
3750
+ top: {
3751
+ type: string;
3752
+ };
3753
+ label: {
3754
+ type: string;
3755
+ };
3756
+ direction: {
3757
+ type: string;
3758
+ enum: boolean[];
3759
+ };
3760
+ };
3761
+ };
3762
+ };
3763
+ };
3764
+ regions: {
3765
+ type: string;
3766
+ additionalProperties: boolean;
3767
+ description: string;
3768
+ properties: {
3769
+ 左上: {
3770
+ type: string;
3771
+ };
3772
+ 右上: {
3773
+ type: string;
3774
+ };
3775
+ 左下: {
3776
+ type: string;
3777
+ };
3778
+ 右下: {
3779
+ type: string;
3780
+ };
3781
+ };
3782
+ };
3783
+ actors: {
3784
+ type: string;
3785
+ minItems: number;
3786
+ description: string;
3787
+ items: {
3788
+ oneOf: ({
3789
+ type: string;
3790
+ description: string;
3791
+ required?: undefined;
3792
+ additionalProperties?: undefined;
2154
3793
  properties?: undefined;
2155
3794
  } | {
2156
3795
  type: string;
@@ -2162,12 +3801,122 @@ declare const diagramJsonSchema: {
2162
3801
  minLength: number;
2163
3802
  description: string;
2164
3803
  };
2165
- kind: {
3804
+ kind: {
3805
+ type: string;
3806
+ description: string;
3807
+ };
3808
+ subtitle: {
3809
+ type: string;
3810
+ description: string;
3811
+ };
3812
+ kindForm: {
3813
+ type: string;
3814
+ enum: string[];
3815
+ };
3816
+ icon: {
3817
+ type: string;
3818
+ enum: string[];
3819
+ };
3820
+ emptyRowsNote: {
3821
+ type: string;
3822
+ };
3823
+ titleAlign: {
3824
+ type: string;
3825
+ enum: string[];
3826
+ };
3827
+ rowRules: {
3828
+ type: string;
3829
+ };
3830
+ rowStripe: {
3831
+ type: string;
3832
+ };
3833
+ rowLayout: {
3834
+ type: string;
3835
+ additionalProperties: boolean;
3836
+ properties: {
3837
+ titleBaseline: {
3838
+ type: string;
3839
+ minimum: number;
3840
+ };
3841
+ rowTop: {
3842
+ type: string;
3843
+ minimum: number;
3844
+ };
3845
+ rowPitch: {
3846
+ type: string;
3847
+ exclusiveMinimum: number;
3848
+ };
3849
+ };
3850
+ };
3851
+ rowDividerForm: {
3852
+ type: string;
3853
+ enum: string[];
3854
+ };
3855
+ rowWell: {
3856
+ type: string;
3857
+ additionalProperties: boolean;
3858
+ properties: {
3859
+ top: {
3860
+ type: string;
3861
+ minimum: number;
3862
+ };
3863
+ right: {
3864
+ type: string;
3865
+ minimum: number;
3866
+ };
3867
+ bottom: {
3868
+ type: string;
3869
+ minimum: number;
3870
+ };
3871
+ left: {
3872
+ type: string;
3873
+ minimum: number;
3874
+ };
3875
+ radius: {
3876
+ type: string;
3877
+ minimum: number;
3878
+ };
3879
+ };
3880
+ };
3881
+ rowMarkForm: {
3882
+ type: string;
3883
+ enum: string[];
3884
+ };
3885
+ nestIn: {
3886
+ type: string;
3887
+ minLength: number;
3888
+ };
3889
+ figureCard: {
3890
+ type: string;
3891
+ additionalProperties: boolean;
3892
+ required: string[];
3893
+ properties: {
3894
+ label: {
3895
+ type: string;
3896
+ };
3897
+ note: {
3898
+ type: string;
3899
+ };
3900
+ };
3901
+ };
3902
+ stationNamePosition: {
3903
+ type: string;
3904
+ enum: string[];
3905
+ description: string;
3906
+ };
3907
+ subtitlePlacement: {
2166
3908
  type: string;
3909
+ enum: string[];
2167
3910
  description: string;
2168
3911
  };
2169
- subtitle: {
3912
+ titleFontSize: {
3913
+ type: string;
3914
+ exclusiveMinimum: number;
3915
+ description: string;
3916
+ };
3917
+ markGap: {
2170
3918
  type: string;
3919
+ exclusiveMinimum: number;
2171
3920
  description: string;
2172
3921
  };
2173
3922
  eyebrow: {
@@ -2192,10 +3941,34 @@ declare const diagramJsonSchema: {
2192
3941
  marks: {
2193
3942
  type: string;
2194
3943
  items: {
2195
- type: string;
3944
+ oneOf: ({
3945
+ type: string;
3946
+ additionalProperties?: undefined;
3947
+ required?: undefined;
3948
+ properties?: undefined;
3949
+ } | {
3950
+ type: string;
3951
+ additionalProperties: boolean;
3952
+ required: string[];
3953
+ properties: {
3954
+ mark: {
3955
+ type: string;
3956
+ };
3957
+ tone: {
3958
+ type: string;
3959
+ enum: string[];
3960
+ };
3961
+ };
3962
+ })[];
2196
3963
  };
2197
3964
  description: string;
2198
3965
  };
3966
+ stage: {
3967
+ type: string;
3968
+ minLength: number;
3969
+ pattern: string;
3970
+ description: string;
3971
+ };
2199
3972
  lane: {
2200
3973
  type: string;
2201
3974
  description: string;
@@ -2244,6 +4017,37 @@ declare const diagramJsonSchema: {
2244
4017
  type: string;
2245
4018
  description: string;
2246
4019
  };
4020
+ startLabel: {
4021
+ type: string;
4022
+ description: string;
4023
+ };
4024
+ milestone: {
4025
+ type: string;
4026
+ description: string;
4027
+ };
4028
+ emphasis: {
4029
+ type: string;
4030
+ enum: string[];
4031
+ description: string;
4032
+ };
4033
+ at: {
4034
+ type: string;
4035
+ minItems: number;
4036
+ maxItems: number;
4037
+ items: {
4038
+ type: string[];
4039
+ };
4040
+ description: string;
4041
+ };
4042
+ 点の位置: {
4043
+ type: string;
4044
+ minItems: number;
4045
+ maxItems: number;
4046
+ items: {
4047
+ type: string[];
4048
+ };
4049
+ description: string;
4050
+ };
2247
4051
  touchpoint: {
2248
4052
  type: string;
2249
4053
  description: string;
@@ -2252,6 +4056,11 @@ declare const diagramJsonSchema: {
2252
4056
  type: string;
2253
4057
  description: string;
2254
4058
  };
4059
+ opportunityPosition: {
4060
+ type: string;
4061
+ enum: string[];
4062
+ description: string;
4063
+ };
2255
4064
  posX: {
2256
4065
  type: string;
2257
4066
  description: string;
@@ -2488,6 +4297,16 @@ declare const diagramJsonSchema: {
2488
4297
  enum: string[];
2489
4298
  description: string;
2490
4299
  };
4300
+ fromSide: {
4301
+ type: string;
4302
+ enum: string[];
4303
+ description: string;
4304
+ };
4305
+ toSide: {
4306
+ type: string;
4307
+ enum: string[];
4308
+ description: string;
4309
+ };
2491
4310
  head: {
2492
4311
  type: string;
2493
4312
  enum: string[];
@@ -2535,6 +4354,57 @@ declare const diagramJsonSchema: {
2535
4354
  type: string;
2536
4355
  description: string;
2537
4356
  };
4357
+ posX1: {
4358
+ type: string;
4359
+ description: string;
4360
+ };
4361
+ posY1: {
4362
+ type: string;
4363
+ description: string;
4364
+ };
4365
+ posX2: {
4366
+ type: string;
4367
+ description: string;
4368
+ };
4369
+ posY2: {
4370
+ type: string;
4371
+ description: string;
4372
+ };
4373
+ waypoints: {
4374
+ type: string;
4375
+ items: {
4376
+ type: string;
4377
+ additionalProperties: boolean;
4378
+ required: string[];
4379
+ properties: {
4380
+ x: {
4381
+ type: string;
4382
+ };
4383
+ y: {
4384
+ type: string;
4385
+ };
4386
+ };
4387
+ };
4388
+ };
4389
+ labelCollision: {
4390
+ type: string;
4391
+ enum: string[];
4392
+ };
4393
+ labelSize: {
4394
+ type: string;
4395
+ additionalProperties: boolean;
4396
+ properties: {
4397
+ width: {
4398
+ $ref: string;
4399
+ };
4400
+ height: {
4401
+ $ref: string;
4402
+ };
4403
+ fontSize: {
4404
+ $ref: string;
4405
+ };
4406
+ };
4407
+ };
2538
4408
  overlay: {
2539
4409
  type: string;
2540
4410
  description: string;
@@ -2646,6 +4516,10 @@ declare const diagramJsonSchema: {
2646
4516
  type: string;
2647
4517
  description: string;
2648
4518
  };
4519
+ description: {
4520
+ type: string;
4521
+ description: string;
4522
+ };
2649
4523
  badge: {
2650
4524
  type: string;
2651
4525
  description: string;
@@ -2702,6 +4576,9 @@ declare const diagramJsonSchema: {
2702
4576
  type: string;
2703
4577
  minimum: number;
2704
4578
  };
4579
+ contentOffsetX: {
4580
+ type: string;
4581
+ };
2705
4582
  laneWidth: {
2706
4583
  type: string;
2707
4584
  minimum: number;
@@ -2745,6 +4622,9 @@ declare const diagramJsonSchema: {
2745
4622
  label: {
2746
4623
  type: string;
2747
4624
  };
4625
+ subtitle: {
4626
+ type: string;
4627
+ };
2748
4628
  contain: {
2749
4629
  type: string;
2750
4630
  };
@@ -3363,11 +5243,163 @@ declare const diagramJsonSchema: {
3363
5243
  enum: string[];
3364
5244
  description: string;
3365
5245
  };
5246
+ shape: {
5247
+ type: string;
5248
+ enum: string[];
5249
+ description: string;
5250
+ };
5251
+ order: {
5252
+ type: string;
5253
+ enum: string[];
5254
+ description: string;
5255
+ };
5256
+ theme: {
5257
+ type: string;
5258
+ enum: string[];
5259
+ description: string;
5260
+ };
3366
5261
  palette: {
3367
5262
  type: string;
3368
5263
  enum: string[];
3369
5264
  description: string;
3370
5265
  };
5266
+ legend: {
5267
+ type: string;
5268
+ description: string;
5269
+ items: {
5270
+ type: string;
5271
+ additionalProperties: boolean;
5272
+ required: string[];
5273
+ properties: {
5274
+ mark: {
5275
+ type: string;
5276
+ enum: string[];
5277
+ };
5278
+ text: {
5279
+ type: string;
5280
+ minLength: number;
5281
+ };
5282
+ tone: {
5283
+ type: string;
5284
+ };
5285
+ lineStyle: {
5286
+ type: string;
5287
+ enum: string[];
5288
+ };
5289
+ align: {
5290
+ type: string;
5291
+ enum: string[];
5292
+ };
5293
+ lead: {
5294
+ type: string;
5295
+ };
5296
+ };
5297
+ oneOf: ({
5298
+ required: string[];
5299
+ not: {
5300
+ anyOf: {
5301
+ required: string[];
5302
+ }[];
5303
+ required?: undefined;
5304
+ };
5305
+ allOf?: undefined;
5306
+ } | {
5307
+ not: {
5308
+ required: string[];
5309
+ anyOf?: undefined;
5310
+ };
5311
+ allOf: {
5312
+ not: {
5313
+ required: string[];
5314
+ };
5315
+ }[];
5316
+ required?: undefined;
5317
+ })[];
5318
+ };
5319
+ };
5320
+ legendFontSize: {
5321
+ type: string;
5322
+ exclusiveMinimum: number;
5323
+ description: string;
5324
+ };
5325
+ edgeEndGap: {
5326
+ type: string;
5327
+ minimum: number;
5328
+ description: string;
5329
+ };
5330
+ legendOffset: {
5331
+ type: string;
5332
+ additionalProperties: boolean;
5333
+ properties: {
5334
+ x: {
5335
+ type: string;
5336
+ };
5337
+ y: {
5338
+ type: string;
5339
+ };
5340
+ };
5341
+ };
5342
+ stageHeader: {
5343
+ type: string;
5344
+ description: string;
5345
+ additionalProperties: boolean;
5346
+ required: string[];
5347
+ properties: {
5348
+ leftPad: {
5349
+ type: string;
5350
+ minimum: number;
5351
+ };
5352
+ topPad: {
5353
+ type: string;
5354
+ minimum: number;
5355
+ };
5356
+ numberSize: {
5357
+ type: string;
5358
+ exclusiveMinimum: number;
5359
+ };
5360
+ gap: {
5361
+ type: string;
5362
+ minimum: number;
5363
+ };
5364
+ nameSize: {
5365
+ type: string;
5366
+ exclusiveMinimum: number;
5367
+ };
5368
+ bottomPad: {
5369
+ type: string;
5370
+ minimum: number;
5371
+ };
5372
+ };
5373
+ };
5374
+ stageLayout: {
5375
+ type: string;
5376
+ additionalProperties: boolean;
5377
+ properties: {
5378
+ columnWidths: {
5379
+ type: string;
5380
+ additionalProperties: {
5381
+ type: string;
5382
+ minimum: number;
5383
+ };
5384
+ };
5385
+ columnGap: {
5386
+ type: string;
5387
+ minimum: number;
5388
+ };
5389
+ backDetourTopGap: {
5390
+ type: string;
5391
+ minimum: number;
5392
+ };
5393
+ backDetourSideGap: {
5394
+ type: string;
5395
+ minimum: number;
5396
+ };
5397
+ backDetourTargetInset: {
5398
+ type: string;
5399
+ minimum: number;
5400
+ };
5401
+ };
5402
+ };
3371
5403
  reveal: {
3372
5404
  type: string;
3373
5405
  enum: string[];
@@ -3527,4 +5559,4 @@ interface CompileOpts {
3527
5559
  */
3528
5560
  declare function textDslToDiagram(src: string, opts?: CompileOpts): CdlDiagram;
3529
5561
 
3530
- export { type AnchorBox, type CompileNotice, type CompileOpts, DIAGRAM_BOUNDARY_PADDING, DIRECTION_ALIAS, DRAW_TARGETS, DRAW_WORDS, type DiagramBoundingBox, type DragonJson, type DslActor, type DslAnimate, type DslDocument, type DslError, type DslGroup, type DslLane, type DslPhase, type DslSet, type DslState, type DslStep, type DslTween, type DslValue, type DslViewport, type FocusEntry, type InputSize, JSONを分解する, type JsonActor, type JsonAxes, type JsonDslError, type JsonPhase, type JsonStep, type LayoutMode, type LayoutPos, type LintIssue, type LintReport, type LintSeverity, MAX_INPUT_BYTES, MAX_INPUT_ELEMENTS, MAX_PART_SCALE, NODE_KIND_ALIAS, NODE_KIND_VALID, PHASE_ITEM_WORDS, PRESET_TYPES, type PresetType, RELATIVE_GAP_DEFAULT, type RelativeDirection, type RelativePos, TONE_ALIAS, TOP_LEVEL_KEYS, autoFix, compileToCdl, computeDiagramBoundingBox, countBytes, countDiagramElements, countDocElements, describeOversize, describeOversizeSource, diagramJsonSchema, isColorValue, jsonToDiagram, lintDiagram, measureActorBoxes, normalizePartScale, orderByDependency, parseFocusEntry, parseRelativePos, parseTextDsl, parseTextDslV05, partBoxInFrame, partDrawsInDiagram, partIsMeasurable, partRenderSize, partScaleFactor, partTargetScale, partTargetSize, partVisualSize, partsBaseBottom, partsGridCenters, pointsOutside, rectsOverlap, resolveRelativePos, stripExternalPaint, stripQuotes, textDslToDiagram, validateDragonJson, writeActorPosition, type トークン, type トークンの種類, 区間に広げる, 書いた場所の鍵, type 書いた行の表, 記法を分解する, 部品に上書きを当てる };
5562
+ export { ALL_DIAGRAM_SHAPES, type AnchorBox, type CompileNotice, type CompileOpts, DIAGRAM_BOUNDARY_PADDING, DIAGRAM_SHAPES, DIRECTION_ALIAS, DRAW_TARGETS, DRAW_WORDS, type DiagramBoundingBox, type DragonJson, type DslActor, type DslAnimate, type DslDiagramShape, type DslDocument, type DslError, type DslGroup, type DslLane, type DslPhase, type DslSet, type DslShape, type DslState, type DslStep, type DslSwimlaneShape, type DslTheme, type DslTween, type DslValue, type DslViewport, type FocusEntry, type InputSize, JSONを分解する, type JsonActor, type JsonAxes, type JsonDslError, type JsonPhase, type JsonStep, LEGEND_MARK_ALIAS, type LayoutMode, type LayoutPos, type LintIssue, type LintReport, type LintSeverity, MAX_INPUT_BYTES, MAX_INPUT_ELEMENTS, MAX_PART_SCALE, NODE_KIND_ALIAS, NODE_KIND_VALID, ORDERS, ORDER_ALIAS, PHASE_ITEM_WORDS, PRESET_TYPES, type PresetType, RELATIVE_GAP_DEFAULT, type RelativeDirection, type RelativePos, SHAPES, SWIMLANE_SHAPES, THEMES, THEME_ALIAS, TONE_ALIAS, TOP_LEVEL_KEYS, TYPE_ALIASES, autoFix, compileToCdl, computeDiagramBoundingBox, countBytes, countDiagramElements, countDocElements, describeOversize, describeOversizeSource, diagramJsonSchema, isColorValue, jsonToDiagram, lintDiagram, measureActorBoxes, normalizePartScale, orderByDependency, parseFocusEntry, parseRelativePos, parseTextDsl, parseTextDslV05, partBoxInFrame, partDrawsInDiagram, partIsMeasurable, partRenderSize, partScaleFactor, partTargetScale, partTargetSize, partVisualSize, partsBaseBottom, partsGridCenters, pointsOutside, rectsOverlap, resolveLegendMark, resolveRelativePos, resolveTheme, stripExternalPaint, stripQuotes, textDslToDiagram, validateDragonJson, writeActorPosition, type トークン, type トークンの種類, 区間に広げる, 意匠の円の区画の間, 意匠の字の測り方, 意匠の棒の角, 書いた場所の鍵, type 書いた行の表, 棒を描く節か, 測るために受け取った知らせの数, 行頭の語, 記法を分解する, 部品に上書きを当てる };