obi-sdk 0.19.50-beta.1 → 0.19.50-beta.10

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.
@@ -22,7 +22,7 @@ export type CourseDialogContentProps = {
22
22
  */
23
23
  controlBarProps: ControlBarProps;
24
24
  /**
25
- * Courses shown in the right-hand selection panel.
25
+ * Courses shown in the course selection panel.
26
26
  */
27
27
  courses: CoursePanelCourse[];
28
28
  /**
@@ -30,15 +30,21 @@ export type CourseDialogContentProps = {
30
30
  */
31
31
  coursePanelProps?: Omit<React.ComponentProps<typeof CoursePanel>, "courses">;
32
32
  /**
33
- * Optional replacement content for the right-hand panel.
33
+ * Optional replacement content for the middle panel.
34
34
  * When provided, this replaces the default CoursePanel, allowing
35
- * the dialog to show chat or other alternate content.
35
+ * the dialog to show an outline or other alternate content.
36
+ */
37
+ middlePanel?: React.ReactNode;
38
+ /**
39
+ * Optional third panel rendered to the right of the middle panel.
40
+ * When provided, this displays alongside the course list/outline,
41
+ * enabling chat or other messaging content.
36
42
  */
37
43
  rightPanel?: React.ReactNode;
38
44
  className?: string;
39
45
  };
40
46
  /**
41
- * CourseDialogContent renders the two-panel course selection UI without owning dialog state.
47
+ * CourseDialogContent renders the panelled course selection UI without owning dialog state.
42
48
  * This makes it easy to reuse in Storybook without needing to click a trigger to open.
43
49
  */
44
50
  export declare function CourseDialogContent(props: CourseDialogContentProps): import("react/jsx-runtime").JSX.Element;
@@ -13,6 +13,10 @@ type StartSessionDialogProps = {
13
13
  startLabel?: string;
14
14
  disclaimer?: string;
15
15
  showCloseButton?: boolean;
16
+ /**
17
+ * When true, shows a loading spinner on the start button and disables it.
18
+ */
19
+ isStarting?: boolean;
16
20
  };
17
21
  export declare function StartSessionDialog(props: StartSessionDialogProps): import("react/jsx-runtime").JSX.Element;
18
22
  export type { StartSessionDialogProps };
@@ -0,0 +1,22 @@
1
+ import type { TextStreamData } from "@obi/obi-client";
2
+ export type UseAgentCaptionsFromStreamsOptions = {
3
+ /** Delay in ms before displaying captions (used to sync with avatar video audio delay) */
4
+ delayMs?: number;
5
+ };
6
+ /**
7
+ * Hook that returns the current transcription caption for the remote agent from text streams.
8
+ *
9
+ * Accumulates text until it reaches MAX_CAPTION_LENGTH, then lingers briefly
10
+ * on the current text before clearing to start fresh. This creates a readable
11
+ * caption experience without needing timing data from the server.
12
+ *
13
+ * This hook matches the behavior of obi-meet's useAgentCaptions exactly but
14
+ * consumes TextStreamData[] directly instead of using LiveKit React hooks.
15
+ *
16
+ * @param streams - Array of text stream data from ObiSession's captions event
17
+ * @param options.delayMs - Optional delay before displaying captions to sync with audio
18
+ */
19
+ export declare function useAgentCaptionsFromStreams(streams: TextStreamData[], options?: UseAgentCaptionsFromStreamsOptions): {
20
+ caption: string;
21
+ hasCaption: boolean;
22
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obi-sdk",
3
- "version": "0.19.50-beta.1",
3
+ "version": "0.19.50-beta.10",
4
4
  "description": "JavaScript SDK for Obi",
5
5
  "type": "module",
6
6
  "main": "dist/obi-sdk.umd.js",