@vertesia/tools-admin-ui 1.0.0-dev.20260227.112605Z → 1.0.0-dev.20260305.083323Z

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.
Files changed (58) hide show
  1. package/lib/AdminApp.d.ts +3 -1
  2. package/lib/AdminApp.d.ts.map +1 -1
  3. package/lib/components/AdminTopBar.d.ts +6 -0
  4. package/lib/components/AdminTopBar.d.ts.map +1 -0
  5. package/lib/components/CollectionCard.d.ts.map +1 -1
  6. package/lib/components/DetailPage.d.ts.map +1 -1
  7. package/lib/components/EndpointPanel.d.ts.map +1 -1
  8. package/lib/components/HeroSection.d.ts.map +1 -1
  9. package/lib/components/ResourceCard.d.ts.map +1 -1
  10. package/lib/components/ResourceSection.d.ts.map +1 -1
  11. package/lib/components/SearchBar.d.ts.map +1 -1
  12. package/lib/components/SummaryBadge.d.ts.map +1 -1
  13. package/lib/components/index.d.ts +6 -5
  14. package/lib/components/index.d.ts.map +1 -1
  15. package/lib/components/typeVariants.d.ts +5 -0
  16. package/lib/components/typeVariants.d.ts.map +1 -0
  17. package/lib/hooks.d.ts +1 -1
  18. package/lib/hooks.d.ts.map +1 -1
  19. package/lib/pages/HomePage.d.ts.map +1 -1
  20. package/lib/pages/InteractionCollection.d.ts.map +1 -1
  21. package/lib/pages/InteractionDetail.d.ts.map +1 -1
  22. package/lib/pages/SkillCollection.d.ts.map +1 -1
  23. package/lib/pages/SkillDetail.d.ts.map +1 -1
  24. package/lib/pages/TemplateCollection.d.ts.map +1 -1
  25. package/lib/pages/TemplateDetail.d.ts.map +1 -1
  26. package/lib/pages/ToolCollection.d.ts.map +1 -1
  27. package/lib/pages/TypeCollection.d.ts.map +1 -1
  28. package/lib/pages/TypeDetail.d.ts.map +1 -1
  29. package/lib/tools-admin-ui.js +410 -377
  30. package/lib/tools-admin-ui.js.map +1 -1
  31. package/package.json +8 -4
  32. package/src/AdminApp.tsx +21 -17
  33. package/src/components/AdminTopBar.tsx +39 -0
  34. package/src/components/CollectionCard.tsx +18 -13
  35. package/src/components/DetailPage.tsx +20 -11
  36. package/src/components/EndpointPanel.tsx +16 -7
  37. package/src/components/HeroSection.tsx +51 -45
  38. package/src/components/ResourceCard.tsx +23 -18
  39. package/src/components/ResourceSection.tsx +7 -5
  40. package/src/components/SearchBar.tsx +8 -6
  41. package/src/components/SummaryBadge.tsx +4 -3
  42. package/src/components/index.ts +6 -5
  43. package/src/components/typeVariants.ts +18 -0
  44. package/src/dev/index.css +13 -0
  45. package/src/dev/main.tsx +5 -2
  46. package/src/hooks.ts +2 -1
  47. package/src/pages/HomePage.tsx +18 -15
  48. package/src/pages/InteractionCollection.tsx +25 -27
  49. package/src/pages/InteractionDetail.tsx +35 -34
  50. package/src/pages/SkillCollection.tsx +29 -32
  51. package/src/pages/SkillDetail.tsx +31 -41
  52. package/src/pages/TemplateCollection.tsx +25 -21
  53. package/src/pages/TemplateDetail.tsx +18 -17
  54. package/src/pages/ToolCollection.tsx +22 -16
  55. package/src/pages/TypeCollection.tsx +32 -24
  56. package/src/pages/TypeDetail.tsx +16 -18
  57. package/src/theme.css +12 -0
  58. package/src/admin.css +0 -650
