@artooi/ag-ui-web-component 0.38.0 → 0.40.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 (142) hide show
  1. package/CHANGELOG.md +515 -1
  2. package/README.md +232 -56
  3. package/dist/ag-ui-web-component.bundle.js +370 -139
  4. package/dist/ag-ui-web-component.bundle.js.map +4 -4
  5. package/dist/constants.d.ts +17 -14
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/core/activity_registry.d.ts +46 -0
  8. package/dist/core/activity_registry.d.ts.map +1 -0
  9. package/dist/core/ag_ui_chat.d.ts +23 -10
  10. package/dist/core/ag_ui_chat.d.ts.map +1 -1
  11. package/dist/core/agui_client.d.ts +28 -0
  12. package/dist/core/agui_client.d.ts.map +1 -1
  13. package/dist/core/client_seed.d.ts +27 -0
  14. package/dist/core/client_seed.d.ts.map +1 -0
  15. package/dist/core/read_max_tool_rounds.d.ts +9 -0
  16. package/dist/core/read_max_tool_rounds.d.ts.map +1 -0
  17. package/dist/core/run_handlers.d.ts +80 -0
  18. package/dist/core/run_handlers.d.ts.map +1 -0
  19. package/dist/core/storage_scope.d.ts +110 -0
  20. package/dist/core/storage_scope.d.ts.map +1 -0
  21. package/dist/core/tool_outcome.d.ts +2 -3
  22. package/dist/core/tool_outcome.d.ts.map +1 -1
  23. package/dist/core/utils.d.ts +46 -0
  24. package/dist/core/utils.d.ts.map +1 -1
  25. package/dist/index.js +16268 -14747
  26. package/dist/index.js.map +4 -4
  27. package/dist/skills/skill_catalog.d.ts +67 -0
  28. package/dist/skills/skill_catalog.d.ts.map +1 -0
  29. package/dist/skills/skill_name_from.d.ts +12 -0
  30. package/dist/skills/skill_name_from.d.ts.map +1 -0
  31. package/dist/tools/tool_catalog.d.ts +79 -0
  32. package/dist/tools/tool_catalog.d.ts.map +1 -0
  33. package/dist/tools/tool_dispatch.d.ts +104 -0
  34. package/dist/tools/tool_dispatch.d.ts.map +1 -0
  35. package/dist/ui/composer/attachment_tray.d.ts.map +1 -1
  36. package/dist/ui/composer/auto_grow.d.ts +10 -0
  37. package/dist/ui/composer/auto_grow.d.ts.map +1 -0
  38. package/dist/ui/composer/composer_attachments.d.ts +57 -0
  39. package/dist/ui/composer/composer_attachments.d.ts.map +1 -0
  40. package/dist/ui/composer/composer_voice.d.ts +48 -0
  41. package/dist/ui/composer/composer_voice.d.ts.map +1 -0
  42. package/dist/ui/composer/voice_input.d.ts.map +1 -1
  43. package/dist/ui/excerpts/transcript_quote_offer.d.ts +57 -0
  44. package/dist/ui/excerpts/transcript_quote_offer.d.ts.map +1 -0
  45. package/dist/ui/fill_ui_string.d.ts +32 -0
  46. package/dist/ui/fill_ui_string.d.ts.map +1 -0
  47. package/dist/ui/history/conversation_history.d.ts +203 -0
  48. package/dist/ui/history/conversation_history.d.ts.map +1 -0
  49. package/dist/ui/history/relative_time.d.ts.map +1 -1
  50. package/dist/ui/history/thread_drawer.d.ts +0 -14
  51. package/dist/ui/history/thread_drawer.d.ts.map +1 -1
  52. package/dist/ui/interrupts/confirmation_card.d.ts.map +1 -1
  53. package/dist/ui/interrupts/pending_decision.d.ts +23 -0
  54. package/dist/ui/interrupts/pending_decision.d.ts.map +1 -0
  55. package/dist/ui/placement/is_collapsible_placement.d.ts +18 -0
  56. package/dist/ui/placement/is_collapsible_placement.d.ts.map +1 -0
  57. package/dist/ui/placement/is_draggable_placement.d.ts +9 -0
  58. package/dist/ui/placement/is_draggable_placement.d.ts.map +1 -0
  59. package/dist/ui/placement/launcher_drag.d.ts +6 -0
  60. package/dist/ui/placement/launcher_drag.d.ts.map +1 -1
  61. package/dist/ui/placement/panel_placement.d.ts +119 -0
  62. package/dist/ui/placement/panel_placement.d.ts.map +1 -0
  63. package/dist/ui/progress/run_announcer.d.ts +41 -0
  64. package/dist/ui/progress/run_announcer.d.ts.map +1 -0
  65. package/dist/ui/progress/subagent_progress.d.ts +58 -0
  66. package/dist/ui/progress/subagent_progress.d.ts.map +1 -0
  67. package/dist/ui/progress/tool_call_card.d.ts.map +1 -1
  68. package/dist/ui/shell/adopt_styles.d.ts +23 -0
  69. package/dist/ui/shell/adopt_styles.d.ts.map +1 -0
  70. package/dist/ui/shell/glyph_slot.d.ts +7 -0
  71. package/dist/ui/shell/glyph_slot.d.ts.map +1 -0
  72. package/dist/ui/shell/header_button.d.ts +10 -0
  73. package/dist/ui/shell/header_button.d.ts.map +1 -0
  74. package/dist/ui/shell/icon_element.d.ts +12 -0
  75. package/dist/ui/shell/icon_element.d.ts.map +1 -0
  76. package/dist/ui/shell/is_unread_badge_enabled.d.ts +10 -0
  77. package/dist/ui/shell/is_unread_badge_enabled.d.ts.map +1 -0
  78. package/dist/ui/shell/read_launcher_icon_url.d.ts +8 -0
  79. package/dist/ui/shell/read_launcher_icon_url.d.ts.map +1 -0
  80. package/dist/ui/styles.d.ts +1 -1
  81. package/dist/ui/styles.d.ts.map +1 -1
  82. package/dist/ui/transcript/answer_actions.d.ts +39 -0
  83. package/dist/ui/transcript/answer_actions.d.ts.map +1 -0
  84. package/dist/ui/transcript/answer_stream.d.ts +56 -0
  85. package/dist/ui/transcript/answer_stream.d.ts.map +1 -0
  86. package/dist/ui/transcript/render_or_warn.d.ts +16 -0
  87. package/dist/ui/transcript/render_or_warn.d.ts.map +1 -0
  88. package/dist/ui/transcript/starter_chips.d.ts +21 -0
  89. package/dist/ui/transcript/starter_chips.d.ts.map +1 -0
  90. package/dist/ui/transcript/transcript.d.ts +171 -0
  91. package/dist/ui/transcript/transcript.d.ts.map +1 -0
  92. package/dist/ui/ui_strings.d.ts +29 -1
  93. package/dist/ui/ui_strings.d.ts.map +1 -1
  94. package/package.json +1 -1
  95. package/src/constants.ts +17 -15
  96. package/src/core/activity_registry.ts +133 -0
  97. package/src/core/ag_ui_chat.ts +945 -4419
  98. package/src/core/agui_client.ts +172 -16
  99. package/src/core/client_seed.ts +27 -0
  100. package/src/core/read_max_tool_rounds.ts +13 -0
  101. package/src/core/remote_conversation_store.ts +1 -1
  102. package/src/core/run_handlers.ts +501 -0
  103. package/src/core/storage_scope.ts +279 -0
  104. package/src/core/tool_outcome.ts +5 -3
  105. package/src/core/utils.ts +109 -0
  106. package/src/skills/skill_catalog.ts +166 -0
  107. package/src/skills/skill_name_from.ts +19 -0
  108. package/src/tools/tool_catalog.ts +354 -0
  109. package/src/tools/tool_dispatch.ts +521 -0
  110. package/src/ui/composer/attachment_tray.ts +6 -5
  111. package/src/ui/composer/auto_grow.ts +12 -0
  112. package/src/ui/composer/composer_attachments.ts +324 -0
  113. package/src/ui/composer/composer_voice.ts +93 -0
  114. package/src/ui/composer/voice_input.ts +4 -4
  115. package/src/ui/excerpts/transcript_quote_offer.ts +198 -0
  116. package/src/ui/fill_ui_string.ts +41 -0
  117. package/src/ui/history/conversation_history.ts +699 -0
  118. package/src/ui/history/relative_time.ts +5 -4
  119. package/src/ui/history/thread_drawer.ts +3 -50
  120. package/src/ui/interrupts/confirmation_card.ts +4 -2
  121. package/src/ui/interrupts/pending_decision.ts +34 -0
  122. package/src/ui/placement/is_collapsible_placement.ts +19 -0
  123. package/src/ui/placement/is_draggable_placement.ts +23 -0
  124. package/src/ui/placement/launcher_drag.ts +104 -89
  125. package/src/ui/placement/panel_placement.ts +1130 -0
  126. package/src/ui/progress/run_announcer.ts +67 -0
  127. package/src/ui/progress/subagent_progress.ts +201 -0
  128. package/src/ui/progress/tool_call_card.ts +2 -0
  129. package/src/ui/shell/adopt_styles.ts +28 -0
  130. package/src/ui/shell/glyph_slot.ts +12 -0
  131. package/src/ui/shell/header_button.ts +21 -0
  132. package/src/ui/shell/icon_element.ts +33 -0
  133. package/src/ui/shell/is_unread_badge_enabled.ts +11 -0
  134. package/src/ui/shell/read_launcher_icon_url.ts +9 -0
  135. package/src/ui/styles.ts +301 -70
  136. package/src/ui/transcript/answer_actions.ts +139 -0
  137. package/src/ui/transcript/answer_stream.ts +123 -0
  138. package/src/ui/transcript/render_or_warn.ts +22 -0
  139. package/src/ui/transcript/starter_chips.ts +42 -0
  140. package/src/ui/transcript/transcript.ts +429 -0
  141. package/src/ui/ui_strings.ts +38 -1
  142. package/src/version.ts +1 -1
