@qwanyx/stack 0.2.94 → 0.2.96
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/auth/index.d.ts +1 -0
- package/dist/client/LLMClient.d.ts +15 -0
- package/dist/components/QMap/QMapNode.d.ts +1 -0
- package/dist/components/VoiceTextEditor.d.ts +30 -1
- package/dist/index.cjs.js +38 -38
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +3572 -3425
- package/package.json +1 -1
package/dist/auth/index.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ export declare class AuthService {
|
|
|
114
114
|
/**
|
|
115
115
|
* Login with email and password
|
|
116
116
|
* Uses system coprocessor for authentication
|
|
117
|
+
* If systemId is configured, validates user belongs to that system
|
|
117
118
|
*/
|
|
118
119
|
login(email: string, password: string): Promise<LoginResult>;
|
|
119
120
|
/**
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
* All operations communicate through the unified `/spu/invoke` endpoint.
|
|
6
6
|
*/
|
|
7
7
|
export type QwanyxModel = 'xlm' | 'mlm' | 'nlm';
|
|
8
|
+
export type TTSVoice = 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'fable' | 'nova' | 'onyx' | 'sage' | 'shimmer' | 'verse' | 'marin' | 'cedar';
|
|
9
|
+
export declare const TTS_VOICES: {
|
|
10
|
+
id: TTSVoice;
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}[];
|
|
8
14
|
export interface LLMClientConfig {
|
|
9
15
|
baseUrl: string;
|
|
10
16
|
system_id: string;
|
|
@@ -62,6 +68,15 @@ export declare class LLMClient {
|
|
|
62
68
|
temperature?: number;
|
|
63
69
|
maxTokens?: number;
|
|
64
70
|
}): Promise<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Convert text to speech audio
|
|
73
|
+
* @param text - The text to convert to speech
|
|
74
|
+
* @param options - TTS options
|
|
75
|
+
* @returns Base64 encoded MP3 audio
|
|
76
|
+
*/
|
|
77
|
+
tts(text: string, options?: {
|
|
78
|
+
voice?: TTSVoice;
|
|
79
|
+
}): Promise<string>;
|
|
65
80
|
/**
|
|
66
81
|
* Transcribe audio to text
|
|
67
82
|
*/
|
|
@@ -19,6 +19,7 @@ export interface QMapNodeProps {
|
|
|
19
19
|
onClick?: (event: React.MouseEvent) => void;
|
|
20
20
|
onDoubleClick?: (event: React.MouseEvent) => void;
|
|
21
21
|
onContextMenu?: (event: React.MouseEvent) => void;
|
|
22
|
+
nodeRef?: (el: HTMLDivElement | null) => void;
|
|
22
23
|
children: React.ReactNode;
|
|
23
24
|
}
|
|
24
25
|
export declare const QMapNode: React.NamedExoticComponent<QMapNodeProps>;
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
* VoiceTextEditor Component
|
|
3
3
|
* Combines AudioEditor (recorder + transcription) with a textarea + AI dropdown
|
|
4
4
|
* Pattern from TaskEditModal: AudioEditor + Notes component
|
|
5
|
+
*
|
|
6
|
+
* TTS Integration:
|
|
7
|
+
* - Option 1 (Integrated): Pass llmClient, graphClient, nodeId, audioFilename
|
|
8
|
+
* Component handles TTS generation and storage internally
|
|
9
|
+
* - Option 2 (Callback): Pass onGenerateTTS callback for custom handling
|
|
5
10
|
*/
|
|
11
|
+
import { LLMClient, type TTSVoice } from '../client/LLMClient';
|
|
12
|
+
import { GraphClient } from '../client/GraphClient';
|
|
6
13
|
export interface VoiceTextEditorProps {
|
|
7
14
|
/** Label shown above the textarea */
|
|
8
15
|
label: string;
|
|
@@ -22,5 +29,27 @@ export interface VoiceTextEditorProps {
|
|
|
22
29
|
className?: string;
|
|
23
30
|
/** Number of rows for textarea (if not flex) */
|
|
24
31
|
rows?: number;
|
|
32
|
+
/** LLMClient for TTS generation */
|
|
33
|
+
llmClient?: LLMClient;
|
|
34
|
+
/** GraphClient for file upload/URL */
|
|
35
|
+
graphClient?: GraphClient;
|
|
36
|
+
/** Node ID for file storage (course/lesson ID) */
|
|
37
|
+
nodeId?: string;
|
|
38
|
+
/** Filename for the audio file (e.g., 'description.mp3') */
|
|
39
|
+
audioFilename?: string;
|
|
40
|
+
/** Initial audio filename (if already exists) */
|
|
41
|
+
existingAudio?: string;
|
|
42
|
+
/** Initial voice selection */
|
|
43
|
+
existingVoice?: TTSVoice;
|
|
44
|
+
/** Called when audio is generated (returns filename) */
|
|
45
|
+
onAudioGenerated?: (filename: string, voice: TTSVoice) => void;
|
|
46
|
+
/** Called to generate TTS audio - should return filename */
|
|
47
|
+
onGenerateTTS?: (text: string, voice: TTSVoice) => Promise<string>;
|
|
48
|
+
/** URL of existing audio for playback */
|
|
49
|
+
audioUrl?: string;
|
|
50
|
+
/** Selected voice */
|
|
51
|
+
voice?: TTSVoice;
|
|
52
|
+
/** Called when voice selection changes */
|
|
53
|
+
onVoiceChange?: (voice: TTSVoice) => void;
|
|
25
54
|
}
|
|
26
|
-
export declare function VoiceTextEditor({ label, value, onChange, onTranscribe, onAIAction, onAIPrompt, placeholder, className, rows }: VoiceTextEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare function VoiceTextEditor({ label, value, onChange, onTranscribe, onAIAction, onAIPrompt, placeholder, className, rows, llmClient, graphClient, nodeId, audioFilename, existingAudio, existingVoice, onAudioGenerated, onGenerateTTS, audioUrl, voice, onVoiceChange }: VoiceTextEditorProps): import("react/jsx-runtime").JSX.Element;
|