@signalwire/web-components 4.0.0-beta.3 → 4.0.0-beta.4
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 +3 -1
- package/dist/components/audio-level.d.ts +106 -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 +163 -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 +114 -0
- package/dist/components/call-media.d.ts.map +1 -0
- package/dist/components/call-media.js +215 -0
- package/dist/components/call-media.js.map +1 -0
- package/dist/components/call-status.d.ts +71 -0
- package/dist/components/call-status.d.ts.map +1 -0
- package/dist/components/call-status.js +251 -0
- package/dist/components/call-status.js.map +1 -0
- package/dist/components/click-to-call.d.ts +123 -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 +250 -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 +60 -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 +103 -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 +20 -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 +94 -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 +116 -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 +128 -0
- package/dist/components/self-media.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 +39 -5645
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +101 -0
- package/dist/types/index.d.ts +67 -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
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self Media Component
|
|
3
|
+
*
|
|
4
|
+
* Renders local video overlay with positioning from layoutLayers.
|
|
5
|
+
* Supports optional mirror transform for the video element.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <self-media mirror=${true}></self-media>
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
import { LitElement } from 'lit';
|
|
13
|
+
import type { Call } from '../types/index.js';
|
|
14
|
+
export declare class SelfMedia extends LitElement {
|
|
15
|
+
static styles: import("lit").CSSResult;
|
|
16
|
+
/**
|
|
17
|
+
* Mirror the local video horizontally
|
|
18
|
+
*/
|
|
19
|
+
mirror: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Consumes call context from parent call-media component
|
|
22
|
+
*/
|
|
23
|
+
private _call?;
|
|
24
|
+
/**
|
|
25
|
+
* Public call property for direct assignment (when not nested in sw-call-media)
|
|
26
|
+
*/
|
|
27
|
+
set call(value: Call | undefined);
|
|
28
|
+
get call(): Call | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Current local stream value from observable
|
|
31
|
+
*/
|
|
32
|
+
private _localStreamValue;
|
|
33
|
+
/**
|
|
34
|
+
* Current layout layers value from observable
|
|
35
|
+
*/
|
|
36
|
+
private _layoutLayersValue;
|
|
37
|
+
/**
|
|
38
|
+
* RxJS subscriptions for cleanup
|
|
39
|
+
*/
|
|
40
|
+
private subscriptions;
|
|
41
|
+
/**
|
|
42
|
+
* Lifecycle: Component connected to DOM
|
|
43
|
+
*/
|
|
44
|
+
connectedCallback(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Lifecycle: React to property/context changes
|
|
47
|
+
*/
|
|
48
|
+
protected updated(changedProperties: Map<string, unknown>): void;
|
|
49
|
+
/**
|
|
50
|
+
* Lifecycle: Component disconnected from DOM
|
|
51
|
+
*/
|
|
52
|
+
disconnectedCallback(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Subscribe to call observables
|
|
55
|
+
*/
|
|
56
|
+
private setupSubscriptions;
|
|
57
|
+
/**
|
|
58
|
+
* Cleanup all subscriptions
|
|
59
|
+
*/
|
|
60
|
+
private cleanupSubscriptions;
|
|
61
|
+
/**
|
|
62
|
+
* Find self layer in layout layers
|
|
63
|
+
*/
|
|
64
|
+
private getSelfLayer;
|
|
65
|
+
/**
|
|
66
|
+
* Render the component
|
|
67
|
+
*/
|
|
68
|
+
render(): import("lit-html").TemplateResult<1> | null;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Declare global type for TypeScript
|
|
72
|
+
*/
|
|
73
|
+
declare global {
|
|
74
|
+
interface HTMLElementTagNameMap {
|
|
75
|
+
'sw-self-media': SelfMedia;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=self-media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-media.d.ts","sourceRoot":"","sources":["../../src/components/self-media.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,OAAO,KAAK,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AAI3D,qBACa,SAAU,SAAQ,UAAU;IACvC,MAAM,CAAC,MAAM,0BAYX;IAEF;;OAEG;IAC0B,MAAM,UAAS;IAE5C;;OAEG;IAGH,OAAO,CAAC,KAAK,CAAC,CAAO;IAErB;;OAEG;IACH,IACI,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,EAI/B;IACD,IAAI,IAAI,IAAI,IAAI,GAAG,SAAS,CAE3B;IAED;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAA4B;IAErD;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAAqB;IAE/C;;OAEG;IACH,OAAO,CAAC,aAAa,CAAsB;IAE3C;;OAEG;IACH,iBAAiB;IAKjB;;OAEG;IACH,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAUhE;;OAEG;IACH,oBAAoB;IAKpB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAsB1B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAK5B;;OAEG;IACH,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACH,MAAM;CAqCP;AAED;;GAEG;AACH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,SAAS,CAAC;KAC5B;CACF"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { LitElement as u, html as p, css as h } from "lit";
|
|
2
|
+
import { property as n, customElement as b } from "lit/decorators.js";
|
|
3
|
+
import { consume as d } from "@lit/context";
|
|
4
|
+
import { getSelfId as f } from "../types/index.js";
|
|
5
|
+
import { callContext as y } from "../context/call-context.js";
|
|
6
|
+
var m = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, o = (t, e, l, r) => {
|
|
7
|
+
for (var s = r > 1 ? void 0 : r ? _(e, l) : e, a = t.length - 1, c; a >= 0; a--)
|
|
8
|
+
(c = t[a]) && (s = (r ? c(e, l, s) : c(s)) || s);
|
|
9
|
+
return r && s && m(e, l, s), s;
|
|
10
|
+
};
|
|
11
|
+
let i = class extends u {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.mirror = !1, this._localStreamValue = null, this._layoutLayersValue = [], this.subscriptions = [];
|
|
14
|
+
}
|
|
15
|
+
set call(t) {
|
|
16
|
+
this._call = t, this.cleanupSubscriptions(), this.setupSubscriptions();
|
|
17
|
+
}
|
|
18
|
+
get call() {
|
|
19
|
+
return this._call;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Lifecycle: Component connected to DOM
|
|
23
|
+
*/
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback(), this.setupSubscriptions();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Lifecycle: React to property/context changes
|
|
29
|
+
*/
|
|
30
|
+
updated(t) {
|
|
31
|
+
super.updated(t), t.has("_call") && this._call && (this.cleanupSubscriptions(), this.setupSubscriptions());
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Lifecycle: Component disconnected from DOM
|
|
35
|
+
*/
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
super.disconnectedCallback(), this.cleanupSubscriptions();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Subscribe to call observables
|
|
41
|
+
*/
|
|
42
|
+
setupSubscriptions() {
|
|
43
|
+
this._call && (this.subscriptions.push(
|
|
44
|
+
this._call.localStream$.subscribe((t) => {
|
|
45
|
+
this._localStreamValue = t, this.requestUpdate();
|
|
46
|
+
})
|
|
47
|
+
), this.subscriptions.push(
|
|
48
|
+
this._call.layoutLayers$.subscribe((t) => {
|
|
49
|
+
this._layoutLayersValue = t, this.requestUpdate();
|
|
50
|
+
})
|
|
51
|
+
));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Cleanup all subscriptions
|
|
55
|
+
*/
|
|
56
|
+
cleanupSubscriptions() {
|
|
57
|
+
this.subscriptions.forEach((t) => t.unsubscribe()), this.subscriptions = [];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Find self layer in layout layers
|
|
61
|
+
*/
|
|
62
|
+
getSelfLayer() {
|
|
63
|
+
const t = f(this._call);
|
|
64
|
+
return this._layoutLayersValue.find((e) => e.member_id === t);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Render the component
|
|
68
|
+
*/
|
|
69
|
+
render() {
|
|
70
|
+
const t = this.getSelfLayer();
|
|
71
|
+
if (!t) return null;
|
|
72
|
+
const e = `
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: ${t.y}%;
|
|
75
|
+
left: ${t.x}%;
|
|
76
|
+
width: ${t.width}%;
|
|
77
|
+
height: ${t.height}%;
|
|
78
|
+
opacity: ${t.visible ? 1 : 0};
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
`, l = this.mirror ? "transform: scale(-1, 1); -webkit-transform: scale(-1, 1);" : "";
|
|
83
|
+
return p`
|
|
84
|
+
<div class="local-overlay" part="container" style="${e}">
|
|
85
|
+
<video
|
|
86
|
+
class="local-video"
|
|
87
|
+
part="video"
|
|
88
|
+
style="width: 100%; height: 100%; object-fit: cover; ${l}"
|
|
89
|
+
autoplay
|
|
90
|
+
playsinline
|
|
91
|
+
muted
|
|
92
|
+
disablePictureInPicture
|
|
93
|
+
.srcObject=${this._localStreamValue}
|
|
94
|
+
></video>
|
|
95
|
+
</div>
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
i.styles = h`
|
|
100
|
+
:host {
|
|
101
|
+
display: contents; /* Doesn't create a box, children inherit positioning */
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.local-overlay {
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
video {
|
|
109
|
+
display: block;
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
o([
|
|
113
|
+
n({ type: Boolean })
|
|
114
|
+
], i.prototype, "mirror", 2);
|
|
115
|
+
o([
|
|
116
|
+
d({ context: y, subscribe: !0 }),
|
|
117
|
+
n({ attribute: !1 })
|
|
118
|
+
], i.prototype, "_call", 2);
|
|
119
|
+
o([
|
|
120
|
+
n({ attribute: !1 })
|
|
121
|
+
], i.prototype, "call", 1);
|
|
122
|
+
i = o([
|
|
123
|
+
b("sw-self-media")
|
|
124
|
+
], i);
|
|
125
|
+
export {
|
|
126
|
+
i as SelfMedia
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=self-media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-media.js","sources":["../../src/components/self-media.ts"],"sourcesContent":["/**\n * Self Media Component\n *\n * Renders local video overlay with positioning from layoutLayers.\n * Supports optional mirror transform for the video element.\n *\n * @example\n * ```html\n * <self-media mirror=${true}></self-media>\n * ```\n */\n\nimport { LitElement, html, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\nimport { Subscription } from 'rxjs';\nimport type { Call, LayoutLayer } from '../types/index.js';\nimport { getSelfId } from '../types/index.js';\nimport { callContext } from '../context/call-context.js';\n\n@customElement('sw-self-media')\nexport class SelfMedia extends LitElement {\n static styles = css`\n :host {\n display: contents; /* Doesn't create a box, children inherit positioning */\n }\n\n .local-overlay {\n box-sizing: border-box;\n }\n\n video {\n display: block;\n }\n `;\n\n /**\n * Mirror the local video horizontally\n */\n @property({ type: Boolean }) mirror = false;\n\n /**\n * Consumes call context from parent call-media component\n */\n @consume({ context: callContext, subscribe: true })\n @property({ attribute: false })\n private _call?: Call;\n\n /**\n * Public call property for direct assignment (when not nested in sw-call-media)\n */\n @property({ attribute: false })\n set call(value: Call | undefined) {\n this._call = value;\n this.cleanupSubscriptions();\n this.setupSubscriptions();\n }\n get call(): Call | undefined {\n return this._call;\n }\n\n /**\n * Current local stream value from observable\n */\n private _localStreamValue: MediaStream | null = null;\n\n /**\n * Current layout layers value from observable\n */\n private _layoutLayersValue: LayoutLayer[] = [];\n\n /**\n * RxJS subscriptions for cleanup\n */\n private subscriptions: Subscription[] = [];\n\n /**\n * Lifecycle: Component connected to DOM\n */\n connectedCallback() {\n super.connectedCallback();\n this.setupSubscriptions();\n }\n\n /**\n * Lifecycle: React to property/context changes\n */\n protected updated(changedProperties: Map<string, unknown>): void {\n super.updated(changedProperties);\n if (changedProperties.has('_call') && this._call) {\n // Clean up old subscriptions first\n this.cleanupSubscriptions();\n // Set up new subscriptions\n this.setupSubscriptions();\n }\n }\n\n /**\n * Lifecycle: Component disconnected from DOM\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.cleanupSubscriptions();\n }\n\n /**\n * Subscribe to call observables\n */\n private setupSubscriptions(): void {\n // Continue observing even if _call is undefined initially\n // This allows component to react when call becomes available\n if (!this._call) return;\n\n // Subscribe to local stream\n this.subscriptions.push(\n this._call.localStream$.subscribe((stream: MediaStream | null) => {\n this._localStreamValue = stream;\n this.requestUpdate();\n })\n );\n\n // Subscribe to layout layers\n this.subscriptions.push(\n this._call.layoutLayers$.subscribe((layers: LayoutLayer[]) => {\n this._layoutLayersValue = layers;\n this.requestUpdate();\n })\n );\n }\n\n /**\n * Cleanup all subscriptions\n */\n private cleanupSubscriptions(): void {\n this.subscriptions.forEach((sub) => sub.unsubscribe());\n this.subscriptions = [];\n }\n\n /**\n * Find self layer in layout layers\n */\n private getSelfLayer(): LayoutLayer | undefined {\n // Get selfId dynamically from call.self to handle cases where self is available after subscription setup\n const selfId = getSelfId(this._call);\n return this._layoutLayersValue.find((layer) => layer.member_id === selfId);\n }\n\n /**\n * Render the component\n */\n render() {\n const layer = this.getSelfLayer();\n\n // Skip rendering but continue observing - return null allows reactive updates\n if (!layer) return null;\n\n const style = `\n position: absolute;\n top: ${layer.y}%;\n left: ${layer.x}%;\n width: ${layer.width}%;\n height: ${layer.height}%;\n opacity: ${layer.visible ? 1 : 0};\n overflow: hidden;\n transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;\n pointer-events: none;\n `;\n\n const videoStyle = this.mirror\n ? 'transform: scale(-1, 1); -webkit-transform: scale(-1, 1);'\n : '';\n\n return html`\n <div class=\"local-overlay\" part=\"container\" style=\"${style}\">\n <video\n class=\"local-video\"\n part=\"video\"\n style=\"width: 100%; height: 100%; object-fit: cover; ${videoStyle}\"\n autoplay\n playsinline\n muted\n disablePictureInPicture\n .srcObject=${this._localStreamValue}\n ></video>\n </div>\n `;\n }\n}\n\n/**\n * Declare global type for TypeScript\n */\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sw-self-media': SelfMedia;\n }\n}\n"],"names":["SelfMedia","LitElement","value","changedProperties","stream","layers","sub","selfId","getSelfId","layer","style","videoStyle","html","css","__decorateClass","property","consume","callContext","customElement"],"mappings":";;;;;;;;;;AAqBO,IAAMA,IAAN,cAAwBC,EAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAAA,GAkBwB,KAAA,SAAS,IAyBtC,KAAQ,oBAAwC,MAKhD,KAAQ,qBAAoC,CAAA,GAK5C,KAAQ,gBAAgC,CAAA;AAAA,EAAC;AAAA,EAtBzC,IAAI,KAAKC,GAAyB;AAChC,SAAK,QAAQA,GACb,KAAK,qBAAA,GACL,KAAK,mBAAA;AAAA,EACP;AAAA,EACA,IAAI,OAAyB;AAC3B,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAoBA,oBAAoB;AAClB,UAAM,kBAAA,GACN,KAAK,mBAAA;AAAA,EACP;AAAA;AAAA;AAAA;AAAA,EAKU,QAAQC,GAA+C;AAC/D,UAAM,QAAQA,CAAiB,GAC3BA,EAAkB,IAAI,OAAO,KAAK,KAAK,UAEzC,KAAK,qBAAA,GAEL,KAAK,mBAAA;AAAA,EAET;AAAA;AAAA;AAAA;AAAA,EAKA,uBAAuB;AACrB,UAAM,qBAAA,GACN,KAAK,qBAAA;AAAA,EACP;AAAA;AAAA;AAAA;AAAA,EAKQ,qBAA2B;AAGjC,IAAK,KAAK,UAGV,KAAK,cAAc;AAAA,MACjB,KAAK,MAAM,aAAa,UAAU,CAACC,MAA+B;AAChE,aAAK,oBAAoBA,GACzB,KAAK,cAAA;AAAA,MACP,CAAC;AAAA,IAAA,GAIH,KAAK,cAAc;AAAA,MACjB,KAAK,MAAM,cAAc,UAAU,CAACC,MAA0B;AAC5D,aAAK,qBAAqBA,GAC1B,KAAK,cAAA;AAAA,MACP,CAAC;AAAA,IAAA;AAAA,EAEL;AAAA;AAAA;AAAA;AAAA,EAKQ,uBAA6B;AACnC,SAAK,cAAc,QAAQ,CAACC,MAAQA,EAAI,aAAa,GACrD,KAAK,gBAAgB,CAAA;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKQ,eAAwC;AAE9C,UAAMC,IAASC,EAAU,KAAK,KAAK;AACnC,WAAO,KAAK,mBAAmB,KAAK,CAACC,MAAUA,EAAM,cAAcF,CAAM;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA,EAKA,SAAS;AACP,UAAME,IAAQ,KAAK,aAAA;AAGnB,QAAI,CAACA,EAAO,QAAO;AAEnB,UAAMC,IAAQ;AAAA;AAAA,aAELD,EAAM,CAAC;AAAA,cACNA,EAAM,CAAC;AAAA,eACNA,EAAM,KAAK;AAAA,gBACVA,EAAM,MAAM;AAAA,iBACXA,EAAM,UAAU,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA,OAM5BE,IAAa,KAAK,SACpB,8DACA;AAEJ,WAAOC;AAAA,2DACgDF,CAAK;AAAA;AAAA;AAAA;AAAA,iEAICC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKpD,KAAK,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAI3C;AACF;AAtKaX,EACJ,SAASa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBaC,EAAA;AAAA,EAA5BC,EAAS,EAAE,MAAM,QAAA,CAAS;AAAA,GAlBhBf,EAkBkB,WAAA,UAAA,CAAA;AAOrBc,EAAA;AAAA,EAFPE,EAAQ,EAAE,SAASC,GAAa,WAAW,IAAM;AAAA,EACjDF,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GAxBnBf,EAyBH,WAAA,SAAA,CAAA;AAMJc,EAAA;AAAA,EADHC,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GA9BnBf,EA+BP,WAAA,QAAA,CAAA;AA/BOA,IAANc,EAAA;AAAA,EADNI,EAAc,eAAe;AAAA,GACjBlB,CAAA;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context for sharing Call object between call-media components.
|
|
3
|
+
* Provides call instance from parent <call-media> to child components.
|
|
4
|
+
*/
|
|
5
|
+
import type { Call } from '../types/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Context key for Call object sharing.
|
|
8
|
+
* Used by call-media (provider) and participants/self-media (consumers).
|
|
9
|
+
*/
|
|
10
|
+
export declare const callContext: {
|
|
11
|
+
__context__: Call | undefined;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=call-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-context.d.ts","sourceRoot":"","sources":["../../src/context/call-context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,WAAW;;CAA0C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-context.js","sources":["../../src/context/call-context.ts"],"sourcesContent":["/**\n * Context for sharing Call object between call-media components.\n * Provides call instance from parent <call-media> to child components.\n */\n\nimport { createContext } from '@lit/context';\nimport type { Call } from '../types/index.js';\n\n/**\n * Context key for Call object sharing.\n * Used by call-media (provider) and participants/self-media (consumers).\n */\nexport const callContext = createContext<Call | undefined>('call');\n"],"names":["callContext","createContext"],"mappings":";AAYO,MAAMA,IAAcC,EAAgC,MAAM;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @signalwire/web-components
|
|
3
|
+
* UI Components Library built with Lit
|
|
4
|
+
*/
|
|
5
|
+
export { ExampleButton } from './components/example-button.js';
|
|
6
|
+
export { CallMedia } from './components/call-media.js';
|
|
7
|
+
export { Participants } from './components/participants.js';
|
|
8
|
+
export { SelfMedia } from './components/self-media.js';
|
|
9
|
+
export { AudioLevel } from './components/audio-level.js';
|
|
10
|
+
export { DeviceSelector } from './components/device-selector.js';
|
|
11
|
+
export { CallControls } from './components/call-controls.js';
|
|
12
|
+
export { CallStatusComponent } from './components/call-status.js';
|
|
13
|
+
export { DialpadComponent } from './components/dialpad.js';
|
|
14
|
+
export { ClickToCallComponent } from './components/click-to-call.js';
|
|
15
|
+
export { DirectoryComponent } from './components/directory.js';
|
|
16
|
+
export { ParticipantControlsComponent } from './components/participant-controls.js';
|
|
17
|
+
export * from './types/index.js';
|
|
18
|
+
export * from './context/index.js';
|
|
19
|
+
export { html, css, LitElement } from 'lit';
|
|
20
|
+
export type { TemplateResult, CSSResult } from 'lit';
|
|
21
|
+
/**
|
|
22
|
+
* Library version from package.json, injected at build time.
|
|
23
|
+
*/
|
|
24
|
+
export declare const version: string;
|
|
25
|
+
/**
|
|
26
|
+
* Flag indicating the library has been loaded and is ready to use.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ready: boolean;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAGpF,cAAc,kBAAkB,CAAC;AAGjC,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAQrD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAAoB,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,OAAc,CAAC"}
|