@cardenelabs/dragon 0.43.0 → 0.44.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.
@@ -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
- "boxes": { "minItems": 1 },
83
- "steps": { "$ref": "#/definitions/plainSteps" },
84
- "strip": { "$ref": "#/definitions/plainStrip" },
85
- "state": { "$ref": "#/definitions/absent" },
86
- "git": { "$ref": "#/definitions/absent" },
87
- "time": { "$ref": "#/definitions/absent" }
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": "枝分かれの図でも時間軸の図でも木の図でもない図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) を書けない",
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",