@coventia/softphone 0.2.0 → 0.3.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.
- package/dist/{call-DUVnDxsz.d.cts → call-CaPDWVk3.d.cts} +50 -1
- package/dist/{call-DUVnDxsz.d.ts → call-CaPDWVk3.d.ts} +50 -1
- package/dist/{chunk-YWI6EQYS.js → chunk-EYEDPD7Y.js} +108 -15
- package/dist/chunk-EYEDPD7Y.js.map +1 -0
- package/dist/{chunk-LMJXX4YM.js → chunk-UHNLEBBO.js} +4 -2
- package/dist/chunk-UHNLEBBO.js.map +1 -0
- package/dist/element/index.d.ts +76 -11
- package/dist/element/index.js +1411 -478
- package/dist/element/index.js.map +1 -1
- package/dist/{engine-EPCKf-Bl.d.ts → engine-BgBsIcEa.d.ts} +1 -1
- package/dist/{engine-CDjkrXHY.d.cts → engine-CU2rEo3g.d.cts} +1 -1
- package/dist/index.cjs +318 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +157 -19
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +2 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +1 -1
- package/dist/{softphone-BtdgZWkm.d.ts → softphone-DEt0TtQw.d.ts} +26 -10
- package/dist/{softphone-DHG9MTNg.d.cts → softphone-dZMkW8V1.d.cts} +26 -10
- package/dist/softphone.css +192 -46
- package/dist/{sources-5L2R4HTV.js → sources-M3GYMS6V.js} +58 -3
- package/dist/sources-M3GYMS6V.js.map +1 -0
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/dist/ui/index.cjs +1308 -366
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +40 -7
- package/dist/ui/index.d.ts +40 -7
- package/dist/ui/index.js +1308 -369
- package/dist/ui/index.js.map +1 -1
- package/dist/zadarma/index.cjs +106 -13
- package/dist/zadarma/index.cjs.map +1 -1
- package/dist/zadarma/index.d.cts +2 -2
- package/dist/zadarma/index.d.ts +2 -2
- package/dist/zadarma/index.js +1 -1
- package/dist/zadarma-engine-L5DEFXUS.js +5 -0
- package/dist/{zadarma-engine-4VOPIBXG.js.map → zadarma-engine-L5DEFXUS.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-LMJXX4YM.js.map +0 -1
- package/dist/chunk-YWI6EQYS.js.map +0 -1
- package/dist/sources-5L2R4HTV.js.map +0 -1
- package/dist/zadarma-engine-4VOPIBXG.js +0 -5
package/dist/ui/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { g as Contact,
|
|
4
|
-
export {
|
|
3
|
+
import { g as Contact, x as ContactsSource, y as HistorySource, a as Call, k as RingtoneOption } from '../call-CaPDWVk3.cjs';
|
|
4
|
+
export { D as CallHistoryEntry, G as ContactsPage } from '../call-CaPDWVk3.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Shaped like a Lucide icon (`size`, `className`, both optional — every SVG prop Lucide's own icons
|
|
@@ -75,8 +75,9 @@ interface SoftphoneWidgetProps {
|
|
|
75
75
|
*/
|
|
76
76
|
readonly requireMic?: boolean;
|
|
77
77
|
/**
|
|
78
|
-
* Play call audio: the remote party, the inbound ring, the outbound ringback,
|
|
79
|
-
*
|
|
78
|
+
* Play call audio: the remote party, the inbound ring, the outbound ringback, a short cue when a
|
|
79
|
+
* connected call ends — by either side — and a key tone for each keypad press (the dialer, and the
|
|
80
|
+
* in-call keypad that sends DTMF). **On by default.**
|
|
80
81
|
*
|
|
81
82
|
* The remote-party half is not a nicety — nothing else attaches the `MediaStream`, so with this
|
|
82
83
|
* off a connected call is silent in both directions. Turn it off only if the host attaches
|
|
@@ -149,13 +150,23 @@ interface DialpadProps {
|
|
|
149
150
|
} | null;
|
|
150
151
|
/** Called on any action that supersedes that outcome: a digit, a backspace, a dial. */
|
|
151
152
|
readonly onIntent?: () => void;
|
|
153
|
+
/**
|
|
154
|
+
* Play a key tone when a digit is pressed. **On by default**; `SoftphoneWidget` passes its own
|
|
155
|
+
* `sounds` flag, so a host that silences the widget silences this too.
|
|
156
|
+
*/
|
|
157
|
+
readonly keyTones?: boolean;
|
|
152
158
|
}
|
|
153
|
-
declare function Dialpad({ outcome, onIntent }?: DialpadProps): react.JSX.Element;
|
|
159
|
+
declare function Dialpad({ outcome, onIntent, keyTones }?: DialpadProps): react.JSX.Element;
|
|
154
160
|
|
|
155
161
|
/** The active-call view: incoming, outgoing and in-call in one, switched on call.state. */
|
|
156
|
-
declare function CallScreen({ call, incomingCallAction, }: Readonly<{
|
|
162
|
+
declare function CallScreen({ call, incomingCallAction, keyTones, }: Readonly<{
|
|
157
163
|
call: Call;
|
|
158
164
|
incomingCallAction?: ContactAction;
|
|
165
|
+
/**
|
|
166
|
+
* Play a tone for each keypad press. **On by default**; `SoftphoneWidget` passes its own `sounds`
|
|
167
|
+
* flag, so a host that silences the widget silences this too.
|
|
168
|
+
*/
|
|
169
|
+
keyTones?: boolean;
|
|
159
170
|
}>): react.JSX.Element | null;
|
|
160
171
|
|
|
161
172
|
/**
|
|
@@ -185,4 +196,26 @@ declare function HistoryTab({ source }: Readonly<{
|
|
|
185
196
|
source: HistorySource;
|
|
186
197
|
}>): react.JSX.Element;
|
|
187
198
|
|
|
188
|
-
|
|
199
|
+
/** A running preview. */
|
|
200
|
+
interface RingtonePreview {
|
|
201
|
+
/** Stops it now. Safe to call more than once, and after it ended. */
|
|
202
|
+
stop(): void;
|
|
203
|
+
/**
|
|
204
|
+
* Settles once the preview is over — played to its end, or `stop()` called. Rejects only when the file
|
|
205
|
+
* could not be downloaded or decoded (a `stop()` before that resolves it instead).
|
|
206
|
+
*/
|
|
207
|
+
readonly done: Promise<void>;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Plays one ringtone briefly, the way the softphone's Ajustes does — same sound, level, loop points and
|
|
211
|
+
* length. For a host's own ringtone picker where no softphone is involved, such as an organization-default
|
|
212
|
+
* setting (custom-ringtone.md §4.7): the built-in "Clásico" (`url: null`) is generated in code, so there is
|
|
213
|
+
* no file such a page could play by itself.
|
|
214
|
+
*
|
|
215
|
+
* Call it from a user gesture (a click): that is when a browser lets audio start.
|
|
216
|
+
*/
|
|
217
|
+
declare function previewRingtone(ringtone: Pick<RingtoneOption, 'url'> & Partial<Pick<RingtoneOption, 'loop'>>, options?: {
|
|
218
|
+
readonly sinkId?: string | null;
|
|
219
|
+
}): RingtonePreview;
|
|
220
|
+
|
|
221
|
+
export { CallScreen, ContactsSource, ContactsTab, Dialpad, HistorySource, HistoryTab, MicPermissionGate, type RingtonePreview, type SoftphoneTheme, SoftphoneWidget, type SoftphoneWidgetProps, previewRingtone };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { g as Contact,
|
|
4
|
-
export {
|
|
3
|
+
import { g as Contact, x as ContactsSource, y as HistorySource, a as Call, k as RingtoneOption } from '../call-CaPDWVk3.js';
|
|
4
|
+
export { D as CallHistoryEntry, G as ContactsPage } from '../call-CaPDWVk3.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Shaped like a Lucide icon (`size`, `className`, both optional — every SVG prop Lucide's own icons
|
|
@@ -75,8 +75,9 @@ interface SoftphoneWidgetProps {
|
|
|
75
75
|
*/
|
|
76
76
|
readonly requireMic?: boolean;
|
|
77
77
|
/**
|
|
78
|
-
* Play call audio: the remote party, the inbound ring, the outbound ringback,
|
|
79
|
-
*
|
|
78
|
+
* Play call audio: the remote party, the inbound ring, the outbound ringback, a short cue when a
|
|
79
|
+
* connected call ends — by either side — and a key tone for each keypad press (the dialer, and the
|
|
80
|
+
* in-call keypad that sends DTMF). **On by default.**
|
|
80
81
|
*
|
|
81
82
|
* The remote-party half is not a nicety — nothing else attaches the `MediaStream`, so with this
|
|
82
83
|
* off a connected call is silent in both directions. Turn it off only if the host attaches
|
|
@@ -149,13 +150,23 @@ interface DialpadProps {
|
|
|
149
150
|
} | null;
|
|
150
151
|
/** Called on any action that supersedes that outcome: a digit, a backspace, a dial. */
|
|
151
152
|
readonly onIntent?: () => void;
|
|
153
|
+
/**
|
|
154
|
+
* Play a key tone when a digit is pressed. **On by default**; `SoftphoneWidget` passes its own
|
|
155
|
+
* `sounds` flag, so a host that silences the widget silences this too.
|
|
156
|
+
*/
|
|
157
|
+
readonly keyTones?: boolean;
|
|
152
158
|
}
|
|
153
|
-
declare function Dialpad({ outcome, onIntent }?: DialpadProps): react.JSX.Element;
|
|
159
|
+
declare function Dialpad({ outcome, onIntent, keyTones }?: DialpadProps): react.JSX.Element;
|
|
154
160
|
|
|
155
161
|
/** The active-call view: incoming, outgoing and in-call in one, switched on call.state. */
|
|
156
|
-
declare function CallScreen({ call, incomingCallAction, }: Readonly<{
|
|
162
|
+
declare function CallScreen({ call, incomingCallAction, keyTones, }: Readonly<{
|
|
157
163
|
call: Call;
|
|
158
164
|
incomingCallAction?: ContactAction;
|
|
165
|
+
/**
|
|
166
|
+
* Play a tone for each keypad press. **On by default**; `SoftphoneWidget` passes its own `sounds`
|
|
167
|
+
* flag, so a host that silences the widget silences this too.
|
|
168
|
+
*/
|
|
169
|
+
keyTones?: boolean;
|
|
159
170
|
}>): react.JSX.Element | null;
|
|
160
171
|
|
|
161
172
|
/**
|
|
@@ -185,4 +196,26 @@ declare function HistoryTab({ source }: Readonly<{
|
|
|
185
196
|
source: HistorySource;
|
|
186
197
|
}>): react.JSX.Element;
|
|
187
198
|
|
|
188
|
-
|
|
199
|
+
/** A running preview. */
|
|
200
|
+
interface RingtonePreview {
|
|
201
|
+
/** Stops it now. Safe to call more than once, and after it ended. */
|
|
202
|
+
stop(): void;
|
|
203
|
+
/**
|
|
204
|
+
* Settles once the preview is over — played to its end, or `stop()` called. Rejects only when the file
|
|
205
|
+
* could not be downloaded or decoded (a `stop()` before that resolves it instead).
|
|
206
|
+
*/
|
|
207
|
+
readonly done: Promise<void>;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Plays one ringtone briefly, the way the softphone's Ajustes does — same sound, level, loop points and
|
|
211
|
+
* length. For a host's own ringtone picker where no softphone is involved, such as an organization-default
|
|
212
|
+
* setting (custom-ringtone.md §4.7): the built-in "Clásico" (`url: null`) is generated in code, so there is
|
|
213
|
+
* no file such a page could play by itself.
|
|
214
|
+
*
|
|
215
|
+
* Call it from a user gesture (a click): that is when a browser lets audio start.
|
|
216
|
+
*/
|
|
217
|
+
declare function previewRingtone(ringtone: Pick<RingtoneOption, 'url'> & Partial<Pick<RingtoneOption, 'loop'>>, options?: {
|
|
218
|
+
readonly sinkId?: string | null;
|
|
219
|
+
}): RingtonePreview;
|
|
220
|
+
|
|
221
|
+
export { CallScreen, ContactsSource, ContactsTab, Dialpad, HistorySource, HistoryTab, MicPermissionGate, type RingtonePreview, type SoftphoneTheme, SoftphoneWidget, type SoftphoneWidgetProps, previewRingtone };
|