@judarn/ui 0.0.0-stage → 0.7.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,729 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "JudarnSDUINode",
4
+ "description": "Declarative Server-Driven UI node schema for Judarn design foundation. Props are allowlisted per node type; any other prop is rejected. Mirrors SDUI_PROP_ALLOWLIST in serializer.js.",
5
+ "type": "object",
6
+ "required": [
7
+ "type"
8
+ ],
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "type": {
12
+ "type": "string",
13
+ "enum": [
14
+ "button",
15
+ "badge",
16
+ "tag",
17
+ "card",
18
+ "data-matrix",
19
+ "data-table",
20
+ "text-field",
21
+ "container",
22
+ "text"
23
+ ]
24
+ },
25
+ "props": {
26
+ "type": "object"
27
+ },
28
+ "children": {
29
+ "type": "array",
30
+ "items": {
31
+ "$ref": "#"
32
+ }
33
+ },
34
+ "content": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "allOf": [
39
+ {
40
+ "if": {
41
+ "properties": {
42
+ "type": {
43
+ "const": "button"
44
+ }
45
+ },
46
+ "required": [
47
+ "type"
48
+ ]
49
+ },
50
+ "then": {
51
+ "properties": {
52
+ "props": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "properties": {
56
+ "variant": {
57
+ "type": "string",
58
+ "enum": [
59
+ "primary",
60
+ "outline",
61
+ "secondary",
62
+ "ghost",
63
+ "accent"
64
+ ]
65
+ },
66
+ "size": {
67
+ "type": "string",
68
+ "enum": [
69
+ "sm",
70
+ "md",
71
+ "lg"
72
+ ]
73
+ },
74
+ "block": {
75
+ "type": "boolean"
76
+ },
77
+ "disabled": {
78
+ "type": "boolean"
79
+ },
80
+ "type": {
81
+ "type": "string",
82
+ "enum": [
83
+ "button",
84
+ "submit",
85
+ "reset"
86
+ ]
87
+ },
88
+ "token": {
89
+ "type": "string",
90
+ "enum": [
91
+ "substrate",
92
+ "surfaceElevated",
93
+ "surfaceRecessed",
94
+ "ink100",
95
+ "ink60",
96
+ "ink30",
97
+ "signalError",
98
+ "subtle",
99
+ "control",
100
+ "card",
101
+ "badge",
102
+ "half",
103
+ "1",
104
+ "2",
105
+ "3",
106
+ "4",
107
+ "6",
108
+ "8",
109
+ "12",
110
+ "16",
111
+ "touch",
112
+ "body",
113
+ "compact",
114
+ "sidebar"
115
+ ]
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ },
122
+ {
123
+ "if": {
124
+ "properties": {
125
+ "type": {
126
+ "const": "badge"
127
+ }
128
+ },
129
+ "required": [
130
+ "type"
131
+ ]
132
+ },
133
+ "then": {
134
+ "properties": {
135
+ "props": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "properties": {
139
+ "variant": {
140
+ "type": "string",
141
+ "enum": [
142
+ "outline",
143
+ "solid",
144
+ "accent",
145
+ "accent-outline"
146
+ ]
147
+ },
148
+ "accentColor": {
149
+ "type": "string",
150
+ "pattern": "^(#[0-9a-fA-F]{3,8}|rgba?\\([\\d\\s.,%/]+\\)|oklch\\([\\d\\s.%/deg]+\\))$"
151
+ },
152
+ "token": {
153
+ "type": "string",
154
+ "enum": [
155
+ "substrate",
156
+ "surfaceElevated",
157
+ "surfaceRecessed",
158
+ "ink100",
159
+ "ink60",
160
+ "ink30",
161
+ "signalError",
162
+ "subtle",
163
+ "control",
164
+ "card",
165
+ "badge",
166
+ "half",
167
+ "1",
168
+ "2",
169
+ "3",
170
+ "4",
171
+ "6",
172
+ "8",
173
+ "12",
174
+ "16",
175
+ "touch",
176
+ "body",
177
+ "compact",
178
+ "sidebar"
179
+ ]
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ },
186
+ {
187
+ "if": {
188
+ "properties": {
189
+ "type": {
190
+ "const": "tag"
191
+ }
192
+ },
193
+ "required": [
194
+ "type"
195
+ ]
196
+ },
197
+ "then": {
198
+ "properties": {
199
+ "props": {
200
+ "type": "object",
201
+ "additionalProperties": false,
202
+ "properties": {
203
+ "token": {
204
+ "type": "string",
205
+ "enum": [
206
+ "substrate",
207
+ "surfaceElevated",
208
+ "surfaceRecessed",
209
+ "ink100",
210
+ "ink60",
211
+ "ink30",
212
+ "signalError",
213
+ "subtle",
214
+ "control",
215
+ "card",
216
+ "badge",
217
+ "half",
218
+ "1",
219
+ "2",
220
+ "3",
221
+ "4",
222
+ "6",
223
+ "8",
224
+ "12",
225
+ "16",
226
+ "touch",
227
+ "body",
228
+ "compact",
229
+ "sidebar"
230
+ ]
231
+ }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ },
237
+ {
238
+ "if": {
239
+ "properties": {
240
+ "type": {
241
+ "const": "card"
242
+ }
243
+ },
244
+ "required": [
245
+ "type"
246
+ ]
247
+ },
248
+ "then": {
249
+ "properties": {
250
+ "props": {
251
+ "type": "object",
252
+ "additionalProperties": false,
253
+ "properties": {
254
+ "eyebrow": {
255
+ "type": "string"
256
+ },
257
+ "eyebrowCasing": {
258
+ "type": "string",
259
+ "enum": [
260
+ "uppercase",
261
+ "asWritten"
262
+ ]
263
+ },
264
+ "title": {
265
+ "type": "string"
266
+ },
267
+ "flat": {
268
+ "type": "boolean"
269
+ },
270
+ "compact": {
271
+ "type": "boolean"
272
+ },
273
+ "token": {
274
+ "type": "string",
275
+ "enum": [
276
+ "substrate",
277
+ "surfaceElevated",
278
+ "surfaceRecessed",
279
+ "ink100",
280
+ "ink60",
281
+ "ink30",
282
+ "signalError",
283
+ "subtle",
284
+ "control",
285
+ "card",
286
+ "badge",
287
+ "half",
288
+ "1",
289
+ "2",
290
+ "3",
291
+ "4",
292
+ "6",
293
+ "8",
294
+ "12",
295
+ "16",
296
+ "touch",
297
+ "body",
298
+ "compact",
299
+ "sidebar"
300
+ ]
301
+ }
302
+ }
303
+ }
304
+ }
305
+ }
306
+ },
307
+ {
308
+ "if": {
309
+ "properties": {
310
+ "type": {
311
+ "const": "data-matrix"
312
+ }
313
+ },
314
+ "required": [
315
+ "type"
316
+ ]
317
+ },
318
+ "then": {
319
+ "properties": {
320
+ "props": {
321
+ "type": "object",
322
+ "additionalProperties": false,
323
+ "properties": {
324
+ "columns": {
325
+ "type": "array",
326
+ "items": {
327
+ "oneOf": [
328
+ {
329
+ "type": "string"
330
+ },
331
+ {
332
+ "type": "object",
333
+ "required": [
334
+ "key",
335
+ "label"
336
+ ],
337
+ "additionalProperties": false,
338
+ "properties": {
339
+ "key": {
340
+ "type": "string"
341
+ },
342
+ "label": {
343
+ "type": "string"
344
+ },
345
+ "numeric": {
346
+ "type": "boolean"
347
+ },
348
+ "width": {
349
+ "type": [
350
+ "number",
351
+ "string"
352
+ ]
353
+ },
354
+ "casing": {
355
+ "type": "string",
356
+ "enum": [
357
+ "uppercase",
358
+ "asWritten"
359
+ ]
360
+ }
361
+ }
362
+ }
363
+ ]
364
+ }
365
+ },
366
+ "rows": {
367
+ "type": "array",
368
+ "items": {
369
+ "type": "object",
370
+ "additionalProperties": {
371
+ "type": [
372
+ "string",
373
+ "number",
374
+ "boolean",
375
+ "null"
376
+ ]
377
+ }
378
+ }
379
+ },
380
+ "label": {
381
+ "type": "string"
382
+ },
383
+ "token": {
384
+ "type": "string",
385
+ "enum": [
386
+ "substrate",
387
+ "surfaceElevated",
388
+ "surfaceRecessed",
389
+ "ink100",
390
+ "ink60",
391
+ "ink30",
392
+ "signalError",
393
+ "subtle",
394
+ "control",
395
+ "card",
396
+ "badge",
397
+ "half",
398
+ "1",
399
+ "2",
400
+ "3",
401
+ "4",
402
+ "6",
403
+ "8",
404
+ "12",
405
+ "16",
406
+ "touch",
407
+ "body",
408
+ "compact",
409
+ "sidebar"
410
+ ]
411
+ }
412
+ }
413
+ }
414
+ }
415
+ }
416
+ },
417
+ {
418
+ "if": {
419
+ "properties": {
420
+ "type": {
421
+ "const": "data-table"
422
+ }
423
+ },
424
+ "required": [
425
+ "type"
426
+ ]
427
+ },
428
+ "then": {
429
+ "properties": {
430
+ "props": {
431
+ "type": "object",
432
+ "additionalProperties": false,
433
+ "properties": {
434
+ "columns": {
435
+ "type": "array",
436
+ "items": {
437
+ "oneOf": [
438
+ {
439
+ "type": "string"
440
+ },
441
+ {
442
+ "type": "object",
443
+ "required": [
444
+ "key",
445
+ "label"
446
+ ],
447
+ "additionalProperties": false,
448
+ "properties": {
449
+ "key": {
450
+ "type": "string"
451
+ },
452
+ "label": {
453
+ "type": "string"
454
+ },
455
+ "numeric": {
456
+ "type": "boolean"
457
+ },
458
+ "width": {
459
+ "type": [
460
+ "number",
461
+ "string"
462
+ ]
463
+ },
464
+ "casing": {
465
+ "type": "string",
466
+ "enum": [
467
+ "uppercase",
468
+ "asWritten"
469
+ ]
470
+ }
471
+ }
472
+ }
473
+ ]
474
+ }
475
+ },
476
+ "rows": {
477
+ "type": "array",
478
+ "items": {
479
+ "type": "object",
480
+ "additionalProperties": {
481
+ "type": [
482
+ "string",
483
+ "number",
484
+ "boolean",
485
+ "null"
486
+ ]
487
+ }
488
+ }
489
+ },
490
+ "token": {
491
+ "type": "string",
492
+ "enum": [
493
+ "substrate",
494
+ "surfaceElevated",
495
+ "surfaceRecessed",
496
+ "ink100",
497
+ "ink60",
498
+ "ink30",
499
+ "signalError",
500
+ "subtle",
501
+ "control",
502
+ "card",
503
+ "badge",
504
+ "half",
505
+ "1",
506
+ "2",
507
+ "3",
508
+ "4",
509
+ "6",
510
+ "8",
511
+ "12",
512
+ "16",
513
+ "touch",
514
+ "body",
515
+ "compact",
516
+ "sidebar"
517
+ ]
518
+ }
519
+ }
520
+ }
521
+ }
522
+ }
523
+ },
524
+ {
525
+ "if": {
526
+ "properties": {
527
+ "type": {
528
+ "const": "text-field"
529
+ }
530
+ },
531
+ "required": [
532
+ "type"
533
+ ]
534
+ },
535
+ "then": {
536
+ "properties": {
537
+ "props": {
538
+ "type": "object",
539
+ "additionalProperties": false,
540
+ "properties": {
541
+ "label": {
542
+ "type": "string"
543
+ },
544
+ "hint": {
545
+ "type": "string"
546
+ },
547
+ "error": {
548
+ "type": "string"
549
+ },
550
+ "as": {
551
+ "type": "string",
552
+ "enum": [
553
+ "input",
554
+ "textarea",
555
+ "select"
556
+ ]
557
+ },
558
+ "invalid": {
559
+ "type": "boolean"
560
+ },
561
+ "disabled": {
562
+ "type": "boolean"
563
+ },
564
+ "labelCasing": {
565
+ "type": "string",
566
+ "enum": [
567
+ "uppercase",
568
+ "asWritten"
569
+ ]
570
+ },
571
+ "placeholder": {
572
+ "type": "string"
573
+ },
574
+ "name": {
575
+ "type": "string"
576
+ },
577
+ "type": {
578
+ "type": "string",
579
+ "enum": [
580
+ "text",
581
+ "email",
582
+ "number",
583
+ "password",
584
+ "search",
585
+ "tel",
586
+ "url"
587
+ ]
588
+ },
589
+ "defaultValue": {
590
+ "type": "string"
591
+ },
592
+ "token": {
593
+ "type": "string",
594
+ "enum": [
595
+ "substrate",
596
+ "surfaceElevated",
597
+ "surfaceRecessed",
598
+ "ink100",
599
+ "ink60",
600
+ "ink30",
601
+ "signalError",
602
+ "subtle",
603
+ "control",
604
+ "card",
605
+ "badge",
606
+ "half",
607
+ "1",
608
+ "2",
609
+ "3",
610
+ "4",
611
+ "6",
612
+ "8",
613
+ "12",
614
+ "16",
615
+ "touch",
616
+ "body",
617
+ "compact",
618
+ "sidebar"
619
+ ]
620
+ }
621
+ }
622
+ }
623
+ }
624
+ }
625
+ },
626
+ {
627
+ "if": {
628
+ "properties": {
629
+ "type": {
630
+ "const": "container"
631
+ }
632
+ },
633
+ "required": [
634
+ "type"
635
+ ]
636
+ },
637
+ "then": {
638
+ "properties": {
639
+ "props": {
640
+ "type": "object",
641
+ "additionalProperties": false,
642
+ "properties": {
643
+ "token": {
644
+ "type": "string",
645
+ "enum": [
646
+ "substrate",
647
+ "surfaceElevated",
648
+ "surfaceRecessed",
649
+ "ink100",
650
+ "ink60",
651
+ "ink30",
652
+ "signalError",
653
+ "subtle",
654
+ "control",
655
+ "card",
656
+ "badge",
657
+ "half",
658
+ "1",
659
+ "2",
660
+ "3",
661
+ "4",
662
+ "6",
663
+ "8",
664
+ "12",
665
+ "16",
666
+ "touch",
667
+ "body",
668
+ "compact",
669
+ "sidebar"
670
+ ]
671
+ }
672
+ }
673
+ }
674
+ }
675
+ }
676
+ },
677
+ {
678
+ "if": {
679
+ "properties": {
680
+ "type": {
681
+ "const": "text"
682
+ }
683
+ },
684
+ "required": [
685
+ "type"
686
+ ]
687
+ },
688
+ "then": {
689
+ "properties": {
690
+ "props": {
691
+ "type": "object",
692
+ "additionalProperties": false,
693
+ "properties": {
694
+ "token": {
695
+ "type": "string",
696
+ "enum": [
697
+ "substrate",
698
+ "surfaceElevated",
699
+ "surfaceRecessed",
700
+ "ink100",
701
+ "ink60",
702
+ "ink30",
703
+ "signalError",
704
+ "subtle",
705
+ "control",
706
+ "card",
707
+ "badge",
708
+ "half",
709
+ "1",
710
+ "2",
711
+ "3",
712
+ "4",
713
+ "6",
714
+ "8",
715
+ "12",
716
+ "16",
717
+ "touch",
718
+ "body",
719
+ "compact",
720
+ "sidebar"
721
+ ]
722
+ }
723
+ }
724
+ }
725
+ }
726
+ }
727
+ }
728
+ ]
729
+ }