@markdstage/markdstage 0.1.1
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 +90 -0
- package/bin/markdstage.mjs +12 -0
- package/package.json +45 -0
- package/shared/README.md +1014 -0
- package/shared/THIRD-PARTY-NOTICES.md +19 -0
- package/shared/deck-state.mjs +105 -0
- package/shared/docs/custom-theme-authoring.md +208 -0
- package/shared/markdown-deck.mjs +220 -0
- package/shared/markdstage-guide.mjs +276 -0
- package/shared/presenter-window.mjs +17 -0
- package/shared/renderer/architecture-document.mjs +596 -0
- package/shared/renderer/architecture-edit.mjs +298 -0
- package/shared/renderer/architecture-editor.mjs +449 -0
- package/shared/renderer/architecture.mjs +4033 -0
- package/shared/renderer/import-path.mjs +11 -0
- package/shared/renderer/index.html +106 -0
- package/shared/renderer/renderer.js +2082 -0
- package/shared/renderer/slides.css +614 -0
- package/shared/renderer/speaker-notes.mjs +106 -0
- package/shared/renderer/theme.mjs +205 -0
- package/shared/runtime/browser.mjs +539 -0
- package/shared/runtime/custom-theme.mjs +135 -0
- package/shared/runtime/deck-session.mjs +188 -0
- package/shared/runtime/errors.mjs +17 -0
- package/shared/runtime/output-paths.mjs +159 -0
- package/shared/runtime/output.mjs +385 -0
- package/shared/runtime/presentation-server.mjs +505 -0
- package/shared/runtime/static-files.mjs +70 -0
- package/shared/schema/README.md +228 -0
- package/shared/schema/architecture-v1.schema.json +664 -0
- package/shared/schema/examples/web-app.architecture.json +119 -0
- package/shared/schema/theme-metadata-v1.schema.json +75 -0
- package/shared/schema/theme-v1.json +84 -0
- package/shared/scripts/architecture-assets.mjs +226 -0
- package/shared/scripts/asset-paths.mjs +92 -0
- package/shared/scripts/atomic-markdown-replace.mjs +46 -0
- package/shared/scripts/markdown-blocks.mjs +182 -0
- package/shared/scripts/markdown-files.mjs +63 -0
- package/shared/scripts/markdown-save-coordinator.mjs +18 -0
- package/shared/scripts/markdown-watcher.mjs +80 -0
- package/shared/scripts/theme-paths.mjs +108 -0
- package/shared/scripts/vendor-assets.mjs +132 -0
- package/shared/scripts/workspace-root.mjs +32 -0
- package/shared/vendor/highlight.LICENSE +29 -0
- package/shared/vendor/highlight.min.js +1244 -0
- package/shared/vendor/marked.min.js +6 -0
- package/shared/vendor/mermaid.min.js.part-0001 +268 -0
- package/shared/vendor/mermaid.min.js.part-0002 +304 -0
- package/shared/vendor/mermaid.min.js.part-0003 +324 -0
- package/shared/vendor/mermaid.min.js.part-0004 +374 -0
- package/shared/vendor/mermaid.min.js.part-0005 +564 -0
- package/shared/vendor/mermaid.min.js.part-0006 +1308 -0
- package/shared/vendor/mermaid.min.js.part-0007 +269 -0
- package/shared/vendor/purify.min.js +3 -0
- package/shared/vendor/vendor-assets.lock.json +60 -0
- package/src/cli.mjs +347 -0
- package/src/commands/capture.mjs +23 -0
- package/src/commands/export.mjs +18 -0
- package/src/commands/guide.mjs +23 -0
- package/src/commands/inspect.mjs +35 -0
- package/src/commands/present.mjs +91 -0
- package/src/commands/skill.mjs +114 -0
- package/src/commands/validate.mjs +79 -0
- package/src/deck.mjs +63 -0
- package/src/exit.mjs +58 -0
- package/src/runtime.mjs +77 -0
- package/src/skills.mjs +155 -0
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/runceel/markdstage/main/.github/extensions/markdstage/schema/architecture-v1.schema.json",
|
|
4
|
+
"title": "Architecture DSL v1",
|
|
5
|
+
"description": "Shape definition for the constrained JSON DSL (v1) accepted by ```architecture blocks in the MarkdStage canvas. This schema validates shape only; it is necessary but not sufficient. renderer/architecture.mjs parseArchitecture performs semantic validation such as referential integrity, unique IDs, flattened element-count limits, and layout compatibility. See README.md in this directory for details.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["elements"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Schema reference for editor completion and validation. Ignored at runtime."
|
|
13
|
+
},
|
|
14
|
+
"version": {
|
|
15
|
+
"const": 1,
|
|
16
|
+
"description": "DSL grammar version. v1 accepts only 1. An omitted value is also treated as 1."
|
|
17
|
+
},
|
|
18
|
+
"canvas": {
|
|
19
|
+
"$ref": "#/$defs/canvas",
|
|
20
|
+
"description": "Diagram logical coordinate-system size. Defaults to 1600x900."
|
|
21
|
+
},
|
|
22
|
+
"title": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"maxLength": 200,
|
|
25
|
+
"description": "Accessible name for the diagram. Defaults to \"Architecture diagram\"."
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"maxLength": 1000,
|
|
30
|
+
"description": "Supplementary diagram description used by screen readers."
|
|
31
|
+
},
|
|
32
|
+
"elements": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"maxItems": 200,
|
|
35
|
+
"description": "Top-level element array. A complete diagram may contain up to 200 elements and 100 connectors; parseArchitecture enforces these aggregate limits.",
|
|
36
|
+
"items": { "$ref": "#/$defs/elementFixedL0" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"$defs": {
|
|
40
|
+
"themeToken": {
|
|
41
|
+
"enum": [
|
|
42
|
+
"accent",
|
|
43
|
+
"accentStrong",
|
|
44
|
+
"accentSoft",
|
|
45
|
+
"accentLine",
|
|
46
|
+
"surface",
|
|
47
|
+
"fg",
|
|
48
|
+
"muted",
|
|
49
|
+
"body",
|
|
50
|
+
"border",
|
|
51
|
+
"bg"
|
|
52
|
+
],
|
|
53
|
+
"description": "Theme-aware color token. Preferred over literal colors so the diagram remains legible when the theme changes."
|
|
54
|
+
},
|
|
55
|
+
"literalColor": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^(?:#[0-9a-fA-F]{3,8}|[Bb][Ll][Aa][Cc][Kk]|[Ww][Hh][Ii][Tt][Ee]|[Tt][Rr][Aa][Nn][Ss][Pp][Aa][Rr][Ee][Nn][Tt]|[Nn][Oo][Nn][Ee])$",
|
|
58
|
+
"description": "Literal color. Only hexadecimal notation (#rgb through #rrggbbaa) and black / white / transparent / none are supported. rgb() and other named colors such as red are not supported."
|
|
59
|
+
},
|
|
60
|
+
"color": {
|
|
61
|
+
"anyOf": [
|
|
62
|
+
{ "$ref": "#/$defs/themeToken" },
|
|
63
|
+
{ "$ref": "#/$defs/literalColor" }
|
|
64
|
+
],
|
|
65
|
+
"description": "Theme token name or a restricted literal color. Arbitrary CSS colors are not accepted."
|
|
66
|
+
},
|
|
67
|
+
"iconName": {
|
|
68
|
+
"enum": [
|
|
69
|
+
"cloud",
|
|
70
|
+
"database",
|
|
71
|
+
"api",
|
|
72
|
+
"user",
|
|
73
|
+
"server",
|
|
74
|
+
"analytics",
|
|
75
|
+
"browser",
|
|
76
|
+
"mobile",
|
|
77
|
+
"network",
|
|
78
|
+
"queue",
|
|
79
|
+
"shield"
|
|
80
|
+
],
|
|
81
|
+
"description": "Built-in icon name. Icons render as 24x24 line art using the node textColor for the stroke, so their colors automatically adapt to all four themes."
|
|
82
|
+
},
|
|
83
|
+
"assetPath": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"maxLength": 200,
|
|
86
|
+
"pattern": "^assets/(?:[A-Za-z0-9][A-Za-z0-9_-]*(?:\\.[A-Za-z0-9_-]+)*/)*[A-Za-z0-9][A-Za-z0-9_-]*(?:\\.[A-Za-z0-9_-]+)*\\.(?:[Ss][Vv][Gg]|[Pp][Nn][Gg]|[Ww][Ee][Bb][Pp]|[Jj][Pp][Gg]|[Jj][Pp][Ee][Gg])$",
|
|
87
|
+
"description": "Image in the repository assets/ directory. Supported extensions are .svg / .png / .webp / .jpg / .jpeg, including uppercase variants. The syntax cannot represent paths containing '..', data: URIs, or external URLs."
|
|
88
|
+
},
|
|
89
|
+
"iconAsset": {
|
|
90
|
+
"$ref": "#/$defs/assetPath",
|
|
91
|
+
"description": "Image under assets/ used as a node icon. Raster images and SVG files loaded through <image> do not adapt to theme colors, so use artwork that remains legible against every theme background."
|
|
92
|
+
},
|
|
93
|
+
"icon": {
|
|
94
|
+
"anyOf": [
|
|
95
|
+
{ "$ref": "#/$defs/iconName" },
|
|
96
|
+
{ "$ref": "#/$defs/iconAsset" }
|
|
97
|
+
],
|
|
98
|
+
"description": "Built-in icon name or path to an icon under assets/."
|
|
99
|
+
},
|
|
100
|
+
"identifier": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,63}$",
|
|
103
|
+
"description": "Identifier of 1–64 characters that starts with an ASCII letter and contains only ASCII letters, digits, '.', '_', and '-'."
|
|
104
|
+
},
|
|
105
|
+
"coordinate": {
|
|
106
|
+
"type": "number",
|
|
107
|
+
"minimum": -4000,
|
|
108
|
+
"maximum": 4000,
|
|
109
|
+
"description": "Coordinate in the canvas coordinate system, relative to the parent group."
|
|
110
|
+
},
|
|
111
|
+
"extent": {
|
|
112
|
+
"type": "number",
|
|
113
|
+
"minimum": 1,
|
|
114
|
+
"maximum": 4000,
|
|
115
|
+
"description": "Width or height. When the parent group has a layout, the effective maximum depends on cell size and is validated by parseArchitecture."
|
|
116
|
+
},
|
|
117
|
+
"zIndex": {
|
|
118
|
+
"type": "number",
|
|
119
|
+
"minimum": -100,
|
|
120
|
+
"maximum": 100,
|
|
121
|
+
"description": "Stacking order. Defaults are -50 for groups, -10 for connectors, and 0 for nodes."
|
|
122
|
+
},
|
|
123
|
+
"canvas": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"properties": {
|
|
127
|
+
"width": { "type": "number", "minimum": 320, "maximum": 4000 },
|
|
128
|
+
"height": { "type": "number", "minimum": 180, "maximum": 4000 }
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"style": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"description": "Appearance overrides. Omitted properties use the defaults for the element type.",
|
|
135
|
+
"properties": {
|
|
136
|
+
"fill": { "$ref": "#/$defs/color" },
|
|
137
|
+
"stroke": { "$ref": "#/$defs/color" },
|
|
138
|
+
"textColor": { "$ref": "#/$defs/color" },
|
|
139
|
+
"strokeWidth": { "type": "number", "minimum": 0.5, "maximum": 20 },
|
|
140
|
+
"fontSize": { "type": "number", "minimum": 8, "maximum": 160 },
|
|
141
|
+
"opacity": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
142
|
+
"dash": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"maxLength": 40,
|
|
145
|
+
"pattern": "^$|^\\d+(?:\\.\\d+)?(?:[ ,]+\\d+(?:\\.\\d+)?)*$",
|
|
146
|
+
"description": "Dash pattern containing only whitespace- or comma-separated non-negative numbers (for example, \"12 8\"). An empty string means no dashes."
|
|
147
|
+
},
|
|
148
|
+
"cornerRadius": { "type": "number", "minimum": 0, "maximum": 200 }
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"layoutObject": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"additionalProperties": false,
|
|
154
|
+
"required": ["type"],
|
|
155
|
+
"properties": {
|
|
156
|
+
"type": { "enum": ["row", "column", "grid", "layered"] },
|
|
157
|
+
"gap": { "type": "number", "minimum": 0, "maximum": 240 },
|
|
158
|
+
"rowGap": { "type": "number", "minimum": 0, "maximum": 240 },
|
|
159
|
+
"columnGap": { "type": "number", "minimum": 0, "maximum": 240 },
|
|
160
|
+
"padding": { "type": "number", "minimum": 0, "maximum": 400 },
|
|
161
|
+
"columns": {
|
|
162
|
+
"type": "number",
|
|
163
|
+
"minimum": 1,
|
|
164
|
+
"maximum": 12,
|
|
165
|
+
"description": "Number of grid columns. Fractional values are truncated. Ignored for row / column / layered."
|
|
166
|
+
},
|
|
167
|
+
"direction": {
|
|
168
|
+
"enum": ["down", "right"],
|
|
169
|
+
"description": "Direction in which layered ranks extend. down means top to bottom; right means left to right. Not allowed for layouts other than layered."
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"allOf": [
|
|
173
|
+
{
|
|
174
|
+
"if": {
|
|
175
|
+
"not": { "properties": { "type": { "const": "layered" } }, "required": ["type"] }
|
|
176
|
+
},
|
|
177
|
+
"then": { "not": { "required": ["direction"] } }
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"layout": {
|
|
182
|
+
"anyOf": [
|
|
183
|
+
{
|
|
184
|
+
"enum": ["row", "column", "grid", "layered"],
|
|
185
|
+
"description": "String shorthand. Defaults are gap 36 / padding 54 / columns 3 / direction \"down\"."
|
|
186
|
+
},
|
|
187
|
+
{ "$ref": "#/$defs/layoutObject" }
|
|
188
|
+
],
|
|
189
|
+
"description": "Automatic child placement. When specified, child x / y / width / height values are calculated automatically, and explicit x / y values are ignored. layered infers ranks from connectors between children."
|
|
190
|
+
},
|
|
191
|
+
"point": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"required": ["x", "y"],
|
|
195
|
+
"properties": {
|
|
196
|
+
"x": { "$ref": "#/$defs/coordinate" },
|
|
197
|
+
"y": { "$ref": "#/$defs/coordinate" }
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"nodeBase": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"additionalProperties": false,
|
|
203
|
+
"required": ["type", "id"],
|
|
204
|
+
"properties": {
|
|
205
|
+
"type": { "const": "node" },
|
|
206
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
207
|
+
"shape": { "enum": ["rect", "rounded-rect", "ellipse"] },
|
|
208
|
+
"x": { "$ref": "#/$defs/coordinate" },
|
|
209
|
+
"y": { "$ref": "#/$defs/coordinate" },
|
|
210
|
+
"width": { "$ref": "#/$defs/extent" },
|
|
211
|
+
"height": { "$ref": "#/$defs/extent" },
|
|
212
|
+
"text": { "type": "string", "maxLength": 500 },
|
|
213
|
+
"icon": { "$ref": "#/$defs/icon" },
|
|
214
|
+
"ariaLabel": { "type": "string", "maxLength": 300 },
|
|
215
|
+
"z": { "$ref": "#/$defs/zIndex" },
|
|
216
|
+
"style": { "$ref": "#/$defs/style" }
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"nodeFixed": {
|
|
220
|
+
"description": "Node placed directly under a parent without a layout. Position and size are required.",
|
|
221
|
+
"allOf": [
|
|
222
|
+
{ "$ref": "#/$defs/nodeBase" },
|
|
223
|
+
{ "$ref": "#/$defs/boxRequired" }
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"nodeFlow": {
|
|
227
|
+
"description": "Node placed directly under a group with a layout. Position and size are calculated automatically.",
|
|
228
|
+
"$ref": "#/$defs/nodeBase"
|
|
229
|
+
},
|
|
230
|
+
"imageBase": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": ["type", "id", "src"],
|
|
234
|
+
"properties": {
|
|
235
|
+
"type": { "const": "image" },
|
|
236
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
237
|
+
"src": { "$ref": "#/$defs/assetPath" },
|
|
238
|
+
"fit": { "enum": ["contain", "cover", "stretch"] },
|
|
239
|
+
"x": { "$ref": "#/$defs/coordinate" },
|
|
240
|
+
"y": { "$ref": "#/$defs/coordinate" },
|
|
241
|
+
"width": { "$ref": "#/$defs/extent" },
|
|
242
|
+
"height": { "$ref": "#/$defs/extent" },
|
|
243
|
+
"ariaLabel": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"maxLength": 300,
|
|
246
|
+
"description": "Alternative text for the image. Defaults first to the src file name and then to the id."
|
|
247
|
+
},
|
|
248
|
+
"z": { "$ref": "#/$defs/zIndex" },
|
|
249
|
+
"style": { "$ref": "#/$defs/style" }
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"imageFixed": {
|
|
253
|
+
"description": "Image placed directly under a parent without a layout. Position and size are required.",
|
|
254
|
+
"allOf": [
|
|
255
|
+
{ "$ref": "#/$defs/imageBase" },
|
|
256
|
+
{ "$ref": "#/$defs/boxRequired" }
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"imageFlow": {
|
|
260
|
+
"description": "Image placed directly under a group with a layout. Position and size are calculated automatically.",
|
|
261
|
+
"$ref": "#/$defs/imageBase"
|
|
262
|
+
},
|
|
263
|
+
"connector": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"additionalProperties": false,
|
|
266
|
+
"required": ["type", "from", "to"],
|
|
267
|
+
"properties": {
|
|
268
|
+
"type": { "const": "connector" },
|
|
269
|
+
"from": { "$ref": "#/$defs/identifier" },
|
|
270
|
+
"to": { "$ref": "#/$defs/identifier" },
|
|
271
|
+
"fromPort": { "enum": ["auto", "top", "right", "bottom", "left"] },
|
|
272
|
+
"toPort": { "enum": ["auto", "top", "right", "bottom", "left"] },
|
|
273
|
+
"label": { "type": "string", "maxLength": 200 },
|
|
274
|
+
"labelLayer": {
|
|
275
|
+
"enum": ["front", "behind"],
|
|
276
|
+
"default": "front",
|
|
277
|
+
"description": "Label stacking order. front renders above boxes; behind uses the connector body's stacking order."
|
|
278
|
+
},
|
|
279
|
+
"ariaLabel": { "type": "string", "maxLength": 300 },
|
|
280
|
+
"routing": { "enum": ["straight", "orthogonal", "polyline"] },
|
|
281
|
+
"points": {
|
|
282
|
+
"type": "array",
|
|
283
|
+
"maxItems": 12,
|
|
284
|
+
"items": { "$ref": "#/$defs/point" },
|
|
285
|
+
"description": "Waypoints allowed only when routing is polyline."
|
|
286
|
+
},
|
|
287
|
+
"arrow": { "type": "boolean" },
|
|
288
|
+
"lane": {
|
|
289
|
+
"type": "number",
|
|
290
|
+
"minimum": -12,
|
|
291
|
+
"maximum": 12,
|
|
292
|
+
"description": "Separation lane for parallel connectors. Fractional values are truncated."
|
|
293
|
+
},
|
|
294
|
+
"z": { "$ref": "#/$defs/zIndex" },
|
|
295
|
+
"style": { "$ref": "#/$defs/style" }
|
|
296
|
+
},
|
|
297
|
+
"if": {
|
|
298
|
+
"type": "object",
|
|
299
|
+
"required": ["routing"],
|
|
300
|
+
"properties": { "routing": { "const": "polyline" } }
|
|
301
|
+
},
|
|
302
|
+
"else": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"properties": {
|
|
305
|
+
"points": {
|
|
306
|
+
"type": "array",
|
|
307
|
+
"maxItems": 0,
|
|
308
|
+
"description": "points may be specified only when routing is polyline."
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"groupBase": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"additionalProperties": false,
|
|
316
|
+
"required": ["type", "id"],
|
|
317
|
+
"properties": {
|
|
318
|
+
"type": { "const": "group" },
|
|
319
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
320
|
+
"x": { "$ref": "#/$defs/coordinate" },
|
|
321
|
+
"y": { "$ref": "#/$defs/coordinate" },
|
|
322
|
+
"width": { "$ref": "#/$defs/extent" },
|
|
323
|
+
"height": { "$ref": "#/$defs/extent" },
|
|
324
|
+
"title": { "type": "string", "maxLength": 200 },
|
|
325
|
+
"ariaLabel": { "type": "string", "maxLength": 300 },
|
|
326
|
+
"layout": { "$ref": "#/$defs/layout" },
|
|
327
|
+
"z": { "$ref": "#/$defs/zIndex" },
|
|
328
|
+
"style": { "$ref": "#/$defs/style" },
|
|
329
|
+
"children": { "type": "array", "maxItems": 200 }
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"groupChildrenL1": {
|
|
333
|
+
"if": { "type": "object", "required": ["layout"] },
|
|
334
|
+
"then": {
|
|
335
|
+
"type": "object",
|
|
336
|
+
"properties": {
|
|
337
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/elementFlowL1" } }
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"else": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"properties": {
|
|
343
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/elementFixedL1" } }
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"groupChildrenL2": {
|
|
348
|
+
"if": { "type": "object", "required": ["layout"] },
|
|
349
|
+
"then": {
|
|
350
|
+
"type": "object",
|
|
351
|
+
"properties": {
|
|
352
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/elementFlowL2" } }
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"else": {
|
|
356
|
+
"type": "object",
|
|
357
|
+
"properties": {
|
|
358
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/elementFixedL2" } }
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"groupChildrenL3": {
|
|
363
|
+
"if": { "type": "object", "required": ["layout"] },
|
|
364
|
+
"then": {
|
|
365
|
+
"type": "object",
|
|
366
|
+
"properties": {
|
|
367
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/elementFlowL3" } }
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"else": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"properties": {
|
|
373
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/elementFixedL3" } }
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"groupChildrenL4": {
|
|
378
|
+
"if": { "type": "object", "required": ["layout"] },
|
|
379
|
+
"then": {
|
|
380
|
+
"type": "object",
|
|
381
|
+
"properties": {
|
|
382
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/elementFlowL4" } }
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"else": {
|
|
386
|
+
"type": "object",
|
|
387
|
+
"properties": {
|
|
388
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/elementFixedL4" } }
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"boxRequired": {
|
|
393
|
+
"description": "x / y / width / height are required directly under a parent without a layout.",
|
|
394
|
+
"type": "object",
|
|
395
|
+
"required": ["x", "y", "width", "height"]
|
|
396
|
+
},
|
|
397
|
+
"groupFixedL0": {
|
|
398
|
+
"allOf": [
|
|
399
|
+
{ "$ref": "#/$defs/groupBase" },
|
|
400
|
+
{ "$ref": "#/$defs/boxRequired" },
|
|
401
|
+
{ "$ref": "#/$defs/groupChildrenL1" }
|
|
402
|
+
]
|
|
403
|
+
},
|
|
404
|
+
"groupFlowL0": {
|
|
405
|
+
"allOf": [
|
|
406
|
+
{ "$ref": "#/$defs/groupBase" },
|
|
407
|
+
{ "$ref": "#/$defs/groupChildrenL1" }
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
"groupFixedL1": {
|
|
411
|
+
"allOf": [
|
|
412
|
+
{ "$ref": "#/$defs/groupBase" },
|
|
413
|
+
{ "$ref": "#/$defs/boxRequired" },
|
|
414
|
+
{ "$ref": "#/$defs/groupChildrenL2" }
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
"groupFlowL1": {
|
|
418
|
+
"allOf": [
|
|
419
|
+
{ "$ref": "#/$defs/groupBase" },
|
|
420
|
+
{ "$ref": "#/$defs/groupChildrenL2" }
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
"groupFixedL2": {
|
|
424
|
+
"allOf": [
|
|
425
|
+
{ "$ref": "#/$defs/groupBase" },
|
|
426
|
+
{ "$ref": "#/$defs/boxRequired" },
|
|
427
|
+
{ "$ref": "#/$defs/groupChildrenL3" }
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
"groupFlowL2": {
|
|
431
|
+
"allOf": [
|
|
432
|
+
{ "$ref": "#/$defs/groupBase" },
|
|
433
|
+
{ "$ref": "#/$defs/groupChildrenL3" }
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
"groupFixedL3": {
|
|
437
|
+
"allOf": [
|
|
438
|
+
{ "$ref": "#/$defs/groupBase" },
|
|
439
|
+
{ "$ref": "#/$defs/boxRequired" },
|
|
440
|
+
{ "$ref": "#/$defs/groupChildrenL4" }
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
"groupFlowL3": {
|
|
444
|
+
"allOf": [
|
|
445
|
+
{ "$ref": "#/$defs/groupBase" },
|
|
446
|
+
{ "$ref": "#/$defs/groupChildrenL4" }
|
|
447
|
+
]
|
|
448
|
+
},
|
|
449
|
+
"elementFixedL0": {
|
|
450
|
+
"type": "object",
|
|
451
|
+
"required": ["type"],
|
|
452
|
+
"properties": {
|
|
453
|
+
"type": {
|
|
454
|
+
"enum": ["node", "group", "image", "connector"],
|
|
455
|
+
"description": "Element type."
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"allOf": [
|
|
459
|
+
{
|
|
460
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
461
|
+
"then": { "$ref": "#/$defs/nodeFixed" }
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "group" } } },
|
|
465
|
+
"then": { "$ref": "#/$defs/groupFixedL0" }
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
469
|
+
"then": { "$ref": "#/$defs/imageFixed" }
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
473
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
},
|
|
477
|
+
"elementFixedL1": {
|
|
478
|
+
"type": "object",
|
|
479
|
+
"required": ["type"],
|
|
480
|
+
"properties": { "type": { "enum": ["node", "group", "image", "connector"] } },
|
|
481
|
+
"allOf": [
|
|
482
|
+
{
|
|
483
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
484
|
+
"then": { "$ref": "#/$defs/nodeFixed" }
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "group" } } },
|
|
488
|
+
"then": { "$ref": "#/$defs/groupFixedL1" }
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
492
|
+
"then": { "$ref": "#/$defs/imageFixed" }
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
496
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
497
|
+
}
|
|
498
|
+
]
|
|
499
|
+
},
|
|
500
|
+
"elementFlowL1": {
|
|
501
|
+
"type": "object",
|
|
502
|
+
"required": ["type"],
|
|
503
|
+
"properties": { "type": { "enum": ["node", "group", "image", "connector"] } },
|
|
504
|
+
"allOf": [
|
|
505
|
+
{
|
|
506
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
507
|
+
"then": { "$ref": "#/$defs/nodeFlow" }
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "group" } } },
|
|
511
|
+
"then": { "$ref": "#/$defs/groupFlowL1" }
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
515
|
+
"then": { "$ref": "#/$defs/imageFlow" }
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
519
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
520
|
+
}
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
"elementFixedL2": {
|
|
524
|
+
"type": "object",
|
|
525
|
+
"required": ["type"],
|
|
526
|
+
"properties": { "type": { "enum": ["node", "group", "image", "connector"] } },
|
|
527
|
+
"allOf": [
|
|
528
|
+
{
|
|
529
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
530
|
+
"then": { "$ref": "#/$defs/nodeFixed" }
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "group" } } },
|
|
534
|
+
"then": { "$ref": "#/$defs/groupFixedL2" }
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
538
|
+
"then": { "$ref": "#/$defs/imageFixed" }
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
542
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
543
|
+
}
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
"elementFlowL2": {
|
|
547
|
+
"type": "object",
|
|
548
|
+
"required": ["type"],
|
|
549
|
+
"properties": { "type": { "enum": ["node", "group", "image", "connector"] } },
|
|
550
|
+
"allOf": [
|
|
551
|
+
{
|
|
552
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
553
|
+
"then": { "$ref": "#/$defs/nodeFlow" }
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "group" } } },
|
|
557
|
+
"then": { "$ref": "#/$defs/groupFlowL2" }
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
561
|
+
"then": { "$ref": "#/$defs/imageFlow" }
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
565
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
},
|
|
569
|
+
"elementFixedL3": {
|
|
570
|
+
"type": "object",
|
|
571
|
+
"required": ["type"],
|
|
572
|
+
"properties": { "type": { "enum": ["node", "group", "image", "connector"] } },
|
|
573
|
+
"allOf": [
|
|
574
|
+
{
|
|
575
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
576
|
+
"then": { "$ref": "#/$defs/nodeFixed" }
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "group" } } },
|
|
580
|
+
"then": { "$ref": "#/$defs/groupFixedL3" }
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
584
|
+
"then": { "$ref": "#/$defs/imageFixed" }
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
588
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
589
|
+
}
|
|
590
|
+
]
|
|
591
|
+
},
|
|
592
|
+
"elementFlowL3": {
|
|
593
|
+
"type": "object",
|
|
594
|
+
"required": ["type"],
|
|
595
|
+
"properties": { "type": { "enum": ["node", "group", "image", "connector"] } },
|
|
596
|
+
"allOf": [
|
|
597
|
+
{
|
|
598
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
599
|
+
"then": { "$ref": "#/$defs/nodeFlow" }
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "group" } } },
|
|
603
|
+
"then": { "$ref": "#/$defs/groupFlowL3" }
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
607
|
+
"then": { "$ref": "#/$defs/imageFlow" }
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
611
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
612
|
+
}
|
|
613
|
+
]
|
|
614
|
+
},
|
|
615
|
+
"elementFixedL4": {
|
|
616
|
+
"type": "object",
|
|
617
|
+
"required": ["type"],
|
|
618
|
+
"properties": {
|
|
619
|
+
"type": {
|
|
620
|
+
"enum": ["node", "image", "connector"],
|
|
621
|
+
"description": "Groups cannot be placed at this depth because nesting is limited to four levels."
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"allOf": [
|
|
625
|
+
{
|
|
626
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
627
|
+
"then": { "$ref": "#/$defs/nodeFixed" }
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
631
|
+
"then": { "$ref": "#/$defs/imageFixed" }
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
635
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
"elementFlowL4": {
|
|
640
|
+
"type": "object",
|
|
641
|
+
"required": ["type"],
|
|
642
|
+
"properties": {
|
|
643
|
+
"type": {
|
|
644
|
+
"enum": ["node", "image", "connector"],
|
|
645
|
+
"description": "Groups cannot be placed at this depth because nesting is limited to four levels."
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"allOf": [
|
|
649
|
+
{
|
|
650
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "node" } } },
|
|
651
|
+
"then": { "$ref": "#/$defs/nodeFlow" }
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" } } },
|
|
655
|
+
"then": { "$ref": "#/$defs/imageFlow" }
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"if": { "type": "object", "required": ["type"], "properties": { "type": { "const": "connector" } } },
|
|
659
|
+
"then": { "$ref": "#/$defs/connector" }
|
|
660
|
+
}
|
|
661
|
+
]
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|