@@ -0,0 +1,39 @@
1
+ import { Avatar, Button, ModeToggle } from '@vertesia/ui/core';
2
+ import { useUserSession } from '@vertesia/ui/session';
3
+ import { LogOut } from 'lucide-react';
4
+
5
+ interface AdminTopBarProps {
6
+ title: string;
7
+ }
8
+
9
+ export function AdminTopBar({ title }: AdminTopBarProps) {
10
+ const { user, logout } = useUserSession();
11
+
12
+ return (
13
+ <header className="sticky top-0 z-40 flex h-14 items-center justify-between border-b border-border bg-background px-6">
14
+ <div className="flex items-center gap-3">
15
+ <div className="flex size-8 items-center justify-center rounded-lg bg-primary text-xs font-semibold uppercase tracking-wider text-primary-foreground">
16
+ {title.split(/\s+/).map(w => w[0]).filter(Boolean).slice(0, 2).join('')}
17
+ </div>
18
+ <span className="text-sm font-semibold text-foreground">{title}</span>
19
+ </div>
20
+
21
+ <div className="flex items-center gap-3">
22
+ <ModeToggle label={false} />
23
+ {user && (
24
+ <>
25
+ <Avatar size="sm" name={user.name} color="bg-primary" />
26
+ <Button
27
+ variant="outline"
28
+ size="sm"
29
+ onClick={() => logout()}
30
+ alt="Sign out"
31
+ >
32
+ <LogOut className="size-4" />
33
+ </Button>
34
+ </>
35
+ )}
36
+ </div>
37
+ </header>
38
+ );
39
+ }
@@ -1,23 +1,28 @@
1
+ import { Card, CardContent } from '@vertesia/ui/core';
1
2
  import { NavLink } from '@vertesia/ui/router';
3
+
2
4
  import type { CollectionInfo } from '../types.js';
5
+ import { TYPE_VARIANTS } from './typeVariants.js';
3
6
 
4
7
  export function CollectionCard({ collection }: { collection: CollectionInfo }) {
5
8
  const href = `/${collection.type}s/${collection.name}`;
6
9
 
7
10
  return (
8
- <NavLink href={href} className="vta-card-link">
9
- <div className="vta-card vta-card--link">
10
- <span className={`vta-card-type vta-card-type--${collection.type}`}>
11
- {collection.type}
12
- </span>
13
- <div className="vta-card-title">{collection.title}</div>
14
- <div className="vta-card-desc">
15
- {collection.description || 'No description'}
16
- </div>
17
- <div className="vta-card-url">
18
- {collection.count} {collection.count === 1 ? 'item' : 'items'}
19
- </div>
20
- </div>
11
+ <NavLink href={href} className="block no-underline">
12
+ <Card className="cursor-pointer transition-all hover:-translate-y-0.5 hover:shadow-md">
13
+ <CardContent className="p-5">
14
+ <span className={`mb-2 inline-block rounded-full px-2 py-0.5 text-[0.7rem] font-semibold uppercase tracking-wide ${TYPE_VARIANTS[collection.type] ?? ''}`}>
15
+ {collection.type}
16
+ </span>
17
+ <div className="font-semibold text-card-foreground">{collection.title}</div>
18
+ <div className="mt-1 text-sm text-muted-foreground">
19
+ {collection.description || 'No description'}
20
+ </div>
21
+ <div className="mt-2 font-mono text-xs text-muted-foreground">
22
+ {collection.count} {collection.count === 1 ? 'item' : 'items'}
23
+ </div>
24
+ </CardContent>
25
+ </Card>
21
26
  </NavLink>
22
27
  );
23
28
  }
@@ -1,6 +1,10 @@
1
+ import { Badge } from '@vertesia/ui/core';
2
+ import { NavLink } from '@vertesia/ui/router';
3
+ import { ArrowLeft } from 'lucide-react';
1
4
  import type { ReactNode } from 'react';
