@alexkroman1/aai-ui 7.0.0 → 8.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.
@@ -26,7 +26,7 @@
26
26
  * the whole reason to derive rather than hardcode.
27
27
  */
28
28
  function inkTint(text, surface, pct) {
29
- return `color-mix(in srgb, ${text} ${pct}%, ${surface})`;
29
+ return mixInto(text, surface, pct);
30
30
  }
31
31
  /** Error red tuned for warm light surfaces. */
32
32
  const ERROR_COLOR = "#B3261E";
@@ -38,7 +38,18 @@ const THINKING_COLOR = "#B98900";
38
38
  * coherent tinted bubble instead of a hardcoded indigo.
39
39
  */
40
40
  function primaryTint(primary, surface, pct) {
41
- return `color-mix(in srgb, ${primary} ${pct}%, ${surface})`;
41
+ return mixInto(primary, surface, pct);
42
+ }
43
+ /**
44
+ * The blend itself — `pct` of `color` over `ground`, in sRGB.
45
+ *
46
+ * One definition rather than one per axis: {@link inkTint} and
47
+ * {@link primaryTint} differ in WHICH theme color they walk from, which is what
48
+ * their names carry, and not in how the walk is spelled. Two copies of the
49
+ * `color-mix()` string are two places a change of color space has to land.
50
+ */
51
+ function mixInto(color, ground, pct) {
52
+ return `color-mix(in srgb, ${color} ${pct}%, ${ground})`;
42
53
  }
43
54
  //#endregion
44
55
  export { primaryTint as i, THINKING_COLOR as n, inkTint as r, ERROR_COLOR as t };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The two buttons a page puts over a live upload, bound to whichever gate the
3
+ * submission is currently holding.
4
+ *
5
+ * `useWorkflowSubmit` and `useWorkflowStream` both own an {@link UploadGate} and
6
+ * both reported the pause the same way: park the gate, then fold `paused` into
7
+ * the status the bar is already drawing. Folded rather than replaced, because
8
+ * everything else about that status — which file, how far, of how many — is
9
+ * still true. Two copies of that rule are two copies that can stop agreeing
10
+ * about what a paused bar says.
11
+ */
12
+ import { type Dispatch, type SetStateAction } from "react";
13
+ import type { UploadGate } from "./_upload-session.ts";
14
+ import type { UploadStatus } from "./use-workflow-form.ts";
15
+ /** What {@link useUploadPause} returns — see {@link WorkflowSubmission}. */
16
+ export type UploadPause = {
17
+ /** Stop the bytes in flight and hold the uploader. */
18
+ pauseUpload: () => void;
19
+ /** Send whatever the store is still missing. */
20
+ resumeUpload: () => void;
21
+ };
22
+ /**
23
+ * Bind pause/resume to the live submission's gate.
24
+ *
25
+ * @param getGate - Reads the gate out of the caller's ref, so the callbacks stay
26
+ * stable across submissions rather than being re-created per gate.
27
+ * @param setUpload - The status setter the progress bar renders from.
28
+ *
29
+ * @internal
30
+ */
31
+ export declare function useUploadPause(getGate: () => UploadGate | undefined, setUpload: Dispatch<SetStateAction<UploadStatus | undefined>>): UploadPause;
@@ -1,6 +1,6 @@
1
- import { t as MessageList } from "./message-list-DHddO4QC.js";
1
+ import { t as MessageList } from "./message-list-Dtl03sGr.js";
2
2
  import { useSessionSelector, useTheme } from "./context.js";
3
- import { n as THINKING_COLOR, r as inkTint, t as ERROR_COLOR } from "./_colors-CcAi2FOU.js";
3
+ import { n as THINKING_COLOR, r as inkTint, t as ERROR_COLOR } from "./_colors-j8XMToi9.js";
4
4
  import { t as AaiLogo } from "./aai-logo-9xRBGVFl.js";
5
5
  import { t as Eyebrow } from "./eyebrow-C6ZFuiz6.js";
6
6
  import { Controls } from "./components/controls.js";
@@ -22,7 +22,7 @@ import { CLIENT_CONFIG_PATH, ClientConfigResponseSchema } from "@alexkroman1/aai
22
22
  function buildAgentUrl(platformUrl, endpointPath) {
23
23
  return new URL(endpointPath, platformUrl.endsWith("/") ? platformUrl : `${platformUrl}/`);
24
24
  }
25
- const AGENT_DEFAULT = {};
25
+ const AGENT_DEFAULT = { page: "voice" };
26
26
  /**
27
27
  * Per-attempt deadline for the `client-config` lookup.
28
28
  *
@@ -1,5 +1,5 @@
1
1
  import { useTheme } from "../context.js";
2
- import { i as primaryTint, r as inkTint } from "../_colors-CcAi2FOU.js";
2
+ import { i as primaryTint, r as inkTint } from "../_colors-j8XMToi9.js";
3
3
  import clsx from "clsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region components/button.tsx
@@ -1,3 +1,3 @@
1
1
  import "../context.js";
2
- import { t as ChatView } from "../chat-view-BKsFfFZJ.js";
2
+ import { t as ChatView } from "../chat-view-BJ6sOARu.js";
3
3
  export { ChatView };
@@ -1,6 +1,6 @@
1
1
  import { useSessionCore, useSessionSelector } from "../context.js";
2
2
  import { Button } from "./button.js";
3
- import { n as SessionUrlChips } from "../url-chips-DpM7Oocj.js";
3
+ import { n as SessionUrlChips } from "../url-chips-DxXKgyL9.js";
4
4
  import clsx from "clsx";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { memo } from "react";
@@ -1,3 +1,3 @@
1
- import { t as MessageList } from "../message-list-DHddO4QC.js";
1
+ import { t as MessageList } from "../message-list-Dtl03sGr.js";
2
2
  import "../context.js";
3
3
  export { MessageList };
@@ -1,5 +1,5 @@
1
1
  import { useSessionCore, useSessionSelector, useTheme } from "../context.js";
2
- import { r as inkTint } from "../_colors-CcAi2FOU.js";
2
+ import { r as inkTint } from "../_colors-j8XMToi9.js";
3
3
  import { Button } from "./button.js";
4
4
  import { t as AaiLogo } from "../aai-logo-9xRBGVFl.js";
5
5
  import { t as Eyebrow } from "../eyebrow-C6ZFuiz6.js";
@@ -1,3 +1,3 @@
1
1
  import "../context.js";
2
- import { t as ToolCallBlock } from "../tool-call-block-DoF-cSIZ.js";
2
+ import { t as ToolCallBlock } from "../tool-call-block-B7KlhaWl.js";
3
3
  export { ToolCallBlock };