@hyprune/schema 0.5.2 → 0.6.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,478 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hyprune.com/schema/v0.8/common.schema.json",
4
+ "title": "Hyprune world 0.8 common definitions",
5
+ "$defs": {
6
+ "id": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "maxLength": 128,
10
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
11
+ },
12
+ "slug": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 64,
16
+ "pattern": "^[a-z][a-z0-9-]*$"
17
+ },
18
+ "version": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 256,
22
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"
23
+ },
24
+ "path": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 512,
28
+ "pattern": "^(?!.*(?:^|/)\\.{1,2}(?:/|$))[A-Za-z0-9_.-]+(?:/[A-Za-z0-9_.-]+)*$"
29
+ },
30
+ "pose": {
31
+ "type": "object",
32
+ "properties": {
33
+ "position": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "number"
37
+ },
38
+ "minItems": 3,
39
+ "maxItems": 3
40
+ },
41
+ "rotation": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "number"
45
+ },
46
+ "minItems": 4,
47
+ "maxItems": 4
48
+ }
49
+ },
50
+ "required": [
51
+ "position",
52
+ "rotation"
53
+ ],
54
+ "additionalProperties": false
55
+ },
56
+ "index": {
57
+ "type": "integer",
58
+ "minimum": 0
59
+ },
60
+ "capability": {
61
+ "enum": [
62
+ "state.read",
63
+ "world.control",
64
+ "surface.control",
65
+ "movement.control",
66
+ "shell.control",
67
+ "runtime.control",
68
+ "data.publish",
69
+ "input.control"
70
+ ]
71
+ },
72
+ "extensions": {
73
+ "type": "object",
74
+ "propertyNames": {
75
+ "$ref": "common.schema.json#/$defs/id"
76
+ },
77
+ "additionalProperties": {
78
+ "type": "object"
79
+ }
80
+ },
81
+ "revision": {
82
+ "type": "integer",
83
+ "minimum": 0,
84
+ "maximum": 9007199254740991
85
+ },
86
+ "mount": {
87
+ "type": "object",
88
+ "properties": {
89
+ "type": {
90
+ "enum": [
91
+ "facade-wall",
92
+ "hanging-wall",
93
+ "wall-inset-console",
94
+ "banner",
95
+ "lectern",
96
+ "operator-desk",
97
+ "field-rig",
98
+ "kiosk-pillar",
99
+ "globe",
100
+ "crate",
101
+ "blast-door-screen",
102
+ "terminal-bench",
103
+ "radar-dish"
104
+ ]
105
+ },
106
+ "role": {
107
+ "enum": [
108
+ "mounted-workspace",
109
+ "tool-mount",
110
+ "data-object"
111
+ ]
112
+ },
113
+ "frameNode": {
114
+ "type": "integer",
115
+ "minimum": 0
116
+ },
117
+ "limits": {
118
+ "type": "object",
119
+ "properties": {
120
+ "minAspect": {
121
+ "type": "number",
122
+ "minimum": 0.05,
123
+ "maximum": 20
124
+ },
125
+ "maxAspect": {
126
+ "type": "number",
127
+ "minimum": 0.05,
128
+ "maximum": 20
129
+ },
130
+ "minSize": {
131
+ "$ref": "common.schema.json#/$defs/size2"
132
+ },
133
+ "maxSize": {
134
+ "$ref": "common.schema.json#/$defs/size2"
135
+ }
136
+ },
137
+ "required": [
138
+ "minAspect",
139
+ "maxAspect",
140
+ "minSize",
141
+ "maxSize"
142
+ ],
143
+ "additionalProperties": false
144
+ },
145
+ "interaction": {
146
+ "enum": [
147
+ "focus-in",
148
+ "in-place",
149
+ "none"
150
+ ]
151
+ }
152
+ },
153
+ "required": [
154
+ "type",
155
+ "role",
156
+ "interaction"
157
+ ],
158
+ "additionalProperties": false
159
+ },
160
+ "area": {
161
+ "type": "object",
162
+ "properties": {
163
+ "id": {
164
+ "$ref": "common.schema.json#/$defs/slug"
165
+ },
166
+ "workspaceSlot": {
167
+ "type": "string",
168
+ "pattern": "^[0-9]{2,4}$"
169
+ },
170
+ "primaryAnchor": {
171
+ "$ref": "common.schema.json#/$defs/slug"
172
+ },
173
+ "toolAnchors": {
174
+ "type": "array",
175
+ "items": {
176
+ "$ref": "common.schema.json#/$defs/slug"
177
+ },
178
+ "maxItems": 128
179
+ },
180
+ "dataAnchors": {
181
+ "type": "array",
182
+ "items": {
183
+ "$ref": "common.schema.json#/$defs/slug"
184
+ },
185
+ "maxItems": 128
186
+ },
187
+ "theme": {
188
+ "type": "string",
189
+ "maxLength": 256
190
+ },
191
+ "spawnId": {
192
+ "$ref": "common.schema.json#/$defs/slug"
193
+ },
194
+ "freePlacementZones": {
195
+ "type": "array",
196
+ "items": {
197
+ "$ref": "common.schema.json#/$defs/slug"
198
+ },
199
+ "maxItems": 32
200
+ }
201
+ },
202
+ "required": [
203
+ "id",
204
+ "workspaceSlot",
205
+ "primaryAnchor",
206
+ "toolAnchors",
207
+ "dataAnchors",
208
+ "theme"
209
+ ],
210
+ "additionalProperties": false
211
+ },
212
+ "atmosphere": {
213
+ "type": "object",
214
+ "properties": {
215
+ "fog": {
216
+ "type": "object",
217
+ "properties": {
218
+ "color": {
219
+ "$ref": "common.schema.json#/$defs/vec3"
220
+ },
221
+ "density": {
222
+ "type": "number",
223
+ "minimum": 0,
224
+ "maximum": 1
225
+ },
226
+ "heightFalloff": {
227
+ "type": "number",
228
+ "minimum": 0,
229
+ "maximum": 10
230
+ },
231
+ "baseHeight": {
232
+ "type": "number",
233
+ "minimum": -10000,
234
+ "maximum": 10000
235
+ },
236
+ "excludeUnlit": {
237
+ "type": "boolean"
238
+ }
239
+ },
240
+ "required": [
241
+ "color",
242
+ "density",
243
+ "heightFalloff",
244
+ "baseHeight",
245
+ "excludeUnlit"
246
+ ],
247
+ "additionalProperties": false
248
+ },
249
+ "sky": {
250
+ "type": "object",
251
+ "properties": {
252
+ "zenith": {
253
+ "$ref": "common.schema.json#/$defs/vec3"
254
+ },
255
+ "horizon": {
256
+ "$ref": "common.schema.json#/$defs/vec3"
257
+ },
258
+ "ground": {
259
+ "$ref": "common.schema.json#/$defs/vec3"
260
+ },
261
+ "sun": {
262
+ "type": "object",
263
+ "properties": {
264
+ "direction": {
265
+ "$ref": "common.schema.json#/$defs/vec3"
266
+ },
267
+ "color": {
268
+ "$ref": "common.schema.json#/$defs/vec3"
269
+ },
270
+ "intensity": {
271
+ "type": "number",
272
+ "minimum": 0,
273
+ "maximum": 10000
274
+ },
275
+ "angularRadius": {
276
+ "type": "number",
277
+ "minimum": 0.001,
278
+ "maximum": 1
279
+ }
280
+ },
281
+ "required": [
282
+ "direction",
283
+ "color",
284
+ "intensity",
285
+ "angularRadius"
286
+ ],
287
+ "additionalProperties": false
288
+ }
289
+ },
290
+ "required": [
291
+ "zenith",
292
+ "horizon",
293
+ "ground",
294
+ "sun"
295
+ ],
296
+ "additionalProperties": false
297
+ },
298
+ "environment": {
299
+ "type": "object",
300
+ "properties": {
301
+ "faces": {
302
+ "type": "array",
303
+ "items": {
304
+ "$ref": "common.schema.json#/$defs/path"
305
+ },
306
+ "minItems": 6,
307
+ "maxItems": 6
308
+ },
309
+ "encoding": {
310
+ "enum": [
311
+ "srgb",
312
+ "linear"
313
+ ]
314
+ },
315
+ "intensity": {
316
+ "type": "number",
317
+ "minimum": 0,
318
+ "maximum": 10000
319
+ },
320
+ "rotation": {
321
+ "type": "number",
322
+ "minimum": -6.283186,
323
+ "maximum": 6.283186
324
+ },
325
+ "maxResolution": {
326
+ "type": "integer",
327
+ "minimum": 16,
328
+ "maximum": 512
329
+ }
330
+ },
331
+ "required": [
332
+ "faces",
333
+ "encoding",
334
+ "intensity",
335
+ "rotation",
336
+ "maxResolution"
337
+ ],
338
+ "additionalProperties": false
339
+ },
340
+ "exposure": {
341
+ "type": "number",
342
+ "minimum": 0.01,
343
+ "maximum": 100
344
+ },
345
+ "toneMapping": {
346
+ "enum": [
347
+ "aces",
348
+ "reinhard",
349
+ "linear"
350
+ ]
351
+ },
352
+ "bloom": {
353
+ "type": "object",
354
+ "properties": {
355
+ "strength": {
356
+ "type": "number",
357
+ "minimum": 0,
358
+ "maximum": 2
359
+ },
360
+ "threshold": {
361
+ "type": "number",
362
+ "minimum": 0,
363
+ "maximum": 100
364
+ },
365
+ "radius": {
366
+ "type": "number",
367
+ "minimum": 1,
368
+ "maximum": 8
369
+ }
370
+ },
371
+ "required": [
372
+ "strength",
373
+ "threshold",
374
+ "radius"
375
+ ],
376
+ "additionalProperties": false
377
+ }
378
+ },
379
+ "required": [
380
+ "fog",
381
+ "sky",
382
+ "exposure",
383
+ "toneMapping",
384
+ "bloom"
385
+ ],
386
+ "additionalProperties": false
387
+ },
388
+ "vec3": {
389
+ "type": "array",
390
+ "items": {
391
+ "type": "number"
392
+ },
393
+ "minItems": 3,
394
+ "maxItems": 3
395
+ },
396
+ "size2": {
397
+ "type": "array",
398
+ "items": {
399
+ "type": "number",
400
+ "exclusiveMinimum": 0
401
+ },
402
+ "minItems": 2,
403
+ "maxItems": 2
404
+ },
405
+ "placementZone": {
406
+ "type": "object",
407
+ "properties": {
408
+ "id": {
409
+ "$ref": "common.schema.json#/$defs/slug"
410
+ },
411
+ "bounds": {
412
+ "type": "object",
413
+ "properties": {
414
+ "min": {
415
+ "$ref": "common.schema.json#/$defs/vec3"
416
+ },
417
+ "max": {
418
+ "$ref": "common.schema.json#/$defs/vec3"
419
+ }
420
+ },
421
+ "required": [
422
+ "min",
423
+ "max"
424
+ ],
425
+ "additionalProperties": false
426
+ },
427
+ "windowSizes": {
428
+ "type": "array",
429
+ "items": {
430
+ "$ref": "common.schema.json#/$defs/size2"
431
+ },
432
+ "maxItems": 8,
433
+ "minItems": 1
434
+ },
435
+ "clearance": {
436
+ "type": "number",
437
+ "minimum": 0.04,
438
+ "maximum": 1
439
+ }
440
+ },
441
+ "required": [
442
+ "id",
443
+ "bounds",
444
+ "windowSizes",
445
+ "clearance"
446
+ ],
447
+ "additionalProperties": false
448
+ },
449
+ "dataObject": {
450
+ "type": "object",
451
+ "properties": {
452
+ "id": {
453
+ "$ref": "common.schema.json#/$defs/slug"
454
+ },
455
+ "areaId": {
456
+ "$ref": "common.schema.json#/$defs/slug"
457
+ },
458
+ "pose": {
459
+ "$ref": "common.schema.json#/$defs/pose"
460
+ },
461
+ "mount": {
462
+ "$ref": "common.schema.json#/$defs/mount"
463
+ },
464
+ "node": {
465
+ "type": "integer",
466
+ "minimum": 0
467
+ }
468
+ },
469
+ "required": [
470
+ "id",
471
+ "areaId",
472
+ "pose",
473
+ "mount"
474
+ ],
475
+ "additionalProperties": false
476
+ }
477
+ }
478
+ }