@getcatalystiq/agent-plane-ui 0.1.7 → 0.1.9

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/index.js CHANGED
@@ -1187,7 +1187,7 @@ function McpServerListPage({ initialData }) {
1187
1187
  servers.length === 0 && /* @__PURE__ */ jsx(EmptyRow, { colSpan: 8, children: 'No custom connectors registered. Click "+ New Connector" to add one.' })
1188
1188
  ] })
1189
1189
  ] }),
1190
- /* @__PURE__ */ jsx(Dialog, { open: showCreate, onOpenChange: setShowCreate, children: /* @__PURE__ */ jsxs(DialogContent, { children: [
1190
+ /* @__PURE__ */ jsx(Dialog, { open: showCreate, onOpenChange: setShowCreate, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-lg", children: [
1191
1191
  /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Register Connector" }) }),
1192
1192
  /* @__PURE__ */ jsxs(DialogBody, { className: "space-y-3", children: [
1193
1193
  createError && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: createError }),
@@ -1204,7 +1204,7 @@ function McpServerListPage({ initialData }) {
1204
1204
  ] }) }),
1205
1205
  /* @__PURE__ */ jsx(Dialog, { open: !!editTarget, onOpenChange: (open) => {
1206
1206
  if (!open) setEditTarget(null);
1207
- }, children: /* @__PURE__ */ jsxs(DialogContent, { children: [
1207
+ }, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-lg", children: [
1208
1208
  /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Edit Connector" }) }),
1209
1209
  /* @__PURE__ */ jsxs(DialogBody, { className: "space-y-3", children: [
1210
1210
  editError && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: editError }),
@@ -1269,17 +1269,25 @@ function PluginMarketplaceListPage({ initialData }) {
1269
1269
  );
1270
1270
  const [showAdd, setShowAdd] = useState(false);
1271
1271
  const [adding, setAdding] = useState(false);
1272
+ const [addError, setAddError] = useState("");
1272
1273
  const [newMarketplace, setNewMarketplace] = useState({ name: "", github_repo: "" });
1273
1274
  const [deleteTarget, setDeleteTarget] = useState(null);
1274
1275
  const [deleting, setDeleting] = useState(false);
1275
1276
  const [deleteError, setDeleteError] = useState("");
1277
+ function resetAddForm() {
1278
+ setNewMarketplace({ name: "", github_repo: "" });
1279
+ setAddError("");
1280
+ }
1276
1281
  async function handleAdd() {
1277
1282
  setAdding(true);
1283
+ setAddError("");
1278
1284
  try {
1279
1285
  await client.pluginMarketplaces.create(newMarketplace);
1280
1286
  setShowAdd(false);
1281
- setNewMarketplace({ name: "", github_repo: "" });
1287
+ resetAddForm();
1282
1288
  mutate("plugin-marketplaces");
1289
+ } catch (err) {
1290
+ setAddError(err?.message ?? "Failed to add marketplace");
1283
1291
  } finally {
1284
1292
  setAdding(false);
1285
1293
  }
@@ -1308,14 +1316,39 @@ function PluginMarketplaceListPage({ initialData }) {
1308
1316
  return /* @__PURE__ */ jsx(Skeleton, { className: "h-96 rounded-lg" });
1309
1317
  }
1310
1318
  return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
1311
- /* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: () => setShowAdd(!showAdd), children: showAdd ? "Cancel" : "Add Marketplace" }) }),
1312
- showAdd && /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border p-4 space-y-3", children: [
1313
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
1314
- /* @__PURE__ */ jsx(Input, { placeholder: "Name", value: newMarketplace.name, onChange: (e) => setNewMarketplace({ ...newMarketplace, name: e.target.value }) }),
1315
- /* @__PURE__ */ jsx(Input, { placeholder: "GitHub Repo (owner/repo)", value: newMarketplace.github_repo, onChange: (e) => setNewMarketplace({ ...newMarketplace, github_repo: e.target.value }) })
1319
+ /* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: () => setShowAdd(true), children: "+ Add Marketplace" }) }),
1320
+ /* @__PURE__ */ jsx(Dialog, { open: showAdd, onOpenChange: (v) => {
1321
+ setShowAdd(v);
1322
+ if (!v) resetAddForm();
1323
+ }, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-md", children: [
1324
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Add Marketplace" }) }),
1325
+ /* @__PURE__ */ jsxs(DialogBody, { className: "space-y-3", children: [
1326
+ /* @__PURE__ */ jsx(FormField, { label: "Name", children: /* @__PURE__ */ jsx(
1327
+ Input,
1328
+ {
1329
+ value: newMarketplace.name,
1330
+ onChange: (e) => setNewMarketplace({ ...newMarketplace, name: e.target.value }),
1331
+ placeholder: "My Marketplace"
1332
+ }
1333
+ ) }),
1334
+ /* @__PURE__ */ jsx(FormField, { label: "GitHub Repo", children: /* @__PURE__ */ jsx(
1335
+ Input,
1336
+ {
1337
+ value: newMarketplace.github_repo,
1338
+ onChange: (e) => setNewMarketplace({ ...newMarketplace, github_repo: e.target.value }),
1339
+ placeholder: "owner/repo"
1340
+ }
1341
+ ) }),
1342
+ /* @__PURE__ */ jsx(FormError, { error: addError })
1316
1343
  ] }),
1317
- /* @__PURE__ */ jsx(Button, { size: "sm", onClick: handleAdd, disabled: adding || !newMarketplace.name || !newMarketplace.github_repo, children: adding ? "Adding..." : "Add Marketplace" })
1318
- ] }),
1344
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
1345
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: () => {
1346
+ setShowAdd(false);
1347
+ resetAddForm();
1348
+ }, children: "Cancel" }),
1349
+ /* @__PURE__ */ jsx(Button, { size: "sm", onClick: handleAdd, disabled: adding || !newMarketplace.name || !newMarketplace.github_repo, children: adding ? "Adding..." : "Add Marketplace" })
1350
+ ] })
1351
+ ] }) }),
1319
1352
  /* @__PURE__ */ jsxs(AdminTable, { children: [
1320
1353
  /* @__PURE__ */ jsxs(AdminTableHead, { children: [
1321
1354
  /* @__PURE__ */ jsx(Th, { children: "Name" }),
@@ -1397,7 +1430,7 @@ function PluginMarketplaceDetailPage({ marketplaceId, initialData, initialPlugin
1397
1430
  (c) => c.pluginMarketplaces.get(marketplaceId),
1398
1431
  initialData ? { fallbackData: initialData } : void 0
1399
1432
  );
1400
- const { data: pluginsResult } = useApi(
1433
+ const { data: plugins } = useApi(
1401
1434
  `marketplace-${marketplaceId}-plugins`,
1402
1435
  (c) => c.pluginMarketplaces.listPlugins(marketplaceId),
1403
1436
  initialPlugins ? { fallbackData: initialPlugins } : void 0
@@ -1463,10 +1496,7 @@ function PluginMarketplaceDetailPage({ marketplaceId, initialData, initialPlugin
1463
1496
  ] }),
1464
1497
  /* @__PURE__ */ jsxs("div", { children: [
1465
1498
  /* @__PURE__ */ jsx(SectionHeader, { title: "Plugins" }),
1466
- !pluginsResult ? /* @__PURE__ */ jsx(Skeleton, { className: "h-48 rounded-lg" }) : !pluginsResult.ok ? /* @__PURE__ */ jsxs("p", { className: "text-sm text-destructive", children: [
1467
- "Failed to load plugins: ",
1468
- pluginsResult.message
1469
- ] }) : pluginsResult.data.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No plugins found in this marketplace." }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: pluginsResult.data.map((plugin) => /* @__PURE__ */ jsx(
1499
+ !plugins ? /* @__PURE__ */ jsx(Skeleton, { className: "h-48 rounded-lg" }) : plugins.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No plugins found in this marketplace." }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: plugins.map((plugin) => /* @__PURE__ */ jsx(
1470
1500
  LinkComponent,
1471
1501
  {
1472
1502
  href: `${basePath}/plugin-marketplaces/${marketplaceId}/plugins/${plugin.name}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getcatalystiq/agent-plane-ui",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Embeddable React component library for AgentPlane",
5
5
  "type": "module",
6
6
  "exports": {