@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.
- package/CHANGELOG.md +192 -1
- package/README.md +404 -28
- package/dist/ag-ui-web-component.bundle.js +781 -451
- package/dist/ag-ui-web-component.bundle.js.map +4 -4
- package/dist/constants.d.ts +29 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/core/ag_ui_chat.d.ts +93 -1
- package/dist/core/ag_ui_chat.d.ts.map +1 -1
- package/dist/core/create_http_agent.d.ts +9 -0
- package/dist/core/create_http_agent.d.ts.map +1 -1
- package/dist/core/remote_conversation_store.d.ts +8 -1
- package/dist/core/remote_conversation_store.d.ts.map +1 -1
- package/dist/core/run_index.d.ts +8 -1
- package/dist/core/run_index.d.ts.map +1 -1
- package/dist/core/transcribe_audio.d.ts +7 -0
- package/dist/core/transcribe_audio.d.ts.map +1 -1
- package/dist/core/upload_attachment.d.ts +9 -0
- package/dist/core/upload_attachment.d.ts.map +1 -1
- package/dist/core/utils.d.ts +12 -0
- package/dist/core/utils.d.ts.map +1 -0
- package/dist/dom/animations.d.ts +51 -11
- package/dist/dom/animations.d.ts.map +1 -1
- package/dist/dom/dom_driver.d.ts +12 -7
- package/dist/dom/dom_driver.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1275 -520
- package/dist/index.js.map +3 -3
- package/dist/ui/styles.d.ts +1 -1
- package/dist/ui/styles.d.ts.map +1 -1
- package/dist/ui/ui_strings.d.ts +8 -1
- package/dist/ui/ui_strings.d.ts.map +1 -1
- package/dist/ui/voice_input.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +35 -0
- package/src/core/ag_ui_chat.ts +452 -55
- package/src/core/create_http_agent.ts +14 -3
- package/src/core/remote_conversation_store.ts +25 -6
- package/src/core/run_index.ts +27 -5
- package/src/core/transcribe_audio.ts +20 -5
- package/src/core/upload_attachment.ts +13 -0
- package/src/core/utils.ts +18 -0
- package/src/dom/animations.ts +175 -31
- package/src/dom/dom_driver.ts +18 -12
- package/src/index.ts +4 -0
- package/src/ui/styles.ts +751 -421
- package/src/ui/ui_strings.ts +9 -1
- package/src/ui/voice_input.ts +7 -1
- package/src/version.ts +1 -1
package/src/ui/ui_strings.ts
CHANGED
|
@@ -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
|
|
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",
|
package/src/ui/voice_input.ts
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
1
|
+
export const VERSION: string = "0.22.0";
|