@preset.nz/facets 0.2.0 → 0.3.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.
- package/README.md +159 -8
- package/package.json +6 -3
- package/schema/v0.1.json +198 -125
- package/src/field-renderers.tsx +130 -103
- package/src/file-handlers.ts +158 -0
- package/src/index.ts +15 -7
- package/src/layout.ts +5 -1
- package/src/pages.ts +50 -0
- package/src/panel.tsx +434 -87
- package/src/registry.ts +8 -7
- package/src/types.ts +86 -16
package/schema/v0.1.json
CHANGED
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
"title": "@preset.nz/facets PropertySchema, 0.1",
|
|
5
5
|
"description": "An inspector panel as data: groups of rows of fields. Valid for every 0.1.x release; later 0.1 patches only add kinds and props. Playground: https://facets.preset.nz",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"version",
|
|
9
|
-
"groups"
|
|
10
|
-
],
|
|
7
|
+
"required": ["version", "groups"],
|
|
11
8
|
"additionalProperties": false,
|
|
12
9
|
"properties": {
|
|
13
10
|
"$schema": {
|
|
@@ -22,6 +19,14 @@
|
|
|
22
19
|
"type": "string",
|
|
23
20
|
"description": "What the scope is called, e.g. \"Filter\". Heads the card; the host can override it."
|
|
24
21
|
},
|
|
22
|
+
"pages": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"description": "Splits the inspector into tabs, in this order. Omit it for one page and no tab row. With pages, every group names one in `page`, and every page needs a group that isn't advanced.",
|
|
25
|
+
"minItems": 1,
|
|
26
|
+
"items": {
|
|
27
|
+
"$ref": "#/definitions/page"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
25
30
|
"groups": {
|
|
26
31
|
"type": "array",
|
|
27
32
|
"description": "Rendered top to bottom, with a rule between groups.",
|
|
@@ -33,10 +38,7 @@
|
|
|
33
38
|
"definitions": {
|
|
34
39
|
"group": {
|
|
35
40
|
"type": "object",
|
|
36
|
-
"required": [
|
|
37
|
-
"id",
|
|
38
|
-
"rows"
|
|
39
|
-
],
|
|
41
|
+
"required": ["id", "rows"],
|
|
40
42
|
"additionalProperties": false,
|
|
41
43
|
"properties": {
|
|
42
44
|
"id": {
|
|
@@ -59,6 +61,14 @@
|
|
|
59
61
|
"type": "boolean",
|
|
60
62
|
"description": "Start folded."
|
|
61
63
|
},
|
|
64
|
+
"page": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "The id of the page this group sits on. Required when the schema declares pages, not allowed otherwise."
|
|
67
|
+
},
|
|
68
|
+
"advanced": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"description": "Sits behind the page's one closed Advanced row, at the foot of the page."
|
|
71
|
+
},
|
|
62
72
|
"rows": {
|
|
63
73
|
"type": "array",
|
|
64
74
|
"description": "A field is a full-width row; an array of fields is one row laid out as a grid (usually two).",
|
|
@@ -78,12 +88,38 @@
|
|
|
78
88
|
}
|
|
79
89
|
}
|
|
80
90
|
},
|
|
91
|
+
"page": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"description": "A tab in the inspector. Presentation only: no field path names a page.",
|
|
94
|
+
"required": ["id", "label"],
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"properties": {
|
|
97
|
+
"id": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1,
|
|
100
|
+
"description": "Unique among the pages. Groups name it in `page`."
|
|
101
|
+
},
|
|
102
|
+
"label": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "The tab's text."
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
81
108
|
"disabledWhen": {
|
|
109
|
+
"description": "Greys the field out depending on other fields' values: one condition, or a list that disables the field when any of them holds.",
|
|
110
|
+
"oneOf": [
|
|
111
|
+
{ "$ref": "#/definitions/disabledWhenOne" },
|
|
112
|
+
{
|
|
113
|
+
"type": "array",
|
|
114
|
+
"minItems": 1,
|
|
115
|
+
"items": { "$ref": "#/definitions/disabledWhenOne" }
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"disabledWhenOne": {
|
|
82
120
|
"type": "object",
|
|
83
|
-
"description": "
|
|
84
|
-
"required": [
|
|
85
|
-
"path"
|
|
86
|
-
],
|
|
121
|
+
"description": "One condition on another field's value. Set one operator; if several are set, the first of equals, notEquals, in, notIn wins.",
|
|
122
|
+
"required": ["path"],
|
|
87
123
|
"additionalProperties": false,
|
|
88
124
|
"properties": {
|
|
89
125
|
"path": {
|
|
@@ -110,19 +146,13 @@
|
|
|
110
146
|
"type": "array",
|
|
111
147
|
"description": "The views the field shows in besides the inspector, like a parm promoted to a Houdini asset's interface. \"card\": on the card. \"collapsed\": in a closed group's header and in a folded scope. Omit for inspector-only.",
|
|
112
148
|
"items": {
|
|
113
|
-
"enum": [
|
|
114
|
-
"card",
|
|
115
|
-
"collapsed"
|
|
116
|
-
]
|
|
149
|
+
"enum": ["card", "collapsed"]
|
|
117
150
|
},
|
|
118
151
|
"uniqueItems": true
|
|
119
152
|
},
|
|
120
153
|
"selectOption": {
|
|
121
154
|
"type": "object",
|
|
122
|
-
"required": [
|
|
123
|
-
"value",
|
|
124
|
-
"label"
|
|
125
|
-
],
|
|
155
|
+
"required": ["value", "label"],
|
|
126
156
|
"additionalProperties": false,
|
|
127
157
|
"properties": {
|
|
128
158
|
"value": {
|
|
@@ -135,6 +165,24 @@
|
|
|
135
165
|
}
|
|
136
166
|
}
|
|
137
167
|
},
|
|
168
|
+
"fileFilter": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"required": ["name", "extensions"],
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"properties": {
|
|
173
|
+
"name": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"description": "Shown in the Open dialog, e.g. \"Images\"."
|
|
176
|
+
},
|
|
177
|
+
"extensions": {
|
|
178
|
+
"type": "array",
|
|
179
|
+
"description": "Extensions without the dot, e.g. [\"png\", \"jpg\"].",
|
|
180
|
+
"items": {
|
|
181
|
+
"type": "string"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
138
186
|
"vectorComponent": {
|
|
139
187
|
"type": "object",
|
|
140
188
|
"additionalProperties": false,
|
|
@@ -164,10 +212,7 @@
|
|
|
164
212
|
"field": {
|
|
165
213
|
"type": "object",
|
|
166
214
|
"description": "One field. kind picks the renderer: a built-in kind is checked strictly; any other kind is a custom kind registered by the host, which may carry extra props.",
|
|
167
|
-
"required": [
|
|
168
|
-
"kind",
|
|
169
|
-
"id"
|
|
170
|
-
],
|
|
215
|
+
"required": ["kind", "id"],
|
|
171
216
|
"properties": {
|
|
172
217
|
"kind": {
|
|
173
218
|
"type": "string",
|
|
@@ -194,9 +239,7 @@
|
|
|
194
239
|
"allOf": [
|
|
195
240
|
{
|
|
196
241
|
"if": {
|
|
197
|
-
"required": [
|
|
198
|
-
"kind"
|
|
199
|
-
],
|
|
242
|
+
"required": ["kind"],
|
|
200
243
|
"properties": {
|
|
201
244
|
"kind": {
|
|
202
245
|
"const": "text"
|
|
@@ -209,9 +252,7 @@
|
|
|
209
252
|
},
|
|
210
253
|
{
|
|
211
254
|
"if": {
|
|
212
|
-
"required": [
|
|
213
|
-
"kind"
|
|
214
|
-
],
|
|
255
|
+
"required": ["kind"],
|
|
215
256
|
"properties": {
|
|
216
257
|
"kind": {
|
|
217
258
|
"const": "textarea"
|
|
@@ -224,9 +265,7 @@
|
|
|
224
265
|
},
|
|
225
266
|
{
|
|
226
267
|
"if": {
|
|
227
|
-
"required": [
|
|
228
|
-
"kind"
|
|
229
|
-
],
|
|
268
|
+
"required": ["kind"],
|
|
230
269
|
"properties": {
|
|
231
270
|
"kind": {
|
|
232
271
|
"const": "number"
|
|
@@ -239,9 +278,7 @@
|
|
|
239
278
|
},
|
|
240
279
|
{
|
|
241
280
|
"if": {
|
|
242
|
-
"required": [
|
|
243
|
-
"kind"
|
|
244
|
-
],
|
|
281
|
+
"required": ["kind"],
|
|
245
282
|
"properties": {
|
|
246
283
|
"kind": {
|
|
247
284
|
"const": "slider"
|
|
@@ -254,9 +291,7 @@
|
|
|
254
291
|
},
|
|
255
292
|
{
|
|
256
293
|
"if": {
|
|
257
|
-
"required": [
|
|
258
|
-
"kind"
|
|
259
|
-
],
|
|
294
|
+
"required": ["kind"],
|
|
260
295
|
"properties": {
|
|
261
296
|
"kind": {
|
|
262
297
|
"const": "select"
|
|
@@ -269,9 +304,7 @@
|
|
|
269
304
|
},
|
|
270
305
|
{
|
|
271
306
|
"if": {
|
|
272
|
-
"required": [
|
|
273
|
-
"kind"
|
|
274
|
-
],
|
|
307
|
+
"required": ["kind"],
|
|
275
308
|
"properties": {
|
|
276
309
|
"kind": {
|
|
277
310
|
"const": "color"
|
|
@@ -284,9 +317,7 @@
|
|
|
284
317
|
},
|
|
285
318
|
{
|
|
286
319
|
"if": {
|
|
287
|
-
"required": [
|
|
288
|
-
"kind"
|
|
289
|
-
],
|
|
320
|
+
"required": ["kind"],
|
|
290
321
|
"properties": {
|
|
291
322
|
"kind": {
|
|
292
323
|
"const": "checkbox"
|
|
@@ -299,9 +330,7 @@
|
|
|
299
330
|
},
|
|
300
331
|
{
|
|
301
332
|
"if": {
|
|
302
|
-
"required": [
|
|
303
|
-
"kind"
|
|
304
|
-
],
|
|
333
|
+
"required": ["kind"],
|
|
305
334
|
"properties": {
|
|
306
335
|
"kind": {
|
|
307
336
|
"const": "file"
|
|
@@ -314,9 +343,7 @@
|
|
|
314
343
|
},
|
|
315
344
|
{
|
|
316
345
|
"if": {
|
|
317
|
-
"required": [
|
|
318
|
-
"kind"
|
|
319
|
-
],
|
|
346
|
+
"required": ["kind"],
|
|
320
347
|
"properties": {
|
|
321
348
|
"kind": {
|
|
322
349
|
"const": "vector"
|
|
@@ -329,9 +356,7 @@
|
|
|
329
356
|
},
|
|
330
357
|
{
|
|
331
358
|
"if": {
|
|
332
|
-
"required": [
|
|
333
|
-
"kind"
|
|
334
|
-
],
|
|
359
|
+
"required": ["kind"],
|
|
335
360
|
"properties": {
|
|
336
361
|
"kind": {
|
|
337
362
|
"const": "separator"
|
|
@@ -344,9 +369,7 @@
|
|
|
344
369
|
},
|
|
345
370
|
{
|
|
346
371
|
"if": {
|
|
347
|
-
"required": [
|
|
348
|
-
"kind"
|
|
349
|
-
],
|
|
372
|
+
"required": ["kind"],
|
|
350
373
|
"properties": {
|
|
351
374
|
"kind": {
|
|
352
375
|
"const": "label"
|
|
@@ -359,9 +382,7 @@
|
|
|
359
382
|
},
|
|
360
383
|
{
|
|
361
384
|
"if": {
|
|
362
|
-
"required": [
|
|
363
|
-
"kind"
|
|
364
|
-
],
|
|
385
|
+
"required": ["kind"],
|
|
365
386
|
"properties": {
|
|
366
387
|
"kind": {
|
|
367
388
|
"not": {
|
|
@@ -391,11 +412,7 @@
|
|
|
391
412
|
"text": {
|
|
392
413
|
"type": "object",
|
|
393
414
|
"description": "A single line of text. Value: string.",
|
|
394
|
-
"required": [
|
|
395
|
-
"kind",
|
|
396
|
-
"id",
|
|
397
|
-
"path"
|
|
398
|
-
],
|
|
415
|
+
"required": ["kind", "id", "path"],
|
|
399
416
|
"properties": {
|
|
400
417
|
"kind": {
|
|
401
418
|
"const": "text"
|
|
@@ -408,6 +425,10 @@
|
|
|
408
425
|
"type": "string",
|
|
409
426
|
"description": "Shown above the field. Defaults to id."
|
|
410
427
|
},
|
|
428
|
+
"help": {
|
|
429
|
+
"type": "string",
|
|
430
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
431
|
+
},
|
|
411
432
|
"path": {
|
|
412
433
|
"type": "string",
|
|
413
434
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -428,11 +449,7 @@
|
|
|
428
449
|
"textarea": {
|
|
429
450
|
"type": "object",
|
|
430
451
|
"description": "Several lines of text. Value: string.",
|
|
431
|
-
"required": [
|
|
432
|
-
"kind",
|
|
433
|
-
"id",
|
|
434
|
-
"path"
|
|
435
|
-
],
|
|
452
|
+
"required": ["kind", "id", "path"],
|
|
436
453
|
"properties": {
|
|
437
454
|
"kind": {
|
|
438
455
|
"const": "textarea"
|
|
@@ -445,6 +462,10 @@
|
|
|
445
462
|
"type": "string",
|
|
446
463
|
"description": "Shown above the field. Defaults to id."
|
|
447
464
|
},
|
|
465
|
+
"help": {
|
|
466
|
+
"type": "string",
|
|
467
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
468
|
+
},
|
|
448
469
|
"path": {
|
|
449
470
|
"type": "string",
|
|
450
471
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -469,11 +490,7 @@
|
|
|
469
490
|
"number": {
|
|
470
491
|
"type": "object",
|
|
471
492
|
"description": "A number typed into a box. Value: number.",
|
|
472
|
-
"required": [
|
|
473
|
-
"kind",
|
|
474
|
-
"id",
|
|
475
|
-
"path"
|
|
476
|
-
],
|
|
493
|
+
"required": ["kind", "id", "path"],
|
|
477
494
|
"properties": {
|
|
478
495
|
"kind": {
|
|
479
496
|
"const": "number"
|
|
@@ -486,6 +503,10 @@
|
|
|
486
503
|
"type": "string",
|
|
487
504
|
"description": "Shown above the field. Defaults to id."
|
|
488
505
|
},
|
|
506
|
+
"help": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
509
|
+
},
|
|
489
510
|
"path": {
|
|
490
511
|
"type": "string",
|
|
491
512
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -522,11 +543,7 @@
|
|
|
522
543
|
"slider": {
|
|
523
544
|
"type": "object",
|
|
524
545
|
"description": "A number dragged along a range. Value: number.",
|
|
525
|
-
"required": [
|
|
526
|
-
"kind",
|
|
527
|
-
"id",
|
|
528
|
-
"path"
|
|
529
|
-
],
|
|
546
|
+
"required": ["kind", "id", "path"],
|
|
530
547
|
"properties": {
|
|
531
548
|
"kind": {
|
|
532
549
|
"const": "slider"
|
|
@@ -539,6 +556,10 @@
|
|
|
539
556
|
"type": "string",
|
|
540
557
|
"description": "Shown above the field. Defaults to id."
|
|
541
558
|
},
|
|
559
|
+
"help": {
|
|
560
|
+
"type": "string",
|
|
561
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
562
|
+
},
|
|
542
563
|
"path": {
|
|
543
564
|
"type": "string",
|
|
544
565
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -567,11 +588,7 @@
|
|
|
567
588
|
"select": {
|
|
568
589
|
"type": "object",
|
|
569
590
|
"description": "One choice from a list. Value: the chosen option's value (string). Options can also come from optionsProvider(ctx), a function, which is set in code and has no JSON form.",
|
|
570
|
-
"required": [
|
|
571
|
-
"kind",
|
|
572
|
-
"id",
|
|
573
|
-
"path"
|
|
574
|
-
],
|
|
591
|
+
"required": ["kind", "id", "path"],
|
|
575
592
|
"properties": {
|
|
576
593
|
"kind": {
|
|
577
594
|
"const": "select"
|
|
@@ -584,6 +601,10 @@
|
|
|
584
601
|
"type": "string",
|
|
585
602
|
"description": "Shown above the field. Defaults to id."
|
|
586
603
|
},
|
|
604
|
+
"help": {
|
|
605
|
+
"type": "string",
|
|
606
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
607
|
+
},
|
|
587
608
|
"path": {
|
|
588
609
|
"type": "string",
|
|
589
610
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -607,11 +628,7 @@
|
|
|
607
628
|
"color": {
|
|
608
629
|
"type": "object",
|
|
609
630
|
"description": "A colour as a hex string, e.g. \"#2b7c76\". Value: string.",
|
|
610
|
-
"required": [
|
|
611
|
-
"kind",
|
|
612
|
-
"id",
|
|
613
|
-
"path"
|
|
614
|
-
],
|
|
631
|
+
"required": ["kind", "id", "path"],
|
|
615
632
|
"properties": {
|
|
616
633
|
"kind": {
|
|
617
634
|
"const": "color"
|
|
@@ -624,6 +641,10 @@
|
|
|
624
641
|
"type": "string",
|
|
625
642
|
"description": "Shown above the field. Defaults to id."
|
|
626
643
|
},
|
|
644
|
+
"help": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
647
|
+
},
|
|
627
648
|
"path": {
|
|
628
649
|
"type": "string",
|
|
629
650
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -647,11 +668,7 @@
|
|
|
647
668
|
"checkbox": {
|
|
648
669
|
"type": "object",
|
|
649
670
|
"description": "On or off. Value: boolean.",
|
|
650
|
-
"required": [
|
|
651
|
-
"kind",
|
|
652
|
-
"id",
|
|
653
|
-
"path"
|
|
654
|
-
],
|
|
671
|
+
"required": ["kind", "id", "path"],
|
|
655
672
|
"properties": {
|
|
656
673
|
"kind": {
|
|
657
674
|
"const": "checkbox"
|
|
@@ -664,6 +681,10 @@
|
|
|
664
681
|
"type": "string",
|
|
665
682
|
"description": "Shown above the field. Defaults to id."
|
|
666
683
|
},
|
|
684
|
+
"help": {
|
|
685
|
+
"type": "string",
|
|
686
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
687
|
+
},
|
|
667
688
|
"path": {
|
|
668
689
|
"type": "string",
|
|
669
690
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -679,12 +700,8 @@
|
|
|
679
700
|
},
|
|
680
701
|
"file": {
|
|
681
702
|
"type": "object",
|
|
682
|
-
"description": "
|
|
683
|
-
"required": [
|
|
684
|
-
"kind",
|
|
685
|
-
"id",
|
|
686
|
-
"path"
|
|
687
|
-
],
|
|
703
|
+
"description": "A path to a file, edited on a path field with a recent list, browse icon and Missing check when the host registers file handlers. Value: the path string as written, or null.",
|
|
704
|
+
"required": ["kind", "id", "path"],
|
|
688
705
|
"properties": {
|
|
689
706
|
"kind": {
|
|
690
707
|
"const": "file"
|
|
@@ -697,6 +714,10 @@
|
|
|
697
714
|
"type": "string",
|
|
698
715
|
"description": "Shown above the field. Defaults to id."
|
|
699
716
|
},
|
|
717
|
+
"help": {
|
|
718
|
+
"type": "string",
|
|
719
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
720
|
+
},
|
|
700
721
|
"path": {
|
|
701
722
|
"type": "string",
|
|
702
723
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -704,13 +725,32 @@
|
|
|
704
725
|
"disabledWhen": {
|
|
705
726
|
"$ref": "#/definitions/disabledWhen"
|
|
706
727
|
},
|
|
728
|
+
"recentKey": {
|
|
729
|
+
"type": "string",
|
|
730
|
+
"description": "Keys the recent paths: fields with the same key share one list, across documents. Example: \"texture\"."
|
|
731
|
+
},
|
|
732
|
+
"filters": {
|
|
733
|
+
"type": "array",
|
|
734
|
+
"description": "File types in the Open dialog.",
|
|
735
|
+
"items": {
|
|
736
|
+
"$ref": "#/definitions/fileFilter"
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
"title": {
|
|
740
|
+
"type": "string",
|
|
741
|
+
"description": "The Open dialog's title."
|
|
742
|
+
},
|
|
743
|
+
"placeholder": {
|
|
744
|
+
"type": "string",
|
|
745
|
+
"description": "Shown while the field is empty."
|
|
746
|
+
},
|
|
707
747
|
"accept": {
|
|
708
748
|
"type": "string",
|
|
709
|
-
"description": "File types
|
|
749
|
+
"description": "Deprecated: use filters. File types as on <input accept>; the extensions in it become one \"Files\" filter when filters is absent."
|
|
710
750
|
},
|
|
711
751
|
"helperText": {
|
|
712
752
|
"type": "string",
|
|
713
|
-
"description": "
|
|
753
|
+
"description": "Deprecated: use help, which every field has. Drawn as help when that's absent."
|
|
714
754
|
},
|
|
715
755
|
"promote": {
|
|
716
756
|
"$ref": "#/definitions/promote"
|
|
@@ -721,12 +761,7 @@
|
|
|
721
761
|
"vector": {
|
|
722
762
|
"type": "object",
|
|
723
763
|
"description": "Several numbers in one row: position, size, RGB, LCh. Value: number[], one per component.",
|
|
724
|
-
"required": [
|
|
725
|
-
"kind",
|
|
726
|
-
"id",
|
|
727
|
-
"path",
|
|
728
|
-
"components"
|
|
729
|
-
],
|
|
764
|
+
"required": ["kind", "id", "path", "components"],
|
|
730
765
|
"properties": {
|
|
731
766
|
"kind": {
|
|
732
767
|
"const": "vector"
|
|
@@ -739,6 +774,10 @@
|
|
|
739
774
|
"type": "string",
|
|
740
775
|
"description": "Shown above the field. Defaults to id."
|
|
741
776
|
},
|
|
777
|
+
"help": {
|
|
778
|
+
"type": "string",
|
|
779
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
780
|
+
},
|
|
742
781
|
"path": {
|
|
743
782
|
"type": "string",
|
|
744
783
|
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
@@ -770,10 +809,7 @@
|
|
|
770
809
|
"separator": {
|
|
771
810
|
"type": "object",
|
|
772
811
|
"description": "A horizontal rule between rows, with label as an optional caption. Holds no value, so it has no path.",
|
|
773
|
-
"required": [
|
|
774
|
-
"kind",
|
|
775
|
-
"id"
|
|
776
|
-
],
|
|
812
|
+
"required": ["kind", "id"],
|
|
777
813
|
"properties": {
|
|
778
814
|
"kind": {
|
|
779
815
|
"const": "separator"
|
|
@@ -798,11 +834,7 @@
|
|
|
798
834
|
"label": {
|
|
799
835
|
"type": "object",
|
|
800
836
|
"description": "Static text: a hint, a note, a sub-heading. The text is label. Holds no value, so it has no path.",
|
|
801
|
-
"required": [
|
|
802
|
-
"kind",
|
|
803
|
-
"id",
|
|
804
|
-
"label"
|
|
805
|
-
],
|
|
837
|
+
"required": ["kind", "id", "label"],
|
|
806
838
|
"properties": {
|
|
807
839
|
"kind": {
|
|
808
840
|
"const": "label"
|
|
@@ -827,11 +859,7 @@
|
|
|
827
859
|
"custom": {
|
|
828
860
|
"type": "object",
|
|
829
861
|
"description": "A custom kind. The host's renderer decides which extra props it reads.",
|
|
830
|
-
"required": [
|
|
831
|
-
"kind",
|
|
832
|
-
"id",
|
|
833
|
-
"path"
|
|
834
|
-
],
|
|
862
|
+
"required": ["kind", "id"],
|
|
835
863
|
"properties": {
|
|
836
864
|
"kind": {
|
|
837
865
|
"type": "string"
|
|
@@ -844,9 +872,13 @@
|
|
|
844
872
|
"type": "string",
|
|
845
873
|
"description": "Shown above the field. Defaults to id."
|
|
846
874
|
},
|
|
875
|
+
"help": {
|
|
876
|
+
"type": "string",
|
|
877
|
+
"description": "One or two sentences on what the field does, drawn under the control in the inspector view. The card and collapsed views leave it out."
|
|
878
|
+
},
|
|
847
879
|
"path": {
|
|
848
880
|
"type": "string",
|
|
849
|
-
"description": "A key into the record the scope's read() returns. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
881
|
+
"description": "A key into the record the scope's read() returns. Leave it out for a field that holds no value. A flat lookup, not a nested traversal: \"transform.x\" is one key."
|
|
850
882
|
},
|
|
851
883
|
"disabledWhen": {
|
|
852
884
|
"$ref": "#/definitions/disabledWhen"
|
|
@@ -856,5 +888,46 @@
|
|
|
856
888
|
}
|
|
857
889
|
}
|
|
858
890
|
}
|
|
859
|
-
}
|
|
891
|
+
},
|
|
892
|
+
"allOf": [
|
|
893
|
+
{
|
|
894
|
+
"if": {
|
|
895
|
+
"properties": {
|
|
896
|
+
"pages": true
|
|
897
|
+
},
|
|
898
|
+
"required": ["pages"]
|
|
899
|
+
},
|
|
900
|
+
"then": {
|
|
901
|
+
"properties": {
|
|
902
|
+
"groups": {
|
|
903
|
+
"type": "array",
|
|
904
|
+
"items": {
|
|
905
|
+
"type": "object",
|
|
906
|
+
"properties": {
|
|
907
|
+
"page": true
|
|
908
|
+
},
|
|
909
|
+
"required": ["page"]
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
"else": {
|
|
915
|
+
"properties": {
|
|
916
|
+
"groups": {
|
|
917
|
+
"type": "array",
|
|
918
|
+
"items": {
|
|
919
|
+
"not": {
|
|
920
|
+
"type": "object",
|
|
921
|
+
"properties": {
|
|
922
|
+
"page": true
|
|
923
|
+
},
|
|
924
|
+
"required": ["page"]
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
"$comment": "With pages every group names one; without, none does. Which page, and whether it exists, is checked in code: schemaProblems()."
|
|
931
|
+
}
|
|
932
|
+
]
|
|
860
933
|
}
|