@w0nna_dev/lina-widget 1.0.0 → 1.0.1

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.
@@ -1,31 +1,46 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { LinaState, LinaEmotion, LinaColors } from '../core';
3
+ export type CallStatus = 'idle' | 'connecting' | 'active' | 'ending' | 'error' | 'mic-denied';
3
4
  export declare class LinaWidget extends LitElement {
4
5
  static styles: import('lit').CSSResult;
5
6
  private orbRenderer;
6
7
  private orbContainerRef;
7
8
  private audioSimPhase;
8
9
  private animationId;
10
+ private callManager;
9
11
  size: number;
10
12
  headerLogo: string;
11
13
  headerTitle: string;
12
- caption: string;
13
- showStates: boolean;
14
- showHeader: boolean;
15
- showCaption: boolean;
16
- showButton: boolean;
14
+ showBranding: boolean;
15
+ version: string;
16
+ agentId: string;
17
+ voiceServiceUrl: string;
18
+ btnStartText: string;
19
+ btnEndText: string;
17
20
  colors: Partial<LinaColors>;
18
21
  private currentState;
19
- private isActive;
22
+ private callStatus;
23
+ private _hasMicPermission;
20
24
  connectedCallback(): void;
21
25
  disconnectedCallback(): void;
22
26
  firstUpdated(): void;
27
+ private checkMicrophonePermission;
23
28
  private initializeOrb;
29
+ private initializeCallManager;
30
+ private handleCallStatusChange;
24
31
  private cleanup;
25
32
  private startIdleAnimation;
26
33
  private startActiveAnimation;
27
- private handleStateClick;
34
+ private connectAudioStream;
28
35
  private handleCallClick;
36
+ /**
37
+ * Start a call
38
+ */
39
+ startCall(): Promise<void>;
40
+ /**
41
+ * End the call
42
+ */
43
+ endCall(): Promise<void>;
29
44
  setState(state: LinaState): void;
30
45
  setAudioLevel(level: number): void;
31
46
  setColors(colors: Partial<LinaColors>): void;
@@ -36,6 +51,8 @@ export declare class LinaWidget extends LitElement {
36
51
  setEmotion(emotion: LinaEmotion): void;
37
52
  getEmotion(): LinaEmotion | undefined;
38
53
  getState(): LinaState;
54
+ getCallStatus(): CallStatus;
55
+ private getButtonContent;
39
56
  render(): import('lit-html').TemplateResult<1>;
40
57
  }
41
58
  declare global {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w0nna_dev/lina-widget",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/lina-widget.umd.js",