@seed-ship/mcp-ui-spec 5.0.2 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/schemas.cjs +94 -2
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.ts +293 -21
- package/dist/schemas.js +94 -2
- package/dist/schemas.js.map +1 -1
- package/package.json +1 -1
- package/schemas/component-registry-v1.json +24 -2
package/dist/schemas.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const GridPositionSchema: z.ZodObject<{
|
|
|
18
18
|
rowStart?: number | undefined;
|
|
19
19
|
rowSpan?: number | undefined;
|
|
20
20
|
}>;
|
|
21
|
-
export declare const ComponentTypeSchema: z.ZodEnum<["chart", "table", "metric", "text", "composite", "grid", "iframe", "image", "link", "action", "footer", "carousel", "artifact", "form", "modal", "action-group", "image-gallery", "video", "code", "map"]>;
|
|
21
|
+
export declare const ComponentTypeSchema: z.ZodEnum<["chart", "table", "metric", "text", "composite", "grid", "iframe", "image", "link", "action", "footer", "carousel", "artifact", "form", "modal", "action-group", "image-gallery", "video", "code", "map", "graph"]>;
|
|
22
22
|
export declare const FormFieldOptionSchema: z.ZodObject<{
|
|
23
23
|
label: z.ZodString;
|
|
24
24
|
value: z.ZodString;
|
|
@@ -1005,6 +1005,236 @@ export declare const MapComponentParamsSchema: z.ZodObject<{
|
|
|
1005
1005
|
tileLayer?: string | undefined;
|
|
1006
1006
|
attribution?: string | undefined;
|
|
1007
1007
|
}>;
|
|
1008
|
+
export declare const GraphNodeSchema: z.ZodObject<{
|
|
1009
|
+
id: z.ZodString;
|
|
1010
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1011
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1012
|
+
size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>>;
|
|
1013
|
+
/**
|
|
1014
|
+
* Generic ranking / importance signal. Drives default node size when
|
|
1015
|
+
* `size` is omitted, and acts as the sort key for the `concentric`
|
|
1016
|
+
* layout (highest weight at center). Domain semantics opaque to the lib.
|
|
1017
|
+
*/
|
|
1018
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1019
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1020
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1021
|
+
}, "strip", z.ZodTypeAny, {
|
|
1022
|
+
id: string;
|
|
1023
|
+
type?: string | undefined;
|
|
1024
|
+
label?: string | undefined;
|
|
1025
|
+
size?: number | [number, number] | undefined;
|
|
1026
|
+
weight?: number | undefined;
|
|
1027
|
+
style?: Record<string, unknown> | undefined;
|
|
1028
|
+
data?: Record<string, unknown> | undefined;
|
|
1029
|
+
}, {
|
|
1030
|
+
id: string;
|
|
1031
|
+
type?: string | undefined;
|
|
1032
|
+
label?: string | undefined;
|
|
1033
|
+
size?: number | [number, number] | undefined;
|
|
1034
|
+
weight?: number | undefined;
|
|
1035
|
+
style?: Record<string, unknown> | undefined;
|
|
1036
|
+
data?: Record<string, unknown> | undefined;
|
|
1037
|
+
}>;
|
|
1038
|
+
export declare const GraphEdgeSchema: z.ZodObject<{
|
|
1039
|
+
source: z.ZodString;
|
|
1040
|
+
target: z.ZodString;
|
|
1041
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1042
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1043
|
+
/**
|
|
1044
|
+
* Generic strength signal. Drives default edge stroke width and acts
|
|
1045
|
+
* as attractive force in `force` layouts. Domain semantics opaque.
|
|
1046
|
+
*/
|
|
1047
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1048
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1049
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1050
|
+
}, "strip", z.ZodTypeAny, {
|
|
1051
|
+
source: string;
|
|
1052
|
+
target: string;
|
|
1053
|
+
type?: string | undefined;
|
|
1054
|
+
label?: string | undefined;
|
|
1055
|
+
weight?: number | undefined;
|
|
1056
|
+
style?: Record<string, unknown> | undefined;
|
|
1057
|
+
data?: Record<string, unknown> | undefined;
|
|
1058
|
+
}, {
|
|
1059
|
+
source: string;
|
|
1060
|
+
target: string;
|
|
1061
|
+
type?: string | undefined;
|
|
1062
|
+
label?: string | undefined;
|
|
1063
|
+
weight?: number | undefined;
|
|
1064
|
+
style?: Record<string, unknown> | undefined;
|
|
1065
|
+
data?: Record<string, unknown> | undefined;
|
|
1066
|
+
}>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Layout names exposed in the spec. Narrow on purpose — `force` covers
|
|
1069
|
+
* generic networks, `dagre` covers DAGs, `concentric` covers
|
|
1070
|
+
* weight-ordered ring layouts, `mindmap` + `tree` cover hierarchical
|
|
1071
|
+
* fan-outs, `circular` + `grid` cover small-N ordered layouts. Power
|
|
1072
|
+
* users opt into other G6 layouts via the object form
|
|
1073
|
+
* `{ type: 'force', options: { ... } }` — `options` is a passthrough.
|
|
1074
|
+
*/
|
|
1075
|
+
export declare const GraphLayoutNameSchema: z.ZodEnum<["force", "dagre", "mindmap", "tree", "circular", "grid", "concentric"]>;
|
|
1076
|
+
export declare const GraphLayoutSchema: z.ZodUnion<[z.ZodEnum<["force", "dagre", "mindmap", "tree", "circular", "grid", "concentric"]>, z.ZodObject<{
|
|
1077
|
+
type: z.ZodEnum<["force", "dagre", "mindmap", "tree", "circular", "grid", "concentric"]>;
|
|
1078
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1079
|
+
}, "strip", z.ZodTypeAny, {
|
|
1080
|
+
type: "grid" | "force" | "dagre" | "mindmap" | "tree" | "circular" | "concentric";
|
|
1081
|
+
options?: Record<string, unknown> | undefined;
|
|
1082
|
+
}, {
|
|
1083
|
+
type: "grid" | "force" | "dagre" | "mindmap" | "tree" | "circular" | "concentric";
|
|
1084
|
+
options?: Record<string, unknown> | undefined;
|
|
1085
|
+
}>]>;
|
|
1086
|
+
export declare const GraphComponentParamsSchema: z.ZodObject<{
|
|
1087
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
1089
|
+
id: z.ZodString;
|
|
1090
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1091
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1092
|
+
size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Generic ranking / importance signal. Drives default node size when
|
|
1095
|
+
* `size` is omitted, and acts as the sort key for the `concentric`
|
|
1096
|
+
* layout (highest weight at center). Domain semantics opaque to the lib.
|
|
1097
|
+
*/
|
|
1098
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1099
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1100
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1101
|
+
}, "strip", z.ZodTypeAny, {
|
|
1102
|
+
id: string;
|
|
1103
|
+
type?: string | undefined;
|
|
1104
|
+
label?: string | undefined;
|
|
1105
|
+
size?: number | [number, number] | undefined;
|
|
1106
|
+
weight?: number | undefined;
|
|
1107
|
+
style?: Record<string, unknown> | undefined;
|
|
1108
|
+
data?: Record<string, unknown> | undefined;
|
|
1109
|
+
}, {
|
|
1110
|
+
id: string;
|
|
1111
|
+
type?: string | undefined;
|
|
1112
|
+
label?: string | undefined;
|
|
1113
|
+
size?: number | [number, number] | undefined;
|
|
1114
|
+
weight?: number | undefined;
|
|
1115
|
+
style?: Record<string, unknown> | undefined;
|
|
1116
|
+
data?: Record<string, unknown> | undefined;
|
|
1117
|
+
}>, "many">;
|
|
1118
|
+
edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1119
|
+
source: z.ZodString;
|
|
1120
|
+
target: z.ZodString;
|
|
1121
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1122
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1123
|
+
/**
|
|
1124
|
+
* Generic strength signal. Drives default edge stroke width and acts
|
|
1125
|
+
* as attractive force in `force` layouts. Domain semantics opaque.
|
|
1126
|
+
*/
|
|
1127
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1128
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1129
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1130
|
+
}, "strip", z.ZodTypeAny, {
|
|
1131
|
+
source: string;
|
|
1132
|
+
target: string;
|
|
1133
|
+
type?: string | undefined;
|
|
1134
|
+
label?: string | undefined;
|
|
1135
|
+
weight?: number | undefined;
|
|
1136
|
+
style?: Record<string, unknown> | undefined;
|
|
1137
|
+
data?: Record<string, unknown> | undefined;
|
|
1138
|
+
}, {
|
|
1139
|
+
source: string;
|
|
1140
|
+
target: string;
|
|
1141
|
+
type?: string | undefined;
|
|
1142
|
+
label?: string | undefined;
|
|
1143
|
+
weight?: number | undefined;
|
|
1144
|
+
style?: Record<string, unknown> | undefined;
|
|
1145
|
+
data?: Record<string, unknown> | undefined;
|
|
1146
|
+
}>, "many">>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Layout shorthand string OR object form. When omitted, the renderer
|
|
1149
|
+
* picks a sensible default: `'force'` if edges are present, `'circular'`
|
|
1150
|
+
* otherwise.
|
|
1151
|
+
*/
|
|
1152
|
+
layout: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["force", "dagre", "mindmap", "tree", "circular", "grid", "concentric"]>, z.ZodObject<{
|
|
1153
|
+
type: z.ZodEnum<["force", "dagre", "mindmap", "tree", "circular", "grid", "concentric"]>;
|
|
1154
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1155
|
+
}, "strip", z.ZodTypeAny, {
|
|
1156
|
+
type: "grid" | "force" | "dagre" | "mindmap" | "tree" | "circular" | "concentric";
|
|
1157
|
+
options?: Record<string, unknown> | undefined;
|
|
1158
|
+
}, {
|
|
1159
|
+
type: "grid" | "force" | "dagre" | "mindmap" | "tree" | "circular" | "concentric";
|
|
1160
|
+
options?: Record<string, unknown> | undefined;
|
|
1161
|
+
}>]>>;
|
|
1162
|
+
height: z.ZodOptional<z.ZodString>;
|
|
1163
|
+
width: z.ZodOptional<z.ZodString>;
|
|
1164
|
+
rendererPref: z.ZodOptional<z.ZodEnum<["canvas", "svg"]>>;
|
|
1165
|
+
fitView: z.ZodOptional<z.ZodBoolean>;
|
|
1166
|
+
enableZoom: z.ZodOptional<z.ZodBoolean>;
|
|
1167
|
+
enableDrag: z.ZodOptional<z.ZodBoolean>;
|
|
1168
|
+
enableSelect: z.ZodOptional<z.ZodBoolean>;
|
|
1169
|
+
tooltip: z.ZodOptional<z.ZodBoolean>;
|
|
1170
|
+
className: z.ZodOptional<z.ZodString>;
|
|
1171
|
+
}, "strip", z.ZodTypeAny, {
|
|
1172
|
+
nodes: {
|
|
1173
|
+
id: string;
|
|
1174
|
+
type?: string | undefined;
|
|
1175
|
+
label?: string | undefined;
|
|
1176
|
+
size?: number | [number, number] | undefined;
|
|
1177
|
+
weight?: number | undefined;
|
|
1178
|
+
style?: Record<string, unknown> | undefined;
|
|
1179
|
+
data?: Record<string, unknown> | undefined;
|
|
1180
|
+
}[];
|
|
1181
|
+
title?: string | undefined;
|
|
1182
|
+
layout?: "grid" | "force" | "dagre" | "mindmap" | "tree" | "circular" | "concentric" | {
|
|
1183
|
+
type: "grid" | "force" | "dagre" | "mindmap" | "tree" | "circular" | "concentric";
|
|
1184
|
+
options?: Record<string, unknown> | undefined;
|
|
1185
|
+
} | undefined;
|
|
1186
|
+
tooltip?: boolean | undefined;
|
|
1187
|
+
height?: string | undefined;
|
|
1188
|
+
edges?: {
|
|
1189
|
+
source: string;
|
|
1190
|
+
target: string;
|
|
1191
|
+
type?: string | undefined;
|
|
1192
|
+
label?: string | undefined;
|
|
1193
|
+
weight?: number | undefined;
|
|
1194
|
+
style?: Record<string, unknown> | undefined;
|
|
1195
|
+
data?: Record<string, unknown> | undefined;
|
|
1196
|
+
}[] | undefined;
|
|
1197
|
+
width?: string | undefined;
|
|
1198
|
+
rendererPref?: "canvas" | "svg" | undefined;
|
|
1199
|
+
fitView?: boolean | undefined;
|
|
1200
|
+
enableZoom?: boolean | undefined;
|
|
1201
|
+
enableDrag?: boolean | undefined;
|
|
1202
|
+
enableSelect?: boolean | undefined;
|
|
1203
|
+
className?: string | undefined;
|
|
1204
|
+
}, {
|
|
1205
|
+
nodes: {
|
|
1206
|
+
id: string;
|
|
1207
|
+
type?: string | undefined;
|
|
1208
|
+
label?: string | undefined;
|
|
1209
|
+
size?: number | [number, number] | undefined;
|
|
1210
|
+
weight?: number | undefined;
|
|
1211
|
+
style?: Record<string, unknown> | undefined;
|
|
1212
|
+
data?: Record<string, unknown> | undefined;
|
|
1213
|
+
}[];
|
|
1214
|
+
title?: string | undefined;
|
|
1215
|
+
layout?: "grid" | "force" | "dagre" | "mindmap" | "tree" | "circular" | "concentric" | {
|
|
1216
|
+
type: "grid" | "force" | "dagre" | "mindmap" | "tree" | "circular" | "concentric";
|
|
1217
|
+
options?: Record<string, unknown> | undefined;
|
|
1218
|
+
} | undefined;
|
|
1219
|
+
tooltip?: boolean | undefined;
|
|
1220
|
+
height?: string | undefined;
|
|
1221
|
+
edges?: {
|
|
1222
|
+
source: string;
|
|
1223
|
+
target: string;
|
|
1224
|
+
type?: string | undefined;
|
|
1225
|
+
label?: string | undefined;
|
|
1226
|
+
weight?: number | undefined;
|
|
1227
|
+
style?: Record<string, unknown> | undefined;
|
|
1228
|
+
data?: Record<string, unknown> | undefined;
|
|
1229
|
+
}[] | undefined;
|
|
1230
|
+
width?: string | undefined;
|
|
1231
|
+
rendererPref?: "canvas" | "svg" | undefined;
|
|
1232
|
+
fitView?: boolean | undefined;
|
|
1233
|
+
enableZoom?: boolean | undefined;
|
|
1234
|
+
enableDrag?: boolean | undefined;
|
|
1235
|
+
enableSelect?: boolean | undefined;
|
|
1236
|
+
className?: string | undefined;
|
|
1237
|
+
}>;
|
|
1008
1238
|
export declare const ChartTypeSchema: z.ZodEnum<["bar", "line", "pie", "doughnut", "radar", "scatter", "bubble", "polarArea"]>;
|
|
1009
1239
|
export declare const ChartDatasetSchema: z.ZodObject<{
|
|
1010
1240
|
label: z.ZodString;
|
|
@@ -1207,6 +1437,7 @@ export declare const ChartComponentParamsSchema: z.ZodObject<{
|
|
|
1207
1437
|
} | undefined;
|
|
1208
1438
|
title?: string | undefined;
|
|
1209
1439
|
height?: string | undefined;
|
|
1440
|
+
className?: string | undefined;
|
|
1210
1441
|
renderer?: "iframe" | "auto" | "native" | undefined;
|
|
1211
1442
|
exportable?: boolean | undefined;
|
|
1212
1443
|
timeAxis?: {
|
|
@@ -1216,7 +1447,6 @@ export declare const ChartComponentParamsSchema: z.ZodObject<{
|
|
|
1216
1447
|
unit?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
1217
1448
|
tooltipFormat?: string | undefined;
|
|
1218
1449
|
} | undefined;
|
|
1219
|
-
className?: string | undefined;
|
|
1220
1450
|
}, {
|
|
1221
1451
|
type: "bar" | "line" | "pie" | "doughnut" | "radar" | "scatter" | "bubble" | "polarArea";
|
|
1222
1452
|
data: {
|
|
@@ -1243,6 +1473,7 @@ export declare const ChartComponentParamsSchema: z.ZodObject<{
|
|
|
1243
1473
|
} | undefined;
|
|
1244
1474
|
title?: string | undefined;
|
|
1245
1475
|
height?: string | undefined;
|
|
1476
|
+
className?: string | undefined;
|
|
1246
1477
|
renderer?: "iframe" | "auto" | "native" | undefined;
|
|
1247
1478
|
exportable?: boolean | undefined;
|
|
1248
1479
|
timeAxis?: {
|
|
@@ -1252,7 +1483,6 @@ export declare const ChartComponentParamsSchema: z.ZodObject<{
|
|
|
1252
1483
|
unit?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
1253
1484
|
tooltipFormat?: string | undefined;
|
|
1254
1485
|
} | undefined;
|
|
1255
|
-
className?: string | undefined;
|
|
1256
1486
|
}>;
|
|
1257
1487
|
export declare const TableColumnSchema: z.ZodObject<{
|
|
1258
1488
|
key: z.ZodString;
|
|
@@ -1262,13 +1492,13 @@ export declare const TableColumnSchema: z.ZodObject<{
|
|
|
1262
1492
|
}, "strip", z.ZodTypeAny, {
|
|
1263
1493
|
label: string;
|
|
1264
1494
|
key: string;
|
|
1265
|
-
sortable?: boolean | undefined;
|
|
1266
1495
|
width?: string | undefined;
|
|
1496
|
+
sortable?: boolean | undefined;
|
|
1267
1497
|
}, {
|
|
1268
1498
|
label: string;
|
|
1269
1499
|
key: string;
|
|
1270
|
-
sortable?: boolean | undefined;
|
|
1271
1500
|
width?: string | undefined;
|
|
1501
|
+
sortable?: boolean | undefined;
|
|
1272
1502
|
}>;
|
|
1273
1503
|
export declare const TablePaginationSchema: z.ZodObject<{
|
|
1274
1504
|
currentPage: z.ZodNumber;
|
|
@@ -1309,6 +1539,19 @@ export declare const TableExportableSchema: z.ZodUnion<[z.ZodBoolean, z.ZodObjec
|
|
|
1309
1539
|
filename?: string | undefined;
|
|
1310
1540
|
formats?: ("csv" | "tsv" | "json")[] | undefined;
|
|
1311
1541
|
}>]>;
|
|
1542
|
+
export declare const CitationEntrySchema: z.ZodObject<{
|
|
1543
|
+
page: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
1544
|
+
file: z.ZodOptional<z.ZodString>;
|
|
1545
|
+
file_id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
1546
|
+
}, "strip", z.ZodTypeAny, {
|
|
1547
|
+
page: string | number;
|
|
1548
|
+
file?: string | undefined;
|
|
1549
|
+
file_id?: string | number | undefined;
|
|
1550
|
+
}, {
|
|
1551
|
+
page: string | number;
|
|
1552
|
+
file?: string | undefined;
|
|
1553
|
+
file_id?: string | number | undefined;
|
|
1554
|
+
}>;
|
|
1312
1555
|
export declare const TableComponentParamsSchema: z.ZodObject<{
|
|
1313
1556
|
title: z.ZodOptional<z.ZodString>;
|
|
1314
1557
|
columns: z.ZodArray<z.ZodObject<{
|
|
@@ -1319,13 +1562,13 @@ export declare const TableComponentParamsSchema: z.ZodObject<{
|
|
|
1319
1562
|
}, "strip", z.ZodTypeAny, {
|
|
1320
1563
|
label: string;
|
|
1321
1564
|
key: string;
|
|
1322
|
-
sortable?: boolean | undefined;
|
|
1323
1565
|
width?: string | undefined;
|
|
1566
|
+
sortable?: boolean | undefined;
|
|
1324
1567
|
}, {
|
|
1325
1568
|
label: string;
|
|
1326
1569
|
key: string;
|
|
1327
|
-
sortable?: boolean | undefined;
|
|
1328
1570
|
width?: string | undefined;
|
|
1571
|
+
sortable?: boolean | undefined;
|
|
1329
1572
|
}>, "many">;
|
|
1330
1573
|
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
1331
1574
|
pagination: z.ZodOptional<z.ZodObject<{
|
|
@@ -1368,20 +1611,33 @@ export declare const TableComponentParamsSchema: z.ZodObject<{
|
|
|
1368
1611
|
formats?: ("csv" | "tsv" | "json")[] | undefined;
|
|
1369
1612
|
}>]>>;
|
|
1370
1613
|
className: z.ZodOptional<z.ZodString>;
|
|
1614
|
+
citationMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1615
|
+
page: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
1616
|
+
file: z.ZodOptional<z.ZodString>;
|
|
1617
|
+
file_id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
1618
|
+
}, "strip", z.ZodTypeAny, {
|
|
1619
|
+
page: string | number;
|
|
1620
|
+
file?: string | undefined;
|
|
1621
|
+
file_id?: string | number | undefined;
|
|
1622
|
+
}, {
|
|
1623
|
+
page: string | number;
|
|
1624
|
+
file?: string | undefined;
|
|
1625
|
+
file_id?: string | number | undefined;
|
|
1626
|
+
}>>>;
|
|
1371
1627
|
}, "strip", z.ZodTypeAny, {
|
|
1372
1628
|
rows: Record<string, unknown>[];
|
|
1373
1629
|
columns: {
|
|
1374
1630
|
label: string;
|
|
1375
1631
|
key: string;
|
|
1376
|
-
sortable?: boolean | undefined;
|
|
1377
1632
|
width?: string | undefined;
|
|
1633
|
+
sortable?: boolean | undefined;
|
|
1378
1634
|
}[];
|
|
1379
1635
|
title?: string | undefined;
|
|
1636
|
+
className?: string | undefined;
|
|
1380
1637
|
exportable?: boolean | {
|
|
1381
1638
|
filename?: string | undefined;
|
|
1382
1639
|
formats?: ("csv" | "tsv" | "json")[] | undefined;
|
|
1383
1640
|
} | undefined;
|
|
1384
|
-
className?: string | undefined;
|
|
1385
1641
|
pagination?: {
|
|
1386
1642
|
currentPage: number;
|
|
1387
1643
|
pageSize: number;
|
|
@@ -1393,20 +1649,25 @@ export declare const TableComponentParamsSchema: z.ZodObject<{
|
|
|
1393
1649
|
overscan?: number | undefined;
|
|
1394
1650
|
threshold?: number | undefined;
|
|
1395
1651
|
} | undefined;
|
|
1652
|
+
citationMap?: Record<string, {
|
|
1653
|
+
page: string | number;
|
|
1654
|
+
file?: string | undefined;
|
|
1655
|
+
file_id?: string | number | undefined;
|
|
1656
|
+
}> | undefined;
|
|
1396
1657
|
}, {
|
|
1397
1658
|
rows: Record<string, unknown>[];
|
|
1398
1659
|
columns: {
|
|
1399
1660
|
label: string;
|
|
1400
1661
|
key: string;
|
|
1401
|
-
sortable?: boolean | undefined;
|
|
1402
1662
|
width?: string | undefined;
|
|
1663
|
+
sortable?: boolean | undefined;
|
|
1403
1664
|
}[];
|
|
1404
1665
|
title?: string | undefined;
|
|
1666
|
+
className?: string | undefined;
|
|
1405
1667
|
exportable?: boolean | {
|
|
1406
1668
|
filename?: string | undefined;
|
|
1407
1669
|
formats?: ("csv" | "tsv" | "json")[] | undefined;
|
|
1408
1670
|
} | undefined;
|
|
1409
|
-
className?: string | undefined;
|
|
1410
1671
|
pagination?: {
|
|
1411
1672
|
currentPage: number;
|
|
1412
1673
|
pageSize: number;
|
|
@@ -1418,6 +1679,11 @@ export declare const TableComponentParamsSchema: z.ZodObject<{
|
|
|
1418
1679
|
overscan?: number | undefined;
|
|
1419
1680
|
threshold?: number | undefined;
|
|
1420
1681
|
} | undefined;
|
|
1682
|
+
citationMap?: Record<string, {
|
|
1683
|
+
page: string | number;
|
|
1684
|
+
file?: string | undefined;
|
|
1685
|
+
file_id?: string | number | undefined;
|
|
1686
|
+
}> | undefined;
|
|
1421
1687
|
}>;
|
|
1422
1688
|
export declare const MetricTrendSchema: z.ZodObject<{
|
|
1423
1689
|
value: z.ZodNumber;
|
|
@@ -1450,8 +1716,8 @@ export declare const MetricComponentParamsSchema: z.ZodObject<{
|
|
|
1450
1716
|
value: string | number;
|
|
1451
1717
|
title: string;
|
|
1452
1718
|
icon?: string | undefined;
|
|
1453
|
-
unit?: string | undefined;
|
|
1454
1719
|
className?: string | undefined;
|
|
1720
|
+
unit?: string | undefined;
|
|
1455
1721
|
trend?: {
|
|
1456
1722
|
value: number;
|
|
1457
1723
|
direction: "up" | "down" | "neutral";
|
|
@@ -1461,8 +1727,8 @@ export declare const MetricComponentParamsSchema: z.ZodObject<{
|
|
|
1461
1727
|
value: string | number;
|
|
1462
1728
|
title: string;
|
|
1463
1729
|
icon?: string | undefined;
|
|
1464
|
-
unit?: string | undefined;
|
|
1465
1730
|
className?: string | undefined;
|
|
1731
|
+
unit?: string | undefined;
|
|
1466
1732
|
trend?: {
|
|
1467
1733
|
value: number;
|
|
1468
1734
|
direction: "up" | "down" | "neutral";
|
|
@@ -1648,7 +1914,7 @@ export declare const ComponentExampleSchema: z.ZodObject<{
|
|
|
1648
1914
|
}>;
|
|
1649
1915
|
export declare const ComponentSchema: z.ZodObject<{
|
|
1650
1916
|
id: z.ZodString;
|
|
1651
|
-
type: z.ZodEnum<["chart", "table", "metric", "text", "composite", "grid", "iframe", "image", "link", "action", "footer", "carousel", "artifact", "form", "modal", "action-group", "image-gallery", "video", "code", "map"]>;
|
|
1917
|
+
type: z.ZodEnum<["chart", "table", "metric", "text", "composite", "grid", "iframe", "image", "link", "action", "footer", "carousel", "artifact", "form", "modal", "action-group", "image-gallery", "video", "code", "map", "graph"]>;
|
|
1652
1918
|
name: z.ZodString;
|
|
1653
1919
|
description: z.ZodOptional<z.ZodString>;
|
|
1654
1920
|
schema: z.ZodObject<{
|
|
@@ -1739,7 +2005,7 @@ export declare const ComponentSchema: z.ZodObject<{
|
|
|
1739
2005
|
deprecated: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
1740
2006
|
deprecationMessage: z.ZodOptional<z.ZodString>;
|
|
1741
2007
|
}, "strip", z.ZodTypeAny, {
|
|
1742
|
-
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
|
|
2008
|
+
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
|
|
1743
2009
|
name: string;
|
|
1744
2010
|
id: string;
|
|
1745
2011
|
schema: {
|
|
@@ -1775,7 +2041,7 @@ export declare const ComponentSchema: z.ZodObject<{
|
|
|
1775
2041
|
deprecated?: boolean | undefined;
|
|
1776
2042
|
deprecationMessage?: string | undefined;
|
|
1777
2043
|
}, {
|
|
1778
|
-
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
|
|
2044
|
+
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
|
|
1779
2045
|
name: string;
|
|
1780
2046
|
id: string;
|
|
1781
2047
|
schema: {
|
|
@@ -1847,7 +2113,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
|
|
|
1847
2113
|
}>>;
|
|
1848
2114
|
components: z.ZodArray<z.ZodObject<{
|
|
1849
2115
|
id: z.ZodString;
|
|
1850
|
-
type: z.ZodEnum<["chart", "table", "metric", "text", "composite", "grid", "iframe", "image", "link", "action", "footer", "carousel", "artifact", "form", "modal", "action-group", "image-gallery", "video", "code", "map"]>;
|
|
2116
|
+
type: z.ZodEnum<["chart", "table", "metric", "text", "composite", "grid", "iframe", "image", "link", "action", "footer", "carousel", "artifact", "form", "modal", "action-group", "image-gallery", "video", "code", "map", "graph"]>;
|
|
1851
2117
|
name: z.ZodString;
|
|
1852
2118
|
description: z.ZodOptional<z.ZodString>;
|
|
1853
2119
|
schema: z.ZodObject<{
|
|
@@ -1938,7 +2204,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
|
|
|
1938
2204
|
deprecated: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
1939
2205
|
deprecationMessage: z.ZodOptional<z.ZodString>;
|
|
1940
2206
|
}, "strip", z.ZodTypeAny, {
|
|
1941
|
-
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
|
|
2207
|
+
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
|
|
1942
2208
|
name: string;
|
|
1943
2209
|
id: string;
|
|
1944
2210
|
schema: {
|
|
@@ -1974,7 +2240,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
|
|
|
1974
2240
|
deprecated?: boolean | undefined;
|
|
1975
2241
|
deprecationMessage?: string | undefined;
|
|
1976
2242
|
}, {
|
|
1977
|
-
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
|
|
2243
|
+
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
|
|
1978
2244
|
name: string;
|
|
1979
2245
|
id: string;
|
|
1980
2246
|
schema: {
|
|
@@ -2013,7 +2279,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
|
|
|
2013
2279
|
}, "strip", z.ZodTypeAny, {
|
|
2014
2280
|
version: "1.0.0";
|
|
2015
2281
|
components: {
|
|
2016
|
-
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
|
|
2282
|
+
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
|
|
2017
2283
|
name: string;
|
|
2018
2284
|
id: string;
|
|
2019
2285
|
schema: {
|
|
@@ -2058,7 +2324,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
|
|
|
2058
2324
|
}, {
|
|
2059
2325
|
version: "1.0.0";
|
|
2060
2326
|
components: {
|
|
2061
|
-
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
|
|
2327
|
+
type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
|
|
2062
2328
|
name: string;
|
|
2063
2329
|
id: string;
|
|
2064
2330
|
schema: {
|
|
@@ -2135,6 +2401,11 @@ export type LatLngTuple = z.infer<typeof LatLngTupleSchema>;
|
|
|
2135
2401
|
export type LatLngPoint = z.infer<typeof LatLngPointSchema>;
|
|
2136
2402
|
export type MapMarker = z.infer<typeof MapMarkerSchema>;
|
|
2137
2403
|
export type MapComponentParams = z.infer<typeof MapComponentParamsSchema>;
|
|
2404
|
+
export type GraphNode = z.infer<typeof GraphNodeSchema>;
|
|
2405
|
+
export type GraphEdge = z.infer<typeof GraphEdgeSchema>;
|
|
2406
|
+
export type GraphLayoutName = z.infer<typeof GraphLayoutNameSchema>;
|
|
2407
|
+
export type GraphLayout = z.infer<typeof GraphLayoutSchema>;
|
|
2408
|
+
export type GraphComponentParams = z.infer<typeof GraphComponentParamsSchema>;
|
|
2138
2409
|
export type ChartType = z.infer<typeof ChartTypeSchema>;
|
|
2139
2410
|
export type ChartDataset = z.infer<typeof ChartDatasetSchema>;
|
|
2140
2411
|
export type ChartTimeAxis = z.infer<typeof ChartTimeAxisSchema>;
|
|
@@ -2143,6 +2414,7 @@ export type TableColumn = z.infer<typeof TableColumnSchema>;
|
|
|
2143
2414
|
export type TablePagination = z.infer<typeof TablePaginationSchema>;
|
|
2144
2415
|
export type TableVirtualizeOptions = z.infer<typeof TableVirtualizeOptionsSchema>;
|
|
2145
2416
|
export type TableExportable = z.infer<typeof TableExportableSchema>;
|
|
2417
|
+
export type CitationEntry = z.infer<typeof CitationEntrySchema>;
|
|
2146
2418
|
export type TableComponentParams = z.infer<typeof TableComponentParamsSchema>;
|
|
2147
2419
|
export type MetricTrend = z.infer<typeof MetricTrendSchema>;
|
|
2148
2420
|
export type MetricComponentParams = z.infer<typeof MetricComponentParamsSchema>;
|
package/dist/schemas.js
CHANGED
|
@@ -34,8 +34,10 @@ const ComponentTypeSchema = z.enum([
|
|
|
34
34
|
// Sprint 5: Video embed (YouTube, Vimeo, direct)
|
|
35
35
|
"code",
|
|
36
36
|
// Sprint 6: Syntax highlighted code block
|
|
37
|
-
"map"
|
|
37
|
+
"map",
|
|
38
38
|
// Sprint 6: Interactive map (Leaflet)
|
|
39
|
+
"graph"
|
|
40
|
+
// v5.0.4: node-link graph (peer @antv/g6)
|
|
39
41
|
]);
|
|
40
42
|
const FormFieldOptionSchema = z.object({
|
|
41
43
|
label: z.string().min(1),
|
|
@@ -259,6 +261,83 @@ const MapComponentParamsSchema = z.object({
|
|
|
259
261
|
tileLayer: z.string().optional(),
|
|
260
262
|
attribution: z.string().optional()
|
|
261
263
|
});
|
|
264
|
+
const GraphNodeSchema = z.object({
|
|
265
|
+
id: z.string().min(1),
|
|
266
|
+
label: z.string().optional(),
|
|
267
|
+
type: z.string().optional(),
|
|
268
|
+
// G6 node type: 'circle' | 'rect' | 'image' | …
|
|
269
|
+
size: z.union([z.number(), z.tuple([z.number(), z.number()])]).optional(),
|
|
270
|
+
/**
|
|
271
|
+
* Generic ranking / importance signal. Drives default node size when
|
|
272
|
+
* `size` is omitted, and acts as the sort key for the `concentric`
|
|
273
|
+
* layout (highest weight at center). Domain semantics opaque to the lib.
|
|
274
|
+
*/
|
|
275
|
+
weight: z.number().optional(),
|
|
276
|
+
style: z.record(z.unknown()).optional(),
|
|
277
|
+
// passthrough G6 NodeStyle
|
|
278
|
+
data: z.record(z.unknown()).optional()
|
|
279
|
+
// arbitrary metadata for tooltips / click handlers
|
|
280
|
+
});
|
|
281
|
+
const GraphEdgeSchema = z.object({
|
|
282
|
+
source: z.string().min(1),
|
|
283
|
+
// must match a node.id
|
|
284
|
+
target: z.string().min(1),
|
|
285
|
+
// must match a node.id
|
|
286
|
+
label: z.string().optional(),
|
|
287
|
+
type: z.string().optional(),
|
|
288
|
+
// G6 edge type: 'line' | 'arc' | 'cubic' | 'polyline' | …
|
|
289
|
+
/**
|
|
290
|
+
* Generic strength signal. Drives default edge stroke width and acts
|
|
291
|
+
* as attractive force in `force` layouts. Domain semantics opaque.
|
|
292
|
+
*/
|
|
293
|
+
weight: z.number().optional(),
|
|
294
|
+
style: z.record(z.unknown()).optional(),
|
|
295
|
+
data: z.record(z.unknown()).optional()
|
|
296
|
+
});
|
|
297
|
+
const GraphLayoutNameSchema = z.enum([
|
|
298
|
+
"force",
|
|
299
|
+
"dagre",
|
|
300
|
+
"mindmap",
|
|
301
|
+
"tree",
|
|
302
|
+
"circular",
|
|
303
|
+
"grid",
|
|
304
|
+
"concentric"
|
|
305
|
+
]);
|
|
306
|
+
const GraphLayoutSchema = z.union([
|
|
307
|
+
GraphLayoutNameSchema,
|
|
308
|
+
z.object({
|
|
309
|
+
type: GraphLayoutNameSchema,
|
|
310
|
+
options: z.record(z.unknown()).optional()
|
|
311
|
+
})
|
|
312
|
+
]);
|
|
313
|
+
const GraphComponentParamsSchema = z.object({
|
|
314
|
+
title: z.string().optional(),
|
|
315
|
+
nodes: z.array(GraphNodeSchema).min(1),
|
|
316
|
+
edges: z.array(GraphEdgeSchema).optional(),
|
|
317
|
+
/**
|
|
318
|
+
* Layout shorthand string OR object form. When omitted, the renderer
|
|
319
|
+
* picks a sensible default: `'force'` if edges are present, `'circular'`
|
|
320
|
+
* otherwise.
|
|
321
|
+
*/
|
|
322
|
+
layout: GraphLayoutSchema.optional(),
|
|
323
|
+
height: z.string().optional(),
|
|
324
|
+
// CSS length, default '400px'
|
|
325
|
+
width: z.string().optional(),
|
|
326
|
+
// CSS length, default '100%'
|
|
327
|
+
rendererPref: z.enum(["canvas", "svg"]).optional(),
|
|
328
|
+
// default 'canvas'
|
|
329
|
+
fitView: z.boolean().optional(),
|
|
330
|
+
// default true
|
|
331
|
+
enableZoom: z.boolean().optional(),
|
|
332
|
+
// default true
|
|
333
|
+
enableDrag: z.boolean().optional(),
|
|
334
|
+
// default true (drag nodes)
|
|
335
|
+
enableSelect: z.boolean().optional(),
|
|
336
|
+
// default true (click-select highlight)
|
|
337
|
+
tooltip: z.boolean().optional(),
|
|
338
|
+
// default true (label + data summary on hover)
|
|
339
|
+
className: z.string().optional()
|
|
340
|
+
});
|
|
262
341
|
const ChartTypeSchema = z.enum([
|
|
263
342
|
"bar",
|
|
264
343
|
"line",
|
|
@@ -339,6 +418,11 @@ const TableExportableSchema = z.union([
|
|
|
339
418
|
filename: z.string().optional()
|
|
340
419
|
})
|
|
341
420
|
]);
|
|
421
|
+
const CitationEntrySchema = z.object({
|
|
422
|
+
page: z.union([z.number(), z.string()]),
|
|
423
|
+
file: z.string().optional(),
|
|
424
|
+
file_id: z.union([z.number(), z.string()]).optional()
|
|
425
|
+
});
|
|
342
426
|
const TableComponentParamsSchema = z.object({
|
|
343
427
|
title: z.string().optional(),
|
|
344
428
|
columns: z.array(TableColumnSchema).min(1),
|
|
@@ -346,7 +430,9 @@ const TableComponentParamsSchema = z.object({
|
|
|
346
430
|
pagination: TablePaginationSchema.optional(),
|
|
347
431
|
virtualize: z.union([z.boolean(), TableVirtualizeOptionsSchema]).optional(),
|
|
348
432
|
exportable: TableExportableSchema.optional(),
|
|
349
|
-
className: z.string().optional()
|
|
433
|
+
className: z.string().optional(),
|
|
434
|
+
// v5.0.3 — opt-in citation chip rendering inside cells
|
|
435
|
+
citationMap: z.record(z.string(), CitationEntrySchema).optional()
|
|
350
436
|
});
|
|
351
437
|
const MetricTrendSchema = z.object({
|
|
352
438
|
value: z.number(),
|
|
@@ -461,6 +547,7 @@ export {
|
|
|
461
547
|
ChartDatasetSchema,
|
|
462
548
|
ChartTimeAxisSchema,
|
|
463
549
|
ChartTypeSchema,
|
|
550
|
+
CitationEntrySchema,
|
|
464
551
|
CodeComponentParamsSchema,
|
|
465
552
|
ComponentExampleSchema,
|
|
466
553
|
ComponentRegistrySchema,
|
|
@@ -473,6 +560,11 @@ export {
|
|
|
473
560
|
FormFieldTypeSchema,
|
|
474
561
|
FormSubmitActionSchema,
|
|
475
562
|
GalleryImageSchema,
|
|
563
|
+
GraphComponentParamsSchema,
|
|
564
|
+
GraphEdgeSchema,
|
|
565
|
+
GraphLayoutNameSchema,
|
|
566
|
+
GraphLayoutSchema,
|
|
567
|
+
GraphNodeSchema,
|
|
476
568
|
GridPositionSchema,
|
|
477
569
|
IframeComponentParamsSchema,
|
|
478
570
|
ImageComponentParamsSchema,
|