@qwanyx/stack 0.2.95 → 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/components/QMap/QMapNode.d.ts +1 -0
- package/dist/components/VoiceTextEditor.d.ts +22 -2
- package/dist/index.cjs.js +29 -29
- package/dist/index.esm.js +2811 -2758
- package/package.json +1 -1
|
@@ -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,8 +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
|
*/
|
|
6
|
-
import { type TTSVoice } from '../client/LLMClient';
|
|
11
|
+
import { LLMClient, type TTSVoice } from '../client/LLMClient';
|
|
12
|
+
import { GraphClient } from '../client/GraphClient';
|
|
7
13
|
export interface VoiceTextEditorProps {
|
|
8
14
|
/** Label shown above the textarea */
|
|
9
15
|
label: string;
|
|
@@ -23,6 +29,20 @@ export interface VoiceTextEditorProps {
|
|
|
23
29
|
className?: string;
|
|
24
30
|
/** Number of rows for textarea (if not flex) */
|
|
25
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;
|
|
26
46
|
/** Called to generate TTS audio - should return filename */
|
|
27
47
|
onGenerateTTS?: (text: string, voice: TTSVoice) => Promise<string>;
|
|
28
48
|
/** URL of existing audio for playback */
|
|
@@ -32,4 +52,4 @@ export interface VoiceTextEditorProps {
|
|
|
32
52
|
/** Called when voice selection changes */
|
|
33
53
|
onVoiceChange?: (voice: TTSVoice) => void;
|
|
34
54
|
}
|
|
35
|
-
export declare function VoiceTextEditor({ label, value, onChange, onTranscribe, onAIAction, onAIPrompt, placeholder, className, rows, onGenerateTTS, audioUrl, voice, onVoiceChange }: 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;
|