@asteby/metacore-genui 2.0.0 → 2.1.1

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,3185 @@
1
+ /* eslint-disable */
2
+ // GENERADO por packages/genui/scripts/codegen.mjs desde schema/genui-v2.schema.json. No editar a mano: corre `pnpm --filter @asteby/metacore-genui codegen`.
3
+ export const GENUI_V2_SCHEMA = {
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "$id": "https://schemas.asteby.dev/metacore/genui-v2.schema.json",
6
+ "title": "genui/v2",
7
+ "description": "Contrato declarativo de UI genui/v2 (ADR 0001 del SDK). Fuente única del contrato: de aquí salen los tipos TS; el kernel Go copia este archivo (packages/genui/conformance/README.md). Las reglas que el esquema no expresa (límites globales, unicidad de id, gramática de $ref, enlaces seguros, destino de open) viven en el validador.",
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": [
11
+ "version",
12
+ "blocks"
13
+ ],
14
+ "properties": {
15
+ "version": {
16
+ "const": "genui/v2"
17
+ },
18
+ "title": {
19
+ "$ref": "#/$defs/label"
20
+ },
21
+ "i18n": {
22
+ "enum": [
23
+ "keys",
24
+ "literal"
25
+ ],
26
+ "default": "literal"
27
+ },
28
+ "data": {
29
+ "type": "object",
30
+ "maxProperties": 8,
31
+ "propertyNames": {
32
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
33
+ },
34
+ "additionalProperties": {
35
+ "$ref": "#/$defs/dataSource"
36
+ }
37
+ },
38
+ "state": {
39
+ "type": "object",
40
+ "maxProperties": 32,
41
+ "propertyNames": {
42
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
43
+ },
44
+ "additionalProperties": {
45
+ "$ref": "#/$defs/stateValue"
46
+ },
47
+ "description": "Estado local: escalares, listas de escalares y objetos de escalares o listas de escalares."
48
+ },
49
+ "overlays": {
50
+ "type": "object",
51
+ "maxProperties": 4,
52
+ "propertyNames": {
53
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
54
+ },
55
+ "additionalProperties": {
56
+ "$ref": "#/$defs/overlay"
57
+ }
58
+ },
59
+ "blocks": {
60
+ "type": "array",
61
+ "items": {
62
+ "$ref": "#/$defs/block"
63
+ },
64
+ "maxItems": 24,
65
+ "minItems": 1
66
+ }
67
+ },
68
+ "$defs": {
69
+ "tone": {
70
+ "enum": [
71
+ "default",
72
+ "muted",
73
+ "info",
74
+ "success",
75
+ "warning",
76
+ "danger"
77
+ ],
78
+ "description": "Vocabulario de tono compartido (Tone)."
79
+ },
80
+ "statFormat": {
81
+ "enum": [
82
+ "number",
83
+ "currency",
84
+ "percent",
85
+ "compact",
86
+ "date",
87
+ "datetime",
88
+ "relative_date"
89
+ ],
90
+ "description": "StatFormat (superconjunto de WidgetFormat)."
91
+ },
92
+ "fieldKind": {
93
+ "enum": [
94
+ "text",
95
+ "textarea",
96
+ "number",
97
+ "integer",
98
+ "email",
99
+ "url",
100
+ "phone",
101
+ "date",
102
+ "datetime",
103
+ "time",
104
+ "boolean",
105
+ "switch",
106
+ "select",
107
+ "multiselect",
108
+ "search"
109
+ ],
110
+ "description": "Tipos de campo (field.kind)."
111
+ },
112
+ "widgetSize": {
113
+ "enum": [
114
+ "sm",
115
+ "md",
116
+ "lg",
117
+ "full"
118
+ ]
119
+ },
120
+ "scalar": {
121
+ "type": [
122
+ "string",
123
+ "number",
124
+ "boolean",
125
+ "null"
126
+ ],
127
+ "maxLength": 2000,
128
+ "description": "Escalar; las cadenas, de hasta 2 000 puntos de código."
129
+ },
130
+ "id": {
131
+ "type": "string",
132
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[A-Za-z][A-Za-z0-9_-]{0,63}$",
133
+ "description": "Identificador único dentro del documento.",
134
+ "x-no-proto": true
135
+ },
136
+ "key": {
137
+ "type": "string",
138
+ "pattern": "^(?=.{1,64}$)(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$",
139
+ "x-no-proto": true,
140
+ "description": "Clave de campo, columna o entrada: segmentos no vacíos [A-Za-z_][A-Za-z0-9_]* separados por punto (sin \"a..b\" ni \"a.\"); ningún segmento puede ser __proto__, constructor ni prototype."
141
+ },
142
+ "bindingPath": {
143
+ "type": "string",
144
+ "pattern": "^(?!(?:.*\\.)?(?:__proto__|constructor|prototype)(?:\\.|$))(data|state|record|ctx)(\\.[A-Za-z_][A-Za-z0-9_]{0,63}|\\.[0-9]{1,3}){1,6}$",
145
+ "x-no-proto": true,
146
+ "description": "Ruta de vinculación; raíces cerradas data|state|record|ctx. Ningún segmento puede ser __proto__, constructor ni prototype."
147
+ },
148
+ "ref": {
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "required": [
152
+ "$ref"
153
+ ],
154
+ "properties": {
155
+ "$ref": {
156
+ "$ref": "#/$defs/bindingPath"
157
+ }
158
+ },
159
+ "description": "Vinculación {\"$ref\": \"<raíz>.<ruta>\"} en posiciones de valor."
160
+ },
161
+ "tref": {
162
+ "type": "object",
163
+ "additionalProperties": false,
164
+ "required": [
165
+ "$t"
166
+ ],
167
+ "properties": {
168
+ "$t": {
169
+ "type": "string",
170
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[A-Za-z0-9_.:-]{1,128}$",
171
+ "x-no-proto": true
172
+ },
173
+ "args": {
174
+ "type": "object",
175
+ "maxProperties": 8,
176
+ "additionalProperties": {
177
+ "anyOf": [
178
+ {
179
+ "type": [
180
+ "string",
181
+ "number",
182
+ "boolean"
183
+ ],
184
+ "maxLength": 2000
185
+ },
186
+ {
187
+ "$ref": "#/$defs/ref"
188
+ }
189
+ ]
190
+ }
191
+ }
192
+ },
193
+ "description": "Clave i18n con argumentos insertados como texto."
194
+ },
195
+ "text": {
196
+ "anyOf": [
197
+ {
198
+ "type": "string",
199
+ "maxLength": 2000
200
+ },
201
+ {
202
+ "$ref": "#/$defs/tref"
203
+ },
204
+ {
205
+ "$ref": "#/$defs/ref"
206
+ }
207
+ ],
208
+ "description": "Texto visible: literal, clave i18n o vinculación."
209
+ },
210
+ "label": {
211
+ "anyOf": [
212
+ {
213
+ "type": "string",
214
+ "maxLength": 160
215
+ },
216
+ {
217
+ "$ref": "#/$defs/tref"
218
+ },
219
+ {
220
+ "$ref": "#/$defs/ref"
221
+ }
222
+ ]
223
+ },
224
+ "value": {
225
+ "anyOf": [
226
+ {
227
+ "$ref": "#/$defs/scalar"
228
+ },
229
+ {
230
+ "$ref": "#/$defs/ref"
231
+ }
232
+ ],
233
+ "description": "Valor: escalar o vinculación."
234
+ },
235
+ "link": {
236
+ "type": "string",
237
+ "maxLength": 2048,
238
+ "pattern": "^(/(?!/)[^\\\\\\n\\r\\t]*|https?://[^\\s\\\\]+)$",
239
+ "x-error": "genui.unsafe_link",
240
+ "description": "Ruta relativa de la app o http(s) literal; nunca $ref. Los externos solo con allowExternalLinks."
241
+ },
242
+ "appPath": {
243
+ "type": "string",
244
+ "maxLength": 2048,
245
+ "pattern": "^/(?!/)[^\\\\\\n\\r\\t]*$",
246
+ "x-error": "genui.unsafe_link",
247
+ "description": "Ruta de la app (nunca http)."
248
+ },
249
+ "name": {
250
+ "type": "string",
251
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[A-Za-z_][A-Za-z0-9_]{0,63}$",
252
+ "x-no-proto": true
253
+ },
254
+ "predicate": {
255
+ "type": "object",
256
+ "additionalProperties": false,
257
+ "required": [
258
+ "ref"
259
+ ],
260
+ "minProperties": 2,
261
+ "properties": {
262
+ "ref": {
263
+ "$ref": "#/$defs/bindingPath"
264
+ },
265
+ "equals": {
266
+ "$ref": "#/$defs/scalar"
267
+ },
268
+ "in": {
269
+ "type": "array",
270
+ "items": {
271
+ "$ref": "#/$defs/scalar"
272
+ },
273
+ "maxItems": 50
274
+ },
275
+ "not_in": {
276
+ "type": "array",
277
+ "items": {
278
+ "$ref": "#/$defs/scalar"
279
+ },
280
+ "maxItems": 50
281
+ },
282
+ "empty": {
283
+ "type": "boolean"
284
+ }
285
+ },
286
+ "description": "Condición when (forma de VisibleWhen ampliada a cualquier raíz)."
287
+ },
288
+ "badge": {
289
+ "type": "object",
290
+ "additionalProperties": false,
291
+ "required": [
292
+ "label"
293
+ ],
294
+ "properties": {
295
+ "label": {
296
+ "type": "string",
297
+ "maxLength": 60
298
+ },
299
+ "tone": {
300
+ "$ref": "#/$defs/tone"
301
+ }
302
+ }
303
+ },
304
+ "field": {
305
+ "type": "object",
306
+ "additionalProperties": false,
307
+ "required": [
308
+ "label"
309
+ ],
310
+ "properties": {
311
+ "label": {
312
+ "$ref": "#/$defs/label"
313
+ },
314
+ "value": {
315
+ "$ref": "#/$defs/text"
316
+ },
317
+ "copy": {
318
+ "type": "boolean"
319
+ }
320
+ }
321
+ },
322
+ "option": {
323
+ "type": "object",
324
+ "additionalProperties": false,
325
+ "required": [
326
+ "value",
327
+ "label"
328
+ ],
329
+ "properties": {
330
+ "value": {
331
+ "type": "string",
332
+ "maxLength": 160
333
+ },
334
+ "label": {
335
+ "$ref": "#/$defs/label"
336
+ }
337
+ }
338
+ },
339
+ "column": {
340
+ "type": "object",
341
+ "additionalProperties": false,
342
+ "required": [
343
+ "key",
344
+ "label"
345
+ ],
346
+ "properties": {
347
+ "key": {
348
+ "$ref": "#/$defs/key"
349
+ },
350
+ "label": {
351
+ "$ref": "#/$defs/label"
352
+ },
353
+ "format": {
354
+ "$ref": "#/$defs/statFormat"
355
+ }
356
+ }
357
+ },
358
+ "stateList": {
359
+ "type": "array",
360
+ "items": {
361
+ "$ref": "#/$defs/scalar"
362
+ },
363
+ "maxItems": 50
364
+ },
365
+ "stateValue": {
366
+ "anyOf": [
367
+ {
368
+ "$ref": "#/$defs/scalar"
369
+ },
370
+ {
371
+ "$ref": "#/$defs/stateList"
372
+ },
373
+ {
374
+ "type": "object",
375
+ "maxProperties": 16,
376
+ "propertyNames": {
377
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
378
+ },
379
+ "additionalProperties": {
380
+ "anyOf": [
381
+ {
382
+ "$ref": "#/$defs/scalar"
383
+ },
384
+ {
385
+ "$ref": "#/$defs/stateList"
386
+ }
387
+ ]
388
+ }
389
+ }
390
+ ]
391
+ },
392
+ "row": {
393
+ "type": "object",
394
+ "maxProperties": 24,
395
+ "propertyNames": {
396
+ "pattern": "^(?=.{1,64}$)(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$",
397
+ "x-no-proto": true
398
+ },
399
+ "additionalProperties": {
400
+ "$ref": "#/$defs/value"
401
+ }
402
+ },
403
+ "item": {
404
+ "type": "object",
405
+ "additionalProperties": false,
406
+ "properties": {
407
+ "label": {
408
+ "$ref": "#/$defs/label"
409
+ },
410
+ "value": {
411
+ "$ref": "#/$defs/text"
412
+ },
413
+ "hint": {
414
+ "$ref": "#/$defs/label"
415
+ },
416
+ "trend": {
417
+ "enum": [
418
+ "up",
419
+ "down",
420
+ "flat"
421
+ ]
422
+ },
423
+ "title": {
424
+ "$ref": "#/$defs/label"
425
+ },
426
+ "url": {
427
+ "$ref": "#/$defs/link"
428
+ },
429
+ "source": {
430
+ "$ref": "#/$defs/label"
431
+ },
432
+ "date": {
433
+ "type": "string",
434
+ "maxLength": 160
435
+ },
436
+ "time": {
437
+ "type": "string",
438
+ "maxLength": 160
439
+ },
440
+ "description": {
441
+ "$ref": "#/$defs/text"
442
+ },
443
+ "status": {
444
+ "type": "string",
445
+ "maxLength": 160
446
+ },
447
+ "tone": {
448
+ "$ref": "#/$defs/tone"
449
+ },
450
+ "format": {
451
+ "$ref": "#/$defs/statFormat"
452
+ }
453
+ }
454
+ },
455
+ "route": {
456
+ "type": "object",
457
+ "additionalProperties": false,
458
+ "minProperties": 1,
459
+ "properties": {
460
+ "name": {
461
+ "enum": [
462
+ "record",
463
+ "list",
464
+ "page"
465
+ ]
466
+ },
467
+ "model": {
468
+ "$ref": "#/$defs/key"
469
+ },
470
+ "id": {
471
+ "$ref": "#/$defs/value"
472
+ },
473
+ "filters": {
474
+ "type": "object",
475
+ "maxProperties": 8,
476
+ "additionalProperties": {
477
+ "$ref": "#/$defs/scalar"
478
+ }
479
+ },
480
+ "key": {
481
+ "$ref": "#/$defs/key"
482
+ },
483
+ "path": {
484
+ "$ref": "#/$defs/appPath"
485
+ }
486
+ },
487
+ "description": "path o name; los requeridos por name se validan en código."
488
+ },
489
+ "action": {
490
+ "x-discriminator": "do",
491
+ "description": "Acción declarativa {do, ...}; un esquema por verbo.",
492
+ "oneOf": [
493
+ {
494
+ "$ref": "#/$defs/action_navigate"
495
+ },
496
+ {
497
+ "$ref": "#/$defs/action_invoke"
498
+ },
499
+ {
500
+ "$ref": "#/$defs/action_submit"
501
+ },
502
+ {
503
+ "$ref": "#/$defs/action_open"
504
+ },
505
+ {
506
+ "$ref": "#/$defs/action_close"
507
+ },
508
+ {
509
+ "$ref": "#/$defs/action_set"
510
+ },
511
+ {
512
+ "$ref": "#/$defs/action_refresh"
513
+ },
514
+ {
515
+ "$ref": "#/$defs/action_emit"
516
+ }
517
+ ]
518
+ },
519
+ "action_navigate": {
520
+ "type": "object",
521
+ "additionalProperties": false,
522
+ "required": [
523
+ "do",
524
+ "route"
525
+ ],
526
+ "properties": {
527
+ "do": {
528
+ "const": "navigate"
529
+ },
530
+ "label": {
531
+ "$ref": "#/$defs/label"
532
+ },
533
+ "variant": {
534
+ "enum": [
535
+ "primary",
536
+ "secondary",
537
+ "ghost",
538
+ "danger"
539
+ ]
540
+ },
541
+ "icon": {
542
+ "type": "string",
543
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
544
+ "x-no-proto": true
545
+ },
546
+ "confirm": {
547
+ "type": "object",
548
+ "additionalProperties": false,
549
+ "properties": {
550
+ "title": {
551
+ "$ref": "#/$defs/label"
552
+ },
553
+ "body": {
554
+ "$ref": "#/$defs/text"
555
+ },
556
+ "tone": {
557
+ "$ref": "#/$defs/tone"
558
+ },
559
+ "require_text": {
560
+ "type": "string",
561
+ "maxLength": 60
562
+ }
563
+ }
564
+ },
565
+ "when": {
566
+ "$ref": "#/$defs/predicate"
567
+ },
568
+ "route": {
569
+ "$ref": "#/$defs/route"
570
+ }
571
+ }
572
+ },
573
+ "action_invoke": {
574
+ "type": "object",
575
+ "additionalProperties": false,
576
+ "required": [
577
+ "do",
578
+ "action"
579
+ ],
580
+ "properties": {
581
+ "do": {
582
+ "const": "invoke"
583
+ },
584
+ "label": {
585
+ "$ref": "#/$defs/label"
586
+ },
587
+ "variant": {
588
+ "enum": [
589
+ "primary",
590
+ "secondary",
591
+ "ghost",
592
+ "danger"
593
+ ]
594
+ },
595
+ "icon": {
596
+ "type": "string",
597
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
598
+ "x-no-proto": true
599
+ },
600
+ "confirm": {
601
+ "type": "object",
602
+ "additionalProperties": false,
603
+ "properties": {
604
+ "title": {
605
+ "$ref": "#/$defs/label"
606
+ },
607
+ "body": {
608
+ "$ref": "#/$defs/text"
609
+ },
610
+ "tone": {
611
+ "$ref": "#/$defs/tone"
612
+ },
613
+ "require_text": {
614
+ "type": "string",
615
+ "maxLength": 60
616
+ }
617
+ }
618
+ },
619
+ "when": {
620
+ "$ref": "#/$defs/predicate"
621
+ },
622
+ "action": {
623
+ "type": "string",
624
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*){1,3}$",
625
+ "description": "Acción del manifest <addon>.<Model>.<key>.",
626
+ "x-no-proto": true
627
+ },
628
+ "record": {
629
+ "$ref": "#/$defs/value"
630
+ },
631
+ "params": {
632
+ "type": "object",
633
+ "maxProperties": 8,
634
+ "additionalProperties": {
635
+ "$ref": "#/$defs/value"
636
+ }
637
+ },
638
+ "values": {
639
+ "type": "object",
640
+ "maxProperties": 40,
641
+ "additionalProperties": {
642
+ "$ref": "#/$defs/value"
643
+ }
644
+ }
645
+ }
646
+ },
647
+ "action_submit": {
648
+ "properties": {
649
+ "do": {
650
+ "const": "submit"
651
+ }
652
+ },
653
+ "x-discriminator": "to",
654
+ "oneOf": [
655
+ {
656
+ "$ref": "#/$defs/action_submit_invoke"
657
+ },
658
+ {
659
+ "$ref": "#/$defs/action_submit_settings"
660
+ },
661
+ {
662
+ "$ref": "#/$defs/action_submit_create"
663
+ },
664
+ {
665
+ "$ref": "#/$defs/action_submit_update"
666
+ }
667
+ ]
668
+ },
669
+ "action_submit_invoke": {
670
+ "type": "object",
671
+ "additionalProperties": false,
672
+ "required": [
673
+ "do",
674
+ "to",
675
+ "form",
676
+ "action"
677
+ ],
678
+ "properties": {
679
+ "do": {
680
+ "const": "submit"
681
+ },
682
+ "label": {
683
+ "$ref": "#/$defs/label"
684
+ },
685
+ "variant": {
686
+ "enum": [
687
+ "primary",
688
+ "secondary",
689
+ "ghost",
690
+ "danger"
691
+ ]
692
+ },
693
+ "icon": {
694
+ "type": "string",
695
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
696
+ "x-no-proto": true
697
+ },
698
+ "confirm": {
699
+ "type": "object",
700
+ "additionalProperties": false,
701
+ "properties": {
702
+ "title": {
703
+ "$ref": "#/$defs/label"
704
+ },
705
+ "body": {
706
+ "$ref": "#/$defs/text"
707
+ },
708
+ "tone": {
709
+ "$ref": "#/$defs/tone"
710
+ },
711
+ "require_text": {
712
+ "type": "string",
713
+ "maxLength": 60
714
+ }
715
+ }
716
+ },
717
+ "when": {
718
+ "$ref": "#/$defs/predicate"
719
+ },
720
+ "to": {
721
+ "const": "invoke"
722
+ },
723
+ "form": {
724
+ "$ref": "#/$defs/id"
725
+ },
726
+ "action": {
727
+ "type": "string",
728
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*){1,3}$",
729
+ "x-no-proto": true
730
+ }
731
+ }
732
+ },
733
+ "action_submit_settings": {
734
+ "type": "object",
735
+ "additionalProperties": false,
736
+ "required": [
737
+ "do",
738
+ "to",
739
+ "form"
740
+ ],
741
+ "properties": {
742
+ "do": {
743
+ "const": "submit"
744
+ },
745
+ "label": {
746
+ "$ref": "#/$defs/label"
747
+ },
748
+ "variant": {
749
+ "enum": [
750
+ "primary",
751
+ "secondary",
752
+ "ghost",
753
+ "danger"
754
+ ]
755
+ },
756
+ "icon": {
757
+ "type": "string",
758
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
759
+ "x-no-proto": true
760
+ },
761
+ "confirm": {
762
+ "type": "object",
763
+ "additionalProperties": false,
764
+ "properties": {
765
+ "title": {
766
+ "$ref": "#/$defs/label"
767
+ },
768
+ "body": {
769
+ "$ref": "#/$defs/text"
770
+ },
771
+ "tone": {
772
+ "$ref": "#/$defs/tone"
773
+ },
774
+ "require_text": {
775
+ "type": "string",
776
+ "maxLength": 60
777
+ }
778
+ }
779
+ },
780
+ "when": {
781
+ "$ref": "#/$defs/predicate"
782
+ },
783
+ "to": {
784
+ "const": "settings.write"
785
+ },
786
+ "form": {
787
+ "$ref": "#/$defs/id"
788
+ }
789
+ }
790
+ },
791
+ "action_submit_create": {
792
+ "type": "object",
793
+ "additionalProperties": false,
794
+ "required": [
795
+ "do",
796
+ "to",
797
+ "form",
798
+ "model"
799
+ ],
800
+ "properties": {
801
+ "do": {
802
+ "const": "submit"
803
+ },
804
+ "label": {
805
+ "$ref": "#/$defs/label"
806
+ },
807
+ "variant": {
808
+ "enum": [
809
+ "primary",
810
+ "secondary",
811
+ "ghost",
812
+ "danger"
813
+ ]
814
+ },
815
+ "icon": {
816
+ "type": "string",
817
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
818
+ "x-no-proto": true
819
+ },
820
+ "confirm": {
821
+ "type": "object",
822
+ "additionalProperties": false,
823
+ "properties": {
824
+ "title": {
825
+ "$ref": "#/$defs/label"
826
+ },
827
+ "body": {
828
+ "$ref": "#/$defs/text"
829
+ },
830
+ "tone": {
831
+ "$ref": "#/$defs/tone"
832
+ },
833
+ "require_text": {
834
+ "type": "string",
835
+ "maxLength": 60
836
+ }
837
+ }
838
+ },
839
+ "when": {
840
+ "$ref": "#/$defs/predicate"
841
+ },
842
+ "to": {
843
+ "const": "record.create"
844
+ },
845
+ "form": {
846
+ "$ref": "#/$defs/id"
847
+ },
848
+ "model": {
849
+ "$ref": "#/$defs/key"
850
+ }
851
+ }
852
+ },
853
+ "action_submit_update": {
854
+ "type": "object",
855
+ "additionalProperties": false,
856
+ "required": [
857
+ "do",
858
+ "to",
859
+ "form",
860
+ "model",
861
+ "record"
862
+ ],
863
+ "properties": {
864
+ "do": {
865
+ "const": "submit"
866
+ },
867
+ "label": {
868
+ "$ref": "#/$defs/label"
869
+ },
870
+ "variant": {
871
+ "enum": [
872
+ "primary",
873
+ "secondary",
874
+ "ghost",
875
+ "danger"
876
+ ]
877
+ },
878
+ "icon": {
879
+ "type": "string",
880
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
881
+ "x-no-proto": true
882
+ },
883
+ "confirm": {
884
+ "type": "object",
885
+ "additionalProperties": false,
886
+ "properties": {
887
+ "title": {
888
+ "$ref": "#/$defs/label"
889
+ },
890
+ "body": {
891
+ "$ref": "#/$defs/text"
892
+ },
893
+ "tone": {
894
+ "$ref": "#/$defs/tone"
895
+ },
896
+ "require_text": {
897
+ "type": "string",
898
+ "maxLength": 60
899
+ }
900
+ }
901
+ },
902
+ "when": {
903
+ "$ref": "#/$defs/predicate"
904
+ },
905
+ "to": {
906
+ "const": "record.update"
907
+ },
908
+ "form": {
909
+ "$ref": "#/$defs/id"
910
+ },
911
+ "model": {
912
+ "$ref": "#/$defs/key"
913
+ },
914
+ "record": {
915
+ "$ref": "#/$defs/value"
916
+ }
917
+ }
918
+ },
919
+ "action_open": {
920
+ "type": "object",
921
+ "additionalProperties": false,
922
+ "required": [
923
+ "do",
924
+ "overlay"
925
+ ],
926
+ "properties": {
927
+ "do": {
928
+ "const": "open"
929
+ },
930
+ "label": {
931
+ "$ref": "#/$defs/label"
932
+ },
933
+ "variant": {
934
+ "enum": [
935
+ "primary",
936
+ "secondary",
937
+ "ghost",
938
+ "danger"
939
+ ]
940
+ },
941
+ "icon": {
942
+ "type": "string",
943
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
944
+ "x-no-proto": true
945
+ },
946
+ "confirm": {
947
+ "type": "object",
948
+ "additionalProperties": false,
949
+ "properties": {
950
+ "title": {
951
+ "$ref": "#/$defs/label"
952
+ },
953
+ "body": {
954
+ "$ref": "#/$defs/text"
955
+ },
956
+ "tone": {
957
+ "$ref": "#/$defs/tone"
958
+ },
959
+ "require_text": {
960
+ "type": "string",
961
+ "maxLength": 60
962
+ }
963
+ }
964
+ },
965
+ "when": {
966
+ "$ref": "#/$defs/predicate"
967
+ },
968
+ "overlay": {
969
+ "$ref": "#/$defs/id"
970
+ }
971
+ }
972
+ },
973
+ "action_close": {
974
+ "type": "object",
975
+ "additionalProperties": false,
976
+ "required": [
977
+ "do"
978
+ ],
979
+ "properties": {
980
+ "do": {
981
+ "const": "close"
982
+ },
983
+ "label": {
984
+ "$ref": "#/$defs/label"
985
+ },
986
+ "variant": {
987
+ "enum": [
988
+ "primary",
989
+ "secondary",
990
+ "ghost",
991
+ "danger"
992
+ ]
993
+ },
994
+ "icon": {
995
+ "type": "string",
996
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
997
+ "x-no-proto": true
998
+ },
999
+ "confirm": {
1000
+ "type": "object",
1001
+ "additionalProperties": false,
1002
+ "properties": {
1003
+ "title": {
1004
+ "$ref": "#/$defs/label"
1005
+ },
1006
+ "body": {
1007
+ "$ref": "#/$defs/text"
1008
+ },
1009
+ "tone": {
1010
+ "$ref": "#/$defs/tone"
1011
+ },
1012
+ "require_text": {
1013
+ "type": "string",
1014
+ "maxLength": 60
1015
+ }
1016
+ }
1017
+ },
1018
+ "when": {
1019
+ "$ref": "#/$defs/predicate"
1020
+ },
1021
+ "overlay": {
1022
+ "$ref": "#/$defs/id"
1023
+ }
1024
+ }
1025
+ },
1026
+ "action_set": {
1027
+ "type": "object",
1028
+ "additionalProperties": false,
1029
+ "required": [
1030
+ "do",
1031
+ "path",
1032
+ "value"
1033
+ ],
1034
+ "properties": {
1035
+ "do": {
1036
+ "const": "set"
1037
+ },
1038
+ "label": {
1039
+ "$ref": "#/$defs/label"
1040
+ },
1041
+ "variant": {
1042
+ "enum": [
1043
+ "primary",
1044
+ "secondary",
1045
+ "ghost",
1046
+ "danger"
1047
+ ]
1048
+ },
1049
+ "icon": {
1050
+ "type": "string",
1051
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
1052
+ "x-no-proto": true
1053
+ },
1054
+ "confirm": {
1055
+ "type": "object",
1056
+ "additionalProperties": false,
1057
+ "properties": {
1058
+ "title": {
1059
+ "$ref": "#/$defs/label"
1060
+ },
1061
+ "body": {
1062
+ "$ref": "#/$defs/text"
1063
+ },
1064
+ "tone": {
1065
+ "$ref": "#/$defs/tone"
1066
+ },
1067
+ "require_text": {
1068
+ "type": "string",
1069
+ "maxLength": 60
1070
+ }
1071
+ }
1072
+ },
1073
+ "when": {
1074
+ "$ref": "#/$defs/predicate"
1075
+ },
1076
+ "path": {
1077
+ "type": "string",
1078
+ "pattern": "^(?!(?:.*\\.)?(?:__proto__|constructor|prototype)(?:\\.|$))state(\\.[A-Za-z_][A-Za-z0-9_]{0,63}){1,6}$",
1079
+ "x-no-proto": true
1080
+ },
1081
+ "value": {
1082
+ "$ref": "#/$defs/scalar"
1083
+ }
1084
+ }
1085
+ },
1086
+ "action_refresh": {
1087
+ "type": "object",
1088
+ "additionalProperties": false,
1089
+ "required": [
1090
+ "do",
1091
+ "source"
1092
+ ],
1093
+ "properties": {
1094
+ "do": {
1095
+ "const": "refresh"
1096
+ },
1097
+ "label": {
1098
+ "$ref": "#/$defs/label"
1099
+ },
1100
+ "variant": {
1101
+ "enum": [
1102
+ "primary",
1103
+ "secondary",
1104
+ "ghost",
1105
+ "danger"
1106
+ ]
1107
+ },
1108
+ "icon": {
1109
+ "type": "string",
1110
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
1111
+ "x-no-proto": true
1112
+ },
1113
+ "confirm": {
1114
+ "type": "object",
1115
+ "additionalProperties": false,
1116
+ "properties": {
1117
+ "title": {
1118
+ "$ref": "#/$defs/label"
1119
+ },
1120
+ "body": {
1121
+ "$ref": "#/$defs/text"
1122
+ },
1123
+ "tone": {
1124
+ "$ref": "#/$defs/tone"
1125
+ },
1126
+ "require_text": {
1127
+ "type": "string",
1128
+ "maxLength": 60
1129
+ }
1130
+ }
1131
+ },
1132
+ "when": {
1133
+ "$ref": "#/$defs/predicate"
1134
+ },
1135
+ "source": {
1136
+ "$ref": "#/$defs/name"
1137
+ }
1138
+ }
1139
+ },
1140
+ "action_emit": {
1141
+ "type": "object",
1142
+ "additionalProperties": false,
1143
+ "required": [
1144
+ "do",
1145
+ "id"
1146
+ ],
1147
+ "properties": {
1148
+ "do": {
1149
+ "const": "emit"
1150
+ },
1151
+ "label": {
1152
+ "$ref": "#/$defs/label"
1153
+ },
1154
+ "variant": {
1155
+ "enum": [
1156
+ "primary",
1157
+ "secondary",
1158
+ "ghost",
1159
+ "danger"
1160
+ ]
1161
+ },
1162
+ "icon": {
1163
+ "type": "string",
1164
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
1165
+ "x-no-proto": true
1166
+ },
1167
+ "confirm": {
1168
+ "type": "object",
1169
+ "additionalProperties": false,
1170
+ "properties": {
1171
+ "title": {
1172
+ "$ref": "#/$defs/label"
1173
+ },
1174
+ "body": {
1175
+ "$ref": "#/$defs/text"
1176
+ },
1177
+ "tone": {
1178
+ "$ref": "#/$defs/tone"
1179
+ },
1180
+ "require_text": {
1181
+ "type": "string",
1182
+ "maxLength": 60
1183
+ }
1184
+ }
1185
+ },
1186
+ "when": {
1187
+ "$ref": "#/$defs/predicate"
1188
+ },
1189
+ "id": {
1190
+ "type": "string",
1191
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*){1,3}$",
1192
+ "x-no-proto": true
1193
+ },
1194
+ "params": {
1195
+ "type": "object",
1196
+ "maxProperties": 8,
1197
+ "additionalProperties": {
1198
+ "$ref": "#/$defs/scalar"
1199
+ }
1200
+ }
1201
+ }
1202
+ },
1203
+ "actions": {
1204
+ "type": "array",
1205
+ "items": {
1206
+ "$ref": "#/$defs/action"
1207
+ },
1208
+ "maxItems": 6
1209
+ },
1210
+ "formField": {
1211
+ "type": "object",
1212
+ "additionalProperties": false,
1213
+ "required": [
1214
+ "key",
1215
+ "label",
1216
+ "kind"
1217
+ ],
1218
+ "properties": {
1219
+ "key": {
1220
+ "$ref": "#/$defs/key"
1221
+ },
1222
+ "label": {
1223
+ "$ref": "#/$defs/label"
1224
+ },
1225
+ "kind": {
1226
+ "$ref": "#/$defs/fieldKind"
1227
+ },
1228
+ "required": {
1229
+ "type": "boolean"
1230
+ },
1231
+ "options": {
1232
+ "type": "array",
1233
+ "items": {
1234
+ "$ref": "#/$defs/option"
1235
+ },
1236
+ "maxItems": 100
1237
+ },
1238
+ "value": {
1239
+ "$ref": "#/$defs/value"
1240
+ },
1241
+ "help": {
1242
+ "type": "string",
1243
+ "maxLength": 160
1244
+ },
1245
+ "placeholder": {
1246
+ "type": "string",
1247
+ "maxLength": 160
1248
+ },
1249
+ "depends_on": {
1250
+ "$ref": "#/$defs/key",
1251
+ "description": "Clave de otro campo del mismo formulario."
1252
+ },
1253
+ "visible_when": {
1254
+ "type": "object",
1255
+ "additionalProperties": false,
1256
+ "properties": {
1257
+ "field": {
1258
+ "$ref": "#/$defs/key"
1259
+ },
1260
+ "equals": {
1261
+ "$ref": "#/$defs/scalar"
1262
+ },
1263
+ "in": {
1264
+ "type": "array",
1265
+ "items": {
1266
+ "$ref": "#/$defs/scalar"
1267
+ },
1268
+ "maxItems": 50
1269
+ },
1270
+ "not_in": {
1271
+ "type": "array",
1272
+ "items": {
1273
+ "$ref": "#/$defs/scalar"
1274
+ },
1275
+ "maxItems": 50
1276
+ },
1277
+ "empty": {
1278
+ "type": "boolean"
1279
+ }
1280
+ }
1281
+ },
1282
+ "validation": {
1283
+ "type": "object",
1284
+ "additionalProperties": false,
1285
+ "properties": {
1286
+ "min": {
1287
+ "type": "number"
1288
+ },
1289
+ "max": {
1290
+ "type": "number"
1291
+ },
1292
+ "min_length": {
1293
+ "type": "integer",
1294
+ "minimum": 0,
1295
+ "maximum": 2000
1296
+ },
1297
+ "max_length": {
1298
+ "type": "integer",
1299
+ "minimum": 0,
1300
+ "maximum": 2000
1301
+ },
1302
+ "pattern": {
1303
+ "type": "string",
1304
+ "maxLength": 200
1305
+ }
1306
+ }
1307
+ },
1308
+ "widget": {
1309
+ "type": "string",
1310
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]{0,31}$",
1311
+ "x-no-proto": true
1312
+ },
1313
+ "section": {
1314
+ "type": "string",
1315
+ "maxLength": 64
1316
+ },
1317
+ "write_only": {
1318
+ "type": "boolean"
1319
+ }
1320
+ }
1321
+ },
1322
+ "dataSource": {
1323
+ "type": "object",
1324
+ "additionalProperties": false,
1325
+ "minProperties": 1,
1326
+ "maxProperties": 2,
1327
+ "properties": {
1328
+ "q": {
1329
+ "type": "string",
1330
+ "pattern": "^(t|m|mm|o|r|i|mi|me|x):[^\\s]{1,500}$",
1331
+ "description": "Token de lectura del query batch."
1332
+ },
1333
+ "plan": {
1334
+ "enum": [
1335
+ "model.list",
1336
+ "model.form",
1337
+ "dashboard.home"
1338
+ ]
1339
+ },
1340
+ "args": {
1341
+ "type": "object",
1342
+ "maxProperties": 8,
1343
+ "additionalProperties": {
1344
+ "$ref": "#/$defs/scalar"
1345
+ }
1346
+ },
1347
+ "widget": {
1348
+ "type": "string",
1349
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]*\\.dashboard\\.[a-z][a-z0-9_]*$",
1350
+ "x-no-proto": true
1351
+ },
1352
+ "inline": {
1353
+ "type": "array",
1354
+ "items": {
1355
+ "$ref": "#/$defs/row"
1356
+ },
1357
+ "maxItems": 200
1358
+ }
1359
+ },
1360
+ "description": "Fuente declarada de solo lectura: q | plan(+args) | widget | inline."
1361
+ },
1362
+ "source": {
1363
+ "type": "string",
1364
+ "pattern": "^data\\.[A-Za-z_][A-Za-z0-9_]{0,63}$",
1365
+ "description": "Referencia a data.<nombre>."
1366
+ },
1367
+ "overlay": {
1368
+ "type": "object",
1369
+ "additionalProperties": false,
1370
+ "required": [
1371
+ "kind",
1372
+ "blocks"
1373
+ ],
1374
+ "properties": {
1375
+ "kind": {
1376
+ "enum": [
1377
+ "modal",
1378
+ "drawer"
1379
+ ]
1380
+ },
1381
+ "title": {
1382
+ "$ref": "#/$defs/label"
1383
+ },
1384
+ "blocks": {
1385
+ "type": "array",
1386
+ "items": {
1387
+ "$ref": "#/$defs/block"
1388
+ },
1389
+ "maxItems": 24,
1390
+ "minItems": 1
1391
+ }
1392
+ }
1393
+ },
1394
+ "block": {
1395
+ "x-genui": "block",
1396
+ "description": "Despachado por `type`; ver block_<type>.",
1397
+ "oneOf": [
1398
+ {
1399
+ "$ref": "#/$defs/block_stack"
1400
+ },
1401
+ {
1402
+ "$ref": "#/$defs/block_grid"
1403
+ },
1404
+ {
1405
+ "$ref": "#/$defs/block_tabs"
1406
+ },
1407
+ {
1408
+ "$ref": "#/$defs/block_section"
1409
+ },
1410
+ {
1411
+ "$ref": "#/$defs/block_text"
1412
+ },
1413
+ {
1414
+ "$ref": "#/$defs/block_markdown"
1415
+ },
1416
+ {
1417
+ "$ref": "#/$defs/block_alert"
1418
+ },
1419
+ {
1420
+ "$ref": "#/$defs/block_empty"
1421
+ },
1422
+ {
1423
+ "$ref": "#/$defs/block_card"
1424
+ },
1425
+ {
1426
+ "$ref": "#/$defs/block_list"
1427
+ },
1428
+ {
1429
+ "$ref": "#/$defs/block_kpi"
1430
+ },
1431
+ {
1432
+ "$ref": "#/$defs/block_stats"
1433
+ },
1434
+ {
1435
+ "$ref": "#/$defs/block_links"
1436
+ },
1437
+ {
1438
+ "$ref": "#/$defs/block_timeline"
1439
+ },
1440
+ {
1441
+ "$ref": "#/$defs/block_table"
1442
+ },
1443
+ {
1444
+ "$ref": "#/$defs/block_model_view"
1445
+ },
1446
+ {
1447
+ "$ref": "#/$defs/block_view"
1448
+ },
1449
+ {
1450
+ "$ref": "#/$defs/block_chart"
1451
+ },
1452
+ {
1453
+ "$ref": "#/$defs/block_form"
1454
+ },
1455
+ {
1456
+ "$ref": "#/$defs/block_wizard"
1457
+ },
1458
+ {
1459
+ "$ref": "#/$defs/block_confirm"
1460
+ },
1461
+ {
1462
+ "$ref": "#/$defs/block_settings"
1463
+ },
1464
+ {
1465
+ "$ref": "#/$defs/block_media"
1466
+ },
1467
+ {
1468
+ "$ref": "#/$defs/block_slot"
1469
+ },
1470
+ {
1471
+ "$ref": "#/$defs/block_ext"
1472
+ }
1473
+ ]
1474
+ },
1475
+ "block_stack": {
1476
+ "type": "object",
1477
+ "additionalProperties": false,
1478
+ "required": [
1479
+ "type",
1480
+ "blocks"
1481
+ ],
1482
+ "properties": {
1483
+ "type": {
1484
+ "const": "stack"
1485
+ },
1486
+ "id": {
1487
+ "$ref": "#/$defs/id"
1488
+ },
1489
+ "when": {
1490
+ "$ref": "#/$defs/predicate"
1491
+ },
1492
+ "fallback": {
1493
+ "type": "string",
1494
+ "maxLength": 2000
1495
+ },
1496
+ "direction": {
1497
+ "enum": [
1498
+ "vertical",
1499
+ "horizontal"
1500
+ ]
1501
+ },
1502
+ "title": {
1503
+ "$ref": "#/$defs/label"
1504
+ },
1505
+ "blocks": {
1506
+ "type": "array",
1507
+ "items": {
1508
+ "$ref": "#/$defs/block"
1509
+ },
1510
+ "maxItems": 24,
1511
+ "minItems": 1
1512
+ }
1513
+ }
1514
+ },
1515
+ "block_grid": {
1516
+ "type": "object",
1517
+ "additionalProperties": false,
1518
+ "required": [
1519
+ "type",
1520
+ "blocks"
1521
+ ],
1522
+ "properties": {
1523
+ "type": {
1524
+ "const": "grid"
1525
+ },
1526
+ "id": {
1527
+ "$ref": "#/$defs/id"
1528
+ },
1529
+ "when": {
1530
+ "$ref": "#/$defs/predicate"
1531
+ },
1532
+ "fallback": {
1533
+ "type": "string",
1534
+ "maxLength": 2000
1535
+ },
1536
+ "columns": {
1537
+ "type": "integer",
1538
+ "minimum": 1,
1539
+ "maximum": 4
1540
+ },
1541
+ "title": {
1542
+ "$ref": "#/$defs/label"
1543
+ },
1544
+ "blocks": {
1545
+ "type": "array",
1546
+ "items": {
1547
+ "$ref": "#/$defs/block"
1548
+ },
1549
+ "maxItems": 24,
1550
+ "minItems": 1
1551
+ }
1552
+ }
1553
+ },
1554
+ "block_tabs": {
1555
+ "type": "object",
1556
+ "additionalProperties": false,
1557
+ "required": [
1558
+ "type",
1559
+ "tabs"
1560
+ ],
1561
+ "properties": {
1562
+ "type": {
1563
+ "const": "tabs"
1564
+ },
1565
+ "id": {
1566
+ "$ref": "#/$defs/id"
1567
+ },
1568
+ "when": {
1569
+ "$ref": "#/$defs/predicate"
1570
+ },
1571
+ "fallback": {
1572
+ "type": "string",
1573
+ "maxLength": 2000
1574
+ },
1575
+ "state": {
1576
+ "$ref": "#/$defs/bindingPath"
1577
+ },
1578
+ "tabs": {
1579
+ "type": "array",
1580
+ "items": {
1581
+ "type": "object",
1582
+ "additionalProperties": false,
1583
+ "required": [
1584
+ "key",
1585
+ "label",
1586
+ "blocks"
1587
+ ],
1588
+ "properties": {
1589
+ "key": {
1590
+ "$ref": "#/$defs/key"
1591
+ },
1592
+ "label": {
1593
+ "$ref": "#/$defs/label"
1594
+ },
1595
+ "blocks": {
1596
+ "type": "array",
1597
+ "items": {
1598
+ "$ref": "#/$defs/block"
1599
+ },
1600
+ "maxItems": 24,
1601
+ "minItems": 1
1602
+ }
1603
+ }
1604
+ },
1605
+ "maxItems": 8,
1606
+ "minItems": 1
1607
+ }
1608
+ }
1609
+ },
1610
+ "block_section": {
1611
+ "type": "object",
1612
+ "additionalProperties": false,
1613
+ "required": [
1614
+ "type",
1615
+ "title",
1616
+ "blocks"
1617
+ ],
1618
+ "properties": {
1619
+ "type": {
1620
+ "const": "section"
1621
+ },
1622
+ "id": {
1623
+ "$ref": "#/$defs/id"
1624
+ },
1625
+ "when": {
1626
+ "$ref": "#/$defs/predicate"
1627
+ },
1628
+ "fallback": {
1629
+ "type": "string",
1630
+ "maxLength": 2000
1631
+ },
1632
+ "title": {
1633
+ "$ref": "#/$defs/label"
1634
+ },
1635
+ "collapsible": {
1636
+ "type": "boolean"
1637
+ },
1638
+ "collapsed": {
1639
+ "type": "boolean"
1640
+ },
1641
+ "blocks": {
1642
+ "type": "array",
1643
+ "items": {
1644
+ "$ref": "#/$defs/block"
1645
+ },
1646
+ "maxItems": 24,
1647
+ "minItems": 1
1648
+ }
1649
+ }
1650
+ },
1651
+ "block_text": {
1652
+ "type": "object",
1653
+ "additionalProperties": false,
1654
+ "required": [
1655
+ "type",
1656
+ "text"
1657
+ ],
1658
+ "properties": {
1659
+ "type": {
1660
+ "const": "text"
1661
+ },
1662
+ "id": {
1663
+ "$ref": "#/$defs/id"
1664
+ },
1665
+ "when": {
1666
+ "$ref": "#/$defs/predicate"
1667
+ },
1668
+ "fallback": {
1669
+ "type": "string",
1670
+ "maxLength": 2000
1671
+ },
1672
+ "text": {
1673
+ "$ref": "#/$defs/text"
1674
+ },
1675
+ "tone": {
1676
+ "$ref": "#/$defs/tone"
1677
+ }
1678
+ }
1679
+ },
1680
+ "block_markdown": {
1681
+ "type": "object",
1682
+ "additionalProperties": false,
1683
+ "required": [
1684
+ "type",
1685
+ "markdown"
1686
+ ],
1687
+ "properties": {
1688
+ "type": {
1689
+ "const": "markdown"
1690
+ },
1691
+ "id": {
1692
+ "$ref": "#/$defs/id"
1693
+ },
1694
+ "when": {
1695
+ "$ref": "#/$defs/predicate"
1696
+ },
1697
+ "fallback": {
1698
+ "type": "string",
1699
+ "maxLength": 2000
1700
+ },
1701
+ "markdown": {
1702
+ "type": "string",
1703
+ "maxLength": 8000
1704
+ }
1705
+ }
1706
+ },
1707
+ "block_alert": {
1708
+ "type": "object",
1709
+ "additionalProperties": false,
1710
+ "required": [
1711
+ "type",
1712
+ "text"
1713
+ ],
1714
+ "properties": {
1715
+ "type": {
1716
+ "const": "alert"
1717
+ },
1718
+ "id": {
1719
+ "$ref": "#/$defs/id"
1720
+ },
1721
+ "when": {
1722
+ "$ref": "#/$defs/predicate"
1723
+ },
1724
+ "fallback": {
1725
+ "type": "string",
1726
+ "maxLength": 2000
1727
+ },
1728
+ "title": {
1729
+ "$ref": "#/$defs/label"
1730
+ },
1731
+ "text": {
1732
+ "$ref": "#/$defs/text"
1733
+ },
1734
+ "tone": {
1735
+ "$ref": "#/$defs/tone"
1736
+ }
1737
+ }
1738
+ },
1739
+ "block_empty": {
1740
+ "type": "object",
1741
+ "additionalProperties": false,
1742
+ "required": [
1743
+ "type",
1744
+ "title"
1745
+ ],
1746
+ "properties": {
1747
+ "type": {
1748
+ "const": "empty"
1749
+ },
1750
+ "id": {
1751
+ "$ref": "#/$defs/id"
1752
+ },
1753
+ "when": {
1754
+ "$ref": "#/$defs/predicate"
1755
+ },
1756
+ "fallback": {
1757
+ "type": "string",
1758
+ "maxLength": 2000
1759
+ },
1760
+ "title": {
1761
+ "$ref": "#/$defs/label"
1762
+ },
1763
+ "text": {
1764
+ "$ref": "#/$defs/text"
1765
+ },
1766
+ "icon": {
1767
+ "type": "string",
1768
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9-]{0,63}$",
1769
+ "x-no-proto": true
1770
+ },
1771
+ "actions": {
1772
+ "$ref": "#/$defs/actions"
1773
+ }
1774
+ }
1775
+ },
1776
+ "block_card": {
1777
+ "type": "object",
1778
+ "additionalProperties": false,
1779
+ "required": [
1780
+ "type",
1781
+ "title"
1782
+ ],
1783
+ "properties": {
1784
+ "type": {
1785
+ "const": "card"
1786
+ },
1787
+ "id": {
1788
+ "$ref": "#/$defs/id"
1789
+ },
1790
+ "when": {
1791
+ "$ref": "#/$defs/predicate"
1792
+ },
1793
+ "fallback": {
1794
+ "type": "string",
1795
+ "maxLength": 2000
1796
+ },
1797
+ "title": {
1798
+ "$ref": "#/$defs/label"
1799
+ },
1800
+ "subtitle": {
1801
+ "$ref": "#/$defs/label"
1802
+ },
1803
+ "body": {
1804
+ "$ref": "#/$defs/text"
1805
+ },
1806
+ "badges": {
1807
+ "type": "array",
1808
+ "items": {
1809
+ "$ref": "#/$defs/badge"
1810
+ },
1811
+ "maxItems": 6
1812
+ },
1813
+ "fields": {
1814
+ "type": "array",
1815
+ "items": {
1816
+ "$ref": "#/$defs/field"
1817
+ },
1818
+ "maxItems": 12
1819
+ },
1820
+ "link": {
1821
+ "$ref": "#/$defs/link"
1822
+ },
1823
+ "tone": {
1824
+ "$ref": "#/$defs/tone"
1825
+ },
1826
+ "actions": {
1827
+ "$ref": "#/$defs/actions"
1828
+ }
1829
+ }
1830
+ },
1831
+ "block_list": {
1832
+ "type": "object",
1833
+ "additionalProperties": false,
1834
+ "required": [
1835
+ "type",
1836
+ "items"
1837
+ ],
1838
+ "properties": {
1839
+ "type": {
1840
+ "const": "list"
1841
+ },
1842
+ "id": {
1843
+ "$ref": "#/$defs/id"
1844
+ },
1845
+ "when": {
1846
+ "$ref": "#/$defs/predicate"
1847
+ },
1848
+ "fallback": {
1849
+ "type": "string",
1850
+ "maxLength": 2000
1851
+ },
1852
+ "title": {
1853
+ "$ref": "#/$defs/label"
1854
+ },
1855
+ "items": {
1856
+ "type": "array",
1857
+ "items": {
1858
+ "type": "object",
1859
+ "additionalProperties": false,
1860
+ "required": [
1861
+ "title"
1862
+ ],
1863
+ "properties": {
1864
+ "title": {
1865
+ "$ref": "#/$defs/label"
1866
+ },
1867
+ "description": {
1868
+ "$ref": "#/$defs/text"
1869
+ },
1870
+ "badge": {
1871
+ "$ref": "#/$defs/badge"
1872
+ },
1873
+ "action": {
1874
+ "$ref": "#/$defs/action"
1875
+ }
1876
+ }
1877
+ },
1878
+ "maxItems": 50,
1879
+ "minItems": 1
1880
+ }
1881
+ }
1882
+ },
1883
+ "block_kpi": {
1884
+ "type": "object",
1885
+ "additionalProperties": false,
1886
+ "required": [
1887
+ "type",
1888
+ "items"
1889
+ ],
1890
+ "properties": {
1891
+ "type": {
1892
+ "const": "kpi"
1893
+ },
1894
+ "id": {
1895
+ "$ref": "#/$defs/id"
1896
+ },
1897
+ "when": {
1898
+ "$ref": "#/$defs/predicate"
1899
+ },
1900
+ "fallback": {
1901
+ "type": "string",
1902
+ "maxLength": 2000
1903
+ },
1904
+ "title": {
1905
+ "$ref": "#/$defs/label"
1906
+ },
1907
+ "items": {
1908
+ "type": "array",
1909
+ "items": {
1910
+ "$ref": "#/$defs/item"
1911
+ },
1912
+ "maxItems": 12,
1913
+ "minItems": 1
1914
+ }
1915
+ }
1916
+ },
1917
+ "block_stats": {
1918
+ "type": "object",
1919
+ "additionalProperties": false,
1920
+ "required": [
1921
+ "type"
1922
+ ],
1923
+ "properties": {
1924
+ "type": {
1925
+ "const": "stats"
1926
+ },
1927
+ "id": {
1928
+ "$ref": "#/$defs/id"
1929
+ },
1930
+ "when": {
1931
+ "$ref": "#/$defs/predicate"
1932
+ },
1933
+ "fallback": {
1934
+ "type": "string",
1935
+ "maxLength": 2000
1936
+ },
1937
+ "title": {
1938
+ "$ref": "#/$defs/label"
1939
+ },
1940
+ "source": {
1941
+ "$ref": "#/$defs/source"
1942
+ },
1943
+ "format": {
1944
+ "$ref": "#/$defs/statFormat"
1945
+ },
1946
+ "items": {
1947
+ "type": "array",
1948
+ "items": {
1949
+ "$ref": "#/$defs/item"
1950
+ },
1951
+ "maxItems": 12,
1952
+ "minItems": 1
1953
+ },
1954
+ "trend": {
1955
+ "enum": [
1956
+ "up",
1957
+ "down",
1958
+ "flat"
1959
+ ]
1960
+ },
1961
+ "compare": {
1962
+ "type": "string",
1963
+ "maxLength": 160
1964
+ }
1965
+ }
1966
+ },
1967
+ "block_links": {
1968
+ "type": "object",
1969
+ "additionalProperties": false,
1970
+ "required": [
1971
+ "type",
1972
+ "items"
1973
+ ],
1974
+ "properties": {
1975
+ "type": {
1976
+ "const": "links"
1977
+ },
1978
+ "id": {
1979
+ "$ref": "#/$defs/id"
1980
+ },
1981
+ "when": {
1982
+ "$ref": "#/$defs/predicate"
1983
+ },
1984
+ "fallback": {
1985
+ "type": "string",
1986
+ "maxLength": 2000
1987
+ },
1988
+ "title": {
1989
+ "$ref": "#/$defs/label"
1990
+ },
1991
+ "items": {
1992
+ "type": "array",
1993
+ "items": {
1994
+ "$ref": "#/$defs/item"
1995
+ },
1996
+ "maxItems": 50,
1997
+ "minItems": 1
1998
+ }
1999
+ }
2000
+ },
2001
+ "block_timeline": {
2002
+ "type": "object",
2003
+ "additionalProperties": false,
2004
+ "required": [
2005
+ "type"
2006
+ ],
2007
+ "properties": {
2008
+ "type": {
2009
+ "const": "timeline"
2010
+ },
2011
+ "id": {
2012
+ "$ref": "#/$defs/id"
2013
+ },
2014
+ "when": {
2015
+ "$ref": "#/$defs/predicate"
2016
+ },
2017
+ "fallback": {
2018
+ "type": "string",
2019
+ "maxLength": 2000
2020
+ },
2021
+ "title": {
2022
+ "$ref": "#/$defs/label"
2023
+ },
2024
+ "items": {
2025
+ "type": "array",
2026
+ "items": {
2027
+ "$ref": "#/$defs/item"
2028
+ },
2029
+ "maxItems": 50,
2030
+ "minItems": 1
2031
+ },
2032
+ "source": {
2033
+ "$ref": "#/$defs/source"
2034
+ }
2035
+ }
2036
+ },
2037
+ "block_table": {
2038
+ "type": "object",
2039
+ "additionalProperties": false,
2040
+ "required": [
2041
+ "type",
2042
+ "columns"
2043
+ ],
2044
+ "properties": {
2045
+ "type": {
2046
+ "const": "table"
2047
+ },
2048
+ "id": {
2049
+ "$ref": "#/$defs/id"
2050
+ },
2051
+ "when": {
2052
+ "$ref": "#/$defs/predicate"
2053
+ },
2054
+ "fallback": {
2055
+ "type": "string",
2056
+ "maxLength": 2000
2057
+ },
2058
+ "title": {
2059
+ "$ref": "#/$defs/label"
2060
+ },
2061
+ "caption": {
2062
+ "$ref": "#/$defs/label"
2063
+ },
2064
+ "columns": {
2065
+ "type": "array",
2066
+ "items": {
2067
+ "$ref": "#/$defs/column"
2068
+ },
2069
+ "maxItems": 24,
2070
+ "minItems": 1
2071
+ },
2072
+ "rows": {
2073
+ "type": "array",
2074
+ "items": {
2075
+ "$ref": "#/$defs/row"
2076
+ },
2077
+ "maxItems": 200
2078
+ },
2079
+ "source": {
2080
+ "$ref": "#/$defs/source"
2081
+ },
2082
+ "filters": {
2083
+ "type": "array",
2084
+ "items": {
2085
+ "$ref": "#/$defs/key"
2086
+ },
2087
+ "maxItems": 12
2088
+ },
2089
+ "sort": {
2090
+ "type": "object",
2091
+ "additionalProperties": false,
2092
+ "required": [
2093
+ "key"
2094
+ ],
2095
+ "properties": {
2096
+ "key": {
2097
+ "$ref": "#/$defs/key"
2098
+ },
2099
+ "dir": {
2100
+ "enum": [
2101
+ "asc",
2102
+ "desc"
2103
+ ]
2104
+ }
2105
+ }
2106
+ },
2107
+ "page_size": {
2108
+ "type": "integer",
2109
+ "minimum": 1,
2110
+ "maximum": 100
2111
+ },
2112
+ "row_actions": {
2113
+ "$ref": "#/$defs/actions"
2114
+ },
2115
+ "bulk_actions": {
2116
+ "$ref": "#/$defs/actions"
2117
+ }
2118
+ }
2119
+ },
2120
+ "block_model_view": {
2121
+ "type": "object",
2122
+ "additionalProperties": false,
2123
+ "required": [
2124
+ "type",
2125
+ "model"
2126
+ ],
2127
+ "properties": {
2128
+ "type": {
2129
+ "const": "model_view"
2130
+ },
2131
+ "id": {
2132
+ "$ref": "#/$defs/id"
2133
+ },
2134
+ "when": {
2135
+ "$ref": "#/$defs/predicate"
2136
+ },
2137
+ "fallback": {
2138
+ "type": "string",
2139
+ "maxLength": 2000
2140
+ },
2141
+ "title": {
2142
+ "$ref": "#/$defs/label"
2143
+ },
2144
+ "model": {
2145
+ "$ref": "#/$defs/key"
2146
+ },
2147
+ "view": {
2148
+ "enum": [
2149
+ "table",
2150
+ "kanban",
2151
+ "calendar",
2152
+ "map",
2153
+ "timeline",
2154
+ "chart"
2155
+ ]
2156
+ },
2157
+ "filters": {
2158
+ "type": "object",
2159
+ "maxProperties": 8,
2160
+ "additionalProperties": {
2161
+ "$ref": "#/$defs/scalar"
2162
+ }
2163
+ },
2164
+ "allowed_actions": {
2165
+ "type": "array",
2166
+ "items": {
2167
+ "$ref": "#/$defs/key"
2168
+ },
2169
+ "maxItems": 12
2170
+ }
2171
+ }
2172
+ },
2173
+ "block_view": {
2174
+ "type": "object",
2175
+ "additionalProperties": false,
2176
+ "required": [
2177
+ "type",
2178
+ "model"
2179
+ ],
2180
+ "properties": {
2181
+ "type": {
2182
+ "const": "view"
2183
+ },
2184
+ "id": {
2185
+ "$ref": "#/$defs/id"
2186
+ },
2187
+ "when": {
2188
+ "$ref": "#/$defs/predicate"
2189
+ },
2190
+ "fallback": {
2191
+ "type": "string",
2192
+ "maxLength": 2000
2193
+ },
2194
+ "title": {
2195
+ "$ref": "#/$defs/label"
2196
+ },
2197
+ "model": {
2198
+ "$ref": "#/$defs/key"
2199
+ },
2200
+ "record": {
2201
+ "$ref": "#/$defs/value"
2202
+ },
2203
+ "fields": {
2204
+ "type": "array",
2205
+ "items": {
2206
+ "$ref": "#/$defs/key"
2207
+ },
2208
+ "maxItems": 40
2209
+ },
2210
+ "panels": {
2211
+ "type": "array",
2212
+ "items": {
2213
+ "$ref": "#/$defs/key"
2214
+ },
2215
+ "maxItems": 12
2216
+ }
2217
+ }
2218
+ },
2219
+ "block_chart": {
2220
+ "type": "object",
2221
+ "additionalProperties": false,
2222
+ "required": [
2223
+ "type",
2224
+ "kind",
2225
+ "x",
2226
+ "series",
2227
+ "summary"
2228
+ ],
2229
+ "properties": {
2230
+ "type": {
2231
+ "const": "chart"
2232
+ },
2233
+ "id": {
2234
+ "$ref": "#/$defs/id"
2235
+ },
2236
+ "when": {
2237
+ "$ref": "#/$defs/predicate"
2238
+ },
2239
+ "fallback": {
2240
+ "type": "string",
2241
+ "maxLength": 2000
2242
+ },
2243
+ "title": {
2244
+ "$ref": "#/$defs/label"
2245
+ },
2246
+ "kind": {
2247
+ "enum": [
2248
+ "bar",
2249
+ "line",
2250
+ "area",
2251
+ "pie",
2252
+ "donut",
2253
+ "sparkline"
2254
+ ]
2255
+ },
2256
+ "x": {
2257
+ "$ref": "#/$defs/key"
2258
+ },
2259
+ "series": {
2260
+ "type": "array",
2261
+ "items": {
2262
+ "$ref": "#/$defs/column"
2263
+ },
2264
+ "maxItems": 6,
2265
+ "minItems": 1
2266
+ },
2267
+ "rows": {
2268
+ "type": "array",
2269
+ "items": {
2270
+ "$ref": "#/$defs/row"
2271
+ },
2272
+ "maxItems": 500
2273
+ },
2274
+ "source": {
2275
+ "$ref": "#/$defs/source"
2276
+ },
2277
+ "format": {
2278
+ "$ref": "#/$defs/statFormat"
2279
+ },
2280
+ "accent": {
2281
+ "$ref": "#/$defs/tone"
2282
+ },
2283
+ "summary": {
2284
+ "type": "string",
2285
+ "maxLength": 2000
2286
+ },
2287
+ "caption": {
2288
+ "$ref": "#/$defs/label"
2289
+ }
2290
+ }
2291
+ },
2292
+ "block_form": {
2293
+ "type": "object",
2294
+ "additionalProperties": false,
2295
+ "required": [
2296
+ "type",
2297
+ "fields"
2298
+ ],
2299
+ "properties": {
2300
+ "type": {
2301
+ "const": "form"
2302
+ },
2303
+ "id": {
2304
+ "$ref": "#/$defs/id"
2305
+ },
2306
+ "when": {
2307
+ "$ref": "#/$defs/predicate"
2308
+ },
2309
+ "fallback": {
2310
+ "type": "string",
2311
+ "maxLength": 2000
2312
+ },
2313
+ "title": {
2314
+ "$ref": "#/$defs/label"
2315
+ },
2316
+ "description": {
2317
+ "$ref": "#/$defs/text"
2318
+ },
2319
+ "fields": {
2320
+ "type": "array",
2321
+ "items": {
2322
+ "$ref": "#/$defs/formField"
2323
+ },
2324
+ "maxItems": 40,
2325
+ "minItems": 1
2326
+ },
2327
+ "layout": {
2328
+ "type": "object",
2329
+ "additionalProperties": false,
2330
+ "properties": {
2331
+ "mode": {
2332
+ "enum": [
2333
+ "sections",
2334
+ "steps"
2335
+ ]
2336
+ },
2337
+ "steps": {
2338
+ "type": "array",
2339
+ "items": {
2340
+ "type": "object",
2341
+ "additionalProperties": false,
2342
+ "required": [
2343
+ "title",
2344
+ "fields"
2345
+ ],
2346
+ "properties": {
2347
+ "title": {
2348
+ "$ref": "#/$defs/label"
2349
+ },
2350
+ "description": {
2351
+ "$ref": "#/$defs/text"
2352
+ },
2353
+ "fields": {
2354
+ "type": "array",
2355
+ "items": {
2356
+ "$ref": "#/$defs/key"
2357
+ },
2358
+ "maxItems": 40,
2359
+ "minItems": 1
2360
+ }
2361
+ }
2362
+ },
2363
+ "maxItems": 8
2364
+ }
2365
+ }
2366
+ },
2367
+ "submit": {
2368
+ "$ref": "#/$defs/action"
2369
+ },
2370
+ "actions": {
2371
+ "$ref": "#/$defs/actions"
2372
+ }
2373
+ }
2374
+ },
2375
+ "block_wizard": {
2376
+ "type": "object",
2377
+ "additionalProperties": false,
2378
+ "required": [
2379
+ "type"
2380
+ ],
2381
+ "properties": {
2382
+ "type": {
2383
+ "const": "wizard"
2384
+ },
2385
+ "id": {
2386
+ "$ref": "#/$defs/id"
2387
+ },
2388
+ "when": {
2389
+ "$ref": "#/$defs/predicate"
2390
+ },
2391
+ "fallback": {
2392
+ "type": "string",
2393
+ "maxLength": 2000
2394
+ },
2395
+ "title": {
2396
+ "$ref": "#/$defs/label"
2397
+ },
2398
+ "description": {
2399
+ "$ref": "#/$defs/text"
2400
+ },
2401
+ "fields": {
2402
+ "type": "array",
2403
+ "items": {
2404
+ "$ref": "#/$defs/formField"
2405
+ },
2406
+ "maxItems": 40,
2407
+ "minItems": 1
2408
+ },
2409
+ "steps": {
2410
+ "type": "array",
2411
+ "items": {
2412
+ "type": "object",
2413
+ "additionalProperties": false,
2414
+ "required": [
2415
+ "title",
2416
+ "fields"
2417
+ ],
2418
+ "properties": {
2419
+ "title": {
2420
+ "$ref": "#/$defs/label"
2421
+ },
2422
+ "description": {
2423
+ "$ref": "#/$defs/text"
2424
+ },
2425
+ "fields": {
2426
+ "type": "array",
2427
+ "items": {
2428
+ "$ref": "#/$defs/key"
2429
+ },
2430
+ "maxItems": 40,
2431
+ "minItems": 1
2432
+ }
2433
+ }
2434
+ },
2435
+ "maxItems": 8,
2436
+ "minItems": 1
2437
+ },
2438
+ "submit": {
2439
+ "$ref": "#/$defs/action"
2440
+ },
2441
+ "ref": {
2442
+ "type": "object",
2443
+ "additionalProperties": false,
2444
+ "required": [
2445
+ "action"
2446
+ ],
2447
+ "properties": {
2448
+ "action": {
2449
+ "type": "string",
2450
+ "maxLength": 160
2451
+ }
2452
+ }
2453
+ }
2454
+ }
2455
+ },
2456
+ "block_confirm": {
2457
+ "type": "object",
2458
+ "additionalProperties": false,
2459
+ "required": [
2460
+ "type",
2461
+ "title",
2462
+ "actions"
2463
+ ],
2464
+ "properties": {
2465
+ "type": {
2466
+ "const": "confirm"
2467
+ },
2468
+ "id": {
2469
+ "$ref": "#/$defs/id"
2470
+ },
2471
+ "when": {
2472
+ "$ref": "#/$defs/predicate"
2473
+ },
2474
+ "fallback": {
2475
+ "type": "string",
2476
+ "maxLength": 2000
2477
+ },
2478
+ "title": {
2479
+ "$ref": "#/$defs/label"
2480
+ },
2481
+ "description": {
2482
+ "$ref": "#/$defs/text"
2483
+ },
2484
+ "fields": {
2485
+ "type": "array",
2486
+ "items": {
2487
+ "$ref": "#/$defs/field"
2488
+ },
2489
+ "maxItems": 12
2490
+ },
2491
+ "inputs": {
2492
+ "type": "array",
2493
+ "items": {
2494
+ "type": "object",
2495
+ "additionalProperties": false,
2496
+ "required": [
2497
+ "name",
2498
+ "label",
2499
+ "kind"
2500
+ ],
2501
+ "properties": {
2502
+ "name": {
2503
+ "$ref": "#/$defs/key"
2504
+ },
2505
+ "label": {
2506
+ "$ref": "#/$defs/label"
2507
+ },
2508
+ "kind": {
2509
+ "enum": [
2510
+ "text",
2511
+ "textarea",
2512
+ "number",
2513
+ "switch",
2514
+ "select",
2515
+ "time",
2516
+ "date"
2517
+ ]
2518
+ },
2519
+ "value": {
2520
+ "$ref": "#/$defs/scalar"
2521
+ },
2522
+ "required": {
2523
+ "type": "boolean"
2524
+ },
2525
+ "options": {
2526
+ "type": "array",
2527
+ "items": {
2528
+ "$ref": "#/$defs/option"
2529
+ },
2530
+ "maxItems": 30
2531
+ },
2532
+ "help": {
2533
+ "type": "string",
2534
+ "maxLength": 160
2535
+ }
2536
+ }
2537
+ },
2538
+ "maxItems": 12
2539
+ },
2540
+ "actions": {
2541
+ "type": "array",
2542
+ "items": {
2543
+ "type": "object",
2544
+ "additionalProperties": false,
2545
+ "required": [
2546
+ "id",
2547
+ "label"
2548
+ ],
2549
+ "properties": {
2550
+ "id": {
2551
+ "type": "string",
2552
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*){1,3}$",
2553
+ "x-no-proto": true
2554
+ },
2555
+ "label": {
2556
+ "type": "string",
2557
+ "maxLength": 60
2558
+ },
2559
+ "variant": {
2560
+ "enum": [
2561
+ "primary",
2562
+ "secondary",
2563
+ "ghost",
2564
+ "danger"
2565
+ ]
2566
+ },
2567
+ "params": {
2568
+ "type": "object",
2569
+ "maxProperties": 8,
2570
+ "additionalProperties": {
2571
+ "$ref": "#/$defs/scalar"
2572
+ }
2573
+ }
2574
+ }
2575
+ },
2576
+ "maxItems": 6,
2577
+ "minItems": 1
2578
+ },
2579
+ "badges": {
2580
+ "type": "array",
2581
+ "items": {
2582
+ "$ref": "#/$defs/badge"
2583
+ },
2584
+ "maxItems": 6
2585
+ },
2586
+ "tone": {
2587
+ "$ref": "#/$defs/tone"
2588
+ }
2589
+ }
2590
+ },
2591
+ "block_settings": {
2592
+ "description": "Solo por referencia; nunca en línea.",
2593
+ "type": "object",
2594
+ "additionalProperties": false,
2595
+ "required": [
2596
+ "type",
2597
+ "addon",
2598
+ "scope"
2599
+ ],
2600
+ "properties": {
2601
+ "type": {
2602
+ "const": "settings"
2603
+ },
2604
+ "id": {
2605
+ "$ref": "#/$defs/id"
2606
+ },
2607
+ "when": {
2608
+ "$ref": "#/$defs/predicate"
2609
+ },
2610
+ "fallback": {
2611
+ "type": "string",
2612
+ "maxLength": 2000
2613
+ },
2614
+ "addon": {
2615
+ "type": "string",
2616
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]{0,63}$",
2617
+ "x-no-proto": true
2618
+ },
2619
+ "keys": {
2620
+ "type": "array",
2621
+ "items": {
2622
+ "$ref": "#/$defs/key"
2623
+ },
2624
+ "maxItems": 40
2625
+ },
2626
+ "scope": {
2627
+ "enum": [
2628
+ "org",
2629
+ "branch"
2630
+ ]
2631
+ },
2632
+ "section": {
2633
+ "type": "string",
2634
+ "maxLength": 64
2635
+ }
2636
+ }
2637
+ },
2638
+ "block_media": {
2639
+ "type": "object",
2640
+ "additionalProperties": false,
2641
+ "required": [
2642
+ "type",
2643
+ "src",
2644
+ "alt",
2645
+ "width",
2646
+ "height"
2647
+ ],
2648
+ "properties": {
2649
+ "type": {
2650
+ "const": "media"
2651
+ },
2652
+ "id": {
2653
+ "$ref": "#/$defs/id"
2654
+ },
2655
+ "when": {
2656
+ "$ref": "#/$defs/predicate"
2657
+ },
2658
+ "fallback": {
2659
+ "type": "string",
2660
+ "maxLength": 2000
2661
+ },
2662
+ "src": {
2663
+ "type": "string",
2664
+ "maxLength": 2048,
2665
+ "pattern": "^(asset:(?!(?:__proto__|constructor|prototype)$)[A-Za-z0-9_-]{1,64}|/[^/\\\\\\s][^\\\\\\s]*)$"
2666
+ },
2667
+ "alt": {
2668
+ "type": "string",
2669
+ "maxLength": 300
2670
+ },
2671
+ "width": {
2672
+ "type": "integer",
2673
+ "minimum": 1,
2674
+ "maximum": 4096
2675
+ },
2676
+ "height": {
2677
+ "type": "integer",
2678
+ "minimum": 1,
2679
+ "maximum": 4096
2680
+ },
2681
+ "caption": {
2682
+ "$ref": "#/$defs/label"
2683
+ }
2684
+ }
2685
+ },
2686
+ "block_slot": {
2687
+ "type": "object",
2688
+ "additionalProperties": false,
2689
+ "required": [
2690
+ "type",
2691
+ "name"
2692
+ ],
2693
+ "properties": {
2694
+ "type": {
2695
+ "const": "slot"
2696
+ },
2697
+ "id": {
2698
+ "$ref": "#/$defs/id"
2699
+ },
2700
+ "when": {
2701
+ "$ref": "#/$defs/predicate"
2702
+ },
2703
+ "fallback": {
2704
+ "type": "string",
2705
+ "maxLength": 2000
2706
+ },
2707
+ "name": {
2708
+ "type": "string",
2709
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*){1,3}$",
2710
+ "x-no-proto": true
2711
+ },
2712
+ "record": {
2713
+ "$ref": "#/$defs/value"
2714
+ }
2715
+ }
2716
+ },
2717
+ "block_ext": {
2718
+ "type": "object",
2719
+ "additionalProperties": false,
2720
+ "required": [
2721
+ "type",
2722
+ "ext"
2723
+ ],
2724
+ "properties": {
2725
+ "type": {
2726
+ "const": "ext"
2727
+ },
2728
+ "id": {
2729
+ "$ref": "#/$defs/id"
2730
+ },
2731
+ "when": {
2732
+ "$ref": "#/$defs/predicate"
2733
+ },
2734
+ "fallback": {
2735
+ "type": "string",
2736
+ "maxLength": 2000
2737
+ },
2738
+ "ext": {
2739
+ "type": "string",
2740
+ "pattern": "^(?!(?:.*[.:@])?(?:__proto__|constructor|prototype)(?:[.:@]|$))[a-z][a-z0-9_]{0,63}\\.[a-z][a-z0-9_]{0,63}@[0-9]{1,3}$",
2741
+ "x-no-proto": true
2742
+ },
2743
+ "props": {
2744
+ "type": "object",
2745
+ "maxProperties": 16,
2746
+ "additionalProperties": {
2747
+ "anyOf": [
2748
+ {
2749
+ "$ref": "#/$defs/scalar"
2750
+ },
2751
+ {
2752
+ "type": "array",
2753
+ "items": {
2754
+ "type": [
2755
+ "string",
2756
+ "number",
2757
+ "boolean"
2758
+ ]
2759
+ },
2760
+ "maxItems": 50
2761
+ }
2762
+ ]
2763
+ }
2764
+ }
2765
+ }
2766
+ }
2767
+ }
2768
+ };
2769
+ /** Campos permitidos y requeridos por tipo de bloque (derivado del esquema). */
2770
+ export const GENUI_V2_BLOCKS = {
2771
+ "stack": {
2772
+ "allowed": [
2773
+ "type",
2774
+ "id",
2775
+ "when",
2776
+ "fallback",
2777
+ "direction",
2778
+ "title",
2779
+ "blocks"
2780
+ ],
2781
+ "required": [
2782
+ "type",
2783
+ "blocks"
2784
+ ]
2785
+ },
2786
+ "grid": {
2787
+ "allowed": [
2788
+ "type",
2789
+ "id",
2790
+ "when",
2791
+ "fallback",
2792
+ "columns",
2793
+ "title",
2794
+ "blocks"
2795
+ ],
2796
+ "required": [
2797
+ "type",
2798
+ "blocks"
2799
+ ]
2800
+ },
2801
+ "tabs": {
2802
+ "allowed": [
2803
+ "type",
2804
+ "id",
2805
+ "when",
2806
+ "fallback",
2807
+ "state",
2808
+ "tabs"
2809
+ ],
2810
+ "required": [
2811
+ "type",
2812
+ "tabs"
2813
+ ]
2814
+ },
2815
+ "section": {
2816
+ "allowed": [
2817
+ "type",
2818
+ "id",
2819
+ "when",
2820
+ "fallback",
2821
+ "title",
2822
+ "collapsible",
2823
+ "collapsed",
2824
+ "blocks"
2825
+ ],
2826
+ "required": [
2827
+ "type",
2828
+ "title",
2829
+ "blocks"
2830
+ ]
2831
+ },
2832
+ "text": {
2833
+ "allowed": [
2834
+ "type",
2835
+ "id",
2836
+ "when",
2837
+ "fallback",
2838
+ "text",
2839
+ "tone"
2840
+ ],
2841
+ "required": [
2842
+ "type",
2843
+ "text"
2844
+ ]
2845
+ },
2846
+ "markdown": {
2847
+ "allowed": [
2848
+ "type",
2849
+ "id",
2850
+ "when",
2851
+ "fallback",
2852
+ "markdown"
2853
+ ],
2854
+ "required": [
2855
+ "type",
2856
+ "markdown"
2857
+ ]
2858
+ },
2859
+ "alert": {
2860
+ "allowed": [
2861
+ "type",
2862
+ "id",
2863
+ "when",
2864
+ "fallback",
2865
+ "title",
2866
+ "text",
2867
+ "tone"
2868
+ ],
2869
+ "required": [
2870
+ "type",
2871
+ "text"
2872
+ ]
2873
+ },
2874
+ "empty": {
2875
+ "allowed": [
2876
+ "type",
2877
+ "id",
2878
+ "when",
2879
+ "fallback",
2880
+ "title",
2881
+ "text",
2882
+ "icon",
2883
+ "actions"
2884
+ ],
2885
+ "required": [
2886
+ "type",
2887
+ "title"
2888
+ ]
2889
+ },
2890
+ "card": {
2891
+ "allowed": [
2892
+ "type",
2893
+ "id",
2894
+ "when",
2895
+ "fallback",
2896
+ "title",
2897
+ "subtitle",
2898
+ "body",
2899
+ "badges",
2900
+ "fields",
2901
+ "link",
2902
+ "tone",
2903
+ "actions"
2904
+ ],
2905
+ "required": [
2906
+ "type",
2907
+ "title"
2908
+ ]
2909
+ },
2910
+ "list": {
2911
+ "allowed": [
2912
+ "type",
2913
+ "id",
2914
+ "when",
2915
+ "fallback",
2916
+ "title",
2917
+ "items"
2918
+ ],
2919
+ "required": [
2920
+ "type",
2921
+ "items"
2922
+ ]
2923
+ },
2924
+ "kpi": {
2925
+ "allowed": [
2926
+ "type",
2927
+ "id",
2928
+ "when",
2929
+ "fallback",
2930
+ "title",
2931
+ "items"
2932
+ ],
2933
+ "required": [
2934
+ "type",
2935
+ "items"
2936
+ ]
2937
+ },
2938
+ "stats": {
2939
+ "allowed": [
2940
+ "type",
2941
+ "id",
2942
+ "when",
2943
+ "fallback",
2944
+ "title",
2945
+ "source",
2946
+ "format",
2947
+ "items",
2948
+ "trend",
2949
+ "compare"
2950
+ ],
2951
+ "required": [
2952
+ "type"
2953
+ ]
2954
+ },
2955
+ "links": {
2956
+ "allowed": [
2957
+ "type",
2958
+ "id",
2959
+ "when",
2960
+ "fallback",
2961
+ "title",
2962
+ "items"
2963
+ ],
2964
+ "required": [
2965
+ "type",
2966
+ "items"
2967
+ ]
2968
+ },
2969
+ "timeline": {
2970
+ "allowed": [
2971
+ "type",
2972
+ "id",
2973
+ "when",
2974
+ "fallback",
2975
+ "title",
2976
+ "items",
2977
+ "source"
2978
+ ],
2979
+ "required": [
2980
+ "type"
2981
+ ]
2982
+ },
2983
+ "table": {
2984
+ "allowed": [
2985
+ "type",
2986
+ "id",
2987
+ "when",
2988
+ "fallback",
2989
+ "title",
2990
+ "caption",
2991
+ "columns",
2992
+ "rows",
2993
+ "source",
2994
+ "filters",
2995
+ "sort",
2996
+ "page_size",
2997
+ "row_actions",
2998
+ "bulk_actions"
2999
+ ],
3000
+ "required": [
3001
+ "type",
3002
+ "columns"
3003
+ ]
3004
+ },
3005
+ "model_view": {
3006
+ "allowed": [
3007
+ "type",
3008
+ "id",
3009
+ "when",
3010
+ "fallback",
3011
+ "title",
3012
+ "model",
3013
+ "view",
3014
+ "filters",
3015
+ "allowed_actions"
3016
+ ],
3017
+ "required": [
3018
+ "type",
3019
+ "model"
3020
+ ]
3021
+ },
3022
+ "view": {
3023
+ "allowed": [
3024
+ "type",
3025
+ "id",
3026
+ "when",
3027
+ "fallback",
3028
+ "title",
3029
+ "model",
3030
+ "record",
3031
+ "fields",
3032
+ "panels"
3033
+ ],
3034
+ "required": [
3035
+ "type",
3036
+ "model"
3037
+ ]
3038
+ },
3039
+ "chart": {
3040
+ "allowed": [
3041
+ "type",
3042
+ "id",
3043
+ "when",
3044
+ "fallback",
3045
+ "title",
3046
+ "kind",
3047
+ "x",
3048
+ "series",
3049
+ "rows",
3050
+ "source",
3051
+ "format",
3052
+ "accent",
3053
+ "summary",
3054
+ "caption"
3055
+ ],
3056
+ "required": [
3057
+ "type",
3058
+ "kind",
3059
+ "x",
3060
+ "series",
3061
+ "summary"
3062
+ ]
3063
+ },
3064
+ "form": {
3065
+ "allowed": [
3066
+ "type",
3067
+ "id",
3068
+ "when",
3069
+ "fallback",
3070
+ "title",
3071
+ "description",
3072
+ "fields",
3073
+ "layout",
3074
+ "submit",
3075
+ "actions"
3076
+ ],
3077
+ "required": [
3078
+ "type",
3079
+ "fields"
3080
+ ]
3081
+ },
3082
+ "wizard": {
3083
+ "allowed": [
3084
+ "type",
3085
+ "id",
3086
+ "when",
3087
+ "fallback",
3088
+ "title",
3089
+ "description",
3090
+ "fields",
3091
+ "steps",
3092
+ "submit",
3093
+ "ref"
3094
+ ],
3095
+ "required": [
3096
+ "type"
3097
+ ]
3098
+ },
3099
+ "confirm": {
3100
+ "allowed": [
3101
+ "type",
3102
+ "id",
3103
+ "when",
3104
+ "fallback",
3105
+ "title",
3106
+ "description",
3107
+ "fields",
3108
+ "inputs",
3109
+ "actions",
3110
+ "badges",
3111
+ "tone"
3112
+ ],
3113
+ "required": [
3114
+ "type",
3115
+ "title",
3116
+ "actions"
3117
+ ]
3118
+ },
3119
+ "settings": {
3120
+ "allowed": [
3121
+ "type",
3122
+ "id",
3123
+ "when",
3124
+ "fallback",
3125
+ "addon",
3126
+ "keys",
3127
+ "scope",
3128
+ "section"
3129
+ ],
3130
+ "required": [
3131
+ "type",
3132
+ "addon",
3133
+ "scope"
3134
+ ]
3135
+ },
3136
+ "media": {
3137
+ "allowed": [
3138
+ "type",
3139
+ "id",
3140
+ "when",
3141
+ "fallback",
3142
+ "src",
3143
+ "alt",
3144
+ "width",
3145
+ "height",
3146
+ "caption"
3147
+ ],
3148
+ "required": [
3149
+ "type",
3150
+ "src",
3151
+ "alt",
3152
+ "width",
3153
+ "height"
3154
+ ]
3155
+ },
3156
+ "slot": {
3157
+ "allowed": [
3158
+ "type",
3159
+ "id",
3160
+ "when",
3161
+ "fallback",
3162
+ "name",
3163
+ "record"
3164
+ ],
3165
+ "required": [
3166
+ "type",
3167
+ "name"
3168
+ ]
3169
+ },
3170
+ "ext": {
3171
+ "allowed": [
3172
+ "type",
3173
+ "id",
3174
+ "when",
3175
+ "fallback",
3176
+ "ext",
3177
+ "props"
3178
+ ],
3179
+ "required": [
3180
+ "type",
3181
+ "ext"
3182
+ ]
3183
+ }
3184
+ };
3185
+ //# sourceMappingURL=genui-v2-schema.js.map