5
+
2
6
  import type { ResourceType } from '../types.js';
3
- import { NavLink } from '@vertesia/ui/router';
7
+ import { TYPE_VARIANTS } from './typeVariants.js';
4
8
 
5
9
  interface DetailPageProps {
6
10
  type: ResourceType;
@@ -13,22 +17,27 @@ interface DetailPageProps {
13
17
 
14
18
  export function DetailPage({ type, title, description, tags, backHref = '/', children }: DetailPageProps) {
15
19
  return (
16
- <div className="vta-root">
17
- <nav className="vta-detail-nav">
20
+ <div className="mx-auto max-w-5xl px-7 py-10">
21
+ <nav className="mb-5 flex items-center gap-4">
18
22
  {backHref !== '/' && (
19
- <NavLink href="/" className="vta-detail-back">Home</NavLink>
23
+ <NavLink href="/" className="text-sm text-primary hover:opacity-75">Home</NavLink>
20
24
  )}
21
- <NavLink href={backHref} className="vta-detail-back">&larr; Back</NavLink>
25
+ <NavLink href={backHref} className="flex items-center gap-1 text-sm text-primary hover:opacity-75">
26
+ <ArrowLeft className="size-3.5" />
27
+ Back
28
+ </NavLink>
22
29
  </nav>
23
30
 
24
- <div className="vta-detail-header">
25
- <span className={`vta-card-type vta-card-type--${type}`}>{type}</span>
26
- <h1 className="vta-detail-title">{title}</h1>
27
- {description && <p className="vta-detail-desc">{description}</p>}
31
+ <div className="mb-8">
32
+ <span className={`mb-2 inline-block rounded-full px-2 py-0.5 text-[0.7rem] font-semibold uppercase tracking-wide ${TYPE_VARIANTS[type] ?? ''}`}>
33
+ {type}
34
+ </span>
35
+ <h1 className="-tracking-wide text-3xl font-bold text-foreground">{title}</h1>
36
+ {description && <p className="mt-1 text-sm leading-relaxed text-muted-foreground">{description}</p>}
28
37
  {tags && tags.length > 0 && (
29
- <div className="vta-card-tags">
38
+ <div className="mt-3 flex flex-wrap gap-1.5">
30
39
  {tags.map(tag => (
31
- <span key={tag} className="vta-tag">{tag}</span>
40
+ <Badge key={tag} variant="default">{tag}</Badge>
32
41
  ))}
33
42
  </div>
34
43
  )}
@@ -1,3 +1,5 @@
1
+ import { Button } from '@vertesia/ui/core';
2
+ import { Check, Copy } from 'lucide-react';
1
3
  import { useState } from 'react';
2
4
 
3
5
  export function EndpointPanel({ label, path }: { label: string; path: string }) {
@@ -11,13 +13,20 @@ export function EndpointPanel({ label, path }: { label: string; path: string })
11
13
  }
12
14
 
13
15
  return (
14
- <div className="vta-endpoint">
15
- <div className="vta-endpoint-label">{label}</div>
16
- <div className="vta-endpoint-box">
17
- <code className="vta-endpoint-code">{path}</code>
18
- <button onClick={handleCopy} className="vta-copy-btn" title="Copy full URL">
19
- {copied ? '\u2713' : '\u29C9'}
20
- </button>
16
+ <div className="mb-3">
17
+ <div className="mb-1 text-[0.7rem] font-medium uppercase tracking-widest text-primary">
18
+ {label}
19
+ </div>
20
+ <div className="flex items-center gap-2 rounded-lg border border-border bg-muted-background px-3 py-2">
21
+ <code className="flex-1 font-mono text-sm text-foreground">{path}</code>
22
+ <Button
23
+ variant="ghost"
24
+ size="xs"
25
+ onClick={handleCopy}
26
+ aria-label="Copy full URL"
27
+ >
28
+ {copied ? <Check className="size-3.5" /> : <Copy className="size-3.5" />}
29
+ </Button>
21
30
  </div>
22
31
  </div>
23
32
  );
@@ -1,3 +1,6 @@
1
+ import { Card } from '@vertesia/ui/core';
2
+ import { Download, LayoutDashboard } from 'lucide-react';
3
+
1
4
  import type { ResourceItem, ResourceType } from '../types.js';
2
5
  import { EndpointPanel } from './EndpointPanel.js';
3
6
  import { SummaryBadge } from './SummaryBadge.js';
@@ -33,56 +36,59 @@ export function HeroSection({ title, version, resources }: HeroSectionProps) {
33
36
  const counts = countByType(resources);
34
37
 
35
38
  return (
36
- <header className="vta-hero">
37
- <div className="vta-hero-main">
38
- <div className="vta-hero-identity">
39
- <div className="vta-hero-logo">
40
- {getInitials(title)}
41
- </div>
42
- <div>
43
- <p className="vta-hero-eyebrow">Tools Server</p>
44
- <h1 className="vta-hero-title">{title}</h1>
39
+ <Card className="mb-10 overflow-hidden border bg-linear-to-br from-card to-muted-background">
40
+ <div className="flex flex-col gap-6 p-6 md:flex-row md:items-start md:justify-between">
41
+ <div className="flex flex-1 flex-col gap-3">
42
+ <div className="flex items-center gap-4">
43
+ <div className="flex size-14 items-center justify-center rounded-xl bg-linear-to-br from-sky-400 to-indigo-500 text-sm font-semibold uppercase tracking-wider text-white shadow-lg">
44
+ {getInitials(title)}
45
+ </div>
46
+ <div>
47
+ <p className="text-xs font-medium uppercase tracking-widest text-muted-foreground">Tools Server</p>
48
+ <h1 className="-tracking-wide text-2xl font-bold text-foreground">{title}</h1>
49
+ </div>
45
50
  </div>
46
- </div>
47
51
 
48
- <p className="vta-hero-tagline">
49
- Discover the tools, skills, interactions, and content types exposed by this server.
50
- </p>
52
+ <p className="text-sm text-muted-foreground">
53
+ Discover the tools, skills, interactions, and content types exposed by this server.
54
+ </p>
51
55
 
52
- <div className="vta-hero-summary">
53
- {badgeLabels.map(({ type, label }) => (
54
- <SummaryBadge key={type} count={counts[type] || 0} label={label} />
55
- ))}
56
- </div>
56
+ <div className="flex flex-wrap gap-2">
57
+ {badgeLabels.map(({ type, label }) => (
58
+ <SummaryBadge key={type} count={counts[type] || 0} label={label} />
59
+ ))}
60
+ </div>
57
61
 
58
- <div className="vta-hero-links">
59
- <a href="/app/" target="_blank" className="vta-link-primary">
60
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
61
- <rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
62
- <line x1="9" y1="3" x2="9" y2="21" />
63
- </svg>
64
- UI Plugin Dev
65
- </a>
66
- <a href="/lib/plugin.js" className="vta-link-secondary">
67
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
68
- <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
69
- <polyline points="7 10 12 15 17 10" />
70
- <line x1="12" y1="15" x2="12" y2="3" />
71
- </svg>
72
- Plugin Bundle
73
- </a>
62
+ <div className="flex flex-wrap gap-3 pt-1">
63
+ <a
64
+ href="/app/"
65
+ target="_blank"
66
+ rel="noopener noreferrer"
67
+ className="inline-flex h-8 items-center gap-2 rounded bg-primary px-3 text-xs font-medium text-white shadow-xs hover:bg-primary/90"
68
+ >
69
+ <LayoutDashboard className="size-4" />
70
+ UI Plugin Dev
71
+ </a>
72
+ <a
73
+ href="/lib/plugin.js"
74
+ className="inline-flex h-8 items-center gap-2 rounded bg-primary/5 px-3 text-xs font-medium text-primary shadow-xs hover:bg-primary/10 dark:bg-primary/10 dark:hover:bg-primary/20"
75
+ >
76
+ <Download className="size-4" />
77
+ Plugin Bundle
78
+ </a>
79
+ </div>
74
80
  </div>
75
- </div>
76
81
 
77
- <aside className="vta-hero-panel">
78
- <EndpointPanel label="Base endpoint" path="/api" />
79
- <EndpointPanel label="Package endpoint" path="/api/package" />
80
- <p className="vta-hero-hint">
81
- Use <strong>POST /api/tools/&lt;collection&gt;</strong> or{' '}
82
- <strong>POST /api/skills/&lt;collection&gt;</strong> to call these from your apps or agents.
83
- </p>
84
- <p className="vta-hero-version">v{version}</p>
85
- </aside>
86
- </header>
82
+ <aside className="min-w-55 max-w-65 shrink-0">
83
+ <EndpointPanel label="Base endpoint" path="/api" />
84
+ <EndpointPanel label="Package endpoint" path="/api/package" />
85
+ <p className="mt-2 text-xs leading-relaxed text-muted-foreground">
86
+ Use <strong className="text-foreground">POST /api/tools/&lt;collection&gt;</strong> or{' '}
87
+ <strong className="text-foreground">POST /api/skills/&lt;collection&gt;</strong> to call these from your apps or agents.
88
+ </p>
89
+ <p className="mt-1 text-xs text-muted-foreground">v{version}</p>
90
+ </aside>
91
+ </div>
92
+ </Card>
87
93
  );
88
94
  }
@@ -1,25 +1,30 @@
1
+ import { Badge, Card, CardContent } from '@vertesia/ui/core';
2
+
1
3
  import type { ResourceItem } from '../types.js';
4
+ import { TYPE_VARIANTS } from './typeVariants.js';
2
5
 
3
6
  export function ResourceCard({ resource }: { resource: ResourceItem }) {
4
7
  return (
5
- <div className="vta-card">
6
- <span className={`vta-card-type vta-card-type--${resource.type}`}>
7
- {resource.type}
8
- </span>
9
- <div className="vta-card-title">{resource.title}</div>
10
- <div className="vta-card-desc">
11
- {resource.description || 'No description'}
12
- </div>
13
- {resource.tags && resource.tags.length > 0 && (
14
- <div className="vta-card-tags">
15
- {resource.tags.map(tag => (
16
- <span key={tag} className="vta-tag">{tag}</span>
17
- ))}
8
+ <Card className="transition-all hover:-translate-y-0.5 hover:shadow-md">
9
+ <CardContent className="p-5">
10
+ <span className={`mb-2 inline-block rounded-full px-2 py-0.5 text-[0.7rem] font-semibold uppercase tracking-wide ${TYPE_VARIANTS[resource.type] ?? ''}`}>
11
+ {resource.type}
12
+ </span>
13
+ <div className="font-semibold text-card-foreground">{resource.title}</div>
14
+ <div className="mt-1 text-sm text-muted-foreground">
15
+ {resource.description || 'No description'}
18
16
  </div>
19
- )}
20
- {resource.url && (
21
- <div className="vta-card-url">{resource.url}</div>
22
- )}
23
- </div>
17
+ {resource.tags && resource.tags.length > 0 && (
18
+ <div className="mt-2 flex flex-wrap gap-1">
19
+ {resource.tags.map(tag => (
20
+ <Badge key={tag} variant="default">{tag}</Badge>
21
+ ))}
22
+ </div>
23
+ )}
24
+ {resource.url && (
25
+ <div className="mt-2 truncate font-mono text-xs text-muted-foreground">{resource.url}</div>
26
+ )}
27
+ </CardContent>
28
+ </Card>
24
29
  );
25
30
  }
@@ -1,3 +1,5 @@
1
+ import { Separator } from '@vertesia/ui/core';
2
+
1
3
  import type { ResourceItem } from '../types.js';
2
4
  import { ResourceCard } from './ResourceCard.js';
3
5
 
@@ -13,15 +15,15 @@ export function ResourceSection({ title, subtitle, resources, showDivider }: Res
13
15
 
14
16
  return (
15
17
  <section>
16
- {showDivider && <hr className="vta-divider" />}
18
+ {showDivider && <Separator className="my-8" />}
17
19
  <div>
18
- <h2 className="vta-section-title">
20
+ <h2 className="text-xl font-semibold text-foreground">
19
21
  {title}
20
- <span className="vta-section-count">({resources.length})</span>
22
+ <span className="ml-2 text-sm font-normal text-muted-foreground">({resources.length})</span>
21
23
  </h2>
22
- <p className="vta-section-subtitle">{subtitle}</p>
24
+ <p className="mb-4 text-sm text-muted-foreground">{subtitle}</p>
23
25
  </div>
24
- <div className="vta-card-grid">
26
+ <div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
25
27
  {resources.map(r => (
26
28
  <ResourceCard key={`${r.type}:${r.name}`} resource={r} />
27
29
  ))}
@@ -1,3 +1,5 @@
1
+ import { Input } from '@vertesia/ui/core';
2
+
1
3
  interface SearchBarProps {
2
4
  value: string;
3
5
  onChange: (value: string) => void;
@@ -11,22 +13,22 @@ export function SearchBar({ value, onChange, placeholder, resultCount, totalCoun
11
13
  const noResults = hasQuery && resultCount === 0;
12
14
 
13
15
  return (
14
- <div className="vta-search">
15
- <input
16
+ <div className="mb-7">
17
+ <Input
16
18
  type="search"
17
19
  value={value}
18
- onChange={e => onChange(e.target.value)}
20
+ onChange={onChange}
19
21
  placeholder={placeholder || 'Search collections...'}
20
- className="vta-search-input"
22
+ className="max-w-sm rounded-full"
21
23
  autoComplete="off"
22
24
  />
23
25
  {hasQuery && !noResults && (
24
- <p className="vta-search-hint">
26
+ <p className="mt-1.5 text-xs text-muted-foreground">
25
27
  Showing {resultCount} of {totalCount} resources
26
28
  </p>
27
29
  )}
28
30
  {noResults && (
29
- <p className="vta-search-empty">
31
+ <p className="mt-2 text-sm text-destructive">
30
32
  No resources match this search.
31
33
  </p>
32
34
  )}
@@ -1,9 +1,10 @@
1
+ import { DotBadge } from '@vertesia/ui/core';
2
+
1
3
  export function SummaryBadge({ count, label }: { count: number; label: string }) {
2
4
  if (count === 0) return null;
3
5
  return (
4
- <span className="vta-badge">
5
- <span className="vta-badge-dot" />
6
+ <DotBadge variant="success">
6
7
  {count} {label}{count !== 1 ? 's' : ''}
7
- </span>
8
+ </DotBadge>
8
9
  );
9
10
  }
@@ -1,8 +1,9 @@
1
- export { HeroSection } from './HeroSection.js';
2
- export { SearchBar } from './SearchBar.js';
3
- export { ResourceSection } from './ResourceSection.js';
4
- export { ResourceCard } from './ResourceCard.js';
1
+ export { AdminTopBar } from './AdminTopBar.js';
5
2
  export { CollectionCard } from './CollectionCard.js';
3
+ export { DetailPage } from './DetailPage.js';
6
4
  export { EndpointPanel } from './EndpointPanel.js';
5
+ export { HeroSection } from './HeroSection.js';
6
+ export { ResourceCard } from './ResourceCard.js';
7
+ export { ResourceSection } from './ResourceSection.js';
8
+ export { SearchBar } from './SearchBar.js';
7
9
  export { SummaryBadge } from './SummaryBadge.js';
8
- export { DetailPage } from './DetailPage.js';
@@ -0,0 +1,18 @@
1
+ /** Tailwind class mappings for resource type badges. */
2
+ export const TYPE_VARIANTS: Record<string, string> = {
3
+ tool: 'bg-blue-100 text-blue-800 dark:bg-blue-500/15 dark:text-blue-300',
4
+ skill: 'bg-emerald-100 text-emerald-800 dark:bg-emerald-500/15 dark:text-emerald-300',
5
+ interaction: 'bg-amber-100 text-amber-800 dark:bg-amber-500/15 dark:text-amber-300',
6
+ type: 'bg-gray-100 text-gray-700 dark:bg-gray-500/20 dark:text-gray-300',
7
+ template: 'bg-violet-100 text-violet-800 dark:bg-violet-500/15 dark:text-violet-300',
8
+ mcp: 'bg-pink-100 text-pink-800 dark:bg-pink-500/15 dark:text-pink-300',
9
+ };
10
+
11
+ /** Tailwind class mappings for prompt role badges. */
12
+ export const ROLE_VARIANTS: Record<string, string> = {
13
+ system: 'bg-blue-100 text-blue-800 dark:bg-blue-500/15 dark:text-blue-300',
14
+ user: 'bg-emerald-100 text-emerald-800 dark:bg-emerald-500/15 dark:text-emerald-300',
15
+ assistant: 'bg-violet-100 text-violet-800 dark:bg-violet-500/15 dark:text-violet-300',
16
+ safety: 'bg-pink-100 text-pink-800 dark:bg-pink-500/15 dark:text-pink-300',
17
+ tool: 'bg-amber-100 text-amber-800 dark:bg-amber-500/15 dark:text-amber-300',
18
+ };
@@ -0,0 +1,13 @@
1
+ @import "tailwindcss";
2
+
3
+ @import "../theme.css";
4
+
5
+ /**
6
+ * Scan local sources for Tailwind classes
7
+ */
8
+ @source "../";
9
+
10
+ /**
11
+ * Scan @vertesia/ui sources for Tailwind classes
12
+ */
13
+ @source "../../../ui/src";
package/src/dev/main.tsx CHANGED
@@ -1,10 +1,13 @@
1
1
  /// <reference types="vite/client" />
2
+ import './index.css';
2
3
  import "./env.js"
4
+
5
+ import { VertesiaShell } from '@vertesia/ui/shell';
6
+ import { RouterProvider } from '@vertesia/ui/router';
3
7
  import { StrictMode } from 'react';
4
8
  import { createRoot } from 'react-dom/client';
5
- import { RouterProvider } from '@vertesia/ui/router';
9
+
6
10
  import { AdminApp } from '../AdminApp.js';
7
- import { VertesiaShell } from '@vertesia/ui/shell';
8
11
 
9
12
  const baseUrl = import.meta.env.VITE_API_BASE_URL;
10
13
 
package/src/hooks.ts CHANGED
@@ -3,7 +3,8 @@
3
3
  */
4
4
 
5
5
  import { useFetch } from '@vertesia/ui/core';
6
- import type { ServerInfo, ResourceData } from './types.js';
6
+
7
+ import type { ResourceData, ServerInfo } from './types.js';
7
8
  import { buildResourceData } from './types.js';
8
9
 
9
10
  /**
@@ -1,8 +1,11 @@
1
+ import { Separator } from '@vertesia/ui/core';
1
2
  import { useMemo, useState } from 'react';
3
+
4
+ import { useAdminContext } from '../AdminContext.js';
5
+ import { CollectionCard, HeroSection, ResourceSection, SearchBar } from '../components/index.js';
6
+ import { TYPE_VARIANTS } from '../components/typeVariants.js';
2
7
  import type { ResourceType } from '../types.js';
3
8
  import { filterResources } from '../types.js';
4
- import { HeroSection, SearchBar, ResourceSection, CollectionCard } from '../components/index.js';
5
- import { useAdminContext } from '../AdminContext.js';
6
9
 
7
10
  const sections: { type: ResourceType; title: string; subtitle: string }[] = [
8
11
  { type: 'tool', title: 'Tools', subtitle: 'Remote tools available to agents via Vertesia.' },
@@ -25,7 +28,7 @@ export function HomePage() {
25
28
  const isSearching = search.trim().length > 0;
26
29
 
27
30
  return (
28
- <div className="vta-root">
31
+ <div className="mx-auto max-w-5xl px-7 py-10">
29
32
  <HeroSection
30
33
  title={serverInfo.message.replace('Vertesia Tools API', 'Tools Server')}
31
34
  version={serverInfo.version}
@@ -41,7 +44,6 @@ export function HomePage() {
41
44
  />
42
45
 
43
46
  {isSearching ? (
44
- /* Search mode: show individual resource cards */
45
47
  sections.map((section, i) => {
46
48
  const sectionItems = filtered.filter(r => r.type === section.type);
47
49
  return (
@@ -55,7 +57,6 @@ export function HomePage() {
55
57
  );
56
58
  })
57
59
  ) : (
58
- /* Browse mode: show collection cards grouped by type */
59
60
  sections.map((section, i) => {
60
61
  const sectionCollections = collections.filter(c => c.type === section.type);
61
62
  const mcpResources = section.type === 'mcp'
@@ -66,27 +67,29 @@ export function HomePage() {
66
67
 
67
68
  return (
68
69
  <section key={section.type}>
69
- {i > 0 && <hr className="vta-divider" />}
70
+ {i > 0 && <Separator className="my-8" />}
70
71
  <div>
71
- <h2 className="vta-section-title">
72
+ <h2 className="text-xl font-semibold text-foreground">
72
73
  {section.title}
73
- <span className="vta-section-count">
74
+ <span className="ml-2 text-sm font-normal text-muted-foreground">
74
75
  ({sectionCollections.length}{sectionCollections.length === 1
75
76
  ? ' collection' : ' collections'})
76
77
  </span>
77
78
  </h2>
78
- <p className="vta-section-subtitle">{section.subtitle}</p>
79
+ <p className="mb-4 text-sm text-muted-foreground">{section.subtitle}</p>
79
80
  </div>
80
- <div className="vta-card-grid">
81
+ <div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
81
82
  {sectionCollections.map(col => (
82
83
  <CollectionCard key={`${col.type}:${col.name}`} collection={col} />
83
84
  ))}
84
85
  {mcpResources.map(r => (
85
- <div key={r.name} className="vta-card">
86
- <span className="vta-card-type vta-card-type--mcp">mcp</span>
87
- <div className="vta-card-title">{r.title}</div>
88
- <div className="vta-card-desc">{r.description || 'No description'}</div>
89
- {r.url && <div className="vta-card-url">{r.url}</div>}
86
+ <div key={r.name} className="rounded-xl border border-border bg-card p-5 shadow-sm">
87
+ <span className={`mb-2 inline-block rounded-full px-2 py-0.5 text-[0.7rem] font-semibold uppercase tracking-wide ${TYPE_VARIANTS.mcp}`}>
88
+ mcp
89
+ </span>
90
+ <div className="font-semibold text-card-foreground">{r.title}</div>
91
+ <div className="mt-1 text-sm text-muted-foreground">{r.description || 'No description'}</div>
92
+ {r.url && <div className="mt-2 truncate font-mono text-xs text-muted-foreground">{r.url}</div>}
90
93
  </div>
91
94
  ))}
92
95
  </div>