juneau 0.1.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 (55) hide show
  1. package/README.md +320 -0
  2. package/dist/adapters/dashboardAdapter.d.ts +10 -0
  3. package/dist/adapters/dashboardAdapter.d.ts.map +1 -0
  4. package/dist/adapters/mockAdapter.d.ts +8 -0
  5. package/dist/adapters/mockAdapter.d.ts.map +1 -0
  6. package/dist/components/AiChat/AiChat.d.ts +39 -0
  7. package/dist/components/AiChat/AiChat.d.ts.map +1 -0
  8. package/dist/components/AiChatHeader/AiChatHeader.d.ts +10 -0
  9. package/dist/components/AiChatHeader/AiChatHeader.d.ts.map +1 -0
  10. package/dist/components/AiError/AiError.d.ts +7 -0
  11. package/dist/components/AiError/AiError.d.ts.map +1 -0
  12. package/dist/components/AiInput/AiInput.d.ts +29 -0
  13. package/dist/components/AiInput/AiInput.d.ts.map +1 -0
  14. package/dist/components/AiMessageBubble/AiMessageBubble.d.ts +12 -0
  15. package/dist/components/AiMessageBubble/AiMessageBubble.d.ts.map +1 -0
  16. package/dist/components/AiMessageList/AiMessageList.d.ts +13 -0
  17. package/dist/components/AiMessageList/AiMessageList.d.ts.map +1 -0
  18. package/dist/components/AiSidebar/AiSidebar.d.ts +26 -0
  19. package/dist/components/AiSidebar/AiSidebar.d.ts.map +1 -0
  20. package/dist/components/AiTypingIndicator/AiTypingIndicator.d.ts +2 -0
  21. package/dist/components/AiTypingIndicator/AiTypingIndicator.d.ts.map +1 -0
  22. package/dist/components/JuneauProvider/JuneauProvider.d.ts +43 -0
  23. package/dist/components/JuneauProvider/JuneauProvider.d.ts.map +1 -0
  24. package/dist/components/icons.d.ts +17 -0
  25. package/dist/components/icons.d.ts.map +1 -0
  26. package/dist/components/parts/AiMessagePartRenderer.d.ts +9 -0
  27. package/dist/components/parts/AiMessagePartRenderer.d.ts.map +1 -0
  28. package/dist/components/parts/AiProposalCard.d.ts +9 -0
  29. package/dist/components/parts/AiProposalCard.d.ts.map +1 -0
  30. package/dist/components/parts/AiTablePart.d.ts +7 -0
  31. package/dist/components/parts/AiTablePart.d.ts.map +1 -0
  32. package/dist/core/stream.d.ts +8 -0
  33. package/dist/core/stream.d.ts.map +1 -0
  34. package/dist/core/types.d.ts +59 -0
  35. package/dist/core/types.d.ts.map +1 -0
  36. package/dist/hooks/useAiChat.d.ts +33 -0
  37. package/dist/hooks/useAiChat.d.ts.map +1 -0
  38. package/dist/i18n/context.d.ts +8 -0
  39. package/dist/i18n/context.d.ts.map +1 -0
  40. package/dist/i18n/index.d.ts +4 -0
  41. package/dist/i18n/index.d.ts.map +1 -0
  42. package/dist/i18n/locales/cs.d.ts +3 -0
  43. package/dist/i18n/locales/cs.d.ts.map +1 -0
  44. package/dist/i18n/locales/en.d.ts +3 -0
  45. package/dist/i18n/locales/en.d.ts.map +1 -0
  46. package/dist/i18n/types.d.ts +24 -0
  47. package/dist/i18n/types.d.ts.map +1 -0
  48. package/dist/index.cjs +49 -0
  49. package/dist/index.cjs.map +1 -0
  50. package/dist/index.d.ts +21 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +9513 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/style.css +1 -0
  55. package/package.json +80 -0
