@alexkroman1/aai-ui 13.1.0 → 13.3.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/dist/{_colors-j8XMToi9.js → _colors-CZ6OlPbL.js} +1 -1
- package/dist/{_module-url-C_4gRVL0.js → _module-url-C13kAJ87.js} +1 -1
- package/dist/_recover-run.d.ts +11 -5
- package/dist/{_utils-B6498_bm.js → _utils-CyzjK0gW.js} +1 -1
- package/dist/{aai-logo-CXZGPSIY.js → aai-logo-CFlomZlS.js} +1 -1
- package/dist/audio.js +1 -1
- package/dist/{chat-view-DDTtrh7N.js → chat-view-Bv5VFJIE.js} +6 -6
- package/dist/{client-config-BT_kWID5.js → client-config-DD820zHn.js} +1 -1
- package/dist/client-dir.js +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/chat-view.js +1 -1
- package/dist/components/controls.js +2 -2
- package/dist/components/message-list.js +1 -1
- package/dist/components/sidebar-layout.js +1 -1
- package/dist/components/start-screen.js +4 -4
- package/dist/components/tool-call-block.js +1 -1
- package/dist/context.js +1 -1
- package/dist/default-client.d.ts +1 -1
- package/dist/define-client.js +6 -6
- package/dist/{eyebrow-C6ZFuiz6.js → eyebrow-UfmSz9yy.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1168 -1114
- package/dist/internal.js +5 -5
- package/dist/{message-list-BJYyuIcR.js → message-list-C0pL7x41.js} +7 -7
- package/dist/{session-core-DxBYsfHA.js → session-core-C9elBIdu.js} +11 -11
- package/dist/session-core.js +1 -1
- package/dist/{tool-call-block-tcPQAkcP.js → tool-call-block-Bunc6rCw.js} +6 -6
- package/dist/{tool-config-context-DzAofqi_.js → tool-config-context-Bh8p3DtG.js} +1 -1
- package/dist/types.js +1 -1
- package/dist/{url-chips-YqhCjWfQ.js → url-chips-C2u7QPv8.js} +3 -3
- package/dist/use-run-key.d.ts +44 -10
- package/dist/{use-user-transcript-C14qWFu2.js → use-user-transcript-DFTSEuZN.js} +1 -1
- package/dist/use-workflow-form.d.ts +31 -90
- package/dist/{use-workflow-progress-Cu0SxMyg.js → use-workflow-run-CXGEcM0l.js} +256 -256
- package/dist/use-workflow-stream.d.ts +4 -1
- package/dist/use-workflows.d.ts +77 -0
- package/dist/worklets/capture-processor.js +2 -2
- package/dist/worklets/playback-processor.js +2 -2
- package/package.json +6 -6
- package/dist/tsdown.config.d.ts +0 -2
package/dist/_recover-run.d.ts
CHANGED
|
@@ -37,12 +37,18 @@
|
|
|
37
37
|
* `useWorkflows`, for the same reason: an empty answer here is a confident
|
|
38
38
|
* false statement.
|
|
39
39
|
*
|
|
40
|
-
* ## It is
|
|
40
|
+
* ## It is ON by default, and it used to be opt-in
|
|
41
41
|
*
|
|
42
|
-
*
|
|
43
|
-
* a voice agent's `ctx.workflows.start({ key })`
|
|
44
|
-
*
|
|
45
|
-
*
|
|
42
|
+
* The argument for opt-in was that a `key` on its own means only "record this
|
|
43
|
+
* with the run" — which is what a voice agent's `ctx.workflows.start({ key })`
|
|
44
|
+
* means, there being no page to put a run back on. A FORM is the other case: it
|
|
45
|
+
* is the page, and losing the run is the thing it cannot recover from. Six of
|
|
46
|
+
* six page templates wrote `useRunKey()` and `recover: true` together, which is
|
|
47
|
+
* the same shape `session-resume-store.ts` names on the voice side — a default
|
|
48
|
+
* in the wrong place — so `useWorkflowSubmit` now mints the key and asks.
|
|
49
|
+
*
|
|
50
|
+
* `enabled` remains, because `recover: false` remains: a page whose form must
|
|
51
|
+
* always open empty says so, and then nothing here runs.
|
|
46
52
|
*/
|
|
47
53
|
import type { WorkflowApi } from "./workflow-client.ts";
|
|
48
54
|
/** What {@link useRecoveredRun} needs. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTheme } from "./context.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { memo } from "react";
|
|
4
|
-
//#region components/aai-logo.tsx
|
|
4
|
+
//#region src/components/aai-logo.tsx
|
|
5
5
|
/** @jsxImportSource react */
|
|
6
6
|
/**
|
|
7
7
|
* The AssemblyAI wordmark (design-system "website refresh" asset).
|
package/dist/audio.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CAPTURE_STOP_ACK_TIMEOUT_MS, PLAYBACK_DONE_MAX_WAIT_MS, PLAYBACK_DONE_POLL_MS, VOICE_CAPTURE_CONSTRAINTS } from "./types.js";
|
|
2
|
-
//#region audio.ts
|
|
2
|
+
//#region src/audio.ts
|
|
3
3
|
/**
|
|
4
4
|
* Throw unless the browser honored a requested context sample rate. The
|
|
5
5
|
* requested rates are never advisory: captured audio is tagged with the
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as MessageList } from "./message-list-
|
|
1
|
+
import { t as MessageList } from "./message-list-C0pL7x41.js";
|
|
2
2
|
import { useSessionSelector, useTheme } from "./context.js";
|
|
3
|
-
import { n as THINKING_COLOR, r as inkTint, t as ERROR_COLOR } from "./_colors-
|
|
4
|
-
import { t as AaiLogo } from "./aai-logo-
|
|
5
|
-
import { t as Eyebrow } from "./eyebrow-
|
|
3
|
+
import { n as THINKING_COLOR, r as inkTint, t as ERROR_COLOR } from "./_colors-CZ6OlPbL.js";
|
|
4
|
+
import { t as AaiLogo } from "./aai-logo-CFlomZlS.js";
|
|
5
|
+
import { t as Eyebrow } from "./eyebrow-UfmSz9yy.js";
|
|
6
6
|
import { Controls } from "./components/controls.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
//#region components/console-shell.tsx
|
|
9
|
+
//#region src/components/console-shell.tsx
|
|
10
10
|
/** @jsxImportSource react */
|
|
11
11
|
/**
|
|
12
12
|
* Indicator dot color per state.
|
|
@@ -138,7 +138,7 @@ function ConsoleShell({ icon, title, state, pulsing, error, children, footer, cl
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
//#endregion
|
|
141
|
-
//#region components/chat-view.tsx
|
|
141
|
+
//#region src/components/chat-view.tsx
|
|
142
142
|
const PULSING_STATES = /* @__PURE__ */ new Set(["listening", "speaking"]);
|
|
143
143
|
/**
|
|
144
144
|
* The main chat interface for a voice agent session — the design-system
|
package/dist/client-dir.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useTheme } from "../context.js";
|
|
2
|
-
import { i as primaryTint, r as inkTint } from "../_colors-
|
|
2
|
+
import { i as primaryTint, r as inkTint } from "../_colors-CZ6OlPbL.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region components/button.tsx
|
|
5
|
+
//#region src/components/button.tsx
|
|
6
6
|
/** @jsxImportSource react */
|
|
7
7
|
/** One variant's rest and hover colors, derived from the theme. */
|
|
8
8
|
function variantColors(variant, theme) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useSessionCore, useSessionSelector } from "../context.js";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
|
-
import { n as SessionUrlChips } from "../url-chips-
|
|
3
|
+
import { n as SessionUrlChips } from "../url-chips-C2u7QPv8.js";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { memo } from "react";
|
|
7
|
-
//#region components/controls.tsx
|
|
7
|
+
//#region src/components/controls.tsx
|
|
8
8
|
/** @jsxImportSource react */
|
|
9
9
|
/**
|
|
10
10
|
* Session control buttons: **Stop / Resume** and **New Conversation**.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTheme } from "../context.js";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
//#region components/sidebar-layout.tsx
|
|
4
|
+
//#region src/components/sidebar-layout.tsx
|
|
5
5
|
/** @jsxImportSource react */
|
|
6
6
|
/**
|
|
7
7
|
* A two-column layout with a fixed-width sidebar and a flexible main area.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useSessionCore, useSessionSelector, useTheme } from "../context.js";
|
|
2
|
-
import { r as inkTint } from "../_colors-
|
|
2
|
+
import { r as inkTint } from "../_colors-CZ6OlPbL.js";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
|
-
import { t as AaiLogo } from "../aai-logo-
|
|
5
|
-
import { t as Eyebrow } from "../eyebrow-
|
|
4
|
+
import { t as AaiLogo } from "../aai-logo-CFlomZlS.js";
|
|
5
|
+
import { t as Eyebrow } from "../eyebrow-UfmSz9yy.js";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
//#region components/start-screen.tsx
|
|
8
|
+
//#region src/components/start-screen.tsx
|
|
9
9
|
/** @jsxImportSource react */
|
|
10
10
|
/**
|
|
11
11
|
* A centered start screen: a white card on the cream page with the logo, an
|
package/dist/context.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, createElement, useContext, useEffect, useMemo, useSyncExternalStore } from "react";
|
|
2
2
|
import { useSyncExternalStoreWithSelector } from "use-sync-external-store/with-selector";
|
|
3
|
-
//#region context.ts
|
|
3
|
+
//#region src/context.ts
|
|
4
4
|
const DEFAULT_THEME = {
|
|
5
5
|
bg: "#FBF8F2",
|
|
6
6
|
primary: "#3F2BC1",
|
package/dist/default-client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @jsxImportSource react */
|
|
2
|
-
import "
|
|
2
|
+
import "../styles.css";
|
package/dist/define-client.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { n as fetchClientConfig } from "./client-config-
|
|
1
|
+
import { n as fetchClientConfig } from "./client-config-DD820zHn.js";
|
|
2
2
|
import { SessionProvider, ThemeProvider } from "./context.js";
|
|
3
|
-
import { t as ChatView } from "./chat-view-
|
|
4
|
-
import { n as setPageTitle, t as pageBaseUrl } from "./_utils-
|
|
5
|
-
import { t as ToolConfigContext } from "./tool-config-context-
|
|
3
|
+
import { t as ChatView } from "./chat-view-Bv5VFJIE.js";
|
|
4
|
+
import { n as setPageTitle, t as pageBaseUrl } from "./_utils-CyzjK0gW.js";
|
|
5
|
+
import { t as ToolConfigContext } from "./tool-config-context-Bh8p3DtG.js";
|
|
6
6
|
import { SidebarLayout } from "./components/sidebar-layout.js";
|
|
7
7
|
import { StartScreen } from "./components/start-screen.js";
|
|
8
|
-
import { t as createSessionCore } from "./session-core-
|
|
8
|
+
import { t as createSessionCore } from "./session-core-C9elBIdu.js";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
import { createElement, useEffect, useState } from "react";
|
|
11
11
|
import { flushSync } from "react-dom";
|
|
12
12
|
import { createRoot } from "react-dom/client";
|
|
13
|
-
//#region define-client.tsx
|
|
13
|
+
//#region src/define-client.tsx
|
|
14
14
|
/** @jsxImportSource react */
|
|
15
15
|
/**
|
|
16
16
|
* The element a mount renders into.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTheme } from "./context.js";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
//#region components/eyebrow.tsx
|
|
4
|
+
//#region src/components/eyebrow.tsx
|
|
5
5
|
/** @jsxImportSource react */
|
|
6
6
|
/**
|
|
7
7
|
* Eyebrow label — the design system's small outlined pill with ALL-CAPS,
|
package/dist/hooks.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSessionSelector } from "./context.js";
|
|
2
|
-
import { i as tryParseJSON } from "./_utils-
|
|
2
|
+
import { i as tryParseJSON } from "./_utils-CyzjK0gW.js";
|
|
3
3
|
import { useEffect, useMemo, useRef } from "react";
|
|
4
|
-
//#region hooks.ts
|
|
4
|
+
//#region src/hooks.ts
|
|
5
5
|
/** Index of the first item whose sequence number is above the watermark (tail scan from the end). */
|
|
6
6
|
function tailStart(items, seqOf, watermark) {
|
|
7
7
|
let start = items.length;
|
package/dist/index.d.ts
CHANGED
|
@@ -27,11 +27,12 @@ export { type ConversationItem, type UseConversationResult, useConversation, } f
|
|
|
27
27
|
export { type UseDownloadUrlOptions, type UseDownloadUrlResult, useDownloadUrl, } from "./use-download-url.ts";
|
|
28
28
|
export { useRunKey } from "./use-run-key.ts";
|
|
29
29
|
export { type UseUserTranscriptResult, useUserTranscript } from "./use-user-transcript.ts";
|
|
30
|
-
export { type UploadStatus, type UseWorkflowSubmitOptions,
|
|
30
|
+
export { type UploadStatus, type UseWorkflowSubmitOptions, useWorkflowSubmit, type WorkflowSubmission, } from "./use-workflow-form.ts";
|
|
31
31
|
export { type UseWorkflowProgressResult, useWorkflowProgress, } from "./use-workflow-progress.ts";
|
|
32
32
|
export { type UseWorkflowRunResult, useWorkflowRun } from "./use-workflow-run.ts";
|
|
33
33
|
export { type UseWorkflowRunsOptions, type UseWorkflowRunsResult, useWorkflowRuns, } from "./use-workflow-runs.ts";
|
|
34
34
|
export { type UseWorkflowStreamOptions, useWorkflowStream, type WorkflowStreamSubmission, } from "./use-workflow-stream.ts";
|
|
35
|
+
export { type UseWorkflowsOptions, type UseWorkflowsResult, useWorkflows, } from "./use-workflows.ts";
|
|
35
36
|
export { createWorkflowApi, isTerminal, type WorkflowApi, type WorkflowApiOptions, type WorkflowInputOf, type WorkflowOutputOf, type WorkflowRun, type WorkflowRunStatus, type WorkflowSummary, } from "./workflow-client.ts";
|
|
36
37
|
export type { SubmitInputOf } from "./workflow-def-types.ts";
|
|
37
38
|
export { WORKFLOW_STATUS_LABELS } from "./workflow-status-labels.ts";
|