@signalwire/web-components 4.0.0-beta.1 → 4.0.0-beta.10

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.
Files changed (79) hide show
  1. package/README.md +9 -10
  2. package/dist/components/audio-level.d.ts +106 -0
  3. package/dist/components/audio-level.d.ts.map +1 -0
  4. package/dist/components/audio-level.js +203 -0
  5. package/dist/components/audio-level.js.map +1 -0
  6. package/dist/components/call-controls.d.ts +163 -0
  7. package/dist/components/call-controls.d.ts.map +1 -0
  8. package/dist/components/call-controls.js +606 -0
  9. package/dist/components/call-controls.js.map +1 -0
  10. package/dist/components/call-media.d.ts +114 -0
  11. package/dist/components/call-media.d.ts.map +1 -0
  12. package/dist/components/call-media.js +219 -0
  13. package/dist/components/call-media.js.map +1 -0
  14. package/dist/components/call-status.d.ts +68 -0
  15. package/dist/components/call-status.d.ts.map +1 -0
  16. package/dist/components/call-status.js +254 -0
  17. package/dist/components/call-status.js.map +1 -0
  18. package/dist/components/click-to-call.d.ts +123 -0
  19. package/dist/components/click-to-call.d.ts.map +1 -0
  20. package/dist/components/click-to-call.js +428 -0
  21. package/dist/components/click-to-call.js.map +1 -0
  22. package/dist/components/device-selector.d.ts +224 -0
  23. package/dist/components/device-selector.d.ts.map +1 -0
  24. package/dist/components/device-selector.js +685 -0
  25. package/dist/components/device-selector.js.map +1 -0
  26. package/dist/components/dialpad.d.ts +60 -0
  27. package/dist/components/dialpad.d.ts.map +1 -0
  28. package/dist/components/dialpad.js +372 -0
  29. package/dist/components/dialpad.js.map +1 -0
  30. package/dist/components/directory.d.ts +103 -0
  31. package/dist/components/directory.d.ts.map +1 -0
  32. package/dist/components/directory.js +503 -0
  33. package/dist/components/directory.js.map +1 -0
  34. package/dist/components/example-button.d.ts +20 -0
  35. package/dist/components/example-button.d.ts.map +1 -0
  36. package/dist/components/example-button.js +74 -0
  37. package/dist/components/example-button.js.map +1 -0
  38. package/dist/components/participant-controls.d.ts +94 -0
  39. package/dist/components/participant-controls.d.ts.map +1 -0
  40. package/dist/components/participant-controls.js +468 -0
  41. package/dist/components/participant-controls.js.map +1 -0
  42. package/dist/components/participants.d.ts +116 -0
  43. package/dist/components/participants.d.ts.map +1 -0
  44. package/dist/components/participants.js +394 -0
  45. package/dist/components/participants.js.map +1 -0
  46. package/dist/components/self-media.d.ts +78 -0
  47. package/dist/components/self-media.d.ts.map +1 -0
  48. package/dist/components/self-media.js +129 -0
  49. package/dist/components/self-media.js.map +1 -0
  50. package/dist/constants.d.ts +10 -0
  51. package/dist/constants.d.ts.map +1 -0
  52. package/dist/constants.js +5 -0
  53. package/dist/constants.js.map +1 -0
  54. package/dist/context/call-context.d.ts +13 -0
  55. package/dist/context/call-context.d.ts.map +1 -0
  56. package/dist/context/call-context.js +6 -0
  57. package/dist/context/call-context.js.map +1 -0
  58. package/dist/context/index.d.ts +2 -0
  59. package/dist/context/index.d.ts.map +1 -0
  60. package/dist/index.d.ts +29 -0
  61. package/dist/index.d.ts.map +1 -0
  62. package/dist/index.js +35 -5644
  63. package/dist/index.js.map +1 -1
  64. package/dist/react.d.ts +101 -0
  65. package/dist/types/index.d.ts +44 -0
  66. package/dist/types/index.d.ts.map +1 -0
  67. package/dist/types/index.js +12 -0
  68. package/dist/types/index.js.map +1 -0
  69. package/dist/utils/debounce.d.ts +10 -0
  70. package/dist/utils/debounce.d.ts.map +1 -0
  71. package/dist/utils/debounce.js +13 -0
  72. package/dist/utils/debounce.js.map +1 -0
  73. package/dist/utils/index.d.ts +3 -0
  74. package/dist/utils/index.d.ts.map +1 -0
  75. package/dist/utils/video.d.ts +34 -0
  76. package/dist/utils/video.d.ts.map +1 -0
  77. package/dist/utils/video.js +26 -0
  78. package/dist/utils/video.js.map +1 -0
  79. 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;CAyCP;AAED;;GAEG;AACH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,SAAS,CAAC;KAC5B;CACF"}
