@theoremjs/react 0.3.5-next.929.gfca1b14 → 0.3.5-next.930.gfb5cd40

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/README.md CHANGED
@@ -381,7 +381,7 @@ const call = useLiveCall({ iface, connection: () => ({ profile: 'support.voice'
381
381
 
382
382
  This code opens `wss://<your host>/api/live/relay?profile=<id>`. To send your own message to the relay, add `openMessage`. To use your own socket, add `createSocket`.
383
383
 
384
- `LiveRunner` also accepts `theme`, `mode`, `labels`, and `trace`. Tool gates in a call appear in a dialog over the call.
384
+ `LiveRunner` also accepts `theme`, `mode`, `labels`, `media`, `resolveMedia`, and `trace`. Its captions show the media a tool returns as the chat does: see [Tool media](#tool-media). Tool gates in a call appear in a dialog over the call.
385
385
 
386
386
  ### A call across pages
387
387
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theoremjs/react",
3
- "version": "0.3.5-next.929.gfca1b14",
3
+ "version": "0.3.5-next.930.gfb5cd40",
4
4
  "description": "React bindings for Theorem: headless hooks + transport, an Astryx chat UI, and a Web-standard server handler.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -60,8 +60,8 @@
60
60
  "@stylexjs/stylex": "0.19.0",
61
61
  "react": "^19.0.0",
62
62
  "react-dom": "^19.0.0",
63
- "@theoremjs/agents": "^0.3.5-next.929.gfca1b14",
64
- "@theoremjs/web": "^0.3.5-next.929.gfca1b14"
63
+ "@theoremjs/agents": "^0.3.5-next.930.gfb5cd40",
64
+ "@theoremjs/web": "^0.3.5-next.930.gfb5cd40"
65
65
  },
66
66
  "peerDependenciesMeta": {
67
67
  "@astryxdesign/core": {
@@ -1,7 +1,9 @@
1
1
  import type { DefinedTheme } from '@astryxdesign/core/theme';
2
2
  import type { LiveCall } from '../components/live/use-live-call.ts';
3
3
  import { type TheoremLabels } from './labels.ts';
4
- export type LiveRunnerProps = {
4
+ import { type TheoremChatProps } from './TheoremChat.tsx';
5
+ /** `media` and `resolveMedia` are the chat's: the captions show a tool's media as the chat does. */
6
+ export type LiveRunnerProps = Pick<TheoremChatProps, 'media' | 'resolveMedia'> & {
5
7
  /** The call to draw, from `useLiveCall`. The call outlives the runner: it ends when its owner unmounts. */
6
8
  call: LiveCall;
7
9
  /** Astryx theme, as on `TheoremChat`. Omit to inherit the host's `<Theme>` or use `theoremTheme`. */
@@ -30,4 +32,4 @@ export type LiveRunnerProps = {
30
32
  * in a toolbar, and tool gates in a dialog. Offers the trace inspector when
31
33
  * the profile records traces.
32
34
  */
33
- export declare function LiveRunner({ theme, mode, labels, ...props }: LiveRunnerProps): import("react").JSX.Element;
35
+ export declare function LiveRunner({ theme, mode, labels, media, resolveMedia, ...props }: LiveRunnerProps): import("react").JSX.Element;
package/ui/LiveRunner.js CHANGED
@@ -18,11 +18,11 @@ import { LiveCaptionsPanel } from "./LiveCaptionsPanel.js";
18
18
  import { LiveToolGateDialog } from "./LiveToolGateDialog.js";
19
19
  import { LiveVideoPreview } from "./LiveVideoPreview.js";
20
20
  import { liveStateLabel } from "./labels.js";
21
- import { TheoremLabelsProvider, useLabels } from "./labels-provider.js";
21
+ import { useLabels } from "./labels-provider.js";
22
22
  import { PANEL_EDGE, SidePanel, SidePanelHeader, SidePanelToggle, useSidePanel, } from "./SidePanel.js";
23
+ import { SurfaceProviders } from "./surface-providers.js";
23
24
  import { DEFAULT_CHAT_MAX_WIDTH } from "./TheoremChat.js";
24
25
  import { useTraceInspector, WithTrace } from "./TraceInspectorPanel.js";
25
- import { TheoremThemeProvider } from "./theme.js";
26
26
  /** The waveform's box: it rests on the stage floor rather than filling the stage. */
27
27
  const WAVE_MAX_WIDTH = 720;
28
28
  const WAVE_HEIGHT = 320;
@@ -33,8 +33,8 @@ const WAVE_HEIGHT = 320;
33
33
  * in a toolbar, and tool gates in a dialog. Offers the trace inspector when
34
34
  * the profile records traces.
35
35
  */
36
- export function LiveRunner({ theme, mode, labels, ...props }) {
37
- return (_jsx(TheoremThemeProvider, { theme: theme, mode: mode, children: _jsx(TheoremLabelsProvider, { labels: labels, children: _jsx(LiveRunnerBody, { ...props }) }) }));
36
+ export function LiveRunner({ theme, mode, labels, media, resolveMedia, ...props }) {
37
+ return (_jsx(SurfaceProviders, { theme: theme, mode: mode, labels: labels, detectCodeLanguage: undefined, media: media, resolveMedia: resolveMedia, children: _jsx(LiveRunnerBody, { ...props }) }));
38
38
  }
39
39
  function LiveRunnerBody({ call, trace, onMinimize, }) {
40
40
  const t = useLabels();