@signalwire/web-components 4.0.0-beta.1 → 4.0.0-beta.11
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/README.md +9 -10
- package/dist/components/audio-level.d.ts +114 -0
- package/dist/components/audio-level.d.ts.map +1 -0
- package/dist/components/audio-level.js +203 -0
- package/dist/components/audio-level.js.map +1 -0
- package/dist/components/call-controls.d.ts +183 -0
- package/dist/components/call-controls.d.ts.map +1 -0
- package/dist/components/call-controls.js +606 -0
- package/dist/components/call-controls.js.map +1 -0
- package/dist/components/call-media.d.ts +118 -0
- package/dist/components/call-media.d.ts.map +1 -0
- package/dist/components/call-media.js +219 -0
- package/dist/components/call-media.js.map +1 -0
- package/dist/components/call-status.d.ts +83 -0
- package/dist/components/call-status.d.ts.map +1 -0
- package/dist/components/call-status.js +255 -0
- package/dist/components/call-status.js.map +1 -0
- package/dist/components/click-to-call.d.ts +151 -0
- package/dist/components/click-to-call.d.ts.map +1 -0
- package/dist/components/click-to-call.js +428 -0
- package/dist/components/click-to-call.js.map +1 -0
- package/dist/components/device-selector.d.ts +238 -0
- package/dist/components/device-selector.d.ts.map +1 -0
- package/dist/components/device-selector.js +685 -0
- package/dist/components/device-selector.js.map +1 -0
- package/dist/components/dialpad.d.ts +74 -0
- package/dist/components/dialpad.d.ts.map +1 -0
- package/dist/components/dialpad.js +372 -0
- package/dist/components/dialpad.js.map +1 -0
- package/dist/components/directory.d.ts +125 -0
- package/dist/components/directory.d.ts.map +1 -0
- package/dist/components/directory.js +503 -0
- package/dist/components/directory.js.map +1 -0
- package/dist/components/example-button.d.ts +21 -0
- package/dist/components/example-button.d.ts.map +1 -0
- package/dist/components/example-button.js +74 -0
- package/dist/components/example-button.js.map +1 -0
- package/dist/components/participant-controls.d.ts +123 -0
- package/dist/components/participant-controls.d.ts.map +1 -0
- package/dist/components/participant-controls.js +468 -0
- package/dist/components/participant-controls.js.map +1 -0
- package/dist/components/participants.d.ts +120 -0
- package/dist/components/participants.d.ts.map +1 -0
- package/dist/components/participants.js +394 -0
- package/dist/components/participants.js.map +1 -0
- package/dist/components/self-media.d.ts +78 -0
- package/dist/components/self-media.d.ts.map +1 -0
- package/dist/components/self-media.js +129 -0
- package/dist/components/self-media.js.map +1 -0
- package/dist/constants.d.ts +10 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +5 -0
- package/dist/constants.js.map +1 -0
- package/dist/context/call-context.d.ts +13 -0
- package/dist/context/call-context.d.ts.map +1 -0
- package/dist/context/call-context.js +6 -0
- package/dist/context/call-context.js.map +1 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -5644
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +122 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/debounce.d.ts +10 -0
- package/dist/utils/debounce.d.ts.map +1 -0
- package/dist/utils/debounce.js +13 -0
- package/dist/utils/debounce.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/video.d.ts +34 -0
- package/dist/utils/video.d.ts.map +1 -0
- package/dist/utils/video.js +26 -0
- package/dist/utils/video.js.map +1 -0
- package/package.json +70 -3
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React JSX type declarations for SignalWire web components.
|
|
3
|
+
*
|
|
4
|
+
* Provides proper element types so `useRef<CallMedia>()` gives access
|
|
5
|
+
* to component properties like `.call` without type casting.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* /// <reference types="@signalwire/web-components/react" />
|
|
9
|
+
*
|
|
10
|
+
* Or add to tsconfig.json:
|
|
11
|
+
* { "compilerOptions": { "types": ["@signalwire/web-components/react"] } }
|
|
12
|
+
*
|
|
13
|
+
* Then in your component:
|
|
14
|
+
* import type { CallMedia } from '@signalwire/web-components';
|
|
15
|
+
* const ref = useRef<CallMedia>(null);
|
|
16
|
+
* ref.current.call = call; // fully typed, no cast needed
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type { CallMedia } from './components/call-media.js';
|
|
20
|
+
import type { SelfMedia } from './components/self-media.js';
|
|
21
|
+
import type { CallControls } from './components/call-controls.js';
|
|
22
|
+
import type { CallStatusComponent } from './components/call-status.js';
|
|
23
|
+
import type { DeviceSelector } from './components/device-selector.js';
|
|
24
|
+
import type { AudioLevel } from './components/audio-level.js';
|
|
25
|
+
import type { DialpadComponent } from './components/dialpad.js';
|
|
26
|
+
import type { ClickToCallComponent } from './components/click-to-call.js';
|
|
27
|
+
import type { DirectoryComponent } from './components/directory.js';
|
|
28
|
+
import type { ParticipantControlsComponent } from './components/participant-controls.js';
|
|
29
|
+
import type { Participants } from './components/participants.js';
|
|
30
|
+
|
|
31
|
+
export {};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Helper: maps a Lit element class to a React JSX props type.
|
|
35
|
+
* Uses the actual element class for ref typing.
|
|
36
|
+
*/
|
|
37
|
+
type SWProps<E extends HTMLElement, A = object> = React.DetailedHTMLProps<
|
|
38
|
+
React.HTMLAttributes<E> & A,
|
|
39
|
+
E
|
|
40
|
+
>;
|
|
41
|
+
|
|
42
|
+
declare module 'react' {
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
44
|
+
namespace JSX {
|
|
45
|
+
interface IntrinsicElements {
|
|
46
|
+
/** Remote video container and call context provider. */
|
|
47
|
+
'sw-call-media': SWProps<CallMedia>;
|
|
48
|
+
|
|
49
|
+
/** Local video overlay with optional mirror mode. */
|
|
50
|
+
'sw-self-media': SWProps<
|
|
51
|
+
SelfMedia,
|
|
52
|
+
{
|
|
53
|
+
mirror?: boolean;
|
|
54
|
+
}
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
/** Mute, hangup, and screen-share controls. */
|
|
58
|
+
'sw-call-controls': SWProps<
|
|
59
|
+
CallControls,
|
|
60
|
+
{
|
|
61
|
+
orientation?: 'horizontal' | 'vertical';
|
|
62
|
+
'show-tooltips'?: boolean;
|
|
63
|
+
}
|
|
64
|
+
>;
|
|
65
|
+
|
|
66
|
+
/** Call status display with duration timer. */
|
|
67
|
+
'sw-call-status': SWProps<CallStatusComponent>;
|
|
68
|
+
|
|
69
|
+
/** Media device dropdowns with optional preview. */
|
|
70
|
+
'sw-device-selector': SWProps<
|
|
71
|
+
DeviceSelector,
|
|
72
|
+
{
|
|
73
|
+
'show-preview'?: boolean;
|
|
74
|
+
}
|
|
75
|
+
>;
|
|
76
|
+
|
|
77
|
+
/** Real-time audio level visualizer. */
|
|
78
|
+
'sw-audio-level': SWProps<
|
|
79
|
+
AudioLevel,
|
|
80
|
+
{
|
|
81
|
+
bars?: number;
|
|
82
|
+
orientation?: 'vertical' | 'horizontal';
|
|
83
|
+
'max-size'?: number;
|
|
84
|
+
}
|
|
85
|
+
>;
|
|
86
|
+
|
|
87
|
+
/** DTMF dialpad. */
|
|
88
|
+
'sw-dialpad': SWProps<
|
|
89
|
+
DialpadComponent,
|
|
90
|
+
{
|
|
91
|
+
'show-call-button'?: boolean;
|
|
92
|
+
placeholder?: string;
|
|
93
|
+
}
|
|
94
|
+
>;
|
|
95
|
+
|
|
96
|
+
/** Single-button call widget. */
|
|
97
|
+
'sw-click-to-call': SWProps<
|
|
98
|
+
ClickToCallComponent,
|
|
99
|
+
{
|
|
100
|
+
destination?: string;
|
|
101
|
+
label?: string;
|
|
102
|
+
'audio-only'?: boolean;
|
|
103
|
+
}
|
|
104
|
+
>;
|
|
105
|
+
|
|
106
|
+
/** Searchable contact directory. */
|
|
107
|
+
'sw-directory': SWProps<DirectoryComponent>;
|
|
108
|
+
|
|
109
|
+
/** Per-participant mute, volume, and remove controls. */
|
|
110
|
+
'sw-participant-controls': SWProps<
|
|
111
|
+
ParticipantControlsComponent,
|
|
112
|
+
{
|
|
113
|
+
'show-volume'?: boolean;
|
|
114
|
+
'show-pin'?: boolean;
|
|
115
|
+
}
|
|
116
|
+
>;
|
|
117
|
+
|
|
118
|
+
/** Remote participant overlay list. */
|
|
119
|
+
'sw-participants': SWProps<Participants>;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for call-media components.
|
|
3
|
+
*
|
|
4
|
+
* Types are imported directly from the SDK to stay in sync.
|
|
5
|
+
*/
|
|
6
|
+
import type { Call, CallParticipant, CallSelfParticipant, DeviceController, LayoutLayer } from '@signalwire/js';
|
|
7
|
+
export type { Call, CallParticipant, CallSelfParticipant, DeviceController, LayoutLayer };
|
|
8
|
+
export type Participant = CallParticipant;
|
|
9
|
+
/**
|
|
10
|
+
* Helper to safely get self ID from a Call.
|
|
11
|
+
* Call.self is typed as CallSelfParticipant | null.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getSelfId(call: Call | undefined): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Type-safe cast for participants array.
|
|
16
|
+
* The SDK's Call.participants is typed as CallParticipant[], so this
|
|
17
|
+
* provides a semantic helper for web-components that receive unknown[].
|
|
18
|
+
*/
|
|
19
|
+
export declare function castParticipants(participants: unknown[]): Participant[];
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGhH,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC;AAG1F,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,CAEvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/types/index.ts"],"sourcesContent":["/**\n * Type definitions for call-media components.\n *\n * Types are imported directly from the SDK to stay in sync.\n */\n\nimport type { Call, CallParticipant, CallSelfParticipant, DeviceController, LayoutLayer } from '@signalwire/js';\n\n// Re-export SDK types for internal use\nexport type { Call, CallParticipant, CallSelfParticipant, DeviceController, LayoutLayer };\n\n// Use SDK's CallParticipant as the canonical Participant type\nexport type Participant = CallParticipant;\n\n/**\n * Helper to safely get self ID from a Call.\n * Call.self is typed as CallSelfParticipant | null.\n */\nexport function getSelfId(call: Call | undefined): string | undefined {\n return call?.self?.id;\n}\n\n/**\n * Type-safe cast for participants array.\n * The SDK's Call.participants is typed as CallParticipant[], so this\n * provides a semantic helper for web-components that receive unknown[].\n */\nexport function castParticipants(participants: unknown[]): Participant[] {\n return participants as Participant[];\n}\n"],"names":["getSelfId","call","_a","castParticipants","participants"],"mappings":"AAkBO,SAASA,EAAUC,GAA4C;AAA/D,MAAAC;AACL,UAAOA,IAAAD,KAAA,gBAAAA,EAAM,SAAN,gBAAAC,EAAY;AACrB;AAOO,SAASC,EAAiBC,GAAwC;AACvE,SAAOA;AACT;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a debounced function that delays invoking the provided function
|
|
3
|
+
* until after the specified wait time has elapsed since the last invocation.
|
|
4
|
+
*
|
|
5
|
+
* @param func - The function to debounce
|
|
6
|
+
* @param wait - The number of milliseconds to delay
|
|
7
|
+
* @returns A debounced version of the function
|
|
8
|
+
*/
|
|
9
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
|
|
10
|
+
//# sourceMappingURL=debounce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAclC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debounce.js","sources":["../../src/utils/debounce.ts"],"sourcesContent":["/**\n * Creates a debounced function that delays invoking the provided function\n * until after the specified wait time has elapsed since the last invocation.\n *\n * @param func - The function to debounce\n * @param wait - The number of milliseconds to delay\n * @returns A debounced version of the function\n */\nexport function debounce<T extends (...args: any[]) => any>(\n func: T,\n wait: number\n): (...args: Parameters<T>) => void {\n let timeout: ReturnType<typeof setTimeout> | null = null;\n\n return function executedFunction(...args: Parameters<T>) {\n const later = () => {\n timeout = null;\n func(...args);\n };\n\n if (timeout !== null) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(later, wait);\n };\n}\n"],"names":["debounce","func","wait","timeout","args","later"],"mappings":"AAQO,SAASA,EACdC,GACAC,GACkC;AAClC,MAAIC,IAAgD;AAEpD,SAAO,YAA6BC,GAAqB;AACvD,UAAMC,IAAQ,MAAM;AAClB,MAAAF,IAAU,MACVF,EAAK,GAAGG,CAAI;AAAA,IACd;AAEA,IAAID,MAAY,QACd,aAAaA,CAAO,GAEtBA,IAAU,WAAWE,GAAOH,CAAI;AAAA,EAClC;AACF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video element utilities for creating and managing video elements
|
|
3
|
+
* with proper configuration for WebRTC streams.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Creates a video element configured for WebRTC streams.
|
|
7
|
+
* The video is muted, autoplays, and plays inline (mobile Safari support).
|
|
8
|
+
* Prevents pause events which can occur on camera switches or PiP mode.
|
|
9
|
+
*
|
|
10
|
+
* @returns A configured HTMLVideoElement
|
|
11
|
+
*/
|
|
12
|
+
export declare function createVideoElement(): HTMLVideoElement;
|
|
13
|
+
/**
|
|
14
|
+
* Waits for a video element to be ready for playback.
|
|
15
|
+
* Resolves when the video has metadata or when it can play.
|
|
16
|
+
*
|
|
17
|
+
* @param element - The video element to wait for
|
|
18
|
+
* @returns A promise that resolves when the video is ready
|
|
19
|
+
*/
|
|
20
|
+
export declare function waitForVideoReady(element: HTMLVideoElement): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Attaches a MediaStream to a video element.
|
|
23
|
+
*
|
|
24
|
+
* @param element - The video element to attach the stream to
|
|
25
|
+
* @param stream - The MediaStream to attach, or null to detach
|
|
26
|
+
*/
|
|
27
|
+
export declare function attachMediaStream(element: HTMLVideoElement, stream: MediaStream | null): void;
|
|
28
|
+
/**
|
|
29
|
+
* Detaches any MediaStream from a video element.
|
|
30
|
+
*
|
|
31
|
+
* @param element - The video element to detach the stream from
|
|
32
|
+
*/
|
|
33
|
+
export declare function detachMediaStream(element: HTMLVideoElement): void;
|
|
34
|
+
//# sourceMappingURL=video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/utils/video.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,CAcrD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB1E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAE7F;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAIjE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VIDEO_READY_TIMEOUT_MS as n } from "../constants.js";
|
|
2
|
+
function c(e) {
|
|
3
|
+
return new Promise((r) => {
|
|
4
|
+
if (e.readyState >= HTMLMediaElement.HAVE_METADATA) {
|
|
5
|
+
r();
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
let i = !1;
|
|
9
|
+
const t = () => {
|
|
10
|
+
i || (i = !0, clearTimeout(a), e.removeEventListener("canplay", t), e.removeEventListener("resize", t), r());
|
|
11
|
+
}, a = setTimeout(t, n);
|
|
12
|
+
e.addEventListener("canplay", t), e.addEventListener("resize", t);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function d(e, r) {
|
|
16
|
+
e.srcObject = r;
|
|
17
|
+
}
|
|
18
|
+
function s(e) {
|
|
19
|
+
e.srcObject && (e.srcObject = null);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
d as attachMediaStream,
|
|
23
|
+
s as detachMediaStream,
|
|
24
|
+
c as waitForVideoReady
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=video.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.js","sources":["../../src/utils/video.ts"],"sourcesContent":["/**\n * Video element utilities for creating and managing video elements\n * with proper configuration for WebRTC streams.\n */\n\nimport { VIDEO_READY_TIMEOUT_MS } from '../constants.js';\n\n/**\n * Creates a video element configured for WebRTC streams.\n * The video is muted, autoplays, and plays inline (mobile Safari support).\n * Prevents pause events which can occur on camera switches or PiP mode.\n *\n * @returns A configured HTMLVideoElement\n */\nexport function createVideoElement(): HTMLVideoElement {\n const video = document.createElement('video');\n video.muted = true;\n video.autoplay = true;\n video.playsInline = true;\n\n // Prevent pause (Safari/Firefox pause on PiP, camera switch)\n video.addEventListener('pause', () => {\n video.play().catch((error) => {\n console.error('Video Element Paused', error);\n });\n });\n\n return video;\n}\n\n/**\n * Waits for a video element to be ready for playback.\n * Resolves when the video has metadata or when it can play.\n *\n * @param element - The video element to wait for\n * @returns A promise that resolves when the video is ready\n */\nexport function waitForVideoReady(element: HTMLVideoElement): Promise<void> {\n return new Promise<void>((resolve) => {\n if (element.readyState >= HTMLMediaElement.HAVE_METADATA) {\n resolve();\n return;\n }\n\n let resolved = false;\n\n const done = () => {\n if (resolved) return;\n resolved = true;\n clearTimeout(timeoutId);\n element.removeEventListener('canplay', done);\n element.removeEventListener('resize', done);\n resolve();\n };\n\n // Timeout fallback for audio-only streams where resize/canplay may never fire\n const timeoutId = setTimeout(done, VIDEO_READY_TIMEOUT_MS);\n element.addEventListener('canplay', done);\n element.addEventListener('resize', done);\n });\n}\n\n/**\n * Attaches a MediaStream to a video element.\n *\n * @param element - The video element to attach the stream to\n * @param stream - The MediaStream to attach, or null to detach\n */\nexport function attachMediaStream(element: HTMLVideoElement, stream: MediaStream | null): void {\n element.srcObject = stream;\n}\n\n/**\n * Detaches any MediaStream from a video element.\n *\n * @param element - The video element to detach the stream from\n */\nexport function detachMediaStream(element: HTMLVideoElement): void {\n if (element.srcObject) {\n element.srcObject = null;\n }\n}\n"],"names":["waitForVideoReady","element","resolve","resolved","done","timeoutId","VIDEO_READY_TIMEOUT_MS","attachMediaStream","stream","detachMediaStream"],"mappings":";AAqCO,SAASA,EAAkBC,GAA0C;AAC1E,SAAO,IAAI,QAAc,CAACC,MAAY;AACpC,QAAID,EAAQ,cAAc,iBAAiB,eAAe;AACxD,MAAAC,EAAA;AACA;AAAA,IACF;AAEA,QAAIC,IAAW;AAEf,UAAMC,IAAO,MAAM;AACjB,MAAID,MACJA,IAAW,IACX,aAAaE,CAAS,GACtBJ,EAAQ,oBAAoB,WAAWG,CAAI,GAC3CH,EAAQ,oBAAoB,UAAUG,CAAI,GAC1CF,EAAA;AAAA,IACF,GAGMG,IAAY,WAAWD,GAAME,CAAsB;AACzD,IAAAL,EAAQ,iBAAiB,WAAWG,CAAI,GACxCH,EAAQ,iBAAiB,UAAUG,CAAI;AAAA,EACzC,CAAC;AACH;AAQO,SAASG,EAAkBN,GAA2BO,GAAkC;AAC7F,EAAAP,EAAQ,YAAYO;AACtB;AAOO,SAASC,EAAkBR,GAAiC;AACjE,EAAIA,EAAQ,cACVA,EAAQ,YAAY;AAExB;"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,83 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalwire/web-components",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.11",
|
|
4
4
|
"description": "UI components library built with Lit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"./dist/index.js",
|
|
11
|
+
"./dist/components/*.js"
|
|
12
|
+
],
|
|
9
13
|
"exports": {
|
|
10
14
|
".": {
|
|
11
15
|
"types": "./dist/index.d.ts",
|
|
12
16
|
"import": "./dist/index.js",
|
|
13
17
|
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./call-media": {
|
|
20
|
+
"types": "./dist/components/call-media.d.ts",
|
|
21
|
+
"import": "./dist/components/call-media.js"
|
|
22
|
+
},
|
|
23
|
+
"./self-media": {
|
|
24
|
+
"types": "./dist/components/self-media.d.ts",
|
|
25
|
+
"import": "./dist/components/self-media.js"
|
|
26
|
+
},
|
|
27
|
+
"./participants": {
|
|
28
|
+
"types": "./dist/components/participants.d.ts",
|
|
29
|
+
"import": "./dist/components/participants.js"
|
|
30
|
+
},
|
|
31
|
+
"./call-controls": {
|
|
32
|
+
"types": "./dist/components/call-controls.d.ts",
|
|
33
|
+
"import": "./dist/components/call-controls.js"
|
|
34
|
+
},
|
|
35
|
+
"./call-status": {
|
|
36
|
+
"types": "./dist/components/call-status.d.ts",
|
|
37
|
+
"import": "./dist/components/call-status.js"
|
|
38
|
+
},
|
|
39
|
+
"./audio-level": {
|
|
40
|
+
"types": "./dist/components/audio-level.d.ts",
|
|
41
|
+
"import": "./dist/components/audio-level.js"
|
|
42
|
+
},
|
|
43
|
+
"./device-selector": {
|
|
44
|
+
"types": "./dist/components/device-selector.d.ts",
|
|
45
|
+
"import": "./dist/components/device-selector.js"
|
|
46
|
+
},
|
|
47
|
+
"./dialpad": {
|
|
48
|
+
"types": "./dist/components/dialpad.d.ts",
|
|
49
|
+
"import": "./dist/components/dialpad.js"
|
|
50
|
+
},
|
|
51
|
+
"./click-to-call": {
|
|
52
|
+
"types": "./dist/components/click-to-call.d.ts",
|
|
53
|
+
"import": "./dist/components/click-to-call.js"
|
|
54
|
+
},
|
|
55
|
+
"./directory": {
|
|
56
|
+
"types": "./dist/components/directory.d.ts",
|
|
57
|
+
"import": "./dist/components/directory.js"
|
|
58
|
+
},
|
|
59
|
+
"./participant-controls": {
|
|
60
|
+
"types": "./dist/components/participant-controls.d.ts",
|
|
61
|
+
"import": "./dist/components/participant-controls.js"
|
|
62
|
+
},
|
|
63
|
+
"./example-button": {
|
|
64
|
+
"types": "./dist/components/example-button.d.ts",
|
|
65
|
+
"import": "./dist/components/example-button.js"
|
|
66
|
+
},
|
|
67
|
+
"./context": {
|
|
68
|
+
"types": "./dist/context/index.d.ts",
|
|
69
|
+
"import": "./dist/context/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./types": {
|
|
72
|
+
"types": "./dist/types/index.d.ts",
|
|
73
|
+
"import": "./dist/types/index.js"
|
|
74
|
+
},
|
|
75
|
+
"./utils": {
|
|
76
|
+
"types": "./dist/utils/index.d.ts",
|
|
77
|
+
"import": "./dist/utils/index.js"
|
|
78
|
+
},
|
|
79
|
+
"./react": {
|
|
80
|
+
"types": "./dist/react.d.ts"
|
|
14
81
|
}
|
|
15
82
|
},
|
|
16
83
|
"files": [
|
|
@@ -19,7 +86,7 @@
|
|
|
19
86
|
"scripts": {
|
|
20
87
|
"dev": "vite",
|
|
21
88
|
"dev:test": "vite --port 3000",
|
|
22
|
-
"build": "tsc --project tsconfig.build.json &&
|
|
89
|
+
"build": "vite build && tsc --project tsconfig.build.json && cp src/react.d.ts dist/",
|
|
23
90
|
"preview": "vite preview",
|
|
24
91
|
"type-check": "tsc --noEmit",
|
|
25
92
|
"lint": "eslint src --ext .ts",
|
|
@@ -48,7 +115,7 @@
|
|
|
48
115
|
"rxjs": "^7.8.2"
|
|
49
116
|
},
|
|
50
117
|
"peerDependencies": {
|
|
51
|
-
"@signalwire/js": "4.0.0-beta.
|
|
118
|
+
"@signalwire/js": "4.0.0-beta.11"
|
|
52
119
|
},
|
|
53
120
|
"devDependencies": {
|
|
54
121
|
"@playwright/test": "^1.56.1",
|