|
7390 | 7390 | "signature": "InjectionToken<ChatLifecycle>", |
7391 | 7391 | "examples": [] |
7392 | 7392 | }, |
7393 | | - { |
7394 | | - "name": "CHAT_MARKDOWN_STYLES", |
7395 | | - "kind": "const", |
7396 | | - "description": "", |
7397 | | - "signature": "\"\\n chat-streaming-md { display: block; color: var(--ngaf-chat-text); line-height: var(--ngaf-chat-line-height); }\\n\\n /* Headings */\\n chat-streaming-md h1, chat-streaming-md h2, chat-streaming-md h3, chat-streaming-md h4, chat-streaming-md h5, chat-streaming-md h6 {\\n font-weight: 600;\\n line-height: 1.25;\\n margin: 1.25rem 0 0.75rem;\\n }\\n chat-streaming-md h1:first-child, chat-streaming-md h2:first-child, chat-streaming-md h3:first-child,\\n chat-streaming-md h4:first-child, chat-streaming-md h5:first-child, chat-streaming-md h6:first-child { margin-top: 0; }\\n chat-streaming-md h1 { font-size: 1.5em; font-weight: 700; }\\n chat-streaming-md h2 { font-size: 1.25em; }\\n chat-streaming-md h3 { font-size: 1.1em; }\\n chat-streaming-md h4 { font-size: 1em; }\\n chat-streaming-md h5, chat-streaming-md h6 { font-size: 0.95em; color: var(--ngaf-chat-text-muted); }\\n\\n /* Paragraphs and inline emphasis */\\n chat-streaming-md p { margin: 0 0 0.75rem; line-height: 1.6; font-size: var(--ngaf-chat-font-size); }\\n chat-streaming-md p:last-child { margin-bottom: 0; }\\n chat-streaming-md strong, chat-streaming-md b { font-weight: 700; }\\n chat-streaming-md em, chat-streaming-md i { font-style: italic; }\\n chat-streaming-md del, chat-streaming-md s { text-decoration: line-through; color: var(--ngaf-chat-text-muted); }\\n chat-streaming-md mark { background: var(--ngaf-chat-surface-alt); padding: 0 2px; border-radius: 2px; }\\n chat-streaming-md sub { font-size: 0.75em; vertical-align: sub; }\\n chat-streaming-md sup { font-size: 0.75em; vertical-align: super; }\\n\\n /* Links */\\n chat-streaming-md a { color: var(--ngaf-chat-primary); text-decoration: underline; text-underline-offset: 2px; }\\n chat-streaming-md a:hover { text-decoration-thickness: 2px; }\\n\\n /* Lists (CommonMark + GFM task lists) */\\n chat-streaming-md ul, chat-streaming-md ol { margin: 0 0 0.75rem; padding-left: 1.5rem; }\\n chat-streaming-md ul { list-style: disc outside; }\\n chat-streaming-md ol { list-style: decimal outside; }\\n chat-streaming-md ul ul { list-style: circle outside; }\\n chat-streaming-md ul ul ul { list-style: square outside; }\\n chat-streaming-md li { margin: 0.2rem 0; }\\n chat-streaming-md li::marker { color: var(--ngaf-chat-text-muted); }\\n chat-streaming-md li > p { margin: 0 0 0.25rem; }\\n chat-streaming-md li > ul, chat-streaming-md li > ol { margin: 0.25rem 0 0; }\\n /* GFM task lists: marked emits <li><input type=\\\"checkbox\\\" disabled> ... */\\n chat-streaming-md li:has(> input[type=\\\"checkbox\\\"]) { list-style: none; margin-left: -1.25rem; }\\n chat-streaming-md li > input[type=\\\"checkbox\\\"] { margin-right: 0.5rem; vertical-align: middle; }\\n\\n /* Code (inline + fenced) */\\n chat-streaming-md code {\\n background: var(--ngaf-chat-surface-alt);\\n color: var(--ngaf-chat-text);\\n padding: 1px 5px;\\n border-radius: 4px;\\n font-family: var(--ngaf-chat-font-mono);\\n font-size: 0.9em;\\n }\\n chat-streaming-md pre {\\n background: var(--ngaf-chat-surface-alt);\\n color: var(--ngaf-chat-text);\\n padding: 12px 14px;\\n border-radius: var(--ngaf-chat-radius-card);\\n overflow-x: auto;\\n font-family: var(--ngaf-chat-font-mono);\\n font-size: var(--ngaf-chat-font-size-sm);\\n line-height: 1.5;\\n margin: 0 0 0.75rem;\\n }\\n chat-streaming-md pre code { background: transparent; padding: 0; border-radius: 0; font-size: inherit; }\\n\\n /* Blockquote */\\n chat-streaming-md blockquote {\\n border-left: 3px solid var(--ngaf-chat-separator);\\n padding: 0.25rem 0 0.25rem 12px;\\n margin: 0 0 0.75rem;\\n color: var(--ngaf-chat-text-muted);\\n }\\n chat-streaming-md blockquote > :last-child { margin-bottom: 0; }\\n\\n /* Horizontal rule */\\n chat-streaming-md hr {\\n border: none;\\n border-top: 1px solid var(--ngaf-chat-separator);\\n margin: 1rem 0;\\n }\\n\\n /* Tables (GFM) */\\n chat-streaming-md table {\\n border-collapse: collapse;\\n margin: 0 0 0.75rem;\\n width: 100%;\\n font-size: 0.95em;\\n }\\n chat-streaming-md thead { background: var(--ngaf-chat-surface-alt); }\\n chat-streaming-md th, chat-streaming-md td {\\n border: 1px solid var(--ngaf-chat-separator);\\n padding: 6px 10px;\\n text-align: left;\\n vertical-align: top;\\n }\\n chat-streaming-md th { font-weight: 600; }\\n /* Component-rendered table: chat-md-table becomes a horizontally-scrollable\\n wrapper for the inner <table>; row/cell elements stay layout-transparent\\n so the browser's table layout takes over. Without this overflow wrapper,\\n wide tables push their parent container past the viewport horizontally. */\\n chat-streaming-md chat-md-table {\\n display: block;\\n overflow-x: auto;\\n max-width: 100%;\\n margin: 0 0 0.75rem;\\n }\\n chat-streaming-md chat-md-table-row { display: contents; }\\n chat-streaming-md chat-md-table-cell { display: contents; }\\n chat-streaming-md chat-md-table > table { margin: 0; }\\n /* Task-list items: checkbox + first paragraph render inline; subsequent\\n blocks (sub-lists, multi-paragraph items) flow normally below. */\\n chat-streaming-md li.chat-md-list-item--task {\\n list-style: none;\\n margin-left: -1.25rem;\\n display: flex;\\n flex-wrap: wrap;\\n align-items: baseline;\\n gap: 0.5rem;\\n }\\n chat-streaming-md li.chat-md-list-item--task > input[type=\\\"checkbox\\\"] {\\n margin: 0;\\n flex: 0 0 auto;\\n transform: translateY(2px);\\n }\\n /* The chat-md-children wrapper around list-item content takes remaining width */\\n chat-streaming-md li.chat-md-list-item--task > chat-md-children {\\n flex: 1 1 auto;\\n min-width: 0;\\n }\\n /* Tight task items: only the FIRST paragraph aligns inline with the\\n checkbox (margin collapsed). Subsequent paragraphs/blocks keep their\\n normal vertical spacing so multi-block items render readably. */\\n chat-streaming-md li.chat-md-list-item--task > chat-md-children > chat-md-paragraph:first-child > p {\\n margin: 0;\\n }\\n\\n /* Media */\\n chat-streaming-md img { max-width: 100%; height: auto; border-radius: 6px; }\\n /* Broken-image fallback: muted pill showing alt text + icon. Triggered\\n when <img> fires (error). Caught by live browser smoke — prior impl\\n showed only the browser's broken-image icon with no readable alt. */\\n chat-streaming-md .chat-md-image--broken {\\n display: inline-flex;\\n align-items: center;\\n gap: 0.4rem;\\n padding: 0.25rem 0.5rem;\\n background: var(--ngaf-chat-surface-alt);\\n border: 1px dashed var(--ngaf-chat-separator);\\n border-radius: 6px;\\n font-size: 0.9em;\\n color: var(--ngaf-chat-text-muted, currentColor);\\n opacity: 0.85;\\n }\\n chat-streaming-md .chat-md-image__icon { font-size: 1em; line-height: 1; }\\n chat-streaming-md .chat-md-image__alt { font-style: italic; }\\n\"", |
7398 | | - "examples": [] |
7399 | | - }, |
7400 | | - { |
7401 | | - "name": "ICON_AGENT", |
7402 | | - "kind": "const", |
7403 | | - "description": "Robot/agent icon (replacement). 14x14.", |
7404 | | - "signature": "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"14\\\" height=\\\"14\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"><rect x=\\\"3\\\" y=\\\"11\\\" width=\\\"18\\\" height=\\\"10\\\" rx=\\\"2\\\"/><circle cx=\\\"12\\\" cy=\\\"5\\\" r=\\\"2\\\"/><path d=\\\"M12 7v4\\\"/><line x1=\\\"8\\\" y1=\\\"16\\\" x2=\\\"8\\\" y2=\\\"16\\\"/><line x1=\\\"16\\\" y1=\\\"16\\\" x2=\\\"16\\\" y2=\\\"16\\\"/></svg>\"", |
7405 | | - "examples": [] |
7406 | | - }, |
7407 | | - { |
7408 | | - "name": "ICON_CHECK", |
7409 | | - "kind": "const", |
7410 | | - "description": "Check mark replacement. 12x12.", |
7411 | | - "signature": "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 12 12\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"><path d=\\\"M2.5 6L5 8.5L9.5 3.5\\\"/></svg>\"", |
7412 | | - "examples": [] |
7413 | | - }, |
7414 | | - { |
7415 | | - "name": "ICON_CHEVRON_DOWN", |
7416 | | - "kind": "const", |
7417 | | - "description": "Chevron down (▼ replacement). 12x12, stroke-based.", |
7418 | | - "signature": "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 12 12\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"><path d=\\\"M3 4.5L6 7.5L9 4.5\\\"/></svg>\"", |
7419 | | - "examples": [] |
7420 | | - }, |
7421 | | - { |
7422 | | - "name": "ICON_CHEVRON_UP", |
7423 | | - "kind": "const", |
7424 | | - "description": "Chevron up (▲ replacement). 12x12, stroke-based.", |
7425 | | - "signature": "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 12 12\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"><path d=\\\"M3 7.5L6 4.5L9 7.5\\\"/></svg>\"", |
7426 | | - "examples": [] |
7427 | | - }, |
7428 | | - { |
7429 | | - "name": "ICON_SEND", |
7430 | | - "kind": "const", |
7431 | | - "description": "Send arrow (for chat input). 16x16.", |
7432 | | - "signature": "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"><path d=\\\"M8 12V4M8 4L4 8M8 4L12 8\\\"/></svg>\"", |
7433 | | - "examples": [] |
7434 | | - }, |
7435 | | - { |
7436 | | - "name": "ICON_TOOL", |
7437 | | - "kind": "const", |
7438 | | - "description": "Gear icon (⚙ replacement). 14x14.", |
7439 | | - "signature": "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"14\\\" height=\\\"14\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"3\\\"/><path d=\\\"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42\\\"/></svg>\"", |
7440 | | - "examples": [] |
7441 | | - }, |
7442 | | - { |
7443 | | - "name": "ICON_WARNING", |
7444 | | - "kind": "const", |
7445 | | - "description": "Warning triangle (⚠ replacement). 18x18.", |
7446 | | - "signature": "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"18\\\" height=\\\"18\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"><path d=\\\"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z\\\"/><line x1=\\\"12\\\" y1=\\\"9\\\" x2=\\\"12\\\" y2=\\\"13\\\"/><line x1=\\\"12\\\" y1=\\\"17\\\" x2=\\\"12.01\\\" y2=\\\"17\\\"/></svg>\"", |
7447 | | - "examples": [] |
7448 | | - }, |
7449 | 7393 | { |
7450 | 7394 | "name": "IS_HEADER_ROW", |
7451 | 7395 | "kind": "const", |
|
7463 | 7407 | { |
7464 | 7408 | "name": "a2uiBasicCatalog", |
7465 | 7409 | "kind": "function", |
7466 | | - "description": "", |
| 7410 | + "description": "Build the built-in A2UI component catalog — a ViewRegistry mapping\nthe standard A2UI element types (Card, Button, TextField, Image, AudioPlayer,\nVideo, …) to their Angular renderers. Spread it into `provideViews` (with any\nof your own views) so an agent's A2UI surface specs render.", |
7467 | 7411 | "signature": "a2uiBasicCatalog(): ViewRegistry", |
7468 | 7412 | "params": [], |
7469 | 7413 | "returns": { |
7470 | 7414 | "type": "ViewRegistry", |
7471 | 7415 | "description": "" |
7472 | 7416 | }, |
7473 | | - "examples": [] |
| 7417 | + "examples": [ |
| 7418 | + "```ts\nproviders: [provideViews({ ...a2uiBasicCatalog(), MyWidget: MyWidgetComponent })]\n```" |
| 7419 | + ] |
7474 | 7420 | }, |
7475 | 7421 | { |
7476 | 7422 | "name": "action", |
|
7566 | 7512 | { |
7567 | 7513 | "name": "createA2uiSurfaceStore", |
7568 | 7514 | "kind": "function", |
7569 | | - "description": "", |
| 7515 | + "description": "Create an A2uiSurfaceStore — the per-conversation store that buffers\nstreamed A2UI surface updates, tracks each surface's data model + lifecycle\nstate, and exposes them as signals for rendering. One store backs a chat\nthread's A2UI surfaces.", |
7570 | 7516 | "signature": "createA2uiSurfaceStore(): A2uiSurfaceStore", |
7571 | 7517 | "params": [], |
7572 | 7518 | "returns": { |
7573 | 7519 | "type": "A2uiSurfaceStore", |
7574 | 7520 | "description": "" |
7575 | 7521 | }, |
7576 | | - "examples": [] |
| 7522 | + "examples": [ |
| 7523 | + "```ts\nconst store = createA2uiSurfaceStore();\nconst surfaces = store.surfaces; // Signal<Map<string, A2uiSurface>>\n```" |
| 7524 | + ] |
7577 | 7525 | }, |
7578 | 7526 | { |
7579 | 7527 | "name": "createAgentRef", |
|
7596 | 7544 | "```ts\ninterface TripState { day: number; places: string[]; }\nexport const TRIP = createAgentRef<TripState>('trip');\n// app.config.ts: provideAgent(TRIP, { assistantId: 'trip' })\n// component: const agent = injectAgent(TRIP); // LangGraphAgent<TripState>\n```" |
7597 | 7545 | ] |
7598 | 7546 | }, |
7599 | | - { |
7600 | | - "name": "createClientToolsCoordinator", |
7601 | | - "kind": "function", |
7602 | | - "description": "", |
7603 | | - "signature": "createClientToolsCoordinator(registry: ClientToolRegistry): ClientToolsCoordinator", |
7604 | | - "params": [ |
7605 | | - { |
7606 | | - "name": "registry", |
7607 | | - "type": "ClientToolRegistry", |
7608 | | - "description": "", |
7609 | | - "optional": false |
7610 | | - } |
7611 | | - ], |
7612 | | - "returns": { |
7613 | | - "type": "ClientToolsCoordinator", |
7614 | | - "description": "" |
7615 | | - }, |
7616 | | - "examples": [] |
7617 | | - }, |
7618 | 7547 | { |
7619 | 7548 | "name": "createContentClassifier", |
7620 | 7549 | "kind": "function", |
7621 | | - "description": "", |
| 7550 | + "description": "Create a ContentClassifier — the streaming accumulator that inspects\nan assistant message's content as it arrives and classifies it (markdown vs a\ngenerative-UI/A2UI spec), exposing the parsed result and per-element state as\nsignals so the renderer can switch modes mid-stream.", |
7622 | 7551 | "signature": "createContentClassifier(): ContentClassifier", |
7623 | 7552 | "params": [], |
7624 | 7553 | "returns": { |
7625 | 7554 | "type": "ContentClassifier", |
7626 | 7555 | "description": "" |
7627 | 7556 | }, |
7628 | | - "examples": [] |
| 7557 | + "examples": [ |
| 7558 | + "```ts\nconst cc = createContentClassifier();\neffect(() => console.log(cc.type())); // 'pending' | 'markdown' | 'spec'\n```" |
| 7559 | + ] |
7629 | 7560 | }, |
7630 | 7561 | { |
7631 | 7562 | "name": "createParseTreeStore", |
7632 | 7563 | "kind": "function", |
7633 | | - "description": "", |
| 7564 | + "description": "Create a ParseTreeStore — feeds streamed JSON chunks through a\npartial-JSON parser and exposes the progressively-materialized spec and\nper-element accumulation state as signals, so a generative-UI surface can\nrender while the spec is still arriving.", |
7634 | 7565 | "signature": "createParseTreeStore(parser: PartialJsonParser): ParseTreeStore", |
7635 | 7566 | "params": [ |
7636 | 7567 | { |
7637 | 7568 | "name": "parser", |
7638 | 7569 | "type": "PartialJsonParser", |
7639 | | - "description": "", |
| 7570 | + "description": "The partial-JSON parser used to incrementally materialize chunks.", |
7640 | 7571 | "optional": false |
7641 | 7572 | } |
7642 | 7573 | ], |
7643 | 7574 | "returns": { |
7644 | 7575 | "type": "ParseTreeStore", |
7645 | 7576 | "description": "" |
7646 | 7577 | }, |
7647 | | - "examples": [] |
| 7578 | + "examples": [ |
| 7579 | + "```ts\nconst store = createParseTreeStore(parser);\nstore.push('{\"type\":\"Car');\nstore.spec(); // best-effort Spec | null\n```" |
| 7580 | + ] |
7648 | 7581 | }, |
7649 | 7582 | { |
7650 | 7583 | "name": "createPartialArgsBridge", |
|
8168 | 8101 | }, |
8169 | 8102 | "examples": [] |
8170 | 8103 | }, |
8171 | | - { |
8172 | | - "name": "surfaceToSpec", |
8173 | | - "kind": "function", |
8174 | | - "description": "", |
8175 | | - "signature": "surfaceToSpec(surface: A2uiSurface): Spec | null", |
8176 | | - "params": [ |
8177 | | - { |
8178 | | - "name": "surface", |
8179 | | - "type": "A2uiSurface", |
8180 | | - "description": "", |
8181 | | - "optional": false |
8182 | | - } |
8183 | | - ], |
8184 | | - "returns": { |
8185 | | - "type": "Spec | null", |
8186 | | - "description": "" |
8187 | | - }, |
8188 | | - "examples": [] |
8189 | | - }, |
8190 | 8104 | { |
8191 | 8105 | "name": "toAgentError", |
8192 | 8106 | "kind": "function", |
|
0 commit comments