Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions samples/client/lit/local_gallery/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# A2UI Local Gallery (Minimal v0.8)

This is a standalone, agentless web application designed to render the A2UI v0.8 minimal examples directly from static JSON files. It serves as a focused environment for testing renderer subset compatibility and protocol compliance.

## Prerequisites

Before running this gallery, you **must** build the shared A2UI renderers.

### 1. Build Shared Renderers

Navigate to the project root and run:

```bash
# Build Web Core
cd renderers/web_core
npm install
npm run build

# Build Lit Renderer
cd ../lit
npm install
npm run build
```

For more details on building the renderers, see:
- [Web Core README](../../../../renderers/web_core/README.md)
- [Lit Renderer README](../../../../renderers/lit/README.md)

## Getting Started

1. **Navigate to this directory**:
```bash
cd samples/client/lit/local_gallery
```

2. **Install dependencies**:
```bash
npm install
```

3. **Run the development server**:
```bash
npm run dev
```
This command will:
- Sync all JSON examples from `specification/v0_8/json/catalogs/minimal/examples/`.
- Generate a manifest file (`index.json`) for dynamic discovery.
- Start the Vite server at `http://localhost:5173`.

## Architecture

- **Agentless**: Unlike other samples, this does not require a running Python agent. It simulates agent responses locally for interactive components (like the Login Form).
- **Dynamic Loading**: The app automatically discovers and loads *all* `.json` files present in the v0.8 minimal specification folder at build time. To add a new test case, simply drop a JSON file into that specification folder and restart the dev server.
- **Surface Isolation**: Each example is rendered into its own independent `a2ui-surface` with a unique ID derived from the filename.
- **Mock Agent Console**: All user interactions (button clicks, form submissions) are intercepted and logged to a sidebar, demonstrating how the renderer resolves actions and contexts.
25 changes: 25 additions & 0 deletions samples/client/lit/local_gallery/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<title>A2UI Local Gallery (Minimal v0.8)</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
font-family: 'Roboto', sans-serif;
background: #0f172a;
color: #f1f5f9;
}
</style>
</head>
<body>
<local-gallery></local-gallery>
<script type="module" src="./src/main.ts"></script>
</body>
</html>
Loading
Loading