/
navbar.json
267 lines (267 loc) · 10.4 KB
/
navbar.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
{
"$id": "https://gros.liacs.nl/schema/visualization-ui/navbar.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Visualization UI navigation bar structure",
"$ref": "#/$defs/navbar",
"$defs": {
"navbar": {
"oneOf": [
{
"type": "array",
"items": {
"type": "object",
"oneOf": [
{"$ref": "#/$defs/brand"},
{"$ref": "#/$defs/link"},
{"$ref": "#/$defs/fullscreen"},
{"$ref": "#/$defs/image"},
{"$ref": "#/$defs/text"},
{"$ref": "#/$defs/burger"},
{"$ref": "#/$defs/menu"},
{"$ref": "#/$defs/start"},
{"$ref": "#/$defs/end"},
{"$ref": "#/$defs/dropdown"},
{"$ref": "#/$defs/divider"}
],
"required": ["type"]
}
},
{"$ref": "#/$defs/locale"}
]
},
"brand": {
"description": "A Bulma navbar brand container. See: https://bulma.io/documentation/components/navbar/#navbar-brand",
"properties": {
"type": {"const": "brand"},
"items": {
"$ref": "#/$defs/navbar",
"description": "Navbar items to display in the brand section."
}
}
},
"link": {
"description": "A Bulma navbar item. See: https://bulma.io/documentation/components/navbar/#navbar-item",
"properties": {
"type": {"const": "link"},
"class": {
"type": "string",
"description": "Class name for the Bulma navbar item. Can contain more classes, space-separated, but the first one is prefixed with `navbar-`.",
"default": "item"
}
},
"allOf": [
{"$ref": "#/$defs/menu_link"}
]
},
"menu_link": {
"properties": {
"url": {"$ref": "#/$defs/attr_url"},
"title": {
"$ref": "#/$defs/locale_text",
"description": "Title of the navbar item."
},
"icon": {"$ref": "#/$defs/attr_icon"},
"content": {"$ref": "#/$defs/navbar"}
}
},
"fullscreen": {
"description": "A fullscreen item, displayed as an icon. Clicking it toggles between fullscreen display and normal browser display.",
"properties": {
"type": {"const": "fullscreen"},
"title": {
"$ref": "#/$defs/locale_text",
"description": "Title of the fullscreen item."
},
"icon": {"$ref": "#/$defs/attr_icon"}
}
},
"image": {
"description": "An image, including sizing options to properly display SVG images.",
"properties": {
"type": {"const": "image"},
"url": {"$ref": "#/$defs/attr_url"},
"alt": {
"$ref": "#/$defs/locale_text",
"description": "Alternative text for the image."
},
"width": {
"type": "integer",
"minimum": 0,
"description": "Width of the image."
},
"height": {
"type": "integer",
"minimum": 0,
"description": "Height of the image."
},
"style": {
"type": "string",
"description": "CSS style declarations for the image element."
}
}
},
"text": {
"description": "A plain text field.",
"properties": {
"type": {"const": "text"},
"text": {
"$ref": "#/$defs/locale_text",
"description": "Text to display."
}
}
},
"burger": {
"description": "A Bulma hamburger with a line-based icon for opening a menu on touch devices with smaller screen sizes. See: https://bulma.io/documentation/components/navbar/#navbar-burger",
"properties": {
"type": {"const": "burger"},
"target": {
"type": "string",
"description": "ID of a `menu` item that is expanded or collapsed when tapping the icon."
},
"lines": {
"type": "integer",
"const": 3,
"description": "Number of lines to display in the burger."
}
}
},
"menu": {
"description": "A Bulma menu. See: https://bulma.io/documentation/components/navbar/#navbar-menu",
"properties": {
"type": {"const": "menu"},
"id": {
"type": "string",
"description": "Unique identifier of the Bulma menu."
},
"items": {"$ref": "#/$defs/navbar"}
}
},
"start": {
"description": "A Bulma start side of a menu bar. See: https://bulma.io/documentation/components/navbar/#navbar-start-and-navbar-end",
"properties": {
"type": {"const": "start"},
"items": {"$ref": "#/$defs/navbar"}
}
},
"end": {
"description": "A Bulma end side of a menu bar. See: https://bulma.io/documentation/components/navbar/#navbar-start-and-navbar-end",
"properties": {
"type": {"const": "end"},
"items": {"$ref": "#/$defs/navbar"}
}
},
"dropdown": {
"description": "A Bulma dropdown menu. See: https://bulma.io/documentation/components/navbar/#dropdown-menu",
"properties": {
"type": {"const": "dropdown"},
"class": {
"type": "string",
"description": "Additional class names for the Bulma item that holds the navbar menu."
},
"id": {
"type": "string",
"description": "Unique identifier of the inner Bulma dropdown menu."
},
"link": {
"type": "object",
"description": "Item to display with the menu dropdown arrow.",
"properties": {
"class": {
"type": "string",
"description": "Class name for the Bulma menu dropdown arrow link. Can contain more classes, space-separated, but the first one is prefixed with `navbar-`.",
"default": "link"
}
},
"allOf": [
{"$ref": "#/$defs/menu_link"}
]
},
"items": {"$ref": "#/$defs/navbar"}
}
},
"divider": {
"description": "A horizontal line in a Bulma dropdown menu to separate navbar items.",
"properties": {
"type": {"const": "divider"}
}
},
"locale_text": {
"oneOf": [
{"type": "string"},
{"$ref": "#/$defs/locale"}
]
},
"locale": {
"type": "object",
"patternProperties": {
"^[a-zA-Z]{2,3}(-.*)?$": {
"type": "string",
"description": "Localization item for a specific language. Valid languages use two-letter ISO 639-1 language codes plus optional BCP 47 subtags, so only a subset of languages is recognized."
}
},
"unevaluatedProperties": false
},
"attr_url": {
"oneOf": [
{
"type": "string",
"description": "URL of the item.",
"format": "uri-reference"
},
{
"type": "array",
"description": "URL consisting of multiple portions, which are joined together.",
"items": {"$ref": "#/$defs/attr_url"}
},
{
"type": "object",
"properties": {
"config": {
"type": "string",
"description": "Configuration key to obtain the URL from."
}
},
"required": ["config"],
"unevaluatedProperties": false
},
{
"type": "object",
"properties": {
"locale": {
"type": "string",
"description": "Localization key from the current locale. May be `lang` to retrieve the current language code."
}
},
"required": ["locale"],
"unevaluatedProperties": false
},
{"$ref": "#/$defs/locale"}
]
},
"attr_title": {
"oneOf": [
{
"type": "string",
"description": "Title of the item."
},
{"$ref": "#/$defs/locale_text"}
]
},
"attr_icon": {
"oneOf": [
{
"type": "string",
"description": "Classes of the icon for the item, separated by spaces."
},
{
"type": "array",
"minItems": 2,
"description": "Portions of a FontAwesome icon class for the item. The classes after the first one are prefixed with `fa-`.",
"items": {
"type": "string"
}
}
]
}
}
}