@absolutejs/voice 0.0.22-beta.515 → 0.0.22-beta.517
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/client/htmxBootstrap.js +1 -0
- package/dist/embed/index.d.ts +38 -0
- package/dist/embed/index.js +1708 -0
- package/dist/embed/voice-widget.js +10 -0
- package/dist/generated/htmxBootstrapBundle.d.ts +1 -1
- package/dist/index.js +23 -2
- package/dist/testing/index.js +18 -1
- package/dist/types.d.ts +24 -0
- package/dist/vue/VoiceWidget.d.ts +1 -1
- package/package.json +13 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createVoiceController } from "../client/controller";
|
|
2
|
+
import { type VoiceWidgetLabels, type VoiceWidgetTheme } from "../client/voiceWidgetView";
|
|
3
|
+
import type { VoiceControllerOptions } from "../types";
|
|
4
|
+
export type VoiceEmbedMountOptions = {
|
|
5
|
+
/** WebSocket route the voice runtime is mounted at. Defaults to "/voice". */
|
|
6
|
+
path?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
theme?: VoiceWidgetTheme;
|
|
9
|
+
labels?: VoiceWidgetLabels;
|
|
10
|
+
controllerOptions?: VoiceControllerOptions;
|
|
11
|
+
/** Auto-start the call as soon as the widget mounts. Defaults to false. */
|
|
12
|
+
autoStart?: boolean;
|
|
13
|
+
onError?: (error: string) => void;
|
|
14
|
+
onStatusChange?: (status: string) => void;
|
|
15
|
+
};
|
|
16
|
+
export type VoiceEmbedHandle = {
|
|
17
|
+
/** Begin recording / open the call. */
|
|
18
|
+
start: () => Promise<void>;
|
|
19
|
+
/** Stop recording (mute). */
|
|
20
|
+
mute: () => void;
|
|
21
|
+
/** End the call and tear down. */
|
|
22
|
+
end: () => Promise<void>;
|
|
23
|
+
/** Remove the widget from the DOM and release all resources. */
|
|
24
|
+
unmount: () => void;
|
|
25
|
+
/** The underlying framework-agnostic controller, for advanced use. */
|
|
26
|
+
controller: ReturnType<typeof createVoiceController>;
|
|
27
|
+
};
|
|
28
|
+
export declare const mount: (target: string | HTMLElement, options?: VoiceEmbedMountOptions) => VoiceEmbedHandle;
|
|
29
|
+
export type VoiceEmbedGlobal = {
|
|
30
|
+
mount: typeof mount;
|
|
31
|
+
version: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const VOICE_EMBED_VERSION = "0.0.22-beta.516";
|
|
34
|
+
declare const globalApi: VoiceEmbedGlobal;
|
|
35
|
+
declare global {
|
|
36
|
+
var AbsoluteVoice: VoiceEmbedGlobal | undefined;
|
|
37
|
+
}
|
|
38
|
+
export default globalApi;
|