@artooi/ag-ui-web-component 0.20.1 → 0.22.0

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 (49) hide show
  1. package/CHANGELOG.md +192 -1
  2. package/README.md +404 -28
  3. package/dist/ag-ui-web-component.bundle.js +781 -451
  4. package/dist/ag-ui-web-component.bundle.js.map +4 -4
  5. package/dist/constants.d.ts +29 -0
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/core/ag_ui_chat.d.ts +93 -1
  8. package/dist/core/ag_ui_chat.d.ts.map +1 -1
  9. package/dist/core/create_http_agent.d.ts +9 -0
  10. package/dist/core/create_http_agent.d.ts.map +1 -1
  11. package/dist/core/remote_conversation_store.d.ts +8 -1
  12. package/dist/core/remote_conversation_store.d.ts.map +1 -1
  13. package/dist/core/run_index.d.ts +8 -1
  14. package/dist/core/run_index.d.ts.map +1 -1
  15. package/dist/core/transcribe_audio.d.ts +7 -0
  16. package/dist/core/transcribe_audio.d.ts.map +1 -1
  17. package/dist/core/upload_attachment.d.ts +9 -0
  18. package/dist/core/upload_attachment.d.ts.map +1 -1
  19. package/dist/core/utils.d.ts +12 -0
  20. package/dist/core/utils.d.ts.map +1 -0
  21. package/dist/dom/animations.d.ts +51 -11
  22. package/dist/dom/animations.d.ts.map +1 -1
  23. package/dist/dom/dom_driver.d.ts +12 -7
  24. package/dist/dom/dom_driver.d.ts.map +1 -1
  25. package/dist/index.d.ts +3 -3
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1275 -520
  28. package/dist/index.js.map +3 -3
  29. package/dist/ui/styles.d.ts +1 -1
  30. package/dist/ui/styles.d.ts.map +1 -1
  31. package/dist/ui/ui_strings.d.ts +8 -1
  32. package/dist/ui/ui_strings.d.ts.map +1 -1
  33. package/dist/ui/voice_input.d.ts.map +1 -1
  34. package/package.json +1 -1
  35. package/src/constants.ts +35 -0
  36. package/src/core/ag_ui_chat.ts +452 -55
  37. package/src/core/create_http_agent.ts +14 -3
  38. package/src/core/remote_conversation_store.ts +25 -6
  39. package/src/core/run_index.ts +27 -5
  40. package/src/core/transcribe_audio.ts +20 -5
  41. package/src/core/upload_attachment.ts +13 -0
  42. package/src/core/utils.ts +18 -0
  43. package/src/dom/animations.ts +175 -31
  44. package/src/dom/dom_driver.ts +18 -12
  45. package/src/index.ts +4 -0
  46. package/src/ui/styles.ts +751 -421
  47. package/src/ui/ui_strings.ts +9 -1
  48. package/src/ui/voice_input.ts +7 -1
  49. package/src/version.ts +1 -1
@@ -24,8 +24,15 @@ export interface UiStrings {
24
24
  newChat: string;
25
25
  /** Collapse button. */
26
26
  collapse: string;
27
- /** Expand affordance (the sidebar rail toggle). */
27
+ /** Expand affordance (the launcher, and the sidebar rail). */
28
28
  expand: string;
29
+ /**
30
+ * The launcher's label while unread answers are waiting behind it, with
31
+ * `{count}` replaced by how many. It replaces {@link expand} rather than
32
+ * appending to it, so a translation can order the two parts as its language
33
+ * needs.
34
+ */
35
+ expandUnread: string;
29
36
  /** Built-in header theme toggle (light ⇄ dark). */
30
37
  toggleTheme: string;
31
38
 
@@ -204,6 +211,7 @@ export const DEFAULT_UI_STRINGS: UiStrings = {
204
211
  newChat: "New chat",
205
212
  collapse: "Collapse",
206
213
  expand: "Expand",
214
+ expandUnread: "Expand — {count} unread",
207
215
  toggleTheme: "Toggle theme",
208
216
  copyCode: "Copy",
209
217
  copied: "Copied",
@@ -1,3 +1,4 @@
1
+ import { ICON_VOICE } from "../constants.js";
1
2
  import type { TranscribeHandler } from "../core/transcribe_audio.js";
2
3
  import { DEFAULT_UI_STRINGS, type UiStrings } from "./ui_strings.js";
3
4
 
@@ -49,7 +50,12 @@ export class VoiceInput {
49
50
  this.element.type = "button";
50
51
  this.element.className = "voice-btn";
51
52
  this.element.setAttribute("part", "voice-button");
52
- this.element.textContent = "🎤";
53
+ // The mic glyph, in a slot so a host can project its own mark. Author-written
54
+ // constant markup, never user or server data.
55
+ const glyph = document.createElement("slot");
56
+ glyph.name = "icon-voice";
57
+ glyph.innerHTML = ICON_VOICE;
58
+ this.element.append(glyph);
53
59
  this.#setState("idle");
54
60
  this.element.addEventListener("click", () => {
55
61
  void this.toggle();
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION: string = "0.20.1";
1
+ export const VERSION: string = "0.22.0";