@cardenelabs/dragon 0.43.0 → 0.45.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/README.md +21 -0
- package/dist/cli.cjs +6804 -5032
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +6804 -5032
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +7172 -5536
- package/dist/export.cjs.map +1 -1
- package/dist/export.d.cts +1 -1
- package/dist/export.d.ts +1 -1
- package/dist/export.js +7171 -5537
- package/dist/export.js.map +1 -1
- package/dist/index.cjs +12244 -10449
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -3
- package/dist/index.d.ts +55 -3
- package/dist/index.js +12244 -10449
- package/dist/index.js.map +1 -1
- package/dist/{ink-B6s_SMXG.d.cts → ink-DeDtzaTL.d.cts} +27 -3
- package/dist/{ink-B6s_SMXG.d.ts → ink-DeDtzaTL.d.ts} +27 -3
- package/dist/light/chunk-6ZUKJ3VO.js +489 -0
- package/dist/light/chunk-6ZUKJ3VO.js.map +1 -0
- package/dist/light/chunk-CLS6JVKK.cjs +84 -0
- package/dist/light/chunk-CLS6JVKK.cjs.map +1 -0
- package/dist/light/chunk-JNSHZTPF.js +1141 -0
- package/dist/light/chunk-JNSHZTPF.js.map +1 -0
- package/dist/light/chunk-OUQ44P45.cjs +489 -0
- package/dist/light/chunk-OUQ44P45.cjs.map +1 -0
- package/dist/light/chunk-VRAW7VAQ.cjs +1141 -0
- package/dist/light/chunk-VRAW7VAQ.cjs.map +1 -0
- package/dist/light/chunk-YDKPEKGZ.js +84 -0
- package/dist/light/chunk-YDKPEKGZ.js.map +1 -0
- package/dist/light/git-C4RVNFT6.js +637 -0
- package/dist/light/git-C4RVNFT6.js.map +1 -0
- package/dist/light/git-I7D7RIW2.cjs +637 -0
- package/dist/light/git-I7D7RIW2.cjs.map +1 -0
- package/dist/light/index.cjs +9885 -0
- package/dist/light/index.cjs.map +1 -0
- package/dist/light/index.d.cts +976 -0
- package/dist/light/index.d.ts +976 -0
- package/dist/light/index.js +9885 -0
- package/dist/light/index.js.map +1 -0
- package/dist/light/lineup-FAIKTH3Y.cjs +283 -0
- package/dist/light/lineup-FAIKTH3Y.cjs.map +1 -0
- package/dist/light/lineup-YEG4HHEI.js +283 -0
- package/dist/light/lineup-YEG4HHEI.js.map +1 -0
- package/dist/light/state-P3LIVI3K.js +335 -0
- package/dist/light/state-P3LIVI3K.js.map +1 -0
- package/dist/light/state-ZZUK6AQT.cjs +335 -0
- package/dist/light/state-ZZUK6AQT.cjs.map +1 -0
- package/dist/light/time-64DJKYAL.cjs +719 -0
- package/dist/light/time-64DJKYAL.cjs.map +1 -0
- package/dist/light/time-B5WUQOFP.js +719 -0
- package/dist/light/time-B5WUQOFP.js.map +1 -0
- package/dist/light/tree-5HPREYW2.js +478 -0
- package/dist/light/tree-5HPREYW2.js.map +1 -0
- package/dist/light/tree-66EH4QVI.cjs +478 -0
- package/dist/light/tree-66EH4QVI.cjs.map +1 -0
- package/dist/node.cjs +1932 -680
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +1932 -680
- package/dist/node.js.map +1 -1
- package/dist/player.global.js +3 -3
- package/package.json +14 -2
- package/src/api.ts +71 -0
- package/src/field-messages.ts +6 -0
- package/src/figure-text.ts +4 -0
- package/src/index.ts +6 -65
- package/src/kinds/all.ts +16 -0
- package/src/kinds/git.ts +3 -0
- package/src/kinds/lineup.ts +3 -0
- package/src/kinds/registry.ts +46 -0
- package/src/kinds/state.ts +2 -0
- package/src/kinds/time.ts +3 -0
- package/src/kinds/tree.ts +3 -0
- package/src/layout/git.ts +0 -1
- package/src/layout/lineup.ts +218 -0
- package/src/layout/time.ts +0 -1
- package/src/layout/tree.ts +0 -1
- package/src/light.ts +31 -0
- package/src/look/values.ts +31 -2
- package/src/messages.ts +54 -0
- package/src/parser.ts +123 -1
- package/src/player-global.ts +3 -0
- package/src/player.ts +1 -1
- package/src/printer.ts +30 -1
- package/src/render/draw.ts +731 -0
- package/src/render/lineup.ts +184 -0
- package/src/render/parts.ts +19 -7
- package/src/render/svg.ts +4 -697
- package/src/render/time.ts +1 -4
- package/src/render/tree.ts +3 -2
- package/src/schema.ts +52 -4
- package/src/schemas/diagram.schema.json +145 -22
- package/src/schemas/validate-diagram.js +1 -1
- package/src/timeline.ts +14 -0
- package/src/view.ts +1 -1
- package/src/words.ts +15 -2
package/src/render/time.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { TimeBox, TimeLayout } from "../layout/time";
|
|
12
12
|
import { hasWide } from "../layout/measure";
|
|
13
|
-
import { EASE, LOOK, MOTION,
|
|
13
|
+
import { EASE, LOOK, MOTION, TYPE } from "../look/values";
|
|
14
14
|
import type { Diagram } from "../schema";
|
|
15
15
|
import type { Span, Timeline } from "../timeline";
|
|
16
16
|
import { ALWAYS, type Shown } from "./ink";
|
|
@@ -21,9 +21,6 @@ const r1 = (v: number): number => Math.round(v * 100) / 100;
|
|
|
21
21
|
/** 和文を含む字に、同じ大きさと太さの和文の字の class を足す */
|
|
22
22
|
const ja = (cls: string, text: string): string => (hasWide(text) ? `${cls} ${cls}j` : cls);
|
|
23
23
|
|
|
24
|
-
/** 和文を含む字の、和文の字で描く時の字の形 */
|
|
25
|
-
export const sansOf = (t: TextStyle): TextStyle => ({ ...t, family: "sans" });
|
|
26
|
-
|
|
27
24
|
/** 真っ直ぐ進む動きの並びから、向きの変わらない間の点を除く。keyframes の数を減らすため */
|
|
28
25
|
export function simplify(keys: [number, number][]): [number, number][] {
|
|
29
26
|
const out: [number, number][] = [];
|
package/src/render/tree.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* 木の線を走る運ぶ物は着いた所で消え、通った木の線を運ぶ物の色で最後まで残す (`data-tree-trail`)。
|
|
7
7
|
* 木の線を運ぶ物が初めて通った段から後は、それまでに運ぶ物を送るか受けた木の箱だけを濃く出し、ほかの木の箱と札と木の線を薄く出す。
|
|
8
8
|
* 線の両端になった木の箱は、その段の間だけ縁に色を付ける。
|
|
9
|
+
* 木の箱が現れる時刻 (`appear`) を返し、木の線を走らない線の点線はその時刻から出す (#3240)。
|
|
9
10
|
*/
|
|
10
11
|
import type { TreeLayout } from "../layout/tree";
|
|
11
12
|
import { EASE, LOOK, MOTION, TYPE } from "../look/values";
|
|
@@ -17,7 +18,7 @@ import { activeKf, arrowHead, type Ctx, cs, esc, glyph, pathOf, write } from "./
|
|
|
17
18
|
|
|
18
19
|
const r1 = (v: number): number => Math.round(v * 100) / 100;
|
|
19
20
|
|
|
20
|
-
export function drawTree(layout: TreeLayout, diagram: Diagram, timeline: Timeline, ctx: Ctx): { links: string; trails: string; nodes: string } {
|
|
21
|
+
export function drawTree(layout: TreeLayout, diagram: Diagram, timeline: Timeline, ctx: Ctx): { links: string; trails: string; nodes: string; appear: Map<string, number> } {
|
|
21
22
|
const { m } = ctx;
|
|
22
23
|
const T = LOOK.tree;
|
|
23
24
|
const B = LOOK.box;
|
|
@@ -160,5 +161,5 @@ export function drawTree(layout: TreeLayout, diagram: Diagram, timeline: Timelin
|
|
|
160
161
|
})
|
|
161
162
|
.join("");
|
|
162
163
|
|
|
163
|
-
return { links: links + ties, trails, nodes: cards + nodes };
|
|
164
|
+
return { links: links + ties, trails, nodes: cards + nodes, appear: drawnAt };
|
|
164
165
|
}
|
package/src/schema.ts
CHANGED
|
@@ -55,7 +55,10 @@ export type DiagramEvent =
|
|
|
55
55
|
| TimeMarkEvent
|
|
56
56
|
| TimeSpanEvent
|
|
57
57
|
| TreeLeaf
|
|
58
|
-
| TreeNode
|
|
58
|
+
| TreeNode
|
|
59
|
+
| LineupOrder
|
|
60
|
+
| { type: "seal" | "open" | "pick"; box: string }
|
|
61
|
+
| LineupStamp;
|
|
59
62
|
|
|
60
63
|
/** 時間軸の図 (#3165) の、印の列 `row` の `from` から `to` の目盛りの印の色を変える出来事 */
|
|
61
64
|
export interface TimeMarkEvent {
|
|
@@ -152,6 +155,27 @@ export interface TreeNode {
|
|
|
152
155
|
hash?: string;
|
|
153
156
|
}
|
|
154
157
|
|
|
158
|
+
/** 列の図 (#3239) の、列 `box` の並びを `items` に書き換える出来事。前の段との差分を描く部品が滑る動きに変える */
|
|
159
|
+
export interface LineupOrder {
|
|
160
|
+
type: "line";
|
|
161
|
+
box: string;
|
|
162
|
+
items: string[];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** 列の図の、列 `box` の右に `text` の札を押す出来事 */
|
|
166
|
+
export interface LineupStamp {
|
|
167
|
+
type: "stamp";
|
|
168
|
+
box: string;
|
|
169
|
+
text: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** 列の図のチップ。`color` を書かないチップは薄い色で、`label` を書かないチップは色だけで出す */
|
|
173
|
+
export interface LineupItem {
|
|
174
|
+
id: string;
|
|
175
|
+
color?: Color;
|
|
176
|
+
label?: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
155
179
|
/** 枝分かれの図の枝。上から宣言した順に帯を並べる */
|
|
156
180
|
export interface GitBranch {
|
|
157
181
|
id: string;
|
|
@@ -182,7 +206,7 @@ export interface Step {
|
|
|
182
206
|
|
|
183
207
|
export interface Diagram {
|
|
184
208
|
version: number;
|
|
185
|
-
kind: "sequence" | "architecture" | "state" | "git" | "time" | "tree";
|
|
209
|
+
kind: "sequence" | "architecture" | "state" | "git" | "time" | "tree" | "lineup";
|
|
186
210
|
title: string;
|
|
187
211
|
view?: ViewMode;
|
|
188
212
|
regions?: Region[];
|
|
@@ -193,6 +217,7 @@ export interface Diagram {
|
|
|
193
217
|
state?: { paths: StatePath[] };
|
|
194
218
|
git?: { branches: GitBranch[] };
|
|
195
219
|
time?: TimeSpec;
|
|
220
|
+
lineup?: { items: LineupItem[] };
|
|
196
221
|
}
|
|
197
222
|
|
|
198
223
|
export interface FieldError {
|
|
@@ -209,7 +234,7 @@ export interface CheckOptions {
|
|
|
209
234
|
}
|
|
210
235
|
|
|
211
236
|
/** 段の中で起きることの種類。schema の event の `discriminator` が見る `type` の値 */
|
|
212
|
-
const EVENT_TYPES = ["edge", "action", "swap", "strip", "commit", "branch", "now", "mark", "span", "leaf", "node"] as const satisfies readonly DiagramEvent["type"][];
|
|
237
|
+
const EVENT_TYPES = ["edge", "action", "swap", "strip", "commit", "branch", "now", "mark", "span", "leaf", "node", "line", "seal", "open", "pick", "stamp"] as const satisfies readonly DiagramEvent["type"][];
|
|
213
238
|
|
|
214
239
|
/**
|
|
215
240
|
* その種類の図に書けない根の欄を書いた時の決まりの場所 (#3164)。根の欄に `not: {}` を置く決まり (`absent`) を指し、
|
|
@@ -220,7 +245,16 @@ const ABSENT = "#/definitions/absent/not";
|
|
|
220
245
|
* 種類の欄でない欄を書ける図の種類。区画は枝分かれの図と時間軸の図に書けない。
|
|
221
246
|
* 線の列 (`at` と `into`)、節目の丸の色 (`color`)、物差し (`meters`) は時間軸の図だけが書ける (#3165)
|
|
222
247
|
*/
|
|
223
|
-
const ABSENT_KINDS: Record<string, string> = {
|
|
248
|
+
const ABSENT_KINDS: Record<string, string> = {
|
|
249
|
+
regions: "sequence / architecture / state",
|
|
250
|
+
at: "time",
|
|
251
|
+
into: "time",
|
|
252
|
+
color: "time",
|
|
253
|
+
meters: "time",
|
|
254
|
+
region: "sequence / architecture / state",
|
|
255
|
+
icon: "sequence / architecture / state / git / time / tree",
|
|
256
|
+
link: "sequence / architecture / state / git / time / tree",
|
|
257
|
+
};
|
|
224
258
|
/** 運ぶ物の書けない組み合わせ (`not: { required: [欄] }`)。誤りの場所の最後の欄で引く */
|
|
225
259
|
const NOT_ALLOWED: Record<string, Allowed> = {
|
|
226
260
|
carry: { field: "text", kind: "tag" },
|
|
@@ -240,6 +274,14 @@ const TIME_EVENTS = ["now", "mark", "span"] as const satisfies readonly DiagramE
|
|
|
240
274
|
const TREE_EVENT = /\/events\/items\/allOf\/0\/not$/u;
|
|
241
275
|
/** 木の図だけが書ける出来事 */
|
|
242
276
|
const TREE_EVENTS = ["leaf", "node"] as const satisfies readonly DiagramEvent["type"][];
|
|
277
|
+
/** 列の図でない図に、列の図だけの出来事を書いた時の決まりの場所 (#3239) */
|
|
278
|
+
const LINEUP_EVENT = "#/definitions/notLineupEvent/not";
|
|
279
|
+
/** 列の図だけが書ける出来事 */
|
|
280
|
+
const LINEUP_EVENTS = ["line", "seal", "open", "pick", "stamp"] as const satisfies readonly DiagramEvent["type"][];
|
|
281
|
+
/** 列の図に、線と処理の出来事を書いた時の決まりの場所 (#3239) */
|
|
282
|
+
const WIRED_EVENT = "#/definitions/notWiredEvent/not";
|
|
283
|
+
/** 列の図が書けない、箱と線の図の出来事 */
|
|
284
|
+
const WIRED_EVENTS = ["edge", "action"] as const satisfies readonly DiagramEvent["type"][];
|
|
243
285
|
/** 時間軸の図の目盛りの長さの決まり (`^[0-9]+(\.[0-9]+)?(<単位>|<単位>)$`)。書ける単位を読む */
|
|
244
286
|
const DURATION = /^\^\[0-9\]\+\(\\\.\[0-9\]\+\)\?\(([a-z|]+)\)\$$/u;
|
|
245
287
|
/** 割合の決まり。百分率の `%` を持つ */
|
|
@@ -287,6 +329,8 @@ function toFieldError(error: ErrorObject, errors: readonly ErrorObject[], m: Fie
|
|
|
287
329
|
if (GIT_EVENT.test(error.schemaPath)) return { pointer: at, message: m.kindOnly(GIT_EVENTS, "git") };
|
|
288
330
|
if (TIME_EVENT.test(error.schemaPath)) return { pointer: `${at}/type`, message: m.kindOnly(TIME_EVENTS, "time") };
|
|
289
331
|
if (TREE_EVENT.test(error.schemaPath)) return { pointer: `${at}/type`, message: m.kindOnly(TREE_EVENTS, "tree") };
|
|
332
|
+
if (error.schemaPath === LINEUP_EVENT) return { pointer: `${at}/type`, message: m.kindOnly(LINEUP_EVENTS, "lineup") };
|
|
333
|
+
if (error.schemaPath === WIRED_EVENT) return { pointer: `${at}/type`, message: m.kindOnly(WIRED_EVENTS, "sequence / architecture / state / git / time / tree") };
|
|
290
334
|
const last = at.slice(at.lastIndexOf("/") + 1);
|
|
291
335
|
if (error.schemaPath === ABSENT) return { pointer: at, message: m.not({ field: last, kind: ABSENT_KINDS[last] ?? last }) };
|
|
292
336
|
const allowed = NOT_ALLOWED[last];
|
|
@@ -307,6 +351,8 @@ function toFieldError(error: ErrorObject, errors: readonly ErrorObject[], m: Fie
|
|
|
307
351
|
return { pointer: at, message: m.type(String(params.type)) };
|
|
308
352
|
case "minLength":
|
|
309
353
|
return { pointer: at, message: m.minLength(Number(params.limit)) };
|
|
354
|
+
case "maxLength":
|
|
355
|
+
return { pointer: at, message: m.maxLength(Number(params.limit)) };
|
|
310
356
|
case "pattern": {
|
|
311
357
|
if (error.schemaPath === URL_RULE) return { pointer: at, message: m.url };
|
|
312
358
|
const pattern = String(params.pattern);
|
|
@@ -319,6 +365,8 @@ function toFieldError(error: ErrorObject, errors: readonly ErrorObject[], m: Fie
|
|
|
319
365
|
}
|
|
320
366
|
case "minItems":
|
|
321
367
|
return { pointer: at, message: m.minItems(Number(params.limit)) };
|
|
368
|
+
case "maxItems":
|
|
369
|
+
return { pointer: at, message: m.maxItems(Number(params.limit)) };
|
|
322
370
|
case "minimum":
|
|
323
371
|
return { pointer: at, message: m.minimum(Number(params.limit)) };
|
|
324
372
|
case "const":
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "dragon の図の原本",
|
|
3
|
-
"description": "区画、箱、線、運ぶ物、段、中身の帯の 6
|
|
3
|
+
"description": "区画、箱、線、運ぶ物、段、中身の帯の 6 部品を共通の骨組みに置き、図の種類だけの物は種類の欄に置く。座標は持たない。箱は枝分かれの図と時間軸の図と木の図だけが持たなくてよい。列の図の箱は列になる。",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
6
|
"required": ["version", "kind", "title", "boxes", "steps"],
|
|
7
7
|
"properties": {
|
|
8
8
|
"version": { "description": "形式の版", "type": "integer", "minimum": 1 },
|
|
9
|
-
"kind": { "description": "図の種類", "enum": ["sequence", "architecture", "state", "git", "time", "tree"] },
|
|
9
|
+
"kind": { "description": "図の種類", "enum": ["sequence", "architecture", "state", "git", "time", "tree", "lineup"] },
|
|
10
10
|
"title": { "$ref": "#/definitions/text" },
|
|
11
11
|
"view": { "description": "見せ方。書かなければ字の大きさで選ぶ。fixed は全体を止めて中だけ動かし、follow は寄って動かし全体図で今どこかを示す", "enum": ["fixed", "follow"] },
|
|
12
12
|
"regions": { "type": "array", "items": { "$ref": "#/definitions/region" } },
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"sequence": { "$ref": "#/definitions/sequence" },
|
|
17
17
|
"state": { "$ref": "#/definitions/state" },
|
|
18
18
|
"git": { "$ref": "#/definitions/git" },
|
|
19
|
-
"time": { "$ref": "#/definitions/time" }
|
|
19
|
+
"time": { "$ref": "#/definitions/time" },
|
|
20
|
+
"lineup": { "$ref": "#/definitions/lineup" }
|
|
20
21
|
},
|
|
21
22
|
"if": { "required": ["kind"], "properties": { "kind": { "const": "sequence" } } },
|
|
22
23
|
"then": {
|
|
@@ -27,7 +28,8 @@
|
|
|
27
28
|
"strip": { "$ref": "#/definitions/plainStrip" },
|
|
28
29
|
"state": { "$ref": "#/definitions/absent" },
|
|
29
30
|
"git": { "$ref": "#/definitions/absent" },
|
|
30
|
-
"time": { "$ref": "#/definitions/absent" }
|
|
31
|
+
"time": { "$ref": "#/definitions/absent" },
|
|
32
|
+
"lineup": { "$ref": "#/definitions/absent" }
|
|
31
33
|
}
|
|
32
34
|
},
|
|
33
35
|
"else": {
|
|
@@ -39,7 +41,8 @@
|
|
|
39
41
|
"steps": { "$ref": "#/definitions/plainSteps" },
|
|
40
42
|
"strip": { "$ref": "#/definitions/plainStrip" },
|
|
41
43
|
"git": { "$ref": "#/definitions/absent" },
|
|
42
|
-
"time": { "$ref": "#/definitions/absent" }
|
|
44
|
+
"time": { "$ref": "#/definitions/absent" },
|
|
45
|
+
"lineup": { "$ref": "#/definitions/absent" }
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
"else": {
|
|
@@ -51,7 +54,8 @@
|
|
|
51
54
|
"strip": { "$ref": "#/definitions/plainStrip" },
|
|
52
55
|
"state": { "$ref": "#/definitions/absent" },
|
|
53
56
|
"regions": { "$ref": "#/definitions/absent" },
|
|
54
|
-
"time": { "$ref": "#/definitions/absent" }
|
|
57
|
+
"time": { "$ref": "#/definitions/absent" },
|
|
58
|
+
"lineup": { "$ref": "#/definitions/absent" }
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
"else": {
|
|
@@ -62,7 +66,8 @@
|
|
|
62
66
|
"steps": { "$ref": "#/definitions/timeSteps" },
|
|
63
67
|
"state": { "$ref": "#/definitions/absent" },
|
|
64
68
|
"git": { "$ref": "#/definitions/absent" },
|
|
65
|
-
"regions": { "$ref": "#/definitions/absent" }
|
|
69
|
+
"regions": { "$ref": "#/definitions/absent" },
|
|
70
|
+
"lineup": { "$ref": "#/definitions/absent" }
|
|
66
71
|
}
|
|
67
72
|
},
|
|
68
73
|
"else": {
|
|
@@ -74,17 +79,37 @@
|
|
|
74
79
|
"state": { "$ref": "#/definitions/absent" },
|
|
75
80
|
"git": { "$ref": "#/definitions/absent" },
|
|
76
81
|
"time": { "$ref": "#/definitions/absent" },
|
|
77
|
-
"regions": { "$ref": "#/definitions/absent" }
|
|
82
|
+
"regions": { "$ref": "#/definitions/absent" },
|
|
83
|
+
"lineup": { "$ref": "#/definitions/absent" }
|
|
78
84
|
}
|
|
79
85
|
},
|
|
80
86
|
"else": {
|
|
81
|
-
"properties": {
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
"if": { "required": ["kind"], "properties": { "kind": { "const": "lineup" } } },
|
|
88
|
+
"then": {
|
|
89
|
+
"required": ["lineup"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"boxes": {
|
|
92
|
+
"minItems": 1,
|
|
93
|
+
"items": { "properties": { "icon": { "$ref": "#/definitions/absent" }, "link": { "$ref": "#/definitions/absent" }, "region": { "$ref": "#/definitions/absent" } } }
|
|
94
|
+
},
|
|
95
|
+
"steps": { "$ref": "#/definitions/lineupSteps" },
|
|
96
|
+
"strip": { "$ref": "#/definitions/plainStrip" },
|
|
97
|
+
"state": { "$ref": "#/definitions/absent" },
|
|
98
|
+
"git": { "$ref": "#/definitions/absent" },
|
|
99
|
+
"time": { "$ref": "#/definitions/absent" },
|
|
100
|
+
"regions": { "$ref": "#/definitions/absent" }
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"else": {
|
|
104
|
+
"properties": {
|
|
105
|
+
"boxes": { "minItems": 1 },
|
|
106
|
+
"steps": { "$ref": "#/definitions/plainSteps" },
|
|
107
|
+
"strip": { "$ref": "#/definitions/plainStrip" },
|
|
108
|
+
"state": { "$ref": "#/definitions/absent" },
|
|
109
|
+
"git": { "$ref": "#/definitions/absent" },
|
|
110
|
+
"time": { "$ref": "#/definitions/absent" },
|
|
111
|
+
"lineup": { "$ref": "#/definitions/absent" }
|
|
112
|
+
}
|
|
88
113
|
}
|
|
89
114
|
}
|
|
90
115
|
}
|
|
@@ -95,13 +120,13 @@
|
|
|
95
120
|
"text": { "type": "string", "minLength": 1 },
|
|
96
121
|
"absent": { "description": "この図の種類では書けない欄", "not": {} },
|
|
97
122
|
"plainSteps": {
|
|
98
|
-
"description": "
|
|
123
|
+
"description": "枝分かれの図でも時間軸の図でも木の図でも列の図でもない図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp) を書けない",
|
|
99
124
|
"items": {
|
|
100
125
|
"properties": {
|
|
101
126
|
"events": {
|
|
102
127
|
"items": {
|
|
103
128
|
"not": { "$ref": "#/definitions/timeEvent" },
|
|
104
|
-
"allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }],
|
|
129
|
+
"allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }],
|
|
105
130
|
"properties": {
|
|
106
131
|
"type": { "not": { "enum": ["commit", "branch"] } },
|
|
107
132
|
"at": { "$ref": "#/definitions/absent" },
|
|
@@ -114,13 +139,13 @@
|
|
|
114
139
|
}
|
|
115
140
|
},
|
|
116
141
|
"gitSteps": {
|
|
117
|
-
"description": "枝分かれの図の段。時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) を書けない",
|
|
142
|
+
"description": "枝分かれの図の段。時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp) を書けない",
|
|
118
143
|
"items": {
|
|
119
144
|
"properties": {
|
|
120
145
|
"events": {
|
|
121
146
|
"items": {
|
|
122
147
|
"not": { "$ref": "#/definitions/timeEvent" },
|
|
123
|
-
"allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }],
|
|
148
|
+
"allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }],
|
|
124
149
|
"properties": { "at": { "$ref": "#/definitions/absent" }, "into": { "$ref": "#/definitions/absent" }, "color": { "$ref": "#/definitions/absent" } }
|
|
125
150
|
}
|
|
126
151
|
}
|
|
@@ -128,20 +153,21 @@
|
|
|
128
153
|
}
|
|
129
154
|
},
|
|
130
155
|
"timeSteps": {
|
|
131
|
-
"description": "時間軸の図の段。枝分かれの図だけの出来事 (commit と branch) と、木の図だけの出来事 (leaf と node) を書けない",
|
|
156
|
+
"description": "時間軸の図の段。枝分かれの図だけの出来事 (commit と branch) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp) を書けない",
|
|
132
157
|
"items": {
|
|
133
158
|
"properties": {
|
|
134
|
-
"events": { "items": { "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } } } } }
|
|
159
|
+
"events": { "items": { "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } } } } }
|
|
135
160
|
}
|
|
136
161
|
}
|
|
137
162
|
},
|
|
138
163
|
"treeSteps": {
|
|
139
|
-
"description": "木の図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) を書けない",
|
|
164
|
+
"description": "木の図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、列の図だけの出来事 (line と seal と open と pick と stamp) を書けない",
|
|
140
165
|
"items": {
|
|
141
166
|
"properties": {
|
|
142
167
|
"events": {
|
|
143
168
|
"items": {
|
|
144
169
|
"not": { "$ref": "#/definitions/timeEvent" },
|
|
170
|
+
"allOf": [{ "$ref": "#/definitions/notLineupEvent" }],
|
|
145
171
|
"properties": {
|
|
146
172
|
"type": { "not": { "enum": ["commit", "branch"] } },
|
|
147
173
|
"at": { "$ref": "#/definitions/absent" },
|
|
@@ -153,11 +179,36 @@
|
|
|
153
179
|
}
|
|
154
180
|
}
|
|
155
181
|
},
|
|
182
|
+
"lineupSteps": {
|
|
183
|
+
"description": "列の図の段。線と処理と、枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (color) と、木の図だけの出来事 (leaf と node) を書けない",
|
|
184
|
+
"items": {
|
|
185
|
+
"properties": {
|
|
186
|
+
"events": {
|
|
187
|
+
"items": {
|
|
188
|
+
"not": { "$ref": "#/definitions/timeEvent" },
|
|
189
|
+
"allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notWiredEvent" }],
|
|
190
|
+
"properties": {
|
|
191
|
+
"type": { "not": { "enum": ["commit", "branch"] } },
|
|
192
|
+
"color": { "$ref": "#/definitions/absent" }
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
156
199
|
"treeEvent": {
|
|
157
200
|
"description": "木の図だけが書ける出来事",
|
|
158
201
|
"required": ["type"],
|
|
159
202
|
"properties": { "type": { "enum": ["leaf", "node"] } }
|
|
160
203
|
},
|
|
204
|
+
"notLineupEvent": {
|
|
205
|
+
"description": "列の図だけが書ける出来事を書けない",
|
|
206
|
+
"not": { "required": ["type"], "properties": { "type": { "enum": ["line", "seal", "open", "pick", "stamp"] } } }
|
|
207
|
+
},
|
|
208
|
+
"notWiredEvent": {
|
|
209
|
+
"description": "箱と線の図の出来事を書けない",
|
|
210
|
+
"not": { "required": ["type"], "properties": { "type": { "enum": ["edge", "action"] } } }
|
|
211
|
+
},
|
|
161
212
|
"timeEvent": {
|
|
162
213
|
"description": "時間軸の図だけが書ける出来事",
|
|
163
214
|
"required": ["type"],
|
|
@@ -369,6 +420,58 @@
|
|
|
369
420
|
"hash": { "$ref": "#/definitions/hash" }
|
|
370
421
|
}
|
|
371
422
|
},
|
|
423
|
+
{
|
|
424
|
+
"description": "列の box の並びを items に書き換える。列の図だけが書ける。チップは前に居た列から滑り、どの列にも居なかったチップは弾んで現れ、列から外れたチップは消える",
|
|
425
|
+
"type": "object",
|
|
426
|
+
"additionalProperties": false,
|
|
427
|
+
"required": ["type", "box", "items"],
|
|
428
|
+
"properties": {
|
|
429
|
+
"type": { "const": "line" },
|
|
430
|
+
"box": { "$ref": "#/definitions/id" },
|
|
431
|
+
"items": { "type": "array", "minItems": 1, "maxItems": 12, "items": { "$ref": "#/definitions/id" } }
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"description": "列 box に封をして、チップを隠す。列の図だけが書ける",
|
|
436
|
+
"type": "object",
|
|
437
|
+
"additionalProperties": false,
|
|
438
|
+
"required": ["type", "box"],
|
|
439
|
+
"properties": {
|
|
440
|
+
"type": { "const": "seal" },
|
|
441
|
+
"box": { "$ref": "#/definitions/id" }
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"description": "列 box の封を開ける。列の図だけが書ける",
|
|
446
|
+
"type": "object",
|
|
447
|
+
"additionalProperties": false,
|
|
448
|
+
"required": ["type", "box"],
|
|
449
|
+
"properties": {
|
|
450
|
+
"type": { "const": "open" },
|
|
451
|
+
"box": { "$ref": "#/definitions/id" }
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"description": "列 box を選ぶ。列の図だけが書ける。列の縁に色が付き、ほかの列が薄くなる",
|
|
456
|
+
"type": "object",
|
|
457
|
+
"additionalProperties": false,
|
|
458
|
+
"required": ["type", "box"],
|
|
459
|
+
"properties": {
|
|
460
|
+
"type": { "const": "pick" },
|
|
461
|
+
"box": { "$ref": "#/definitions/id" }
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"description": "列 box の右に text の札を押す。列の図だけが書ける",
|
|
466
|
+
"type": "object",
|
|
467
|
+
"additionalProperties": false,
|
|
468
|
+
"required": ["type", "box", "text"],
|
|
469
|
+
"properties": {
|
|
470
|
+
"type": { "const": "stamp" },
|
|
471
|
+
"box": { "$ref": "#/definitions/id" },
|
|
472
|
+
"text": { "$ref": "#/definitions/text" }
|
|
473
|
+
}
|
|
474
|
+
},
|
|
372
475
|
{
|
|
373
476
|
"description": "中身の帯の欄の値と札",
|
|
374
477
|
"type": "object",
|
|
@@ -435,6 +538,26 @@
|
|
|
435
538
|
}
|
|
436
539
|
},
|
|
437
540
|
"hash": { "description": "commit と木の箱の hash。16 進の字で 4 から 40 字", "type": "string", "pattern": "^[0-9a-f]{4,40}$" },
|
|
541
|
+
"lineup": {
|
|
542
|
+
"description": "列の図の種類の欄。列に並べるチップ",
|
|
543
|
+
"type": "object",
|
|
544
|
+
"additionalProperties": false,
|
|
545
|
+
"required": ["items"],
|
|
546
|
+
"properties": {
|
|
547
|
+
"items": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/item" } }
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"item": {
|
|
551
|
+
"description": "チップ。color を書かないチップは薄い色で、label を書かないチップは色だけで出す",
|
|
552
|
+
"type": "object",
|
|
553
|
+
"additionalProperties": false,
|
|
554
|
+
"required": ["id"],
|
|
555
|
+
"properties": {
|
|
556
|
+
"id": { "$ref": "#/definitions/id" },
|
|
557
|
+
"color": { "$ref": "#/definitions/color" },
|
|
558
|
+
"label": { "description": "チップに載せる字", "type": "string", "minLength": 1, "maxLength": 4 }
|
|
559
|
+
}
|
|
560
|
+
},
|
|
438
561
|
"time": {
|
|
439
562
|
"description": "時間軸の図の種類の欄。目盛り、区切り、印の列、節目、拡大の範囲",
|
|
440
563
|
"type": "object",
|