@cardenelabs/dragon 0.42.1 → 0.43.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"] },
9
+ "kind": { "description": "図の種類", "enum": ["sequence", "architecture", "state", "git", "time", "tree"] },
10
10
  "title": { "$ref": "#/definitions/text" },
11
11
  "view": { "description": "見せ方。書かなければ字の大きさで選ぶ。fixed は全体を止めて中だけ動かし、follow は寄って動かし全体図で今どこかを示す", "enum": ["fixed", "follow"] },
12
12
  "regions": { "type": "array", "items": { "$ref": "#/definitions/region" } },
@@ -66,13 +66,26 @@
66
66
  }
67
67
  },
68
68
  "else": {
69
- "properties": {
70
- "boxes": { "minItems": 1 },
71
- "steps": { "$ref": "#/definitions/plainSteps" },
72
- "strip": { "$ref": "#/definitions/plainStrip" },
73
- "state": { "$ref": "#/definitions/absent" },
74
- "git": { "$ref": "#/definitions/absent" },
75
- "time": { "$ref": "#/definitions/absent" }
69
+ "if": { "required": ["kind"], "properties": { "kind": { "const": "tree" } } },
70
+ "then": {
71
+ "properties": {
72
+ "steps": { "$ref": "#/definitions/treeSteps" },
73
+ "strip": { "$ref": "#/definitions/plainStrip" },
74
+ "state": { "$ref": "#/definitions/absent" },
75
+ "git": { "$ref": "#/definitions/absent" },
76
+ "time": { "$ref": "#/definitions/absent" },
77
+ "regions": { "$ref": "#/definitions/absent" }
78
+ }
79
+ },
80
+ "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" }
88
+ }
76
89
  }
77
90
  }
78
91
  }
@@ -82,12 +95,13 @@
82
95
  "text": { "type": "string", "minLength": 1 },
83
96
  "absent": { "description": "この図の種類では書けない欄", "not": {} },
84
97
  "plainSteps": {
85
- "description": "枝分かれの図でも時間軸の図でもない図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) を書けない",
98
+ "description": "枝分かれの図でも時間軸の図でも木の図でもない図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) を書けない",
86
99
  "items": {
87
100
  "properties": {
88
101
  "events": {
89
102
  "items": {
90
103
  "not": { "$ref": "#/definitions/timeEvent" },
104
+ "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }],
91
105
  "properties": {
92
106
  "type": { "not": { "enum": ["commit", "branch"] } },
93
107
  "at": { "$ref": "#/definitions/absent" },
@@ -100,12 +114,13 @@
100
114
  }
101
115
  },
102
116
  "gitSteps": {
103
- "description": "枝分かれの図の段。時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) を書けない",
117
+ "description": "枝分かれの図の段。時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) を書けない",
104
118
  "items": {
105
119
  "properties": {
106
120
  "events": {
107
121
  "items": {
108
122
  "not": { "$ref": "#/definitions/timeEvent" },
123
+ "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }],
109
124
  "properties": { "at": { "$ref": "#/definitions/absent" }, "into": { "$ref": "#/definitions/absent" }, "color": { "$ref": "#/definitions/absent" } }
110
125
  }
111
126
  }
@@ -113,8 +128,35 @@
113
128
  }
114
129
  },
115
130
  "timeSteps": {
116
- "description": "時間軸の図の段。枝分かれの図だけの出来事 (commit と branch) を書けない",
117
- "items": { "properties": { "events": { "items": { "properties": { "type": { "not": { "enum": ["commit", "branch"] } } } } } } }
131
+ "description": "時間軸の図の段。枝分かれの図だけの出来事 (commit と branch) と、木の図だけの出来事 (leaf と node) を書けない",
132
+ "items": {
133
+ "properties": {
134
+ "events": { "items": { "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } } } } }
135
+ }
136
+ }
137
+ },
138
+ "treeSteps": {
139
+ "description": "木の図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) を書けない",
140
+ "items": {
141
+ "properties": {
142
+ "events": {
143
+ "items": {
144
+ "not": { "$ref": "#/definitions/timeEvent" },
145
+ "properties": {
146
+ "type": { "not": { "enum": ["commit", "branch"] } },
147
+ "at": { "$ref": "#/definitions/absent" },
148
+ "into": { "$ref": "#/definitions/absent" },
149
+ "color": { "$ref": "#/definitions/absent" }
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ },
156
+ "treeEvent": {
157
+ "description": "木の図だけが書ける出来事",
158
+ "required": ["type"],
159
+ "properties": { "type": { "enum": ["leaf", "node"] } }
118
160
  },
119
161
  "timeEvent": {
120
162
  "description": "時間軸の図だけが書ける出来事",
@@ -304,6 +346,29 @@
304
346
  "color": { "$ref": "#/definitions/color" }
305
347
  }
306
348
  },
349
+ {
350
+ "description": "葉を出す。木の図だけが書ける。書いた段で葉の箱が現れる。hash を書くと箱に値を出し、名札を葉の下の札に出す",
351
+ "type": "object",
352
+ "additionalProperties": false,
353
+ "required": ["type", "id"],
354
+ "properties": {
355
+ "type": { "const": "leaf" },
356
+ "id": { "$ref": "#/definitions/id" },
357
+ "hash": { "$ref": "#/definitions/hash" }
358
+ }
359
+ },
360
+ {
361
+ "description": "1 つ以上の子から親を組む。木の図だけが書ける。書いた段で親の箱と、子から親への木の線が現れる",
362
+ "type": "object",
363
+ "additionalProperties": false,
364
+ "required": ["type", "id", "children"],
365
+ "properties": {
366
+ "type": { "const": "node" },
367
+ "id": { "$ref": "#/definitions/id" },
368
+ "children": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/id" } },
369
+ "hash": { "$ref": "#/definitions/hash" }
370
+ }
371
+ },
307
372
  {
308
373
  "description": "中身の帯の欄の値と札",
309
374
  "type": "object",
@@ -369,7 +434,7 @@
369
434
  "note": { "$ref": "#/definitions/text" }
370
435
  }
371
436
  },
372
- "hash": { "description": "commit の hash。16 進の字で 4 から 40 字", "type": "string", "pattern": "^[0-9a-f]{4,40}$" },
437
+ "hash": { "description": "commit と木の箱の hash。16 進の字で 4 から 40 字", "type": "string", "pattern": "^[0-9a-f]{4,40}$" },
373
438
  "time": {
374
439
  "description": "時間軸の図の種類の欄。目盛り、区切り、印の列、節目、拡大の範囲",
375
440
  "type": "object",