@hyprune/schema 0.0.0-stage → 0.5.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.
Files changed (78) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/LICENSE +21 -0
  3. package/README.md +140 -2
  4. package/bin/validate.mjs +19 -0
  5. package/examples/extension.json +22 -0
  6. package/examples/ipc/error.json +11 -0
  7. package/examples/ipc/movement.set.request.json +8 -0
  8. package/examples/ipc/movement.set.response.json +7 -0
  9. package/examples/ipc/runtime.exit.request.json +6 -0
  10. package/examples/ipc/runtime.exit.response.json +7 -0
  11. package/examples/ipc/runtime.notice.notification.json +9 -0
  12. package/examples/ipc/session.hello.request.json +17 -0
  13. package/examples/ipc/session.hello.response.json +23 -0
  14. package/examples/ipc/session.ping.request.json +6 -0
  15. package/examples/ipc/session.ping.response.json +7 -0
  16. package/examples/ipc/session.revoked.notification.json +7 -0
  17. package/examples/ipc/shell.claim.request.json +10 -0
  18. package/examples/ipc/shell.claim.response.json +8 -0
  19. package/examples/ipc/shell.overlay.request.json +11 -0
  20. package/examples/ipc/shell.overlay.response.json +7 -0
  21. package/examples/ipc/shell.release.request.json +8 -0
  22. package/examples/ipc/shell.release.response.json +7 -0
  23. package/examples/ipc/state.delta.notification.json +18 -0
  24. package/examples/ipc/state.snapshot.request.json +8 -0
  25. package/examples/ipc/state.snapshot.response.json +37 -0
  26. package/examples/ipc/state.subscribe.request.json +10 -0
  27. package/examples/ipc/state.subscribe.response.json +38 -0
  28. package/examples/ipc/state.unsubscribe.request.json +8 -0
  29. package/examples/ipc/state.unsubscribe.response.json +7 -0
  30. package/examples/ipc/surface.focus.request.json +9 -0
  31. package/examples/ipc/surface.focus.response.json +7 -0
  32. package/examples/ipc/world.load.request.json +9 -0
  33. package/examples/ipc/world.load.response.json +7 -0
  34. package/examples/placement-input.json +169 -0
  35. package/examples/screen-type.json +24 -0
  36. package/examples/world.json +111 -0
  37. package/extensions/hud-style-manifest.schema.json +17 -0
  38. package/extensions/hud-style.schema.json +118 -0
  39. package/lib/validate.d.mts +37 -0
  40. package/lib/validate.mjs +221 -0
  41. package/package.json +57 -4
  42. package/v0/common.schema.json +85 -0
  43. package/v0/extension.schema.json +121 -0
  44. package/v0/ipc.schema.json +1725 -0
  45. package/v0/screen-type.schema.json +115 -0
  46. package/v0/world.schema.json +363 -0
  47. package/v0.10/ipc.schema.json +8811 -0
  48. package/v0.11/ipc.schema.json +8863 -0
  49. package/v0.12/ipc.schema.json +9541 -0
  50. package/v0.13/ipc.schema.json +10032 -0
  51. package/v0.14/ipc.schema.json +10127 -0
  52. package/v0.15/ipc.schema.json +10534 -0
  53. package/v0.16/ipc.schema.json +10550 -0
  54. package/v0.17/ipc.schema.json +10703 -0
  55. package/v0.18/ipc.schema.json +10801 -0
  56. package/v0.19/ipc.schema.json +11587 -0
  57. package/v0.2/common.schema.json +86 -0
  58. package/v0.2/ipc.schema.json +3570 -0
  59. package/v0.2/world.schema.json +363 -0
  60. package/v0.3/common.schema.json +477 -0
  61. package/v0.3/ipc.schema.json +4044 -0
  62. package/v0.3/world.schema.json +390 -0
  63. package/v0.4/common.schema.json +477 -0
  64. package/v0.4/ipc.schema.json +5561 -0
  65. package/v0.4/world.schema.json +496 -0
  66. package/v0.5/common.schema.json +477 -0
  67. package/v0.5/ipc.schema.json +5781 -0
  68. package/v0.5/world.schema.json +790 -0
  69. package/v0.6/common.schema.json +478 -0
  70. package/v0.6/input.schema.json +519 -0
  71. package/v0.6/ipc.schema.json +7375 -0
  72. package/v0.6/world.schema.json +1062 -0
  73. package/v0.7/common.schema.json +478 -0
  74. package/v0.7/ipc.schema.json +7905 -0
  75. package/v0.7/world.schema.json +1062 -0
  76. package/v0.8/ipc.schema.json +7945 -0
  77. package/v0.9/input.schema.json +518 -0
  78. package/v0.9/ipc.schema.json +8613 -0
