@seed-ship/mcp-ui-spec 5.0.3 → 5.0.5

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/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;
@@ -1332,13 +1562,13 @@ export declare const TableComponentParamsSchema: z.ZodObject<{
1332
1562
  }, "strip", z.ZodTypeAny, {
1333
1563
  label: string;
1334
1564
  key: string;
1335
- sortable?: boolean | undefined;
1336
1565
  width?: string | undefined;
1566
+ sortable?: boolean | undefined;
1337
1567
  }, {
1338
1568
  label: string;
1339
1569
  key: string;
1340
- sortable?: boolean | undefined;
1341
1570
  width?: string | undefined;
1571
+ sortable?: boolean | undefined;
1342
1572
  }>, "many">;
1343
1573
  rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
1344
1574
  pagination: z.ZodOptional<z.ZodObject<{
@@ -1394,20 +1624,22 @@ export declare const TableComponentParamsSchema: z.ZodObject<{
1394
1624
  file?: string | undefined;
1395
1625
  file_id?: string | number | undefined;
1396
1626
  }>>>;
1627
+ maxHeight: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodNumber, z.ZodString]>>;
1397
1628
  }, "strip", z.ZodTypeAny, {
1398
1629
  rows: Record<string, unknown>[];
1399
1630
  columns: {
1400
1631
  label: string;
1401
1632
  key: string;
1402
- sortable?: boolean | undefined;
1403
1633
  width?: string | undefined;
1634
+ sortable?: boolean | undefined;
1404
1635
  }[];
1405
1636
  title?: string | undefined;
1637
+ maxHeight?: string | number | undefined;
1638
+ className?: string | undefined;
1406
1639
  exportable?: boolean | {
1407
1640
  filename?: string | undefined;
1408
1641
  formats?: ("csv" | "tsv" | "json")[] | undefined;
1409
1642
  } | undefined;
1410
- className?: string | undefined;
1411
1643
  pagination?: {
1412
1644
  currentPage: number;
1413
1645
  pageSize: number;
@@ -1429,15 +1661,16 @@ export declare const TableComponentParamsSchema: z.ZodObject<{
1429
1661
  columns: {
1430
1662
  label: string;
1431
1663
  key: string;
1432
- sortable?: boolean | undefined;
1433
1664
  width?: string | undefined;
1665
+ sortable?: boolean | undefined;
1434
1666
  }[];
1435
1667
  title?: string | undefined;
1668
+ maxHeight?: string | number | undefined;
1669
+ className?: string | undefined;
1436
1670
  exportable?: boolean | {
1437
1671
  filename?: string | undefined;
1438
1672
  formats?: ("csv" | "tsv" | "json")[] | undefined;
1439
1673
  } | undefined;
1440
- className?: string | undefined;
1441
1674
  pagination?: {
1442
1675
  currentPage: number;
1443
1676
  pageSize: number;
@@ -1486,8 +1719,8 @@ export declare const MetricComponentParamsSchema: z.ZodObject<{
1486
1719
  value: string | number;
1487
1720
  title: string;
1488
1721
  icon?: string | undefined;
1489
- unit?: string | undefined;
1490
1722
  className?: string | undefined;
1723
+ unit?: string | undefined;
1491
1724
  trend?: {
1492
1725
  value: number;
1493
1726
  direction: "up" | "down" | "neutral";
@@ -1497,8 +1730,8 @@ export declare const MetricComponentParamsSchema: z.ZodObject<{
1497
1730
  value: string | number;
1498
1731
  title: string;
1499
1732
  icon?: string | undefined;
1500
- unit?: string | undefined;
1501
1733
  className?: string | undefined;
1734
+ unit?: string | undefined;
1502
1735
  trend?: {
1503
1736
  value: number;
1504
1737
  direction: "up" | "down" | "neutral";
@@ -1684,7 +1917,7 @@ export declare const ComponentExampleSchema: z.ZodObject<{
1684
1917
  }>;
1685
1918
  export declare const ComponentSchema: z.ZodObject<{
1686
1919
  id: z.ZodString;
1687
- 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"]>;
1920
+ 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"]>;
1688
1921
  name: z.ZodString;
1689
1922
  description: z.ZodOptional<z.ZodString>;
1690
1923
  schema: z.ZodObject<{
@@ -1775,7 +2008,7 @@ export declare const ComponentSchema: z.ZodObject<{
1775
2008
  deprecated: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1776
2009
  deprecationMessage: z.ZodOptional<z.ZodString>;
1777
2010
  }, "strip", z.ZodTypeAny, {
1778
- type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
2011
+ 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
2012
  name: string;
1780
2013
  id: string;
1781
2014
  schema: {
@@ -1811,7 +2044,7 @@ export declare const ComponentSchema: z.ZodObject<{
1811
2044
  deprecated?: boolean | undefined;
1812
2045
  deprecationMessage?: string | undefined;
1813
2046
  }, {
1814
- type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
2047
+ type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
1815
2048
  name: string;
1816
2049
  id: string;
1817
2050
  schema: {
@@ -1883,7 +2116,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
1883
2116
  }>>;
1884
2117
  components: z.ZodArray<z.ZodObject<{
1885
2118
  id: z.ZodString;
1886
- 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"]>;
2119
+ 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"]>;
1887
2120
  name: z.ZodString;
1888
2121
  description: z.ZodOptional<z.ZodString>;
1889
2122
  schema: z.ZodObject<{
@@ -1974,7 +2207,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
1974
2207
  deprecated: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1975
2208
  deprecationMessage: z.ZodOptional<z.ZodString>;
1976
2209
  }, "strip", z.ZodTypeAny, {
1977
- type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
2210
+ 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
2211
  name: string;
1979
2212
  id: string;
1980
2213
  schema: {
@@ -2010,7 +2243,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
2010
2243
  deprecated?: boolean | undefined;
2011
2244
  deprecationMessage?: string | undefined;
2012
2245
  }, {
2013
- type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
2246
+ type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
2014
2247
  name: string;
2015
2248
  id: string;
2016
2249
  schema: {
@@ -2049,7 +2282,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
2049
2282
  }, "strip", z.ZodTypeAny, {
2050
2283
  version: "1.0.0";
2051
2284
  components: {
2052
- type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
2285
+ type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
2053
2286
  name: string;
2054
2287
  id: string;
2055
2288
  schema: {
@@ -2094,7 +2327,7 @@ export declare const ComponentRegistrySchema: z.ZodObject<{
2094
2327
  }, {
2095
2328
  version: "1.0.0";
2096
2329
  components: {
2097
- type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video";
2330
+ type: "code" | "map" | "chart" | "table" | "metric" | "text" | "composite" | "grid" | "iframe" | "image" | "link" | "action" | "footer" | "carousel" | "artifact" | "form" | "modal" | "action-group" | "image-gallery" | "video" | "graph";
2098
2331
  name: string;
2099
2332
  id: string;
2100
2333
  schema: {
@@ -2171,6 +2404,11 @@ export type LatLngTuple = z.infer<typeof LatLngTupleSchema>;
2171
2404
  export type LatLngPoint = z.infer<typeof LatLngPointSchema>;
2172
2405
  export type MapMarker = z.infer<typeof MapMarkerSchema>;
2173
2406
  export type MapComponentParams = z.infer<typeof MapComponentParamsSchema>;
2407
+ export type GraphNode = z.infer<typeof GraphNodeSchema>;
2408
+ export type GraphEdge = z.infer<typeof GraphEdgeSchema>;
2409
+ export type GraphLayoutName = z.infer<typeof GraphLayoutNameSchema>;
2410
+ export type GraphLayout = z.infer<typeof GraphLayoutSchema>;
2411
+ export type GraphComponentParams = z.infer<typeof GraphComponentParamsSchema>;
2174
2412
  export type ChartType = z.infer<typeof ChartTypeSchema>;
2175
2413
  export type ChartDataset = z.infer<typeof ChartDatasetSchema>;
2176
2414
  export type ChartTimeAxis = z.infer<typeof ChartTimeAxisSchema>;
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",
@@ -353,7 +432,14 @@ const TableComponentParamsSchema = z.object({
353
432
  exportable: TableExportableSchema.optional(),
354
433
  className: z.string().optional(),
355
434
  // v5.0.3 — opt-in citation chip rendering inside cells
356
- citationMap: z.record(z.string(), CitationEntrySchema).optional()
435
+ citationMap: z.record(z.string(), CitationEntrySchema).optional(),
436
+ // v5.0.5 — opt-out of the inline-mode max-height cap. The library defaults
437
+ // a `max-height: 400px` (or 500px when virtualizing) on tables with > 8
438
+ // rows so they don't blow out a chat-stream layout. Pass `'auto'` to
439
+ // disable the cap (when the consumer's wrapping container handles
440
+ // overflow), a number (interpreted as `${n}px`), or any CSS length string
441
+ // to override the value.
442
+ maxHeight: z.union([z.literal("auto"), z.number(), z.string()]).optional()
357
443
  });
358
444
  const MetricTrendSchema = z.object({
359
445
  value: z.number(),
@@ -481,6 +567,11 @@ export {
481
567
  FormFieldTypeSchema,
482
568
  FormSubmitActionSchema,
483
569
  GalleryImageSchema,
570
+ GraphComponentParamsSchema,
571
+ GraphEdgeSchema,
572
+ GraphLayoutNameSchema,
573
+ GraphLayoutSchema,
574
+ GraphNodeSchema,
484
575
  GridPositionSchema,
485
576
  IframeComponentParamsSchema,
486
577
  ImageComponentParamsSchema,