@w0nna_dev/lina-widget 1.2.0 → 1.2.2

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.
@@ -4,7 +4,7 @@ interface MakeCallOptions {
4
4
  agentId: string;
5
5
  }
6
6
  export interface AgentCommand {
7
- type: 'change_color' | 'set_emotion' | 'agent_state';
7
+ type: 'change_color' | 'set_emotion' | 'agent_state' | 'end_call';
8
8
  payload?: {
9
9
  color?: string;
10
10
  emotion?: 'neutral' | 'joy' | 'thinking' | 'interrupted';
@@ -8,6 +8,7 @@ export declare class LinaWidget extends LitElement {
8
8
  private audioSimPhase;
9
9
  private animationId;
10
10
  private callManager;
11
+ private soundManager;
11
12
  size: number;
12
13
  headerLogo: string;
13
14
  headerTitle: string;
@@ -1,31 +1,25 @@
1
1
  /**
2
- * SoundManager - Programmatic melodic sound generation for call events
3
- * Uses Web Audio API for zero-dependency sound synthesis
2
+ * SoundManager - Plays MP3 sound files for call events
4
3
  */
5
4
  export interface SoundConfig {
6
5
  enabled: boolean;
7
6
  volume: number;
8
7
  }
9
8
  export declare class SoundManager {
10
- private audioContext;
11
9
  private config;
10
+ private connectAudio;
11
+ private disconnectAudio;
12
12
  constructor(config?: Partial<SoundConfig>);
13
13
  /**
14
- * Initialize audio context (must be called from user interaction)
14
+ * Preload audio files for instant playback
15
15
  */
16
- private ensureContext;
16
+ private preloadSounds;
17
17
  /**
18
- * Create an oscillator with envelope
19
- */
20
- private createTone;
21
- /**
22
- * Play ascending melodic sound for call start
23
- * C4 → E4 → G4 (C major chord arpeggio)
18
+ * Play connect sound
24
19
  */
25
20
  playCallStartSound(): Promise<void>;
26
21
  /**
27
- * Play descending melodic sound for call end
28
- * G4 → E4 → C4 (descending C major arpeggio)
22
+ * Play disconnect sound
29
23
  */
30
24
  playCallEndSound(): Promise<void>;
31
25
  /**
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@w0nna_dev/lina-widget",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
- "access": "restricted"
6
+ "access": "public"
7
7
  },
8
8
  "type": "module",
9
9
  "main": "dist/lina-widget.umd.js",
@@ -17,7 +17,7 @@
17
17
  "dev": "vite",
18
18
  "build": "tsc && vite build",
19
19
  "preview": "vite preview",
20
- "release": "pnpm build && changeset publish --access restricted"
20
+ "release": "pnpm build && changeset publish --access public"
21
21
  },
22
22
  "dependencies": {
23
23
  "lit": "^3.2.1",