hanc-webrtc-widgets 1.0.0

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.
@@ -0,0 +1,2 @@
1
+ export * from './src/components/index'
2
+ export {}
@@ -0,0 +1,14 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class CallControl extends LitElement {
3
+ static styles: import('lit').CSSResult[];
4
+ private callManager;
5
+ agentId: string;
6
+ private isCalling;
7
+ private videoElement;
8
+ connectedCallback(): void;
9
+ disconnectedCallback(): void;
10
+ updated(changedProperties: Map<string | number | symbol, unknown>): void;
11
+ private handleStatusChange;
12
+ private toggleCall;
13
+ render(): import('lit').TemplateResult<1>;
14
+ }
@@ -0,0 +1 @@
1
+ export * from './call-control';
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,14 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class FloatingCall extends LitElement {
3
+ static styles: import('lit').CSSResult[];
4
+ private callManager;
5
+ agentId: string;
6
+ private isCalling;
7
+ private videoElement;
8
+ connectedCallback(): void;
9
+ disconnectedCallback(): void;
10
+ updated(changedProperties: Map<string | number | symbol, unknown>): void;
11
+ private handleStatusChange;
12
+ private toggleCall;
13
+ render(): import('lit').TemplateResult<1>;
14
+ }
@@ -0,0 +1 @@
1
+ export * from './floating-call';
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,2 @@
1
+ export * from './call-control';
2
+ export * from './floating-call';
@@ -0,0 +1 @@
1
+ export declare const globalStyles: import('lit').CSSResult;
@@ -0,0 +1,22 @@
1
+ import { Call } from '@twilio/voice-sdk';
2
+ type CallStatus = 'idle' | 'connecting' | 'connected' | 'disconnecting' | 'disconnected' | 'error' | 'ringing';
3
+ interface MakeCallOptions {
4
+ agentId: string;
5
+ passCode: string;
6
+ }
7
+ export declare class TwilioCallManager extends EventTarget {
8
+ private device;
9
+ private activeCall;
10
+ private callStatus;
11
+ private isReady;
12
+ private error;
13
+ get status(): CallStatus;
14
+ get ready(): boolean;
15
+ get currentError(): string | null;
16
+ get call(): Call | null;
17
+ private updateStatus;
18
+ makeCall({ agentId, passCode }: MakeCallOptions): Promise<void>;
19
+ private attachCallListeners;
20
+ hangUp(): void;
21
+ }
22
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const CallIcon: import('lit').TemplateResult<1>;
2
+ export declare const CallOffIcon: import('lit').TemplateResult<1>;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vite').UserConfig;
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "hanc-webrtc-widgets",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "dist/hanc-webrtc-widget.umd.js",
6
+ "module": "dist/hanc-webrtc-widget.es.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "README.md"
11
+ ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "scripts": {
16
+ "dev": "vite",
17
+ "build": "tsc && vite build",
18
+ "preview": "vite preview",
19
+ "prepublishOnly": "pnpm build"
20
+ },
21
+ "dependencies": {
22
+ "@twilio/voice-sdk": "^2.13.0",
23
+ "lit": "^3.2.1"
24
+ },
25
+ "devDependencies": {
26
+ "@eslint/js": "^9.24.0",
27
+ "@types/node": "^22.14.0",
28
+ "eslint": "^9.24.0",
29
+ "eslint-config-prettier": "^10.1.1",
30
+ "eslint-plugin-import": "^2.31.0",
31
+ "eslint-plugin-lit": "^2.0.0",
32
+ "ts-lit-plugin": "^2.0.2",
33
+ "typescript": "~5.7.2",
34
+ "typescript-eslint": "^8.29.1",
35
+ "vite": "^6.2.0",
36
+ "vite-plugin-dts": "^4.5.4"
37
+ },
38
+ "packageManager": "pnpm@10.8.1+sha256.d8b2ebbc65cf02c349eca6b45c9640b910f16b6adebdb7b926e9db440e47cac7"
39
+ }