@threadplane/chat 0.0.51 → 0.0.53

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/README.md CHANGED
@@ -173,6 +173,17 @@ Agents can emit surface specs via `buildA2uiActionMessage(...)`. Actions from ca
173
173
 
174
174
  The built-in catalog ships via `a2uiBasicCatalog`. Compose a custom catalog with `withViews()` and pass it to the surface.
175
175
 
176
+ **Icons.** The catalog `Icon` component renders [Material Symbols](https://fonts.google.com/icons) by name (the A2UI canonical icon set — e.g. `check`, `trending_up`, `star`). For glyphs to render, include the Material Symbols Outlined stylesheet in your app's `<head>` (the library does not inject any web font):
177
+
178
+ ```html
179
+ <link
180
+ rel="stylesheet"
181
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
182
+ />
183
+ ```
184
+
185
+ Without the font, the icon name falls back to plain text. Icons inherit `currentColor` and size via the `size` prop.
186
+
176
187
  ### Streaming markdown
177
188
 
178
189
  `<chat-streaming-md>` renders markdown token-by-token as the agent streams. The `cacheplaneMarkdownViews` registry maps each CommonMark node type to an Angular component.
@@ -196,6 +207,17 @@ Per-instance, bind the registry on `<chat-streaming-md [viewRegistry]="…" />`
196
207
 
197
208
  The `renderMarkdown(md, options?)` function produces a parse tree for use outside streaming contexts.
198
209
 
210
+ #### Math (KaTeX)
211
+
212
+ LaTeX math — inline `$…$` / `\(…\)` and display `$$…$$` / `\[…\]` — renders via [KaTeX](https://katex.org), an **optional** peer dependency loaded lazily only when a message actually contains math (so non-math chats carry zero extra bundle weight). To enable styled math, install `katex` and import its stylesheet once in your app:
213
+
214
+ ```typescript
215
+ // e.g. in your global styles or app bootstrap
216
+ import 'katex/dist/katex.min.css';
217
+ ```
218
+
219
+ Without `katex` installed, or without the stylesheet, math degrades gracefully — the raw `$…$` source is shown rather than breaking. Currency like `$5` is not treated as math.
220
+
199
221
  ### Theming
200
222
 
201
223
  `<a2ui-surface>` declares ~50 `--a2ui-*` CSS custom properties at `:host` with dark-theme defaults covering color, spacing, typography, shape radius, focus ring, motion, and elevation. Catalog components consume them via `var(--a2ui-*)`.