package/README.md ADDED
@@ -0,0 +1,320 @@
1
+ # Juneau
2
+
3
+ React component library for building AI chat interfaces. Streaming-first, adapter-based, fully themeable.
4
+
5
+ ```tsx
6
+ import { JuneauProvider, AiSidebar } from 'juneau';
7
+ import 'juneau/dist/style.css';
8
+
9
+ <JuneauProvider>
10
+ <AiSidebar adapter={myAdapter} />
11
+ </JuneauProvider>
12
+ ```
13
+
14
+ ---
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ npm install juneau
20
+ ```
21
+
22
+ Peer dependencies: `react ^18 || ^19`, `react-dom ^18 || ^19`
23
+
24
+ ---
25
+
26
+ ## Core concept — the adapter
27
+
28
+ Juneau never calls any AI API directly. You provide an **adapter** that implements one method:
29
+
30
+ ```ts
31
+ interface AiBackendAdapter {
32
+ sendMessage(input: AiAdapterInput): AsyncIterable<AiStreamEvent>;
33
+ }
34
+ ```
35
+
36
+ The adapter receives the full conversation history and streams back events:
37
+
38
+ ```ts
39
+ type AiStreamEvent =
40
+ | { type: 'text'; text: string } // streamed text chunk
41
+ | { type: 'part'; part: AiTablePart | AiProposalPart | AiErrorPart } // rich content block
42
+ | { type: 'done' } // stream finished
43
+ | { type: 'error'; message: string } // stream failed
44
+ ```
45
+
46
+ ### Minimal adapter example (OpenAI)
47
+
48
+ ```ts
49
+ import type { AiBackendAdapter, AiAdapterInput } from 'juneau';
50
+
51
+ export const openAiAdapter: AiBackendAdapter = {
52
+ async *sendMessage({ messages }: AiAdapterInput) {
53
+ const response = await fetch('/api/chat', {
54
+ method: 'POST',
55
+ headers: { 'Content-Type': 'application/json' },
56
+ body: JSON.stringify({ messages }),
57
+ });
58
+
59
+ const reader = response.body!.getReader();
60
+ const decoder = new TextDecoder();
61
+
62
+ while (true) {
63
+ const { done, value } = await reader.read();
64
+ if (done) break;
65
+ const chunk = decoder.decode(value);
66
+ yield { type: 'text', text: chunk };
67
+ }
68
+
69
+ yield { type: 'done' };
70
+ },
71
+ };
72
+ ```
73
+
74
+ A `mockAdapter` is exported for development — it responds to keywords like `"show"`, `"suggest"`, `"help"`, `"error"`.
75
+
76
+ ---
77
+
78
+ ## Components
79
+
80
+ ### `<JuneauProvider>`
81
+
82
+ Wrap your app (or subtree) once. Provides theme and labels.
83
+
84
+ ```tsx
85
+ import { JuneauProvider, juneauCs } from 'juneau';
86
+
87
+ <JuneauProvider
88
+ theme={{ colorPrimary: '#0f766e', colorAccent: '#14b8a6' }}
89
+ labels={juneauCs}
90
+ >
91
+ {children}
92
+ </JuneauProvider>
93
+ ```
94
+
95
+ | Prop | Type | Description |
96
+ |---|---|---|
97
+ | `theme` | `JuneauTheme` | Override design tokens. Only specified keys are applied. |
98
+ | `labels` | `Partial<JuneauLabels>` | Override UI strings. Omitted keys fall back to English. |
99
+ | `className` | `string` | Added to the root `<div>`. |
100
+ | `style` | `CSSProperties` | Inline styles on the root `<div>`. |
101
+
102
+ ---
103
+
104
+ ### `<AiSidebar>`
105
+
106
+ Self-contained chat panel. Manages its own state via `useAiChat` internally.
107
+
108
+ ```tsx
109
+ <AiSidebar
110
+ adapter={myAdapter}
111
+ title="AI Assistant"
112
+ onProposalConfirm={(id, payload) => console.log('confirmed', id, payload)}
113
+ />
114
+ ```
115
+
116
+ | Prop | Type | Description |
117
+ |---|---|---|
118
+ | `adapter` | `AiBackendAdapter` | **Required.** Your adapter implementation. |
119
+ | `title` | `string` | Overrides the `sidebarTitle` label for this instance. |
120
+ | `context` | `Record<string, unknown>` | Passed through to every `adapter.sendMessage` call. |
121
+ | `icon` | `ReactNode` | Override the header + avatar icon. Defaults to a brain icon. |
122
+ | `actions` | `AiInputAction[]` | Toolbar action buttons. Pass `[]` to hide the toolbar entirely. |
123
+ | `sendIcon` | `ReactNode` | Override the send button icon. |
124
+ | `onProposalConfirm` | `(id, payload) => void` | Called when the user confirms a proposal. |
125
+ | `onProposalCancel` | `(id) => void` | Called when the user cancels a proposal. |
126
+ | `className` | `string` | Added to the `<aside>` element. |
127
+ | `style` | `CSSProperties` | Inline styles on the `<aside>` element. |
128
+
129
+ ---
130
+
131
+ ### `<AiChat>`
132
+
133
+ Headless chat body — message list + input + error banner, no surrounding chrome. Accepts all state as props; the parent calls `useAiChat` and passes results down.
134
+
135
+ Use this when embedding chat in your own layout (dashboard card, modal, full-page).
136
+
137
+ ```tsx
138
+ const chat = useAiChat({ adapter: myAdapter });
139
+
140
+ <AiChat
141
+ messages={chat.messages}
142
+ input={chat.input}
143
+ isLoading={chat.isLoading}
144
+ error={chat.error}
145
+ onInputChange={chat.setInput}
146
+ onSend={chat.sendMessage}
147
+ onStop={chat.stop}
148
+ onProposalConfirm={chat.confirmProposal}
149
+ onProposalCancel={chat.cancelProposal}
150
+ />
151
+ ```
152
+
153
+ | Prop | Type | Description |
154
+ |---|---|---|
155
+ | `messages` | `AiMessage[]` | Conversation history from `useAiChat`. |
156
+ | `input` | `string` | Current input value. |
157
+ | `isLoading` | `boolean` | Whether a stream is in progress. |
158
+ | `error` | `string \| null` | Last error message, or `null`. |
159
+ | `onInputChange` | `(value: string) => void` | Input change handler. |
160
+ | `onSend` | `() => void` | Send the current input. |
161
+ | `onStop` | `() => void` | Abort the in-flight stream. Shows a stop button while loading. |
162
+ | `onProposalConfirm` | `(id, payload) => void` | Proposal confirmed. |
163
+ | `onProposalCancel` | `(id) => void` | Proposal cancelled. |
164
+ | `assistantIcon` | `ReactNode` | Override assistant avatar icon in all message bubbles. |
165
+ | `actions` | `AiInputAction[]` | Toolbar action buttons. |
166
+ | `sendIcon` | `ReactNode` | Override send button icon. |
167
+ | `placeholder` | `string` | Input placeholder text. |
168
+
169
+ ---
170
+
171
+ ## `useAiChat` hook
172
+
173
+ For full control. Returns everything you need to wire up a custom layout.
174
+
175
+ ```ts
176
+ const {
177
+ messages, // AiMessage[] — full conversation
178
+ input, // string — current textarea value
179
+ setInput, // (value: string) => void
180
+ sendMessage, // () => Promise<void> — sends current input
181
+ sendMessageWithText, // (text: string) => Promise<void> — send programmatically
182
+ sendGreeting, // (contextHint: string) => Promise<void> — assistant-only message, no user bubble
183
+ stop, // () => void — abort in-flight stream, keep messages
184
+ isLoading, // boolean
185
+ error, // string | null
186
+ reset, // () => void — clear all messages and abort stream
187
+ confirmProposal, // (id: string, payload: unknown) => void
188
+ cancelProposal, // (id: string) => void
189
+ } = useAiChat({
190
+ adapter,
191
+ context, // optional — passed through to every adapter call
192
+ onProposalConfirm, // optional callback
193
+ onProposalCancel, // optional callback
194
+ });
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Message parts
200
+
201
+ Assistant messages are composed of typed **parts**. The adapter emits them as stream events and `useAiChat` assembles them into `AiMessage.parts`:
202
+
203
+ | Part type | Description | Rendered by |
204
+ |---|---|---|
205
+ | `text` | Markdown string | `AiMessagePartRenderer` (via `react-markdown`) |
206
+ | `table` | Columns + rows | `AiTablePart` |
207
+ | `proposal` | Action card with confirm/cancel | `AiProposalCard` |
208
+ | `error` | Inline error in the message | `AiMessagePartRenderer` |
209
+
210
+ Emit a rich part from your adapter:
211
+
212
+ ```ts
213
+ yield {
214
+ type: 'part',
215
+ part: {
216
+ type: 'proposal',
217
+ proposal: {
218
+ id: 'confirm-delete',
219
+ title: 'Delete this item?',
220
+ description: 'This cannot be undone.',
221
+ confirmLabel: 'Delete',
222
+ cancelLabel: 'Keep',
223
+ payload: { itemId: 42 }, // passed back to onProposalConfirm
224
+ },
225
+ },
226
+ };
227
+ ```
228
+
229
+ ---
230
+
231
+ ## Theming
232
+
233
+ All visual values are CSS custom properties prefixed `--juneau-`. Pass overrides via `JuneauProvider`:
234
+
235
+ ```tsx
236
+ <JuneauProvider theme={{
237
+ colorPrimary: '#1d4ed8',
238
+ colorAccent: '#7c3aed',
239
+ radiusLg: '16px',
240
+ fontFamily: '"Inter", sans-serif',
241
+ }}>
242
+ ```
243
+
244
+ All theme keys are optional — only what you provide is overridden.
245
+
246
+ | Key | CSS variable | Default |
247
+ |---|---|---|
248
+ | `colorPrimary` | `--juneau-color-primary` | `#000000` |
249
+ | `colorAccent` | `--juneau-color-accent` | `#FF49A4` |
250
+ | `colorSurface` | `--juneau-color-surface` | `#FFFFFF` |
251
+ | `colorSurfaceRaised` | `--juneau-color-surface-raised` | `#F4F4F6` |
252
+ | `colorBorder` | `--juneau-color-border` | `#E8E8EC` |
253
+ | `colorTextPrimary` | `--juneau-color-text-primary` | `#000000` |
254
+ | `radiusSm` / `radiusMd` / `radiusLg` | `--juneau-radius-*` | `6px / 8px / 12px` |
255
+ | `fontFamily` | `--juneau-font-family` | system-ui stack |
256
+
257
+ ---
258
+
259
+ ## i18n / Labels
260
+
261
+ All UI strings are overridable. Built-in locales: `juneauEn` (default) and `juneauCs`.
262
+
263
+ ```tsx
264
+ import { juneauCs } from 'juneau';
265
+ <JuneauProvider labels={juneauCs}>...</JuneauProvider>
266
+ ```
267
+
268
+ Pass any `Partial<JuneauLabels>` — omitted keys fall back to English:
269
+
270
+ ```tsx
271
+ <JuneauProvider labels={{ sidebarTitle: 'Ask AI', sendMessage: 'Send' }}>
272
+ ```
273
+
274
+ | Key | Default (EN) |
275
+ |---|---|
276
+ | `sidebarTitle` | `AI Assistant` |
277
+ | `clearConversation` | `Clear conversation` |
278
+ | `inputPlaceholder` | `Ask a question… (Enter to send)` |
279
+ | `sendMessage` | `Send message` |
280
+ | `stopMessage` | `Stop` |
281
+ | `emptyStateText` | `How can I help you today?` |
282
+ | `emptyStateHint` | `Try: "Show me the data" or "Can you suggest something?"` |
283
+ | `proposalConfirm` | `Confirm` |
284
+ | `proposalCancel` | `Cancel` |
285
+ | `errorDismiss` | `Dismiss` |
286
+ | `actionAddFile` | `Add file` |
287
+ | `actionQuickActions` | `Quick actions` |
288
+ | `actionNew` | `New` |
289
+ | `actionHistory` | `History` |
290
+ | `actionRules` | `Rules` |
291
+
292
+ ---
293
+
294
+ ## Custom toolbar actions
295
+
296
+ ```tsx
297
+ import { IconBolt } from './my-icons'; // any ReactNode
298
+
299
+ <AiSidebar
300
+ adapter={myAdapter}
301
+ actions={[
302
+ { icon: <IconBolt />, label: 'Quick actions', onClick: () => openMenu() },
303
+ ]}
304
+ />
305
+
306
+ // Hide toolbar entirely:
307
+ <AiSidebar adapter={myAdapter} actions={[]} />
308
+ ```
309
+
310
+ ---
311
+
312
+ ## Security
313
+
314
+ Juneau never handles API keys — all AI calls happen in your adapter. Text parts are rendered via `react-markdown`, which never uses `dangerouslySetInnerHTML` and is safe against XSS by default.
315
+
316
+ ---
317
+
318
+ ## License
319
+
320
+ MIT
@@ -0,0 +1,10 @@
1
+ import type { AiBackendAdapter } from '../core/types';
2
+ /**
3
+ * Mock adapter for the dashboard (proactive) demo.
4
+ *
5
+ * On first load the dashboard sends a synthetic "init" message so the AI
6
+ * can greet the user with a contextual summary — no user input required.
7
+ * Subsequent messages fall through to the standard keyword scenarios.
8
+ */
9
+ export declare const dashboardAdapter: AiBackendAdapter;
10
+ //# sourceMappingURL=dashboardAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboardAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/dashboardAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,eAAe,CAAC;AAErF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAgB9B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { AiBackendAdapter } from '../core/types';
2
+ /**
3
+ * Simulates AI streaming responses for development and testing.
4
+ * Triggers different scenarios based on keywords in the last user message.
5
+ * Replace with a real adapter (OpenAI, Anthropic, custom backend) in production.
6
+ */
7
+ export declare const mockAdapter: AiBackendAdapter;
8
+ //# sourceMappingURL=mockAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/mockAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,eAAe,CAAC;AAErF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,gBAkBzB,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { AiMessage } from '../../core/types';
3
+ import type { AiInputAction } from '../AiInput/AiInput';
4
+ type Props = {
5
+ messages: AiMessage[];
6
+ input: string;
7
+ isLoading: boolean;
8
+ error: string | null;
9
+ onInputChange: (value: string) => void;
10
+ onSend: () => void;
11
+ /** Called when the user cancels the in-flight stream. Shown as a stop button while isLoading. */
12
+ onStop?: () => void;
13
+ onProposalConfirm: (proposalId: string, payload: unknown) => void;
14
+ onProposalCancel: (proposalId: string) => void;
15
+ placeholder?: string;
16
+ /** Override the assistant avatar icon. Forwarded to every message bubble. */
17
+ assistantIcon?: ReactNode;
18
+ /**
19
+ * Toolbar action buttons rendered left of the send button.
20
+ * Pass an empty array to hide the toolbar entirely.
21
+ * Defaults to five built-in actions (attach, quick actions, new, history, rules).
22
+ */
23
+ actions?: AiInputAction[];
24
+ /** Override the send button icon. Defaults to a paper-plane icon. */
25
+ sendIcon?: ReactNode;
26
+ className?: string;
27
+ style?: CSSProperties;
28
+ };
29
+ /**
30
+ * Presentational chat body — message list, input bar, and error banner.
31
+ * Contains no state or hooks. The parent is responsible for calling useAiChat
32
+ * and passing the results here.
33
+ *
34
+ * Used by AiSidebar (inside the sidebar chrome) and directly in dashboard
35
+ * or any other layout where you want chat without the sidebar wrapper.
36
+ */
37
+ export declare function AiChat({ messages, input, isLoading, error, onInputChange, onSend, onStop, onProposalConfirm, onProposalCancel, placeholder, assistantIcon, actions, sendIcon, className, style, }: Props): import("react").JSX.Element;
38
+ export {};
39
+ //# sourceMappingURL=AiChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiChat.d.ts","sourceRoot":"","sources":["../../../src/components/AiChat/AiChat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,iGAAiG;IACjG,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,KAAK,EACL,SAAS,EACT,KAAK,EACL,aAAa,EACb,MAAM,EACN,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,GACN,EAAE,KAAK,+BA4BP"}
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ type Props = {
3
+ title?: string;
4
+ onReset?: () => void;
5
+ /** Override the avatar icon. Pass any ReactNode — an SVG, img, or component. Defaults to a brain icon. */
6
+ icon?: ReactNode;
7
+ };
8
+ export declare function AiChatHeader({ title, onReset, icon }: Props): import("react").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=AiChatHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiChatHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AiChatHeader/AiChatHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,0GAA0G;IAC1G,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,+BAuB3D"}
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ message: string;
3
+ onDismiss?: () => void;
4
+ };
5
+ export declare function AiError({ message, onDismiss }: Props): import("react").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=AiError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiError.d.ts","sourceRoot":"","sources":["../../../src/components/AiError/AiError.tsx"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,KAAK,+BAkBpD"}
@@ -0,0 +1,29 @@
1
+ import type { ReactNode } from 'react';
2
+ export type AiInputAction = {
3
+ /** Icon rendered inside the button. */
4
+ icon: ReactNode;
5
+ /** Visible label and aria-label for the button. */
6
+ label: string;
7
+ onClick?: () => void;
8
+ };
9
+ type Props = {
10
+ value: string;
11
+ onChange: (value: string) => void;
12
+ onSend: () => void;
13
+ /** When provided, the send button becomes a stop button while isLoading is true. */
14
+ onStop?: () => void;
15
+ isLoading: boolean;
16
+ /** Overrides the `inputPlaceholder` label for this specific instance. */
17
+ placeholder?: string;
18
+ /**
19
+ * Toolbar action buttons rendered left of the send button.
20
+ * Pass an empty array to hide the toolbar entirely.
21
+ * Defaults to five built-in actions (attach, quick actions, new, history, rules).
22
+ */
23
+ actions?: AiInputAction[];
24
+ /** Override the send button icon. Defaults to a paper-plane icon. */
25
+ sendIcon?: ReactNode;
26
+ };
27
+ export declare function AiInput({ value, onChange, onSend, onStop, isLoading, placeholder, actions, sendIcon }: Props): import("react").JSX.Element;
28
+ export {};
29
+ //# sourceMappingURL=AiInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiInput.d.ts","sourceRoot":"","sources":["../../../src/components/AiInput/AiInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAYtD,MAAM,MAAM,aAAa,GAAG;IAC1B,uCAAuC;IACvC,IAAI,EAAE,SAAS,CAAC;IAChB,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,+BAqF5G"}
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { AiMessage } from '../../core/types';
3
+ type Props = {
4
+ message: AiMessage;
5
+ onProposalConfirm: (proposalId: string, payload: unknown) => void;
6
+ onProposalCancel: (proposalId: string) => void;
7
+ /** Override the assistant avatar icon. Pass any ReactNode — an SVG, img, or component. Defaults to a brain icon. */
8
+ assistantIcon?: ReactNode;
9
+ };
10
+ export declare function AiMessageBubble({ message, onProposalConfirm, onProposalCancel, assistantIcon }: Props): import("react").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=AiMessageBubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/AiMessageBubble/AiMessageBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,SAAS,CAAC;IACnB,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,oHAAoH;IACpH,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,EAAE,KAAK,+BA0BrG"}
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { AiMessage } from '../../core/types';
3
+ type Props = {
4
+ messages: AiMessage[];
5
+ isLoading: boolean;
6
+ onProposalConfirm: (proposalId: string, payload: unknown) => void;
7
+ onProposalCancel: (proposalId: string) => void;
8
+ /** Override the assistant avatar icon. Forwarded to every AiMessageBubble. */
9
+ assistantIcon?: ReactNode;
10
+ };
11
+ export declare function AiMessageList({ messages, isLoading, onProposalConfirm, onProposalCancel, assistantIcon }: Props): import("react").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=AiMessageList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiMessageList.d.ts","sourceRoot":"","sources":["../../../src/components/AiMessageList/AiMessageList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAMlD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,8EAA8E;IAC9E,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,EAAE,KAAK,+BAmC/G"}
@@ -0,0 +1,26 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { AiBackendAdapter } from '../../core/types';
3
+ import type { AiInputAction } from '../AiInput/AiInput';
4
+ type Props = {
5
+ adapter: AiBackendAdapter;
6
+ /** Overrides the `sidebarTitle` label for this instance only. */
7
+ title?: string;
8
+ context?: Record<string, unknown>;
9
+ onProposalConfirm?: (proposalId: string, payload: unknown) => void;
10
+ onProposalCancel?: (proposalId: string) => void;
11
+ /** Override the header and assistant avatar icon. Defaults to a brain icon. */
12
+ icon?: ReactNode;
13
+ /**
14
+ * Toolbar action buttons rendered left of the send button.
15
+ * Pass an empty array to hide the toolbar entirely.
16
+ * Defaults to five built-in actions (attach, quick actions, new, history, rules).
17
+ */
18
+ actions?: AiInputAction[];
19
+ /** Override the send button icon. Defaults to a paper-plane icon. */
20
+ sendIcon?: ReactNode;
21
+ className?: string;
22
+ style?: CSSProperties;
23
+ };
24
+ export declare function AiSidebar({ adapter, title, context, onProposalConfirm, onProposalCancel, icon, actions, sendIcon, className, style, }: Props): import("react").JSX.Element;
25
+ export {};
26
+ //# sourceMappingURL=AiSidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/AiSidebar/AiSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,gBAAgB,CAAC;IAC1B,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,+EAA+E;IAC/E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,GACN,EAAE,KAAK,+BA+CP"}
@@ -0,0 +1,2 @@
1
+ export declare function AiTypingIndicator(): import("react").JSX.Element;
2
+ //# sourceMappingURL=AiTypingIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiTypingIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/AiTypingIndicator/AiTypingIndicator.tsx"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,gCAQhC"}
@@ -0,0 +1,43 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import '../../styles/tokens.css';
3
+ import type { JuneauLabels } from '../../i18n/types';
4
+ export type { JuneauLabels };
5
+ export type JuneauTheme = {
6
+ colorPrimary?: string;
7
+ colorPrimaryDark?: string;
8
+ colorPrimaryLight?: string;
9
+ colorPrimaryBorder?: string;
10
+ colorAccent?: string;
11
+ colorAccentDark?: string;
12
+ colorAccentLight?: string;
13
+ colorAccentBorder?: string;
14
+ colorSurface?: string;
15
+ colorSurfaceRaised?: string;
16
+ colorSurfaceHover?: string;
17
+ colorBorder?: string;
18
+ colorBorderSubtle?: string;
19
+ colorTextPrimary?: string;
20
+ colorTextSecondary?: string;
21
+ colorTextMuted?: string;
22
+ colorTextFaint?: string;
23
+ colorTextInverse?: string;
24
+ colorAssistantAvatar?: string;
25
+ radiusSm?: string;
26
+ radiusMd?: string;
27
+ radiusLg?: string;
28
+ /** Override the font family used across all Juneau components. */
29
+ fontFamily?: string;
30
+ };
31
+ type Props = {
32
+ children: ReactNode;
33
+ theme?: JuneauTheme;
34
+ /**
35
+ * Override any subset of UI strings. Unspecified keys fall back to English.
36
+ * Use the exported `juneauCs` or `juneauEn` objects, or build your own from `JuneauLabels`.
37
+ */
38
+ labels?: Partial<JuneauLabels>;
39
+ className?: string;
40
+ style?: CSSProperties;
41
+ };
42
+ export declare function JuneauProvider({ children, theme, labels, className, style }: Props): import("react").JSX.Element;
43
+ //# sourceMappingURL=JuneauProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JuneauProvider.d.ts","sourceRoot":"","sources":["../../../src/components/JuneauProvider/JuneauProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,+BAiBlF"}
@@ -0,0 +1,17 @@
1
+ import type { CSSProperties } from 'react';
2
+ type IconProps = {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ 'aria-hidden'?: boolean | 'true' | 'false';
6
+ };
7
+ export declare function IconBrain({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
8
+ export declare function IconPaperPlane({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
9
+ export declare function IconPaperclip({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
10
+ export declare function IconBolt({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
11
+ export declare function IconPlus({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
12
+ export declare function IconClockRotateLeft({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
13
+ export declare function IconScroll({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
14
+ export declare function IconArrowRotateLeft({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
15
+ export declare function IconWarning({ className, style, 'aria-hidden': ariaHidden }: IconProps): import("react").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,KAAK,SAAS,GAAG;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;CAC5C,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAc1F;AAED,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAc/F;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAc9F;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAczF;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAczF;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAcpG;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAc3F;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAcpG;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,UAAiB,EAAE,EAAE,SAAS,+BAa5F"}
@@ -0,0 +1,9 @@
1
+ import type { AiMessagePart } from '../../core/types';
2
+ type Props = {
3
+ part: AiMessagePart;
4
+ onProposalConfirm: (proposalId: string, payload: unknown) => void;
5
+ onProposalCancel: (proposalId: string) => void;
6
+ };
7
+ export declare function AiMessagePartRenderer({ part, onProposalConfirm, onProposalCancel }: Props): import("react").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=AiMessagePartRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiMessagePartRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/parts/AiMessagePartRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,aAAa,CAAC;IACpB,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,KAAK,+BA2BzF"}
@@ -0,0 +1,9 @@
1
+ import type { AiProposalPart } from '../../core/types';
2
+ type Props = {
3
+ part: AiProposalPart;
4
+ onConfirm: (proposalId: string, payload: unknown) => void;
5
+ onCancel: (proposalId: string) => void;
6
+ };
7
+ export declare function AiProposalCard({ part, onConfirm, onCancel }: Props): import("react").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=AiProposalCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiProposalCard.d.ts","sourceRoot":"","sources":["../../../src/components/parts/AiProposalCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,KAAK,+BA+BlE"}
@@ -0,0 +1,7 @@
1
+ import type { AiTablePart as AiTablePartType } from '../../core/types';
2
+ type Props = {
3
+ part: AiTablePartType;
4
+ };
5
+ export declare function AiTablePart({ part }: Props): import("react").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=AiTablePart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiTablePart.d.ts","sourceRoot":"","sources":["../../../src/components/parts/AiTablePart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGvE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,+BAyB1C"}
@@ -0,0 +1,8 @@
1
+ import type { AiStreamEvent } from './types';
2
+ export declare const delay: (ms: number) => Promise<void>;
3
+ /**
4
+ * Iterates over an AsyncIterable of stream events and calls the handler for each.
5
+ * Automatically handles cancellation via AbortSignal.
6
+ */
7
+ export declare function consumeStream(iterable: AsyncIterable<AiStreamEvent>, onEvent: (event: AiStreamEvent) => void, signal?: AbortSignal): Promise<void>;
8
+ //# sourceMappingURL=stream.d.ts.map