@@ -0,0 +1,203 @@
1
+ import type { Message } from "@ag-ui/core";
2
+ import type { ActivityRegistry } from "../../core/activity_registry.js";
3
+ import type { AgUiClient } from "../../core/agui_client.js";
4
+ import type { ClientSeed } from "../../core/client_seed.js";
5
+ import type { ClientConversationStore, NavigationCheckpoint } from "../../core/conversation_store.js";
6
+ import type { MessageRole } from "../../core/message_role.js";
7
+ import { RunIndex } from "../../core/run_index.js";
8
+ import type { ToolCatalog } from "../../tools/tool_catalog.js";
9
+ import type { AnswerActions } from "../transcript/answer_actions.js";
10
+ import type { Transcript } from "../transcript/transcript.js";
11
+ import type { UiStrings } from "../ui_strings.js";
12
+ import type { CheckpointMenu, CheckpointVerb } from "./checkpoint_menu.js";
13
+ import type { RelativeTimeFormatter } from "./relative_time.js";
14
+ import type { ThreadDrawer } from "./thread_drawer.js";
15
+ /** What conversation history needs from the element that owns it. */
16
+ export interface ConversationHistoryHost {
17
+ /**
18
+ * The custom element: the attributes history reads and stamps, and the
19
+ * `this` a host's `agentFactory` and `navigationResult` are called with.
20
+ */
21
+ readonly element: HTMLElement;
22
+ /** The conversation list, which the element builds and renders. */
23
+ readonly drawer: ThreadDrawer;
24
+ /** The checkpoint panel, which the element builds and renders. */
25
+ readonly checkpoints: CheckpointMenu;
26
+ /** The transcript a restored conversation is replayed into. */
27
+ readonly transcript: Transcript;
28
+ /** The action row under each finished answer. */
29
+ readonly actions: AnswerActions;
30
+ /** The activity renderers, which redraw a restored activity. */
31
+ readonly activities: ActivityRegistry;
32
+ /** The frontend tools, whose renderers a restored call is redrawn with. */
33
+ readonly tools: ToolCatalog;
34
+ /** The composer, whose text a continuation sends. */
35
+ readonly input: HTMLTextAreaElement;
36
+ /** The one-line hint above the composer. */
37
+ readonly hint: HTMLDivElement;
38
+ /** The resolved string table. */
39
+ readonly strings: () => UiStrings;
40
+ /** The element's `conversationStore`, read per use. */
41
+ readonly conversationStore: () => ClientConversationStore;
42
+ /** The element's `formatRelativeTime`. */
43
+ readonly formatRelativeTime: () => RelativeTimeFormatter | null;
44
+ /** The element's `navigationResult`. */
45
+ readonly navigationResult: () => (checkpoint: NavigationCheckpoint) => unknown;
46
+ /** The request headers, having first reported the destination if it is foreign. */
47
+ readonly headersFor: (url: string) => Record<string, string>;
48
+ /** The configured cookie policy as `fetch` spells it. */
49
+ readonly requestCredentials: () => RequestCredentials | undefined;
50
+ /** The element's `appendMessage`, which a restored bubble opens through. */
51
+ readonly appendMessage: (role: MessageRole, content: string) => HTMLDivElement;
52
+ /** Resize the composer to its content. */
53
+ readonly autoGrow: () => void;
54
+ /**
55
+ * A continuation has ended, whether or not it ever ran.
56
+ *
57
+ * The composer parks a turn typed while one is in flight, and learns a run
58
+ * has settled from its own events -- which never arrive for a continuation
59
+ * that failed before starting one. Without this, such a turn stayed parked
60
+ * with nothing left to release it.
61
+ */
62
+ readonly continuationEnded: () => void;
63
+ /** The conversation's own client, or `null` until one is built. */
64
+ readonly client: () => AgUiClient | null;
65
+ /** The conversation's own client, built on first use. */
66
+ readonly ensureClient: () => AgUiClient;
67
+ /**
68
+ * A client from the same construction as the conversation's own, differing
69
+ * only in what `seed` says. A continuation's comes from here so that nothing
70
+ * added to one can be missing from the other.
71
+ */
72
+ readonly buildClient: (seed: ClientSeed) => AgUiClient;
73
+ /**
74
+ * Forget the conversation's own client, so the next one is built from
75
+ * {@link ConversationHistory.restored}. Nothing is cancelled: this is for a
76
+ * client that is not running.
77
+ */
78
+ readonly releaseClient: () => void;
79
+ /** Whether an interaction is in flight, which the composer owns. */
80
+ readonly running: () => boolean;
81
+ /** Stop the in-flight run. */
82
+ readonly cancelRun: () => void;
83
+ /** Drop the in-memory run and transcript, leaving the thread untouched. */
84
+ readonly resetState: () => void;
85
+ /** Swap the composer between Send and Stop, which the composer owns. */
86
+ readonly setRunning: (running: boolean) => void;
87
+ }
88
+ /**
89
+ * Which conversation is on screen, and how one gets there: restoring it from
90
+ * the store, switching to another from the conversation list, and continuing
91
+ * a run from the checkpoint panel.
92
+ *
93
+ * The one writer of the active thread's id and of the messages a restore
94
+ * seeded the next client with. The element reads both when it builds its
95
+ * client, and asks for a transition -- adopt the store's thread, mint a new
96
+ * one -- rather than writing either. Clearing the run, the transcript and the
97
+ * composer around a transition stays the element's, because it spans every
98
+ * part of it; history calls back for that.
99
+ *
100
+ * Owned one-to-one by an `<ag-ui-chat>`, and holding no state outside the
101
+ * instance.
102
+ */
103
+ export declare class ConversationHistory {
104
+ #private;
105
+ constructor(host: ConversationHistoryHost);
106
+ /** The active thread's id. */
107
+ get threadId(): string;
108
+ /** The conversation as last written, for seeding the next client. */
109
+ get restored(): readonly Message[];
110
+ /** The checkpoint continuation in flight, or `null` when none is running. */
111
+ get continuation(): AgUiClient | null;
112
+ /** Point at the thread the store says is active. */
113
+ adoptActiveThread(): void;
114
+ /** Make a freshly minted thread the active one. */
115
+ startThread(): void;
116
+ /**
117
+ * Stop the checkpoint continuation in flight, if there is one.
118
+ *
119
+ * A continuation runs on a client of its own, which the element never held,
120
+ * so Stop cancelled the conversation's client and left this one streaming:
121
+ * the button read Stop and did nothing, and New chat, a thread switch or
122
+ * removing the element carried on drawing the resumed answer into whatever
123
+ * came next. The element calls this wherever it stops its own run.
124
+ */
125
+ stopContinuation(): void;
126
+ /** Forget the messages the last restore seeded, with the rest of the run. */
127
+ forgetRestored(): void;
128
+ /** Delete the active thread if nothing was ever sent in it. */
129
+ reapUnsent(): void;
130
+ /** The run index, built once from `data-runs-url`; `null` when unset. */
131
+ runs(): RunIndex | null;
132
+ /** Open the conversation list, dismissing the checkpoint panel. */
133
+ openThreads(): void;
134
+ /** Open the checkpoint panel, dismissing the conversation list. */
135
+ openCheckpoints(): void;
136
+ /** Switch the active conversation to an existing thread and replay it. */
137
+ switchThread(threadId: string): Promise<void>;
138
+ /** Rename a thread, then reload the list that shows its title. */
139
+ renameThread(threadId: string, title: string): void;
140
+ /** Delete a thread; if it was the active one, fall back to a fresh chat. */
141
+ deleteThread(threadId: string): void;
142
+ /** Reload the drawer's thread list, marking the active thread. */
143
+ refreshDrawer(): Promise<void>;
144
+ /**
145
+ * Continue `runId` as a **new** run, seeded server-side from its snapshot.
146
+ *
147
+ * Uses a short-lived agent pointed at the resume / fork endpoint and seeded
148
+ * with no history, because those endpoints supply the prior turns from the
149
+ * snapshot and re-sending them would duplicate. A separate agent makes that
150
+ * structural and mints the fresh `run_id` the endpoints also require.
151
+ *
152
+ * Built by the same construction as the conversation's own client, so the
153
+ * continuation streams into the same transcript the user is looking at and
154
+ * runs under the same state, tools and bounds. It is the run in flight while
155
+ * it lasts: {@link stopContinuation} is how the element's Stop reaches it.
156
+ *
157
+ * What it adds joins the conversation. Its saves write the conversation on
158
+ * screen ahead of its exchange, and each one hands that whole list to the
159
+ * next client the element builds, so the next ordinary message is sent with
160
+ * the exchange it follows. The conversation's own client never held it, and
161
+ * was sending without it.
162
+ */
163
+ continueRun(runId: string, verb: CheckpointVerb): Promise<void>;
164
+ /**
165
+ * Restore the conversation from the store on mount, then — if a navigating
166
+ * tool reloaded the page mid-run — resume the loop by supplying that tool's
167
+ * result from the page we landed on.
168
+ *
169
+ * Any other call the stored run left unanswered is answered on the way in, as
170
+ * not finished, because no run is left to answer it.
171
+ *
172
+ * **What the store holds after a reload mid-run.** The run loop persists a
173
+ * round when its stream ends, which is *before* it asks about a gated call,
174
+ * runs a frontend tool, or collects a server-side approval. A reload in that
175
+ * window leaves the round's calls stored with no result, and the request that
176
+ * would have produced one died with the page.
177
+ *
178
+ * **Why not finished, and not declined.** Stop declines an open card because
179
+ * pressing it is a person answering the question. A reload answers nothing, and
180
+ * the stored shape is the same whether the round waited on a person or on a
181
+ * handler the reload killed, so declined would be unproven for the first and
182
+ * false for the second. A marker saved while a card is open could tell them
183
+ * apart, but every host store would have to round-trip it, and a store that
184
+ * dropped it would fall back to this wording anyway -- which is true of both.
185
+ *
186
+ * The answers come from the same helper the client runs before each request,
187
+ * so a restored card and the result the next request carries cannot disagree.
188
+ * Giving them to the replay, rather than leaving the client to add them, is
189
+ * what settles each card from its result. The checkpointed call is excluded,
190
+ * because the resume path answers it from the page the reload landed on; that
191
+ * exclusion is held by "still resumes with the landed page's result, and is not
192
+ * declined" in `ag_ui_chat_reload_mid_run.test.ts`.
193
+ */
194
+ rehydrate(): Promise<void>;
195
+ /**
196
+ * Replay a restored message: text bubbles *and* tool activity. An assistant
197
+ * turn may carry `toolCalls` (rendered as cards) and/or text; a `tool` turn
198
+ * carries a result that settles the matching card. So a refreshed page shows
199
+ * the full transcript — tool calls and their results — not just the prose.
200
+ */
201
+ replay(message: Message): void;
202
+ }
203
+ //# sourceMappingURL=conversation_history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation_history.d.ts","sourceRoot":"","sources":["../../../src/ui/history/conversation_history.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,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C,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC"}
1
+ {"version":3,"file":"relative_time.d.ts","sourceRoot":"","sources":["../../../src/ui/history/relative_time.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,GAAG,GAAE,MAAmB,EACxB,OAAO,GAAE,SAA8B,GACtC,MAAM,CAqBR;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC"}
@@ -18,15 +18,6 @@ export interface ThreadDrawerCallbacks {
18
18
  readonly onRename: (threadId: string, title: string) => void;
19
19
  /** A row was deleted (after the inline confirm). */
20
20
  readonly onDelete: (threadId: string) => void;
21
- /**
22
- * The list opened or closed.
23
- *
24
- * There are five ways out of it -- the close control, the backdrop, Escape,
25
- * picking a row and starting a new chat -- and only two of them go through
26
- * the host. A docked list moves the transcript over, so the host has to know
27
- * about all five or the transcript stays shifted around nothing.
28
- */
29
- readonly onVisibility?: (open: boolean) => void;
30
21
  }
31
22
  /**
32
23
  * The chat-history drawer: a slide-over listing the user's threads (title,
@@ -56,11 +47,6 @@ export declare class ThreadDrawer {
56
47
  */
57
48
  setRelativeTimeFormatter(format: RelativeTimeFormatter | null): void;
58
49
  setStrings(strings: UiStrings): void;
59
- /**
60
- * Whether the list is a dialog over the conversation or a rail beside it.
61
- * The host decides, because only the placement knows whether there is room.
62
- */
63
- setModal(modal: boolean): void;
64
50
  isOpen(): boolean;
65
51
  open(): void;
66
52
  close(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"thread_drawer.d.ts","sourceRoot":"","sources":["../../../src/ui/history/thread_drawer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAsB,KAAK,SAAS,EAAE,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E,UAAU,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAIjE;CAqLF"}
@@ -1 +1 @@
1
- {"version":3,"file":"confirmation_card.d.ts","sourceRoot":"","sources":["../../../src/ui/interrupts/confirmation_card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAYD,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,GAAG,UAAU,EACvB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,OAAO,CAAC,CAqElB"}
1
+ {"version":3,"file":"confirmation_card.d.ts","sourceRoot":"","sources":["../../../src/ui/interrupts/confirmation_card.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAYD,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,GAAG,UAAU,EACvB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,OAAO,CAAC,CAsElB"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The decision a run is suspended on, and the one way to abandon it.
3
+ *
4
+ * A run pauses on a person in three places -- a client-side confirmation, a
5
+ * batch of server interrupts, and the `ask_user` question -- and a Stop has to
6
+ * reach whichever of them is open. Each used to assign the element's own abort
7
+ * controller directly, so four places wrote one field and nothing said which
8
+ * of them owned it. Holding it here gives it one owner: a wait opens, the Stop
9
+ * aborts what is open, and the wait closes when it is answered.
10
+ *
11
+ * Owned one-to-one by an `<ag-ui-chat>`, and holding no state outside the
12
+ * instance.
13
+ */
14
+ export declare class PendingDecision {
15
+ #private;
16
+ /** Start waiting on a person; aborting the returned signal abandons the wait. */
17
+ open(): AbortSignal;
18
+ /** The wait was answered; a later Stop has nothing of this wait's to abandon. */
19
+ close(): void;
20
+ /** Abandon whatever wait is open, resolving it as declined. A no-op when none is. */
21
+ abort(): void;
22
+ }
23
+ //# sourceMappingURL=pending_decision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending_decision.d.ts","sourceRoot":"","sources":["../../../src/ui/interrupts/pending_decision.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;;IAK1B,iFAAiF;IACjF,IAAI,IAAI,WAAW,CAGlB;IAED,iFAAiF;IACjF,KAAK,IAAI,IAAI,CAEZ;IAED,qFAAqF;IACrF,KAAK,IAAI,IAAI,CAEZ;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Whether `placement` has a collapsed state at all.
3
+ *
4
+ * `page` does not. It is a dedicated route rather than a panel sitting on
5
+ * someone else's page, so there is no "away" for it to go to: collapsing it
6
+ * left a strip of application chrome fixed over a route that no longer had an
7
+ * owner. It is also the placement that hides the launcher, so the usual way
8
+ * back does not exist here.
9
+ *
10
+ * The header hides its collapse control under this placement, but a control
11
+ * removed from the UI is not a state removed from the model -- the property,
12
+ * the attribute and a value restored from storage all still reach it. This is
13
+ * what the reachable paths are gated on; the stylesheet covers the one path
14
+ * that never passes through here, an attribute written straight onto the
15
+ * element.
16
+ */
17
+ export declare function isCollapsiblePlacement(placement: string | null): boolean;
18
+ //# sourceMappingURL=is_collapsible_placement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is_collapsible_placement.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/is_collapsible_placement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAExE"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Whether `placement` is one whose launcher can be dragged.
3
+ *
4
+ * Asked by two owners: the placement, deciding whether a gesture may move the
5
+ * widget, and the element, deciding whether a first mount starts collapsed --
6
+ * the corner placements are the two with a launcher to collapse to.
7
+ */
8
+ export declare function isDraggablePlacement(placement: string | null): boolean;
9
+ //# sourceMappingURL=is_draggable_placement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is_draggable_placement.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/is_draggable_placement.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAEtE"}
@@ -19,6 +19,12 @@ export interface LauncherDragOptions {
19
19
  * per pointer move, and never per key repeat.
20
20
  */
21
21
  readonly commit: (left: number, top: number) => void;
22
+ /**
23
+ * Ends the launcher's own listeners when aborted. The launcher outlives the
24
+ * element's connection to the document and this is called on every connect,
25
+ * so without it a re-inserted element moved one arrow press two steps.
26
+ */
27
+ readonly signal: AbortSignal;
22
28
  }
23
29
  /**
24
30
  * Let the user drag the collapsed launcher anywhere on screen.
@@ -1 +1 @@
1
- {"version":3,"file":"launcher_drag.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/launcher_drag.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAExE,uDAAuD;AACvD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC;IAChC,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,WAAW,CAAC;IACjC,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,WAAW,CAAC;IACrC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAaD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAuI5F"}
1
+ {"version":3,"file":"launcher_drag.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/launcher_drag.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAExE,uDAAuD;AACvD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC;IAChC,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,WAAW,CAAC;IACjC,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,WAAW,CAAC;IACrC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAC9B;AAaD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAgJ5F"}
@@ -0,0 +1,119 @@
1
+ import type { ChatCorner, ChatSurfaceReport } from "../../tools/chat_surface_tools.js";
2
+ import type { UiStrings } from "../ui_strings.js";
3
+ /**
4
+ * What the placement needs from the element that owns it.
5
+ *
6
+ * Everything the element keeps private is reached through a thunk here, the
7
+ * same shape `PanelDragOptions` and `ResizeOptions` already give their hosts:
8
+ * read per call, so a value the element replaces later (the resolved string
9
+ * table, the connected flag) is never captured stale.
10
+ */
11
+ export interface PlacementHost {
12
+ /** The custom element itself: its inline style, attributes and box. */
13
+ readonly element: HTMLElement;
14
+ /** The collapsed widget's button, which a drag moves and a resize carries. */
15
+ readonly launcher: HTMLButtonElement;
16
+ /** The shadow root, searched for a header mid-drag. */
17
+ readonly root: ShadowRoot;
18
+ /** Whether the element is in the document. */
19
+ readonly connected: () => boolean;
20
+ /** Whether the widget is collapsed. */
21
+ readonly collapsed: () => boolean;
22
+ /** Whether the current placement has a collapsed state at all. */
23
+ readonly collapsible: () => boolean;
24
+ /** The resolved string table. */
25
+ readonly strings: () => UiStrings;
26
+ /** Read a layout preference, durable store first. */
27
+ readonly readPreference: (base: string) => string | null;
28
+ /** Persist a layout preference to both stores. */
29
+ readonly writePreference: (base: string, value: string) => void;
30
+ /** Drop a layout preference from both stores. */
31
+ readonly clearPreference: (base: string) => void;
32
+ /** Tell the reader the agent moved their window, with the way back. */
33
+ readonly announceSurfaceChange: (text: string, undo: () => void) => void;
34
+ }
35
+ /**
36
+ * Where the panel and its launcher sit, and how big the panel is: the dragged
37
+ * launcher, the dragged header, the eight resize grips, the corner the panel
38
+ * opens from, and the persisted record of all of it.
39
+ *
40
+ * Owned one-to-one by an `<ag-ui-chat>`, and holding no state outside the
41
+ * instance, so two elements on a page place themselves independently.
42
+ */
43
+ export declare class PanelPlacement {
44
+ #private;
45
+ constructor(host: PlacementHost);
46
+ /**
47
+ * Make the header a title bar. Only while open: a collapsed widget has no
48
+ * header on screen, and the launcher is the handle then.
49
+ */
50
+ enablePanelDrag(header: HTMLElement): void;
51
+ /**
52
+ * Let the launcher be dragged. Only while collapsed: the launcher is scaled
53
+ * away and unclickable behind the open panel, so a drag there would move
54
+ * something nobody can see.
55
+ */
56
+ enableLauncherDrag(signal: AbortSignal): void;
57
+ /** Build the eight resize grips into `chat`, with one of them in the tab order. */
58
+ mountResizeGrips(chat: HTMLElement): void;
59
+ /** Restore a dragged size before the panel paints. */
60
+ restoreSize(): void;
61
+ /**
62
+ * A zero-sized box carrying the host's viewport insets as padding, so they
63
+ * can be read back as used pixel lengths. See the `.viewport-probe` rule for
64
+ * why a custom property cannot be read directly.
65
+ */
66
+ readonly probe: HTMLDivElement;
67
+ /**
68
+ * Whether a pointer or key gesture is currently placing the widget.
69
+ *
70
+ * Read from the stamp the drag helpers already set, rather than tracked
71
+ * separately: one source of truth, and it clears on `pointercancel` as well
72
+ * as `pointerup`, which is the end a touch gesture usually gets.
73
+ */
74
+ dragging(): boolean;
75
+ /** The report behind `AgUiChat.describeSurface`, whose doc is the contract. */
76
+ describeSurface(): ChatSurfaceReport;
77
+ /** The move behind `AgUiChat.moveTo`, whose doc is the contract. */
78
+ moveTo(corner: ChatCorner, options?: {
79
+ readonly announce?: boolean;
80
+ }): boolean;
81
+ /** Stamp the measured anchor so the shadow CSS can place the grip. */
82
+ syncResizeAnchor(): void;
83
+ /**
84
+ * Drop any dragged size the new placement has taken ownership of.
85
+ *
86
+ * Without this a size survives the switch as an inline property and silently
87
+ * overrides the placement it moved to — the panel keeps a floating height
88
+ * while docked, and reads as a component that cannot do full height.
89
+ */
90
+ releaseOwnedAxes(): void;
91
+ /**
92
+ * Publish the measured viewport height so the stylesheet can size a
93
+ * full-bleed panel to what the user can see.
94
+ *
95
+ * No CSS length carries this. An on-screen keyboard has no effect on any
96
+ * viewport-percentage unit, so a panel sized from `100dvh` puts its composer
97
+ * behind the keyboard being typed into. Written inline, and read through a
98
+ * token the host's own `--ag-ui-viewport-height` still outranks.
99
+ *
100
+ * Removed rather than frozen when the two viewports agree, so a desktop that
101
+ * never diverges carries no inline override at all and the declared fallback
102
+ * stays in charge.
103
+ */
104
+ publishVisualViewport(): void;
105
+ /**
106
+ * Re-apply the dragged position against the current viewport: on connect,
107
+ * whenever the window resizes, and before an expand. The viewport that
108
+ * stored a position may since have shrunk, and a launcher past the edge is
109
+ * unreachable -- it is the only way back to a collapsed conversation.
110
+ */
111
+ restoreLauncherPosition(): void;
112
+ /**
113
+ * Give the position back to the host when the new placement owns it, the way
114
+ * releaseOwnedAxes gives back a size. Without this a dragged inset survives
115
+ * the switch inline and pins a sidebar to wherever the floating launcher was.
116
+ */
117
+ releaseLauncherPosition(): void;
118
+ }
119
+ //# sourceMappingURL=panel_placement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel_placement.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/panel_placement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAmFlD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,uEAA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qE/C;;;;;;OAMG;IACH,QAAQ,IAAI,OAAO,CAKlB;IAED,+EAA+E;IAC/E,eAAe,IAAI,iBAAiB,CAwBnC;IAED,oEAAoE;IACpE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CA2CjF;IAmID,sEAAsE;IACtE,gBAAgB,IAAI,IAAI,CAYvB;IA0CD;;;;;;OAMG;IACH,gBAAgB,IAAI,IAAI,CAQvB;IAsFD;;;;;;;;;;;;OAYG;IACH,qBAAqB,IAAI,IAAI,CAgD5B;IA8PD;;;;;OAKG;IACH,uBAAuB,IAAI,IAAI,CAmB9B;IAiCD;;;;OAIG;IACH,uBAAuB,IAAI,IAAI,CAU9B;CAwGF"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The screen-reader-only status region, and the one short thing it says at a
3
+ * time about how a run is going.
4
+ *
5
+ * The transcript cannot do this job. It is rewritten on every animation frame
6
+ * while an answer streams, so as a live region it re-announced the whole
7
+ * answer tens of times per turn -- not merely unhelpful but actively hostile.
8
+ * The published fix for this exact bug (Microsoft's Bot Framework WebChat
9
+ * #3236) is architectural rather than a matter of tuning attributes: demote the
10
+ * visible transcript out of live-region duty and put one synthesised status per
11
+ * event into a separate invisible region. MDN and Scott O'Hara prescribe the
12
+ * same empty-region-then-inject shape.
13
+ *
14
+ * Roughly four calls land per turn -- responding, answered, a card is waiting,
15
+ * stopped or failed -- so the user is told what happened and reads the answer
16
+ * itself by navigating the log, at their own pace, rather than having it
17
+ * shouted at them a token at a time.
18
+ *
19
+ * Owned one-to-one by an `<ag-ui-chat>`, and holding no state outside the
20
+ * instance. The element places {@link region} in its shadow root.
21
+ */
22
+ export declare class RunAnnouncer {
23
+ #private;
24
+ /** The invisible `role="status"` region the statuses are written into. */
25
+ readonly region: HTMLDivElement;
26
+ /** Stamp the region's live-region semantics, before the element places it. */
27
+ mount(): void;
28
+ /**
29
+ * Say one short thing to a screen reader, without touching the transcript.
30
+ *
31
+ * **The clear is load-bearing, twice.** A reader announces a live region when
32
+ * its content *changes*, so setting the same string twice running -- two turns
33
+ * in a row both starting -- is not a change and is silently not announced.
34
+ * Emptying first makes the next set a change again. It also stops a stale
35
+ * status being read out when a reader later lands on the region.
36
+ */
37
+ announce(message: string): void;
38
+ /** Cancel a pending clear, so no timer outlives the element's connection. */
39
+ dispose(): void;
40
+ }
41
+ //# sourceMappingURL=run_announcer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run_announcer.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/run_announcer.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,YAAY;;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,iBAAiC;IAIhD,8EAA8E;IAC9E,KAAK,IAAI,IAAI,CAOZ;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAS9B;IAED,6EAA6E;IAC7E,OAAO,IAAI,IAAI,CAKd;CACF"}
@@ -0,0 +1,58 @@
1
+ import type { UiStrings } from "../ui_strings.js";
2
+ import type { ToolCallCard } from "./tool_call_card.js";
3
+ /** What delegated progress needs from the element that owns it. */
4
+ export interface SubAgentProgressHost {
5
+ /** The tool card drawn for a call id, which a delegation's panel hangs off. */
6
+ readonly card: (callId: string) => ToolCallCard | undefined;
7
+ /** The resolved string table. */
8
+ readonly strings: () => UiStrings;
9
+ /** Keep the transcript at its foot, if the reader is there. */
10
+ readonly follow: () => void;
11
+ }
12
+ /**
13
+ * A delegated sub-agent's progress, hung off the card that delegated: the live
14
+ * panels by delegation, and which delegation each child run belongs to.
15
+ *
16
+ * Owned one-to-one by an `<ag-ui-chat>`, and holding no state outside the
17
+ * instance.
18
+ */
19
+ export declare class SubAgentProgress {
20
+ #private;
21
+ constructor(host: SubAgentProgressHost);
22
+ /**
23
+ * Draw one step of a delegated sub-agent's progress, on the card that
24
+ * delegated.
25
+ *
26
+ * `delegationId` is the parent's own `delegate_task` tool-call id, so the
27
+ * attachment point is a card this element already drew on `TOOL_CALL_START`.
28
+ * That is the whole design: a run that hands work to a sub-agent used to read
29
+ * as a stall -- the card sat at "running…" for the child's entire duration --
30
+ * and the fix is to narrate *into* the thing that was already standing there,
31
+ * rather than to float a second element with the same identity.
32
+ *
33
+ * A progress event for a call this client never drew is dropped. It has no
34
+ * card to attach to, and inventing a floating one is precisely the alternative
35
+ * that was rejected: parent and child interleave in the transcript with
36
+ * nothing marking whose is whose, and the persisted transcript -- which never
37
+ * held the progress at all -- would not match what was on screen.
38
+ *
39
+ * Nothing here writes to the conversation store. `CUSTOM` never enters
40
+ * `agent.messages`, so a reload mid-run leaves the tool card and loses the
41
+ * nested detail, which is the intended behaviour rather than a gap.
42
+ */
43
+ report(value: unknown): void;
44
+ /** Open a delegation, on `SUBAGENT_STARTED`. */
45
+ start(subagentRunId: string, agent: string, parentToolCallId: string | null): void;
46
+ /** Settle a delegation that completed, on `SUBAGENT_FINISHED`. */
47
+ finish(subagentRunId: string): void;
48
+ /** Settle a delegation that failed, on `SUBAGENT_ERROR`. */
49
+ fail(subagentRunId: string, message: string): void;
50
+ /**
51
+ * Forget every delegation. The panels go with the cards they hung off.
52
+ * Nothing restores them: the progress rode the imperative carrier and was
53
+ * never persisted, which is the correct half of that split -- a delegation
54
+ * that was live before this transcript was wiped is not live now.
55
+ */
56
+ clear(): void;
57
+ }
58
+ //# sourceMappingURL=subagent_progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subagent_progress.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/subagent_progress.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,mEAAmE;AACnE,MAAM,WAAW,oBAAoB;IACnC,+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OAGG;IACH,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAgBhD;CAkEF"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Attach the stylesheet to `root` without an inline `<style>` element.
3
+ *
4
+ * A host with a strict `style-src` and no `'unsafe-inline'` drops an injected
5
+ * `<style>` silently: the component mounts, functions, and renders completely
6
+ * unstyled, with nothing in the console to point at. `adoptedStyleSheets`
7
+ * carries no inline-style origin, so it is unaffected by that policy.
8
+ *
9
+ * The sheet is constructed **per call**, which is once per mounted element,
10
+ * rather than shared at module scope. A shared sheet would additionally avoid
11
+ * re-parsing the stylesheet once per mounted element, which is what
12
+ * `adoptedStyleSheets` is usually reached for -- but a module-level singleton
13
+ * is exactly what this package forbids, and the CSP defect is fixed either way.
14
+ * Per instance is no worse than the `<style>` element it replaces, which also
15
+ * parsed once per mount.
16
+ *
17
+ * No fallback: constructible `CSSStyleSheet` is Chrome 73, Firefox 101 and
18
+ * Safari 16.4, all below this package's declared Safari 17 runtime target. A
19
+ * guard here would be code no supported browser can reach, and the only way
20
+ * to keep it would be to exempt it from the coverage gate.
21
+ */
22
+ export declare function adoptStyles(root: ShadowRoot): void;
23
+ //# sourceMappingURL=adopt_styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adopt_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/shell/adopt_styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAIlD"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A `<slot>` a host can project its own mark into, falling back to one of the
3
+ * built-in glyphs. The markup is an author-written constant, never user or
4
+ * server data, so it is assigned directly rather than sanitised.
5
+ */
6
+ export declare function glyphSlot(slotName: string, className: string, markup: string): HTMLSlotElement;
7
+ //# sourceMappingURL=glyph_slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glyph_slot.d.ts","sourceRoot":"","sources":["../../../src/ui/shell/glyph_slot.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe,CAM9F"}