@mastra/playground-ui 5.1.14 → 5.1.16-alpha.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.
@@ -0,0 +1,8 @@
1
+ import { SpeechSynthesisAdapter } from '@assistant-ui/react';
2
+ import { Agent } from '@mastra/core';
3
+
4
+ export declare class VoiceAttachmentAdapter implements SpeechSynthesisAdapter {
5
+ private readonly agent;
6
+ constructor(agent: Agent);
7
+ speak(text: string): SpeechSynthesisAdapter.Utterance;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { CompositeAttachmentAdapter, SpeechSynthesisAdapter } from '@assistant-ui/react';
2
+
3
+ export declare const useAdapters: (agentId: string) => {
4
+ isReady: boolean;
5
+ adapters: {
6
+ attachments: CompositeAttachmentAdapter;
7
+ speech: SpeechSynthesisAdapter | undefined;
8
+ };
9
+ };
@@ -3,10 +3,11 @@ import { ToolCallContentPartComponent } from '@assistant-ui/react';
3
3
  export interface ThreadProps {
4
4
  ToolFallback?: ToolCallContentPartComponent;
5
5
  agentName?: string;
6
+ agentId?: string;
6
7
  hasMemory?: boolean;
7
8
  onInputChange?: (value: string) => void;
8
9
  }
9
- export declare const Thread: ({ ToolFallback, agentName, hasMemory, onInputChange }: ThreadProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Thread: ({ ToolFallback, agentName, agentId, hasMemory, onInputChange }: ThreadProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export interface ThreadWelcomeProps {
11
12
  agentName?: string;
12
13
  }
@@ -5,11 +5,13 @@ export interface SpeechRecognitionState {
5
5
  }
6
6
  export interface UseSpeechRecognitionArgs {
7
7
  language?: string;
8
+ agentId?: string;
8
9
  }
9
- export declare const useSpeechRecognition: ({ language }?: UseSpeechRecognitionArgs) => {
10
+ type BrowserSpeechRecognition = {
10
11
  start: () => void;
11
12
  stop: () => void;
12
13
  isListening: boolean;
13
14
  transcript: string;
14
- error: string | null;
15
15
  };
16
+ export declare const useSpeechRecognition: ({ language, agentId, }: UseSpeechRecognitionArgs) => BrowserSpeechRecognition;
17
+ export {};
@@ -0,0 +1 @@
1
+ export declare function recordMicrophoneToFile(onFinish: (file: File) => void): Promise<MediaRecorder>;
@@ -25,7 +25,7 @@ export * from './ds/components/Entity/index';
25
25
  export * from './ds/components/EmptyState/index';
26
26
  export * from './ds/icons/index';
27
27
  export * from './lib/polls';
28
- export * from './hooks/use-speech-recognition';
28
+ export * from './domains/voice/hooks/use-speech-recognition';
29
29
  export * from './components/ui/radio-group';
30
30
  export * from './components/ui/entry';
31
31
  export * from './hooks';
@@ -3,4 +3,4 @@ import { ChatProps } from '../types';
3
3
 
4
4
  export declare function MastraRuntimeProvider({ children, agentId, initialMessages, memory, threadId, refreshThreadList, settings, runtimeContext, }: Readonly<{
5
5
  children: ReactNode;
6
- }> & ChatProps): import("react/jsx-runtime").JSX.Element;
6
+ }> & ChatProps): import("react/jsx-runtime").JSX.Element | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/playground-ui",
3
3
  "type": "module",
4
- "version": "5.1.14",
4
+ "version": "5.1.16-alpha.0",
5
5
  "description": "Mastra Playground components",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -94,11 +94,11 @@
94
94
  "unified": "^11.0.5",
95
95
  "use-debounce": "^10.0.5",
96
96
  "zod": "^3.25.67",
97
- "zustand": "^5.0.5",
98
- "@mastra/client-js": "^0.10.15"
97
+ "zustand": "^5.0.6",
98
+ "@mastra/client-js": "^0.10.17-alpha.0"
99
99
  },
100
100
  "peerDependencies": {
101
- "@mastra/core": ">=0.10.11-0 <0.11.0-0",
101
+ "@mastra/core": ">=0.11.0-0 <0.12.0-0",
102
102
  "lucide-react": "^0.474.0",
103
103
  "react": ">=19.0.0",
104
104
  "react-dom": ">=19.0.0",
@@ -120,7 +120,7 @@
120
120
  "vite": "^6.3.5",
121
121
  "vite-plugin-dts": "^3.9.1",
122
122
  "vite-plugin-lib-inject-css": "^2.2.2",
123
- "@mastra/core": "0.11.0"
123
+ "@mastra/core": "0.12.0-alpha.0"
124
124
  },
125
125
  "scripts": {
126
126
  "build": "tsc && vite build",