@@ -0,0 +1,129 @@
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 m } from "../context/call-context.js";
6
+ var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, a = (t, s, r, i) => {
7
+ for (var e = i > 1 ? void 0 : i ? _(s, r) : s, o = t.length - 1, c; o >= 0; o--)
8
+ (c = t[o]) && (e = (i ? c(s, r, e) : c(e)) || e);
9
+ return i && e && y(s, r, e), e;
10
+ };
11
+ let l = 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((s) => s.member_id === t);
65
+ }
66
+ /**
67
+ * Render the component
68
+ */
69
+ render() {
70
+ var e;
71
+ const t = this.getSelfLayer();
72
+ if (!t || !((((e = this._localStreamValue) == null ? void 0 : e.getVideoTracks().length) ?? 0) > 0)) return null;
73
+ const r = `
74
+ position: absolute;
75
+ top: ${t.y}%;
76
+ left: ${t.x}%;
77
+ width: ${t.width}%;
78
+ height: ${t.height}%;
79
+ opacity: ${t.visible ? 1 : 0};
80
+ overflow: hidden;
81
+ transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
82
+ pointer-events: none;
83
+ `, i = this.mirror ? "transform: scale(-1, 1); -webkit-transform: scale(-1, 1);" : "";
84
+ return p`
85
+ <div class="local-overlay" part="container" style="${r}">
86
+ <video
87
+ class="local-video"
88
+ part="video"
89
+ style="width: 100%; height: 100%; object-fit: cover; ${i}"
90
+ autoplay
91
+ playsinline
92
+ muted
93
+ disablePictureInPicture
94
+ .srcObject=${this._localStreamValue}
95
+ ></video>
96
+ </div>
97
+ `;
98
+ }
99
+ };
100
+ l.styles = h`
101
+ :host {
102
+ display: contents; /* Doesn't create a box, children inherit positioning */
103
+ }
104
+
105
+ .local-overlay {
106
+ box-sizing: border-box;
107
+ }
108
+
109
+ video {
110
+ display: block;
111
+ }
112
+ `;
113
+ a([
114
+ n({ type: Boolean })
115
+ ], l.prototype, "mirror", 2);
116
+ a([
117
+ d({ context: m, subscribe: !0 }),
118
+ n({ attribute: !1 })
119
+ ], l.prototype, "_call", 2);
120
+ a([
121
+ n({ attribute: !1 })
122
+ ], l.prototype, "call", 1);
123
+ l = a([
124
+ b("sw-self-media")
125
+ ], l);
126
+ export {
127
+ l as SelfMedia
128
+ };
129
+ //# 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 // Skip video overlay for audio-only streams (no video tracks)\n const hasVideoTracks = (this._localStreamValue?.getVideoTracks().length ?? 0) > 0;\n if (!hasVideoTracks) 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","_a","style","videoStyle","html","css","__decorateClass","property","consume","callContext","customElement"],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Constants for the web-components package
3
+ */
4
+ /**
5
+ * Timeout in milliseconds for waiting for a video element to become ready.
6
+ * Audio-only streams attached to video elements may never fire `resize` or `canplay`,
7
+ * so this timeout ensures the component doesn't block indefinitely.
8
+ */
9
+ export declare const VIDEO_READY_TIMEOUT_MS = 2000;
10
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAC"}
@@ -0,0 +1,5 @@
1
+ const E = 2e3;
2
+ export {
3
+ E as VIDEO_READY_TIMEOUT_MS
4
+ };
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["/**\n * Constants for the web-components package\n */\n\n/**\n * Timeout in milliseconds for waiting for a video element to become ready.\n * Audio-only streams attached to video elements may never fire `resize` or `canplay`,\n * so this timeout ensures the component doesn't block indefinitely.\n */\nexport const VIDEO_READY_TIMEOUT_MS = 2000;\n"],"names":["VIDEO_READY_TIMEOUT_MS"],"mappings":"AASO,MAAMA,IAAyB;"}
@@ -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,6 @@
1
+ import { createContext as t } from "@lit/context";
2
+ const e = t("call");
3
+ export {
4
+ e as callContext
5
+ };
6
+ //# sourceMappingURL=call-context.js.map
@@ -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,2 @@
1
+ export * from './call-context.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -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 type { Call, CallSelf, DeviceController, LayoutLayer, Participant } 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,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGnG,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"}