@asteby/metacore-genui 2.0.0 → 2.1.0

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