Skip to content

Commit f4e6351

Browse files
committed
Revert accidental changes to catalogs.md
1 parent b70153f commit f4e6351

File tree

1 file changed

+15
-35
lines changed

1 file changed

+15
-35
lines changed

docs/catalogs.md

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ Whether you are building a simple prototype or a complex production application,
5959

6060
### The Basic Catalog
6161

62-
To help developers get started quickly, the A2UI team maintains the [Basic Catalog](../specification/v0_9/json/standard_catalog.json).
62+
To help developers get started quickly, the A2UI team maintains the [Basic Catalog](../specification/v0_9/json/basic_catalog.json).
6363

6464
This is a pre-defined catalog file that contains a standard set of general-purpose components (Buttons, Inputs, Cards) and functions. It is not a special "type" of catalog; it is simply a version of a catalog that we have already written and have open source renderers for.
6565

6666
The basic catalog allows you to bootstrap an application or validate A2UI concepts without needing to write your own schema from scratch. It is intentionally sparse to remain easily implementable by different renderers.
6767

6868
Since A2UI is designed for LLMs to generate the UI at either design time or runtime, we do not think portability requires a standardized catalog across multiple clients; the LLM can interpret the catalog for each individual frontend.
6969

70-
[See the A2UI v0.9 basic catalog](../specification/v0_9/json/standard_catalog.json)
70+
[See the A2UI v0.9 basic catalog](../specification/v0_9/json/basic_catalog.json)
7171

7272
### Defining Your Own Catalog
7373

@@ -172,7 +172,7 @@ This catalog imports all elements from the Basic Catalog and adds a new `Suggest
172172
"$id": "https://github.com/.../hello_world_with_all_basic/v1/catalog.json",
173173
"components": {
174174
"allOf": [
175-
{ "$ref": "standard_catalog_definition.json#/components" },
175+
{ "$ref": "basic_catalog_definition.json#/components" },
176176
{
177177
"SuggestionChips": {
178178
"type": "object",
@@ -195,22 +195,24 @@ This catalog imports all elements from the Basic Catalog and adds a new `Suggest
195195

196196
#### Example: Cherry-picking Components
197197

198-
This catalog imports only `Text` from the Basic Catalog to build a simple Popup surface.
198+
This catalog imports only `Text` and `Icon` from the Basic Catalog to build a simple Popup surface.
199199

200200
```json
201201
{
202202
"$id": "https://github.com/.../hello_world_with_some_basic/v1/catalog.json",
203203
"components": {
204204
"allOf": [
205-
{ "$ref": "standard_catalog_definition.json#/components/Text" },
205+
{ "$ref": "basic_catalog_definition.json#/components/Text" },
206+
{ "$ref": "basic_catalog_definition.json#/components/Icon" },
206207
{
207208
"Popup": {
208209
"type": "object",
209210
"description": "A modal overlay that displays an icon and text.",
210211
"properties": {
211-
"text": { "$ref": "common_types.json#/$defs/ComponentId" }
212+
"text": { "$ref": "common_types.json#/$defs/ComponentId" },
213+
"icon": { "$ref": "common_types.json#/$defs/ComponentId" }
212214
},
213-
"required": [ "text" ]
215+
"required": [ "text", "icon" ]
214216
}
215217
}
216218
]
@@ -224,7 +226,7 @@ This catalog imports only `Text` from the Basic Catalog to build a simple Popup
224226

225227
Client renderers implement the catalog by mapping the schema definition to actual code.
226228

227-
[Example typescript renderer for the hello world catalog]
229+
[Example Rizzcharts typescript renderer for the hello world catalog](../samples/client/angular/projects/rizzcharts/src/a2ui-catalog/catalog.ts).
228230

229231
```typescript
230232
import { Catalog, DEFAULT_CATALOG } from '@a2ui/angular';
@@ -235,35 +237,13 @@ export const RIZZ_CHARTS_CATALOG = {
235237
HelloWorldBanner: {
236238
type: () => import('./hello_world_banner').then((r) => r.HelloWorldBanner),
237239
bindings: ({ properties }) => [
238-
inputBinding('message', () => ('message' in properties && properties['message']) || undefined)
240+
inputBinding('message', () => ('message' in properties && properties['message']) || undefined),
241+
inputBinding('backgroundColor', () => ('backgroundColor' in properties && properties['backgroundColor']) || undefined),
239242
],
240243
},
241244
} as Catalog;
242245
```
243246

244-
and the hello_world_banner implementation
245-
246-
```json
247-
import { DynamicComponent } from '@a2ui/angular';
248-
import { Component, Input } from '@angular/core';
249-
250-
@Component({
251-
selector: 'hello-world-banner',
252-
imports: [],
253-
template: `
254-
<div>
255-
<h2>Hello World Banner</h2>
256-
<p>{{ message }}</p>
257-
</div>
258-
`,
259-
})
260-
export class HelloWorldBanner extends DynamicComponent {
261-
@Input() message?: string;
262-
}
263-
```
264-
265-
You can see a working example of a client renderer in the [Rizzcharts demo](../samples/client/angular/projects/rizzcharts/src/a2ui-catalog/catalog.ts).
266-
267247
## A2UI Catalog Negotiation
268248

269249
Because clients and agents can support multiple catalogs, they must agree on which catalog to use through a catalog negotiation handshake.
@@ -285,7 +265,7 @@ Example of an A2A AgentCard advertising that the agent supports the basic and ri
285265
"description": "Provides agent driven UI using the A2UI JSON format.",
286266
"params": {
287267
"supportedCatalogIds": [
288-
"https://a2ui.org/specification/v0_9/standard_catalog.json",
268+
"https://a2ui.org/specification/v0_9/basic_catalog.json",
289269
"https://github.com/.../rizzcharts_catalog_definition.json"
290270
]
291271
}
@@ -311,7 +291,7 @@ Example of A2A message containing the supportedCatalogIds in metadata
311291
"metadata": {
312292
"a2uiClientCapabilities": {
313293
"supportedCatalogIds": [
314-
"https://a2ui.org/specification/v0_9/standard_catalog.json",
294+
"https://a2ui.org/specification/v0_9/basic_catalog.json",
315295
"https://github.com/.../rizzcharts_catalog_definition.json"
316296
]
317297
}
@@ -329,7 +309,7 @@ Example A2UI Message from the agent defining the catalog_id used in a surface
329309
{
330310
"createSurface": {
331311
"surfaceId": "salesDashboard",
332-
"catalogId": "https://a2ui.org/specification/v0_9/standard_catalog.json"
312+
"catalogId": "https://a2ui.org/specification/v0_9/basic_catalog.json"
333313
}
334314
}
335315
```

0 commit comments

Comments
 (0)