idml-ui 0.1.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.
@@ -0,0 +1,495 @@
1
+ {
2
+ "$ref": "#/definitions/UIConfig",
3
+ "definitions": {
4
+ "UIConfig": {
5
+ "type": "object",
6
+ "properties": {
7
+ "version": {
8
+ "type": "string",
9
+ "const": "1"
10
+ },
11
+ "tokens": {
12
+ "type": "object",
13
+ "properties": {
14
+ "colors": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "properties": {
19
+ "name": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "value": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "darkValue": {
28
+ "type": "string"
29
+ }
30
+ },
31
+ "required": [
32
+ "name",
33
+ "value"
34
+ ],
35
+ "additionalProperties": false
36
+ }
37
+ },
38
+ "typography": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "object",
42
+ "properties": {
43
+ "name": {
44
+ "type": "string",
45
+ "minLength": 1
46
+ },
47
+ "fontFamily": {
48
+ "type": "string"
49
+ },
50
+ "fontSize": {
51
+ "type": "string",
52
+ "minLength": 1
53
+ },
54
+ "fontWeight": {
55
+ "type": [
56
+ "number",
57
+ "string"
58
+ ]
59
+ },
60
+ "lineHeight": {
61
+ "type": "string"
62
+ },
63
+ "letterSpacing": {
64
+ "type": "string"
65
+ }
66
+ },
67
+ "required": [
68
+ "name",
69
+ "fontSize"
70
+ ],
71
+ "additionalProperties": false
72
+ }
73
+ },
74
+ "spacing": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "object",
78
+ "properties": {
79
+ "name": {
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "value": {
84
+ "type": "string",
85
+ "minLength": 1
86
+ }
87
+ },
88
+ "required": [
89
+ "name",
90
+ "value"
91
+ ],
92
+ "additionalProperties": false
93
+ }
94
+ }
95
+ },
96
+ "required": [
97
+ "colors",
98
+ "typography",
99
+ "spacing"
100
+ ],
101
+ "additionalProperties": false
102
+ },
103
+ "pages": {
104
+ "type": "array",
105
+ "items": {
106
+ "type": "object",
107
+ "properties": {
108
+ "route": {
109
+ "type": "string",
110
+ "minLength": 1
111
+ },
112
+ "title": {
113
+ "type": "string"
114
+ },
115
+ "layout": {
116
+ "anyOf": [
117
+ {
118
+ "type": "object",
119
+ "properties": {
120
+ "type": {
121
+ "type": "string",
122
+ "const": "flex"
123
+ },
124
+ "direction": {
125
+ "type": "string",
126
+ "enum": [
127
+ "row",
128
+ "column",
129
+ "row-reverse",
130
+ "column-reverse"
131
+ ]
132
+ },
133
+ "wrap": {
134
+ "type": "string",
135
+ "enum": [
136
+ "nowrap",
137
+ "wrap",
138
+ "wrap-reverse"
139
+ ]
140
+ },
141
+ "justifyContent": {
142
+ "type": "string",
143
+ "enum": [
144
+ "flex-start",
145
+ "flex-end",
146
+ "center",
147
+ "space-between",
148
+ "space-around",
149
+ "space-evenly"
150
+ ]
151
+ },
152
+ "alignItems": {
153
+ "type": "string",
154
+ "enum": [
155
+ "flex-start",
156
+ "flex-end",
157
+ "center",
158
+ "stretch",
159
+ "baseline"
160
+ ]
161
+ },
162
+ "gap": {
163
+ "type": "string"
164
+ },
165
+ "size": {
166
+ "type": "object",
167
+ "properties": {
168
+ "width": {
169
+ "type": "string",
170
+ "pattern": "^\\d+(\\.\\d+)?%$"
171
+ },
172
+ "height": {
173
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/size/properties/width"
174
+ },
175
+ "minWidth": {
176
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/size/properties/width"
177
+ },
178
+ "minHeight": {
179
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/size/properties/width"
180
+ },
181
+ "maxWidth": {
182
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/size/properties/width"
183
+ },
184
+ "maxHeight": {
185
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/size/properties/width"
186
+ }
187
+ },
188
+ "additionalProperties": false
189
+ },
190
+ "children": {
191
+ "type": "array",
192
+ "items": {
193
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout"
194
+ }
195
+ },
196
+ "componentId": {
197
+ "type": "string"
198
+ },
199
+ "idmlStyle": {
200
+ "type": "object",
201
+ "additionalProperties": {
202
+ "type": "string"
203
+ }
204
+ },
205
+ "className": {
206
+ "type": "string"
207
+ },
208
+ "classRefs": {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "string"
212
+ }
213
+ },
214
+ "condClasses": {
215
+ "type": "array",
216
+ "items": {
217
+ "type": "object",
218
+ "properties": {
219
+ "classes": {
220
+ "type": "string"
221
+ },
222
+ "ref": {
223
+ "type": "string"
224
+ },
225
+ "negate": {
226
+ "type": "boolean"
227
+ }
228
+ },
229
+ "required": [
230
+ "classes",
231
+ "ref"
232
+ ],
233
+ "additionalProperties": false
234
+ }
235
+ },
236
+ "visibility": {
237
+ "type": "object",
238
+ "properties": {
239
+ "ref": {
240
+ "type": "string"
241
+ },
242
+ "negate": {
243
+ "type": "boolean"
244
+ }
245
+ },
246
+ "required": [
247
+ "ref"
248
+ ],
249
+ "additionalProperties": false
250
+ },
251
+ "dynamicSize": {
252
+ "type": "object",
253
+ "properties": {
254
+ "width": {
255
+ "type": "object",
256
+ "properties": {
257
+ "ref": {
258
+ "type": "string"
259
+ },
260
+ "whenTrue": {
261
+ "type": "string"
262
+ },
263
+ "whenFalse": {
264
+ "type": "string"
265
+ }
266
+ },
267
+ "required": [
268
+ "ref"
269
+ ],
270
+ "additionalProperties": false
271
+ },
272
+ "height": {
273
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/dynamicSize/properties/width"
274
+ }
275
+ },
276
+ "additionalProperties": false
277
+ }
278
+ },
279
+ "required": [
280
+ "type",
281
+ "direction",
282
+ "children"
283
+ ],
284
+ "additionalProperties": false
285
+ },
286
+ {
287
+ "type": "object",
288
+ "properties": {
289
+ "type": {
290
+ "type": "string",
291
+ "const": "grid"
292
+ },
293
+ "columns": {
294
+ "type": "integer",
295
+ "minimum": 1,
296
+ "maximum": 24
297
+ },
298
+ "rows": {
299
+ "type": "integer",
300
+ "minimum": 1
301
+ },
302
+ "gap": {
303
+ "type": "string"
304
+ },
305
+ "size": {
306
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/size"
307
+ },
308
+ "children": {
309
+ "type": "array",
310
+ "items": {
311
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout"
312
+ }
313
+ },
314
+ "componentId": {
315
+ "type": "string"
316
+ },
317
+ "idmlStyle": {
318
+ "type": "object",
319
+ "additionalProperties": {
320
+ "type": "string"
321
+ }
322
+ },
323
+ "className": {
324
+ "type": "string"
325
+ },
326
+ "classRefs": {
327
+ "type": "array",
328
+ "items": {
329
+ "type": "string"
330
+ }
331
+ },
332
+ "condClasses": {
333
+ "type": "array",
334
+ "items": {
335
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/condClasses/items"
336
+ }
337
+ },
338
+ "visibility": {
339
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/visibility"
340
+ },
341
+ "dynamicSize": {
342
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/layout/anyOf/0/properties/dynamicSize"
343
+ }
344
+ },
345
+ "required": [
346
+ "type",
347
+ "columns",
348
+ "children"
349
+ ],
350
+ "additionalProperties": false
351
+ }
352
+ ]
353
+ },
354
+ "components": {
355
+ "type": "array",
356
+ "items": {
357
+ "type": "object",
358
+ "properties": {
359
+ "id": {
360
+ "type": "string",
361
+ "minLength": 1
362
+ },
363
+ "type": {
364
+ "type": "string",
365
+ "minLength": 1
366
+ },
367
+ "props": {
368
+ "type": "object",
369
+ "additionalProperties": {}
370
+ },
371
+ "tokenProps": {
372
+ "type": "object",
373
+ "properties": {
374
+ "color": {
375
+ "type": "string"
376
+ },
377
+ "background": {
378
+ "type": "string"
379
+ },
380
+ "typography": {
381
+ "type": "string"
382
+ },
383
+ "padding": {
384
+ "type": "string"
385
+ }
386
+ },
387
+ "additionalProperties": false
388
+ },
389
+ "bindings": {
390
+ "type": "array",
391
+ "items": {
392
+ "type": "object",
393
+ "properties": {
394
+ "prop": {
395
+ "type": "string",
396
+ "minLength": 1
397
+ },
398
+ "methodId": {
399
+ "type": "string",
400
+ "minLength": 1
401
+ },
402
+ "kind": {
403
+ "type": "string",
404
+ "enum": [
405
+ "handler",
406
+ "value",
407
+ "model"
408
+ ]
409
+ }
410
+ },
411
+ "required": [
412
+ "prop",
413
+ "methodId"
414
+ ],
415
+ "additionalProperties": false
416
+ }
417
+ },
418
+ "visibility": {
419
+ "type": "object",
420
+ "properties": {
421
+ "methodId": {
422
+ "type": "string",
423
+ "minLength": 1
424
+ },
425
+ "negate": {
426
+ "type": "boolean"
427
+ }
428
+ },
429
+ "required": [
430
+ "methodId"
431
+ ],
432
+ "additionalProperties": false
433
+ },
434
+ "children": {
435
+ "type": "array",
436
+ "items": {
437
+ "$ref": "#/definitions/UIConfig/properties/pages/items/properties/components/items"
438
+ }
439
+ },
440
+ "idmlStyle": {
441
+ "type": "object",
442
+ "additionalProperties": {
443
+ "type": "string"
444
+ }
445
+ },
446
+ "className": {
447
+ "type": "string"
448
+ }
449
+ },
450
+ "required": [
451
+ "id",
452
+ "type"
453
+ ],
454
+ "additionalProperties": false
455
+ }
456
+ },
457
+ "meta": {
458
+ "type": "object",
459
+ "properties": {
460
+ "description": {
461
+ "type": "string"
462
+ },
463
+ "ogTitle": {
464
+ "type": "string"
465
+ }
466
+ },
467
+ "additionalProperties": false
468
+ }
469
+ },
470
+ "required": [
471
+ "route",
472
+ "layout",
473
+ "components"
474
+ ],
475
+ "additionalProperties": false
476
+ },
477
+ "minItems": 1
478
+ },
479
+ "userComponents": {
480
+ "type": "array",
481
+ "items": {
482
+ "type": "string"
483
+ }
484
+ }
485
+ },
486
+ "required": [
487
+ "version",
488
+ "tokens",
489
+ "pages"
490
+ ],
491
+ "additionalProperties": false
492
+ }
493
+ },
494
+ "$schema": "http://json-schema.org/draft-07/schema#"
495
+ }