prd-workflow-cli 1.3.4 → 1.4.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,545 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "A2UI Component Schema",
4
+ "description": "PRD A2UI 可视化组件的 JSON Schema,用于校验生成的界面原型和架构图",
5
+ "type": "object",
6
+ "required": [
7
+ "type"
8
+ ],
9
+ "properties": {
10
+ "type": {
11
+ "type": "string",
12
+ "enum": [
13
+ "Page",
14
+ "Panel",
15
+ "Row",
16
+ "Col",
17
+ "Input",
18
+ "Textarea",
19
+ "Select",
20
+ "Button",
21
+ "Text",
22
+ "Table",
23
+ "Tabs",
24
+ "Badge",
25
+ "Card",
26
+ "Upload",
27
+ "Alert",
28
+ "Divider",
29
+ "Diagram",
30
+ "Box",
31
+ "Arrow",
32
+ "Layer",
33
+ "DiagramGroup"
34
+ ],
35
+ "description": "组件类型"
36
+ },
37
+ "children": {
38
+ "type": "array",
39
+ "items": {
40
+ "$ref": "#"
41
+ },
42
+ "description": "子组件列表"
43
+ }
44
+ },
45
+ "allOf": [
46
+ {
47
+ "if": {
48
+ "properties": {
49
+ "type": {
50
+ "const": "Page"
51
+ }
52
+ }
53
+ },
54
+ "then": {
55
+ "properties": {
56
+ "id": {
57
+ "type": "string"
58
+ },
59
+ "title": {
60
+ "type": "string",
61
+ "description": "页面标题"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ {
67
+ "if": {
68
+ "properties": {
69
+ "type": {
70
+ "const": "Panel"
71
+ }
72
+ }
73
+ },
74
+ "then": {
75
+ "properties": {
76
+ "title": {
77
+ "type": "string",
78
+ "description": "面板标题"
79
+ },
80
+ "extra": {
81
+ "type": "array",
82
+ "items": {
83
+ "oneOf": [
84
+ {
85
+ "type": "string"
86
+ },
87
+ {
88
+ "type": "object",
89
+ "properties": {
90
+ "text": {
91
+ "type": "string"
92
+ },
93
+ "variant": {
94
+ "type": "string",
95
+ "enum": [
96
+ "primary",
97
+ "secondary",
98
+ "danger"
99
+ ]
100
+ }
101
+ }
102
+ }
103
+ ]
104
+ },
105
+ "description": "面板右上角按钮"
106
+ }
107
+ }
108
+ }
109
+ },
110
+ {
111
+ "if": {
112
+ "properties": {
113
+ "type": {
114
+ "const": "Input"
115
+ }
116
+ }
117
+ },
118
+ "then": {
119
+ "properties": {
120
+ "label": {
121
+ "type": "string",
122
+ "description": "输入框标签"
123
+ },
124
+ "placeholder": {
125
+ "type": "string",
126
+ "description": "占位文本"
127
+ },
128
+ "required": {
129
+ "type": "boolean",
130
+ "description": "是否必填"
131
+ }
132
+ }
133
+ }
134
+ },
135
+ {
136
+ "if": {
137
+ "properties": {
138
+ "type": {
139
+ "const": "Textarea"
140
+ }
141
+ }
142
+ },
143
+ "then": {
144
+ "properties": {
145
+ "label": {
146
+ "type": "string"
147
+ },
148
+ "placeholder": {
149
+ "type": "string"
150
+ },
151
+ "rows": {
152
+ "type": "integer",
153
+ "minimum": 1,
154
+ "default": 4
155
+ }
156
+ }
157
+ }
158
+ },
159
+ {
160
+ "if": {
161
+ "properties": {
162
+ "type": {
163
+ "const": "Select"
164
+ }
165
+ }
166
+ },
167
+ "then": {
168
+ "properties": {
169
+ "label": {
170
+ "type": "string"
171
+ },
172
+ "options": {
173
+ "type": "array",
174
+ "items": {
175
+ "oneOf": [
176
+ {
177
+ "type": "string"
178
+ },
179
+ {
180
+ "type": "object",
181
+ "properties": {
182
+ "value": {
183
+ "type": "string"
184
+ },
185
+ "label": {
186
+ "type": "string"
187
+ }
188
+ },
189
+ "required": [
190
+ "value",
191
+ "label"
192
+ ]
193
+ }
194
+ ]
195
+ }
196
+ }
197
+ }
198
+ }
199
+ },
200
+ {
201
+ "if": {
202
+ "properties": {
203
+ "type": {
204
+ "const": "Button"
205
+ }
206
+ }
207
+ },
208
+ "then": {
209
+ "properties": {
210
+ "text": {
211
+ "type": "string",
212
+ "description": "按钮文本"
213
+ },
214
+ "variant": {
215
+ "type": "string",
216
+ "enum": [
217
+ "primary",
218
+ "secondary",
219
+ "danger"
220
+ ],
221
+ "default": "primary"
222
+ }
223
+ },
224
+ "required": [
225
+ "text"
226
+ ]
227
+ }
228
+ },
229
+ {
230
+ "if": {
231
+ "properties": {
232
+ "type": {
233
+ "const": "Text"
234
+ }
235
+ }
236
+ },
237
+ "then": {
238
+ "properties": {
239
+ "content": {
240
+ "type": "string",
241
+ "description": "文本内容"
242
+ }
243
+ },
244
+ "required": [
245
+ "content"
246
+ ]
247
+ }
248
+ },
249
+ {
250
+ "if": {
251
+ "properties": {
252
+ "type": {
253
+ "const": "Table"
254
+ }
255
+ }
256
+ },
257
+ "then": {
258
+ "properties": {
259
+ "columns": {
260
+ "type": "array",
261
+ "items": {
262
+ "oneOf": [
263
+ {
264
+ "type": "string"
265
+ },
266
+ {
267
+ "type": "object",
268
+ "properties": {
269
+ "key": {
270
+ "type": "string"
271
+ },
272
+ "title": {
273
+ "type": "string"
274
+ },
275
+ "type": {
276
+ "type": "string",
277
+ "enum": [
278
+ "text",
279
+ "link",
280
+ "badge",
281
+ "status",
282
+ "actions"
283
+ ]
284
+ },
285
+ "variantMap": {
286
+ "type": "object"
287
+ }
288
+ },
289
+ "required": [
290
+ "key",
291
+ "title"
292
+ ]
293
+ }
294
+ ]
295
+ },
296
+ "description": "表格列定义"
297
+ },
298
+ "data": {
299
+ "type": "array",
300
+ "items": {
301
+ "type": "object"
302
+ },
303
+ "description": "表格数据"
304
+ }
305
+ }
306
+ }
307
+ },
308
+ {
309
+ "if": {
310
+ "properties": {
311
+ "type": {
312
+ "const": "Tabs"
313
+ }
314
+ }
315
+ },
316
+ "then": {
317
+ "properties": {
318
+ "items": {
319
+ "type": "array",
320
+ "items": {
321
+ "type": "string"
322
+ },
323
+ "description": "标签页名称列表"
324
+ }
325
+ }
326
+ }
327
+ },
328
+ {
329
+ "if": {
330
+ "properties": {
331
+ "type": {
332
+ "const": "Badge"
333
+ }
334
+ }
335
+ },
336
+ "then": {
337
+ "properties": {
338
+ "text": {
339
+ "type": "string"
340
+ },
341
+ "variant": {
342
+ "type": "string",
343
+ "enum": [
344
+ "success",
345
+ "warning",
346
+ "danger",
347
+ "info"
348
+ ]
349
+ }
350
+ },
351
+ "required": [
352
+ "text"
353
+ ]
354
+ }
355
+ },
356
+ {
357
+ "if": {
358
+ "properties": {
359
+ "type": {
360
+ "const": "Card"
361
+ }
362
+ }
363
+ },
364
+ "then": {
365
+ "properties": {
366
+ "title": {
367
+ "type": "string"
368
+ },
369
+ "status": {
370
+ "type": "string"
371
+ },
372
+ "actions": {
373
+ "type": "array",
374
+ "items": {
375
+ "oneOf": [
376
+ {
377
+ "type": "string"
378
+ },
379
+ {
380
+ "type": "object",
381
+ "properties": {
382
+ "text": {
383
+ "type": "string"
384
+ }
385
+ }
386
+ }
387
+ ]
388
+ }
389
+ }
390
+ }
391
+ }
392
+ },
393
+ {
394
+ "if": {
395
+ "properties": {
396
+ "type": {
397
+ "const": "Upload"
398
+ }
399
+ }
400
+ },
401
+ "then": {
402
+ "properties": {
403
+ "text": {
404
+ "type": "string",
405
+ "description": "上传提示文本"
406
+ }
407
+ }
408
+ }
409
+ },
410
+ {
411
+ "if": {
412
+ "properties": {
413
+ "type": {
414
+ "const": "Alert"
415
+ }
416
+ }
417
+ },
418
+ "then": {
419
+ "properties": {
420
+ "content": {
421
+ "type": "string"
422
+ },
423
+ "text": {
424
+ "type": "string"
425
+ },
426
+ "variant": {
427
+ "type": "string",
428
+ "enum": [
429
+ "info",
430
+ "success",
431
+ "warning",
432
+ "danger"
433
+ ]
434
+ }
435
+ }
436
+ }
437
+ },
438
+ {
439
+ "if": {
440
+ "properties": {
441
+ "type": {
442
+ "const": "Diagram"
443
+ }
444
+ }
445
+ },
446
+ "then": {
447
+ "properties": {
448
+ "title": {
449
+ "type": "string",
450
+ "description": "架构图标题"
451
+ }
452
+ }
453
+ }
454
+ },
455
+ {
456
+ "if": {
457
+ "properties": {
458
+ "type": {
459
+ "const": "Box"
460
+ }
461
+ }
462
+ },
463
+ "then": {
464
+ "properties": {
465
+ "title": {
466
+ "type": "string",
467
+ "description": "方块标题"
468
+ },
469
+ "desc": {
470
+ "type": "string",
471
+ "description": "方块描述"
472
+ },
473
+ "color": {
474
+ "type": "string",
475
+ "description": "左边框颜色"
476
+ }
477
+ },
478
+ "required": [
479
+ "title"
480
+ ]
481
+ }
482
+ },
483
+ {
484
+ "if": {
485
+ "properties": {
486
+ "type": {
487
+ "const": "Arrow"
488
+ }
489
+ }
490
+ },
491
+ "then": {
492
+ "properties": {
493
+ "direction": {
494
+ "type": "string",
495
+ "enum": [
496
+ "up",
497
+ "down",
498
+ "left",
499
+ "right"
500
+ ],
501
+ "default": "down"
502
+ },
503
+ "label": {
504
+ "type": "string",
505
+ "description": "箭头标签"
506
+ }
507
+ }
508
+ }
509
+ },
510
+ {
511
+ "if": {
512
+ "properties": {
513
+ "type": {
514
+ "const": "Layer"
515
+ }
516
+ }
517
+ },
518
+ "then": {
519
+ "properties": {
520
+ "title": {
521
+ "type": "string",
522
+ "description": "层级标题"
523
+ }
524
+ }
525
+ }
526
+ },
527
+ {
528
+ "if": {
529
+ "properties": {
530
+ "type": {
531
+ "const": "DiagramGroup"
532
+ }
533
+ }
534
+ },
535
+ "then": {
536
+ "properties": {
537
+ "title": {
538
+ "type": "string",
539
+ "description": "分组标题"
540
+ }
541
+ }
542
+ }
543
+ }
544
+ ]
545
+ }