@@ -0,0 +1,390 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hyprune.com/schema/v0.3/world.schema.json",
4
+ "title": "Hyprune 0.2 world",
5
+ "type": "object",
6
+ "properties": {
7
+ "formatVersion": {
8
+ "const": "0.3"
9
+ },
10
+ "id": {
11
+ "$ref": "common.schema.json#/$defs/id"
12
+ },
13
+ "version": {
14
+ "$ref": "common.schema.json#/$defs/version"
15
+ },
16
+ "name": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 256
20
+ },
21
+ "description": {
22
+ "type": "string",
23
+ "minLength": 0,
24
+ "maxLength": 4096
25
+ },
26
+ "license": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 256
30
+ },
31
+ "scene": {
32
+ "allOf": [
33
+ {
34
+ "$ref": "common.schema.json#/$defs/path"
35
+ },
36
+ {
37
+ "pattern": "\\.(gltf|glb)$",
38
+ "type": "string"
39
+ }
40
+ ]
41
+ },
42
+ "preview": {
43
+ "$ref": "common.schema.json#/$defs/path"
44
+ },
45
+ "defaultSpawn": {
46
+ "$ref": "common.schema.json#/$defs/slug"
47
+ },
48
+ "spawns": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "properties": {
53
+ "id": {
54
+ "$ref": "common.schema.json#/$defs/slug"
55
+ },
56
+ "pose": {
57
+ "$ref": "common.schema.json#/$defs/pose"
58
+ },
59
+ "node": {
60
+ "$ref": "common.schema.json#/$defs/index"
61
+ }
62
+ },
63
+ "required": [
64
+ "id",
65
+ "pose"
66
+ ],
67
+ "additionalProperties": false
68
+ },
69
+ "minItems": 1
70
+ },
71
+ "attribution": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "object",
75
+ "properties": {
76
+ "path": {
77
+ "anyOf": [
78
+ {
79
+ "$ref": "common.schema.json#/$defs/path"
80
+ },
81
+ {
82
+ "const": "."
83
+ }
84
+ ]
85
+ },
86
+ "author": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "maxLength": 256
90
+ },
91
+ "license": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "maxLength": 256
95
+ },
96
+ "source": {
97
+ "type": "string",
98
+ "minLength": 1,
99
+ "maxLength": 2048,
100
+ "pattern": "^https://"
101
+ }
102
+ },
103
+ "required": [
104
+ "path",
105
+ "author",
106
+ "license"
107
+ ],
108
+ "additionalProperties": false
109
+ },
110
+ "minItems": 1
111
+ },
112
+ "zones": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "object",
116
+ "properties": {
117
+ "id": {
118
+ "$ref": "common.schema.json#/$defs/slug"
119
+ },
120
+ "name": {
121
+ "type": "string",
122
+ "minLength": 1,
123
+ "maxLength": 256
124
+ },
125
+ "bounds": {
126
+ "type": "object",
127
+ "properties": {
128
+ "min": {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "number"
132
+ },
133
+ "minItems": 3,
134
+ "maxItems": 3
135
+ },
136
+ "max": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "number"
140
+ },
141
+ "minItems": 3,
142
+ "maxItems": 3
143
+ }
144
+ },
145
+ "required": [
146
+ "min",
147
+ "max"
148
+ ],
149
+ "additionalProperties": false
150
+ }
151
+ },
152
+ "required": [
153
+ "id",
154
+ "name",
155
+ "bounds"
156
+ ],
157
+ "additionalProperties": false
158
+ },
159
+ "minItems": 0
160
+ },
161
+ "anchors": {
162
+ "type": "array",
163
+ "items": {
164
+ "type": "object",
165
+ "properties": {
166
+ "id": {
167
+ "$ref": "common.schema.json#/$defs/slug"
168
+ },
169
+ "pose": {
170
+ "$ref": "common.schema.json#/$defs/pose"
171
+ },
172
+ "size": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "number",
176
+ "exclusiveMinimum": 0
177
+ },
178
+ "minItems": 2,
179
+ "maxItems": 2
180
+ },
181
+ "screenType": {
182
+ "$ref": "common.schema.json#/$defs/id"
183
+ },
184
+ "node": {
185
+ "$ref": "common.schema.json#/$defs/index"
186
+ },
187
+ "mount": {
188
+ "$ref": "common.schema.json#/$defs/mount"
189
+ }
190
+ },
191
+ "required": [
192
+ "id",
193
+ "pose",
194
+ "size",
195
+ "screenType"
196
+ ],
197
+ "additionalProperties": false
198
+ },
199
+ "minItems": 0
200
+ },
201
+ "navigation": {
202
+ "type": "object",
203
+ "properties": {
204
+ "kind": {
205
+ "const": "mesh"
206
+ },
207
+ "node": {
208
+ "$ref": "common.schema.json#/$defs/index"
209
+ },
210
+ "agentRadius": {
211
+ "type": "number",
212
+ "exclusiveMinimum": 0
213
+ },
214
+ "agentHeight": {
215
+ "type": "number",
216
+ "exclusiveMinimum": 0
217
+ }
218
+ },
219
+ "required": [
220
+ "kind",
221
+ "node",
222
+ "agentRadius",
223
+ "agentHeight"
224
+ ],
225
+ "additionalProperties": false
226
+ },
227
+ "collision": {
228
+ "type": "array",
229
+ "items": {
230
+ "type": "object",
231
+ "properties": {
232
+ "node": {
233
+ "$ref": "common.schema.json#/$defs/index"
234
+ },
235
+ "shape": {
236
+ "enum": [
237
+ "mesh",
238
+ "convex"
239
+ ]
240
+ },
241
+ "layer": {
242
+ "const": "static"
243
+ }
244
+ },
245
+ "required": [
246
+ "node",
247
+ "shape",
248
+ "layer"
249
+ ],
250
+ "additionalProperties": false
251
+ },
252
+ "minItems": 0
253
+ },
254
+ "audio": {
255
+ "type": "array",
256
+ "items": {
257
+ "type": "object",
258
+ "properties": {
259
+ "id": {
260
+ "$ref": "common.schema.json#/$defs/slug"
261
+ },
262
+ "path": {
263
+ "allOf": [
264
+ {
265
+ "$ref": "common.schema.json#/$defs/path"
266
+ },
267
+ {
268
+ "pattern": "\\.(ogg|wav)$",
269
+ "type": "string"
270
+ }
271
+ ]
272
+ },
273
+ "position": {
274
+ "type": "array",
275
+ "items": {
276
+ "type": "number"
277
+ },
278
+ "minItems": 3,
279
+ "maxItems": 3
280
+ },
281
+ "radius": {
282
+ "type": "number",
283
+ "exclusiveMinimum": 0
284
+ },
285
+ "gain": {
286
+ "type": "number",
287
+ "minimum": 0,
288
+ "maximum": 1
289
+ },
290
+ "loop": {
291
+ "type": "boolean"
292
+ }
293
+ },
294
+ "required": [
295
+ "id",
296
+ "path",
297
+ "position",
298
+ "radius",
299
+ "gain",
300
+ "loop"
301
+ ],
302
+ "additionalProperties": false
303
+ },
304
+ "minItems": 0
305
+ },
306
+ "lightmaps": {
307
+ "type": "array",
308
+ "items": {
309
+ "type": "object",
310
+ "properties": {
311
+ "material": {
312
+ "$ref": "common.schema.json#/$defs/index"
313
+ },
314
+ "texture": {
315
+ "$ref": "common.schema.json#/$defs/index"
316
+ },
317
+ "texCoord": {
318
+ "const": 1
319
+ },
320
+ "encoding": {
321
+ "enum": [
322
+ "linear",
323
+ "srgb"
324
+ ]
325
+ },
326
+ "intensity": {
327
+ "type": "number",
328
+ "minimum": 0
329
+ }
330
+ },
331
+ "required": [
332
+ "material",
333
+ "texture",
334
+ "texCoord",
335
+ "encoding",
336
+ "intensity"
337
+ ],
338
+ "additionalProperties": false
339
+ },
340
+ "minItems": 0
341
+ },
342
+ "extensions": {
343
+ "$ref": "common.schema.json#/$defs/extensions"
344
+ },
345
+ "requiredExtensions": {
346
+ "type": "array",
347
+ "items": {
348
+ "$ref": "common.schema.json#/$defs/id"
349
+ },
350
+ "minItems": 0,
351
+ "uniqueItems": true
352
+ },
353
+ "areas": {
354
+ "type": "array",
355
+ "items": {
356
+ "$ref": "common.schema.json#/$defs/area"
357
+ },
358
+ "maxItems": 32
359
+ },
360
+ "atmosphere": {
361
+ "$ref": "common.schema.json#/$defs/atmosphere"
362
+ },
363
+ "placementZones": {
364
+ "type": "array",
365
+ "items": {
366
+ "$ref": "common.schema.json#/$defs/placementZone"
367
+ },
368
+ "maxItems": 32
369
+ },
370
+ "dataObjects": {
371
+ "type": "array",
372
+ "maxItems": 128,
373
+ "items": {
374
+ "$ref": "common.schema.json#/$defs/dataObject"
375
+ }
376
+ }
377
+ },
378
+ "required": [
379
+ "formatVersion",
380
+ "id",
381
+ "version",
382
+ "name",
383
+ "license",
384
+ "scene",
385
+ "defaultSpawn",
386
+ "spawns",
387
+ "attribution"
388
+ ],
389
+ "additionalProperties": false
390
+ }