@yinshan-tech/webrtc-react 0.8.1 → 0.8.3
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 +133 -56
- package/dist/CallWidget.d.ts +1 -0
- package/dist/CallWidget.js +22 -5
- package/dist/CallWidget.js.map +1 -1
- package/dist/OutboundCallButton.d.ts +1 -1
- package/dist/OutboundCallButton.js +45 -5
- package/dist/OutboundCallButton.js.map +1 -1
- package/dist/OutboundModeShell.d.ts +33 -1
- package/dist/OutboundModeShell.js +277 -72
- package/dist/OutboundModeShell.js.map +1 -1
- package/dist/SoftphoneProvider.d.ts +1 -1
- package/dist/SoftphoneProvider.js.map +1 -1
- package/dist/ensureCallWidgetHost.js +27 -2
- package/dist/ensureCallWidgetHost.js.map +1 -1
- package/dist/host/SoftphoneConnectToast.d.ts +10 -0
- package/dist/host/SoftphoneConnectToast.js +36 -0
- package/dist/host/SoftphoneConnectToast.js.map +1 -0
- package/dist/host/SoftphoneHost.d.ts +21 -0
- package/dist/host/SoftphoneHost.js +55 -0
- package/dist/host/SoftphoneHost.js.map +1 -0
- package/dist/host/SoftphoneNotifyBridge.d.ts +9 -0
- package/dist/host/SoftphoneNotifyBridge.js +26 -0
- package/dist/host/SoftphoneNotifyBridge.js.map +1 -0
- package/dist/host/connectToast.d.ts +8 -0
- package/dist/host/connectToast.js +32 -0
- package/dist/host/connectToast.js.map +1 -0
- package/dist/host/types.d.ts +8 -0
- package/dist/host/types.js +2 -0
- package/dist/host/types.js.map +1 -0
- package/dist/index.d.ts +31 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/kit/assets.d.ts +7 -0
- package/dist/kit/assets.js +13 -0
- package/dist/kit/assets.js.map +1 -0
- package/dist/kit/bindDialHangupCallId.d.ts +11 -0
- package/dist/kit/bindDialHangupCallId.js +38 -0
- package/dist/kit/bindDialHangupCallId.js.map +1 -0
- package/dist/kit/callCenterTaskEndpoints.d.ts +9 -0
- package/dist/kit/callCenterTaskEndpoints.js +11 -0
- package/dist/kit/callCenterTaskEndpoints.js.map +1 -0
- package/dist/kit/clickCallChrome.d.ts +7 -0
- package/dist/kit/clickCallChrome.js +22 -0
- package/dist/kit/clickCallChrome.js.map +1 -0
- package/dist/kit/clickCallMutex.d.ts +28 -0
- package/dist/kit/clickCallMutex.js +28 -0
- package/dist/kit/clickCallMutex.js.map +1 -0
- package/dist/kit/createCallCenterSoftphone.d.ts +24 -0
- package/dist/kit/createCallCenterSoftphone.js +10 -0
- package/dist/kit/createCallCenterSoftphone.js.map +1 -0
- package/dist/kit/createSoftphoneHttp.d.ts +9 -0
- package/dist/kit/createSoftphoneHttp.js +10 -0
- package/dist/kit/createSoftphoneHttp.js.map +1 -0
- package/dist/kit/executeSoftphoneHttp.d.ts +31 -0
- package/dist/kit/executeSoftphoneHttp.js +49 -0
- package/dist/kit/executeSoftphoneHttp.js.map +1 -0
- package/dist/kit/flattenUiContext.d.ts +2 -0
- package/dist/kit/flattenUiContext.js +12 -0
- package/dist/kit/flattenUiContext.js.map +1 -0
- package/dist/kit/hooks.d.ts +9 -0
- package/dist/kit/hooks.js +117 -0
- package/dist/kit/hooks.js.map +1 -0
- package/dist/kit/mergeTopLevelDialSession.d.ts +6 -0
- package/dist/kit/mergeTopLevelDialSession.js +12 -0
- package/dist/kit/mergeTopLevelDialSession.js.map +1 -0
- package/dist/kit/overlayFetch.d.ts +1 -0
- package/dist/kit/overlayFetch.js +4 -0
- package/dist/kit/overlayFetch.js.map +1 -0
- package/dist/kit/parseHangupCallId.d.ts +6 -0
- package/dist/kit/parseHangupCallId.js +42 -0
- package/dist/kit/parseHangupCallId.js.map +1 -0
- package/dist/kit/softphoneHostMatch.d.ts +1 -0
- package/dist/kit/softphoneHostMatch.js +7 -0
- package/dist/kit/softphoneHostMatch.js.map +1 -0
- package/dist/kit/useProgressiveOverlay.d.ts +4 -0
- package/dist/kit/useProgressiveOverlay.js +69 -0
- package/dist/kit/useProgressiveOverlay.js.map +1 -0
- package/dist/kit/useProgressiveSession.d.ts +8 -0
- package/dist/kit/useProgressiveSession.js +67 -0
- package/dist/kit/useProgressiveSession.js.map +1 -0
- package/dist/kit/waitingHostKind.d.ts +6 -0
- package/dist/kit/waitingHostKind.js +11 -0
- package/dist/kit/waitingHostKind.js.map +1 -0
- package/dist/locales/en-US.d.ts +1 -0
- package/dist/locales/en-US.js +2 -0
- package/dist/locales/en-US.js.map +1 -0
- package/dist/locales/id-ID.d.ts +1 -0
- package/dist/locales/id-ID.js +2 -0
- package/dist/locales/id-ID.js.map +1 -0
- package/dist/locales/resolveNotifyMessage.d.ts +2 -0
- package/dist/locales/resolveNotifyMessage.js +43 -0
- package/dist/locales/resolveNotifyMessage.js.map +1 -0
- package/dist/locales/resolveSoftphoneTexts.d.ts +7 -0
- package/dist/locales/resolveSoftphoneTexts.js +168 -0
- package/dist/locales/resolveSoftphoneTexts.js.map +1 -0
- package/dist/locales/types.d.ts +47 -0
- package/dist/locales/types.js +46 -0
- package/dist/locales/types.js.map +1 -0
- package/dist/locales/zh-CN.d.ts +1 -0
- package/dist/locales/zh-CN.js +2 -0
- package/dist/locales/zh-CN.js.map +1 -0
- package/dist/outboundShell/ManualCallBody.d.ts +12 -0
- package/dist/outboundShell/ManualCallBody.js +12 -0
- package/dist/outboundShell/ManualCallBody.js.map +1 -0
- package/dist/outboundShell/PredictiveTaskBody.d.ts +6 -0
- package/dist/outboundShell/PredictiveTaskBody.js +23 -0
- package/dist/outboundShell/PredictiveTaskBody.js.map +1 -0
- package/dist/outboundShell/ProgressiveTaskBody.d.ts +24 -0
- package/dist/outboundShell/ProgressiveTaskBody.js +68 -0
- package/dist/outboundShell/ProgressiveTaskBody.js.map +1 -0
- package/dist/outboundTaskUi.d.ts +57 -0
- package/dist/outboundTaskUi.js +86 -0
- package/dist/outboundTaskUi.js.map +1 -0
- package/dist/progressiveStatusLine.d.ts +22 -0
- package/dist/progressiveStatusLine.js +139 -0
- package/dist/progressiveStatusLine.js.map +1 -0
- package/dist/styles.css +136 -4
- package/dist/stylesInject.d.ts +1 -1
- package/dist/stylesInject.js +1 -1
- package/dist/stylesInject.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
function fillTemplate(template, token) {
|
|
2
|
+
var _a;
|
|
3
|
+
const parts = template.split(token);
|
|
4
|
+
return { prefix: (_a = parts[0]) !== null && _a !== void 0 ? _a : '', suffix: parts.slice(1).join(token) };
|
|
5
|
+
}
|
|
6
|
+
function remainingDelaySeconds(ui, nowMs) {
|
|
7
|
+
if (!ui || ui.delaySeconds == null) {
|
|
8
|
+
return 0;
|
|
9
|
+
}
|
|
10
|
+
if (ui.waitKind !== 'interval' || ui.startedAt == null) {
|
|
11
|
+
return Math.max(0, ui.delaySeconds);
|
|
12
|
+
}
|
|
13
|
+
const elapsed = Math.max(0, Math.floor((nowMs - ui.startedAt) / 1000));
|
|
14
|
+
return Math.max(0, ui.delaySeconds - elapsed);
|
|
15
|
+
}
|
|
16
|
+
export function formatNextDialAt(iso, locale, now, timeZone) {
|
|
17
|
+
const at = new Date(iso);
|
|
18
|
+
if (Number.isNaN(at.getTime())) {
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
const sameDay = isSameCalendarDay(at, now, timeZone);
|
|
22
|
+
const options = Object.assign({ hour: '2-digit', minute: '2-digit', hour12: false }, (timeZone ? { timeZone } : {}));
|
|
23
|
+
if (!sameDay) {
|
|
24
|
+
options.month = 'numeric';
|
|
25
|
+
options.day = 'numeric';
|
|
26
|
+
}
|
|
27
|
+
return new Intl.DateTimeFormat(locale, options).format(at);
|
|
28
|
+
}
|
|
29
|
+
function isSameCalendarDay(at, now, timeZone) {
|
|
30
|
+
if (!timeZone) {
|
|
31
|
+
return (at.getFullYear() === now.getFullYear() &&
|
|
32
|
+
at.getMonth() === now.getMonth() &&
|
|
33
|
+
at.getDate() === now.getDate());
|
|
34
|
+
}
|
|
35
|
+
const fmt = new Intl.DateTimeFormat('en-CA', {
|
|
36
|
+
timeZone,
|
|
37
|
+
year: 'numeric',
|
|
38
|
+
month: '2-digit',
|
|
39
|
+
day: '2-digit',
|
|
40
|
+
});
|
|
41
|
+
return fmt.format(at) === fmt.format(now);
|
|
42
|
+
}
|
|
43
|
+
export function resolveProgressiveStatusLine(input) {
|
|
44
|
+
var _a, _b, _c, _d;
|
|
45
|
+
const t = (key, fallback) => input.texts[key] || fallback;
|
|
46
|
+
if (input.completing && input.completeExitSeconds != null) {
|
|
47
|
+
const expired = input.taskStatus === 'expired';
|
|
48
|
+
const template = expired
|
|
49
|
+
? t('taskExpiredCountdown', 'Task expired · auto exit in {n}s')
|
|
50
|
+
: t('taskCompletedCountdown', 'Progressive outbound completed · auto exit in {n}s');
|
|
51
|
+
const parts = fillTemplate(template, '{n}');
|
|
52
|
+
return {
|
|
53
|
+
className: 'wro-shell__state is-calling',
|
|
54
|
+
text: null,
|
|
55
|
+
prefix: parts.prefix,
|
|
56
|
+
highlight: String(input.completeExitSeconds),
|
|
57
|
+
suffix: parts.suffix,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if (input.taskStatus === 'expired') {
|
|
61
|
+
return {
|
|
62
|
+
className: 'wro-shell__state',
|
|
63
|
+
text: t('expiredStatus', 'Task expired. Remaining numbers will not be dialed'),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const phase = (_a = input.call) === null || _a === void 0 ? void 0 : _a.phase;
|
|
67
|
+
const waitingNext = ((_b = input.ui) === null || _b === void 0 ? void 0 : _b.phase) === 'waiting_next';
|
|
68
|
+
if (phase === 'dialing' ||
|
|
69
|
+
phase === 'ringing' ||
|
|
70
|
+
phase === 'active' ||
|
|
71
|
+
phase === 'ending' ||
|
|
72
|
+
(phase === 'failed' && !waitingNext)) {
|
|
73
|
+
const sip = ((_c = input.sipText) === null || _c === void 0 ? void 0 : _c.call(input, phase)) || '';
|
|
74
|
+
const className = phase === 'active'
|
|
75
|
+
? 'wro-shell__state is-connected'
|
|
76
|
+
: phase === 'failed'
|
|
77
|
+
? 'wro-shell__state is-failed'
|
|
78
|
+
: 'wro-shell__state is-calling';
|
|
79
|
+
return { className, text: sip };
|
|
80
|
+
}
|
|
81
|
+
if (input.taskStatus === 'paused' && ((_d = input.ui) === null || _d === void 0 ? void 0 : _d.phase) === 'dialing') {
|
|
82
|
+
return {
|
|
83
|
+
className: 'wro-shell__state is-calling',
|
|
84
|
+
text: t('pausedStillDialing', 'Paused · current number still dialing'),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (input.taskStatus === 'paused') {
|
|
88
|
+
return {
|
|
89
|
+
className: 'wro-shell__state',
|
|
90
|
+
text: t('pausedStatus', 'Paused'),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const ui = input.ui;
|
|
94
|
+
if ((ui === null || ui === void 0 ? void 0 : ui.phase) === 'dialing') {
|
|
95
|
+
return {
|
|
96
|
+
className: 'wro-shell__state is-calling',
|
|
97
|
+
text: t('dialing', 'Dialing'),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
if ((ui === null || ui === void 0 ? void 0 : ui.phase) === 'waiting_next') {
|
|
101
|
+
if (ui.waitKind === 'rest' && ui.nextDialAt) {
|
|
102
|
+
const time = formatNextDialAt(ui.nextDialAt, input.locale || 'en-US', new Date(input.now));
|
|
103
|
+
const template = ui.reason === 'ended'
|
|
104
|
+
? t('nextDialAtEnded', 'Call ended · next dial at {time}...')
|
|
105
|
+
: t('nextDialAtMissed', 'No answer · next dial at {time}...');
|
|
106
|
+
const parts = fillTemplate(template, '{time}');
|
|
107
|
+
return {
|
|
108
|
+
className: 'wro-shell__state is-next-missed',
|
|
109
|
+
text: null,
|
|
110
|
+
prefix: parts.prefix,
|
|
111
|
+
highlight: time,
|
|
112
|
+
suffix: parts.suffix,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
const remaining = remainingDelaySeconds(ui, input.now);
|
|
116
|
+
const ended = ui.reason === 'ended';
|
|
117
|
+
if (remaining > 0) {
|
|
118
|
+
const template = ended
|
|
119
|
+
? t('nextDialEndedCountdown', 'Call ended · next dial in {n}s...')
|
|
120
|
+
: t('nextDialMissedCountdown', 'No answer · next dial in {n}s...');
|
|
121
|
+
const parts = fillTemplate(template, '{n}');
|
|
122
|
+
return {
|
|
123
|
+
className: 'wro-shell__state is-next-missed',
|
|
124
|
+
text: null,
|
|
125
|
+
prefix: parts.prefix,
|
|
126
|
+
highlight: String(remaining),
|
|
127
|
+
suffix: parts.suffix,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
className: 'wro-shell__state is-next-missed',
|
|
132
|
+
text: ended
|
|
133
|
+
? t('nextDialEnded', 'Call ended · dialing next...')
|
|
134
|
+
: t('nextDialMissed', 'No answer · dialing next...'),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
return { className: 'wro-shell__state', text: null };
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=progressiveStatusLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progressiveStatusLine.js","sourceRoot":"","sources":["../src/progressiveStatusLine.ts"],"names":[],"mappings":"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"}
|
package/dist/styles.css
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
--wro-btn-radius: 8px;
|
|
7
7
|
--wro-btn-padding: 6px 14px;
|
|
8
8
|
--wro-btn-font-size: 14px;
|
|
9
|
-
--wro-modal-z:
|
|
9
|
+
--wro-modal-z: 1100;
|
|
10
10
|
font-family:
|
|
11
11
|
system-ui,
|
|
12
12
|
-apple-system,
|
|
@@ -130,6 +130,18 @@
|
|
|
130
130
|
text-overflow: ellipsis;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
.wro-call__number {
|
|
134
|
+
max-width: 100%;
|
|
135
|
+
margin-bottom: 4px;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
color: #0f172a;
|
|
138
|
+
font-weight: 700;
|
|
139
|
+
font-size: 18px;
|
|
140
|
+
letter-spacing: 0.02em;
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
text-overflow: ellipsis;
|
|
143
|
+
}
|
|
144
|
+
|
|
133
145
|
.wro-call__status {
|
|
134
146
|
display: flex;
|
|
135
147
|
align-items: center;
|
|
@@ -365,6 +377,12 @@
|
|
|
365
377
|
height: 16px;
|
|
366
378
|
}
|
|
367
379
|
|
|
380
|
+
.wro-shell__header-actions {
|
|
381
|
+
display: flex;
|
|
382
|
+
gap: 4px;
|
|
383
|
+
align-items: center;
|
|
384
|
+
}
|
|
385
|
+
|
|
368
386
|
.wro-shell__icon-btn {
|
|
369
387
|
display: inline-flex;
|
|
370
388
|
align-items: center;
|
|
@@ -384,6 +402,16 @@
|
|
|
384
402
|
background: rgba(255, 255, 255, 0.06);
|
|
385
403
|
}
|
|
386
404
|
|
|
405
|
+
.wro-shell__icon-btn.is-close {
|
|
406
|
+
color: #d54941;
|
|
407
|
+
background: rgba(213, 73, 65, 0.25);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.wro-shell__icon-btn.is-close:hover {
|
|
411
|
+
color: #fff;
|
|
412
|
+
background: rgba(213, 73, 65, 0.6);
|
|
413
|
+
}
|
|
414
|
+
|
|
387
415
|
.wro-shell__mode-bar {
|
|
388
416
|
display: flex;
|
|
389
417
|
flex-direction: column;
|
|
@@ -413,6 +441,36 @@
|
|
|
413
441
|
flex: 1;
|
|
414
442
|
}
|
|
415
443
|
|
|
444
|
+
.wro-shell__task-btn {
|
|
445
|
+
border: 0;
|
|
446
|
+
border-radius: 6px;
|
|
447
|
+
padding: 6px 8px;
|
|
448
|
+
font-size: 12px;
|
|
449
|
+
font-weight: 600;
|
|
450
|
+
cursor: pointer;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.wro-shell__task-btn.is-pause {
|
|
454
|
+
background: #e8730c;
|
|
455
|
+
color: #fff;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.wro-shell__task-btn.is-resume {
|
|
459
|
+
background: var(--wro-shell-accent, #42a5f5);
|
|
460
|
+
color: #fff;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.wro-shell__task-btn.is-cancel {
|
|
464
|
+
background: rgba(213, 73, 65, 0.16);
|
|
465
|
+
color: #d54941;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.wro-shell__task-btn.is-disabled,
|
|
469
|
+
.wro-shell__icon-btn.is-disabled {
|
|
470
|
+
opacity: 0.45;
|
|
471
|
+
cursor: not-allowed;
|
|
472
|
+
}
|
|
473
|
+
|
|
416
474
|
.wro-shell__call-status {
|
|
417
475
|
display: flex;
|
|
418
476
|
flex-wrap: wrap;
|
|
@@ -433,6 +491,15 @@
|
|
|
433
491
|
color: var(--wro-shell-accent);
|
|
434
492
|
}
|
|
435
493
|
|
|
494
|
+
.wro-shell__state.is-next-missed {
|
|
495
|
+
color: var(--wro-shell-muted);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.wro-shell__countdown-sec {
|
|
499
|
+
color: var(--wro-shell-green);
|
|
500
|
+
font-weight: 700;
|
|
501
|
+
}
|
|
502
|
+
|
|
436
503
|
.wro-shell__state.is-connected {
|
|
437
504
|
color: var(--wro-shell-green);
|
|
438
505
|
}
|
|
@@ -464,8 +531,67 @@
|
|
|
464
531
|
}
|
|
465
532
|
|
|
466
533
|
.wro-shell__idle-hint {
|
|
467
|
-
min-height:
|
|
468
|
-
margin-top:
|
|
534
|
+
min-height: 36px;
|
|
535
|
+
margin-top: 16px;
|
|
536
|
+
padding: 0 16px;
|
|
537
|
+
color: var(--wro-shell-accent);
|
|
538
|
+
font-size: 14px;
|
|
539
|
+
line-height: 36px;
|
|
540
|
+
text-align: center;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.wro-shell__info {
|
|
544
|
+
display: grid;
|
|
545
|
+
grid-template-columns: repeat(5, 1fr);
|
|
546
|
+
gap: 2px;
|
|
547
|
+
width: calc(100% - 28px);
|
|
548
|
+
margin: 10px 14px 4px;
|
|
549
|
+
padding: 6px 4px;
|
|
550
|
+
background: var(--wro-shell-panel);
|
|
551
|
+
border-radius: 5px;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.wro-shell__info-item {
|
|
555
|
+
display: flex;
|
|
556
|
+
flex-direction: column;
|
|
557
|
+
justify-content: flex-end;
|
|
558
|
+
padding: 2px 1px;
|
|
559
|
+
text-align: center;
|
|
560
|
+
border-right: 1px solid rgba(255, 255, 255, 0.08);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.wro-shell__info-item:last-child {
|
|
564
|
+
border-right: none;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.wro-shell__info-label {
|
|
568
|
+
display: flex;
|
|
569
|
+
align-items: flex-end;
|
|
570
|
+
justify-content: center;
|
|
571
|
+
min-height: 2.4em;
|
|
572
|
+
margin-bottom: 2px;
|
|
573
|
+
color: var(--wro-shell-muted);
|
|
574
|
+
font-size: 9px;
|
|
575
|
+
line-height: 1.2;
|
|
576
|
+
text-align: center;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.wro-shell__info-value {
|
|
580
|
+
color: var(--wro-shell-text);
|
|
581
|
+
font-weight: 600;
|
|
582
|
+
font-size: 11px;
|
|
583
|
+
font-variant-numeric: tabular-nums;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.wro-shell__info-meta {
|
|
587
|
+
margin: 0 14px 4px;
|
|
588
|
+
color: var(--wro-shell-muted);
|
|
589
|
+
font-size: 11px;
|
|
590
|
+
text-align: center;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.wro-shell__info-meta-val {
|
|
594
|
+
color: var(--wro-shell-accent);
|
|
469
595
|
}
|
|
470
596
|
|
|
471
597
|
.wro-shell__duration {
|
|
@@ -552,12 +678,18 @@
|
|
|
552
678
|
|
|
553
679
|
.wro-shell__batch-stats {
|
|
554
680
|
display: flex;
|
|
555
|
-
justify-content:
|
|
681
|
+
justify-content: flex-start;
|
|
682
|
+
gap: 16px;
|
|
556
683
|
margin-top: 8px;
|
|
557
684
|
color: var(--wro-shell-muted);
|
|
558
685
|
font-size: 12px;
|
|
559
686
|
}
|
|
560
687
|
|
|
688
|
+
.wro-shell__batch-stats-val {
|
|
689
|
+
color: var(--wro-shell-accent);
|
|
690
|
+
font-weight: 600;
|
|
691
|
+
}
|
|
692
|
+
|
|
561
693
|
.wro-shell-mini {
|
|
562
694
|
position: fixed;
|
|
563
695
|
top: 20px;
|
package/dist/stylesInject.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Auto-generated from styles.css — do not edit. */
|
|
2
|
-
export declare const STYLES_CSS = "/* @yinshan-tech/webrtc-react \u2014 override via CSS variables / className */\n\n.wro-root {\n --wro-btn-bg: #ef4444;\n --wro-btn-color: #fff;\n --wro-btn-radius: 8px;\n --wro-btn-padding: 6px 14px;\n --wro-btn-font-size: 14px;\n --wro-modal-z: 1000;\n font-family:\n system-ui,\n -apple-system,\n \"Segoe UI\",\n Roboto,\n sans-serif;\n}\n\n.wro-btn {\n background: var(--wro-btn-bg);\n color: var(--wro-btn-color);\n border: none;\n border-radius: var(--wro-btn-radius);\n padding: var(--wro-btn-padding);\n font-size: var(--wro-btn-font-size);\n cursor: pointer;\n}\n\n.wro-btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n/* Floating call card (no full-screen mask) */\n.wro-call {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n width: 320px;\n padding: 20px 24px 28px;\n background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%);\n color: #0f172a;\n border-radius: 20px;\n box-shadow:\n 0 12px 40px rgba(15, 23, 42, 0.16),\n 0 2px 8px rgba(15, 23, 42, 0.06);\n text-align: center;\n cursor: grab;\n user-select: none;\n}\n\n.wro-call.is-dragging {\n cursor: grabbing;\n}\n\n.wro-call button {\n cursor: pointer;\n}\n\n.wro-call__minimize {\n position: absolute;\n top: 10px;\n right: 10px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n color: rgba(0, 0, 0, 0.45);\n background: transparent;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.wro-call__minimize:hover {\n color: rgba(0, 0, 0, 0.85);\n background: rgba(0, 0, 0, 0.06);\n}\n\n.wro-call__avatar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 72px;\n height: 72px;\n margin: 8px auto 16px;\n color: #fff;\n font-weight: 600;\n font-size: 28px;\n background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);\n border-radius: 50%;\n box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);\n}\n\n.wro-call__avatar.is-calling::after {\n position: absolute;\n inset: -6px;\n border: 2px solid rgba(59, 130, 246, 0.45);\n border-radius: 50%;\n animation: wro-ring 1.6s ease-out infinite;\n content: \"\";\n}\n\n.wro-call__avatar.is-connected {\n background: linear-gradient(145deg, #22c55e 0%, #15803d 100%);\n box-shadow: 0 8px 20px rgba(34, 197, 94, 0.28);\n}\n\n.wro-call__avatar.is-failed {\n background: linear-gradient(145deg, #f87171 0%, #dc2626 100%);\n box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);\n}\n\n.wro-call__avatar.is-ended {\n background: linear-gradient(145deg, #94a3b8 0%, #64748b 100%);\n box-shadow: none;\n}\n\n.wro-call__name {\n max-width: 100%;\n margin-bottom: 8px;\n overflow: hidden;\n font-weight: 600;\n font-size: 20px;\n line-height: 1.3;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call__status {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 36px;\n margin-bottom: 8px;\n}\n\n.wro-call__state {\n font-size: 14px;\n color: #64748b;\n}\n\n.wro-call__state.is-calling {\n color: #2563eb;\n animation: wro-blink 1.5s ease-in-out infinite;\n}\n\n.wro-call__state.is-failed {\n color: #dc2626;\n}\n\n.wro-call__state.is-timeout {\n color: #d97706;\n}\n\n.wro-call__state.is-ended {\n color: #64748b;\n}\n\n.wro-call__duration {\n color: #16a34a;\n font-weight: 700;\n font-size: 28px;\n font-variant-numeric: tabular-nums;\n letter-spacing: 1px;\n}\n\n.wro-call__actions {\n display: flex;\n gap: 28px;\n justify-content: center;\n margin-top: 16px;\n cursor: grab;\n}\n\n.wro-call__action {\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n}\n\n.wro-call__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n padding: 0;\n color: #fff;\n border: none;\n border-radius: 50%;\n box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);\n cursor: pointer;\n transition:\n transform 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.wro-call__circle:hover:not(:disabled) {\n transform: translateY(-1px);\n box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);\n}\n\n.wro-call__circle:disabled {\n background: #fecaca !important;\n box-shadow: none;\n cursor: not-allowed;\n}\n\n.wro-call__circle.is-unmuted {\n background: #16a34a;\n}\n\n.wro-call__circle.is-muted {\n background: #dc2626;\n}\n\n.wro-call__circle.is-hangup {\n background: #ef4444;\n}\n\n.wro-call__circle.is-hangup:hover:not(:disabled) {\n background: #dc2626;\n}\n\n.wro-call__hangup-icon {\n display: inline-flex;\n transform: rotate(135deg);\n}\n\n.wro-call__label {\n color: #475569;\n font-size: 13px;\n line-height: 1;\n}\n\n.wro-call-mini {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 220px;\n min-height: 64px;\n padding: 12px 14px;\n background: #fff;\n border: 1px solid #e2e8f0;\n border-radius: 12px;\n box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);\n cursor: grab;\n user-select: none;\n transition:\n box-shadow 0.2s ease,\n transform 0.2s ease;\n}\n\n.wro-call-mini.is-dragging {\n cursor: grabbing;\n transition: none;\n}\n\n.wro-call-mini:hover {\n box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);\n transform: translateY(-1px);\n}\n\n.wro-call-mini__name {\n overflow: hidden;\n color: #0f172a;\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call-mini__duration {\n color: #16a34a;\n font-weight: 700;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-call-mini__status {\n color: #2563eb;\n font-size: 12px;\n}\n\n@keyframes wro-blink {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.45;\n }\n}\n\n@keyframes wro-ring {\n 0% {\n transform: scale(0.92);\n opacity: 0.7;\n }\n 100% {\n transform: scale(1.18);\n opacity: 0;\n }\n}\n\n/* OutboundModeShell \u2014 dark workbench chrome */\n.wro-shell {\n --wro-shell-bg: #1a2332;\n --wro-shell-panel: #243044;\n --wro-shell-text: #e8eef7;\n --wro-shell-muted: #8b9bb4;\n --wro-shell-accent: #2dd4bf;\n --wro-shell-green: #22c55e;\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n width: 360px;\n padding: 0 0 16px;\n color: var(--wro-shell-text);\n background: var(--wro-shell-bg);\n border-radius: 12px;\n box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);\n cursor: grab;\n user-select: none;\n}\n\n.wro-shell.is-dragging {\n cursor: grabbing;\n}\n\n.wro-shell__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 14px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.06);\n}\n\n.wro-shell__title {\n display: inline-flex;\n gap: 8px;\n align-items: center;\n color: var(--wro-shell-accent);\n font-weight: 600;\n font-size: 14px;\n}\n\n.wro-shell__title-icon {\n display: inline-flex;\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__title-icon svg {\n width: 16px;\n height: 16px;\n}\n\n.wro-shell__icon-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n color: var(--wro-shell-muted);\n background: transparent;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n}\n\n.wro-shell__icon-btn:hover {\n color: var(--wro-shell-text);\n background: rgba(255, 255, 255, 0.06);\n}\n\n.wro-shell__mode-bar {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px 14px 0;\n}\n\n.wro-shell__agent-status {\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: var(--wro-shell-muted);\n font-size: 13px;\n}\n\n.wro-shell__agent-status-value {\n color: var(--wro-shell-green);\n font-weight: 600;\n}\n\n.wro-shell__mode-actions {\n display: flex;\n gap: 8px;\n}\n\n.wro-shell__mode-actions > * {\n flex: 1;\n}\n\n.wro-shell__call-status {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n justify-content: center;\n margin-top: 16px;\n padding: 0 16px;\n text-align: center;\n}\n\n.wro-shell__state {\n color: var(--wro-shell-muted);\n font-size: 14px;\n}\n\n.wro-shell__state.is-calling {\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__state.is-connected {\n color: var(--wro-shell-green);\n}\n\n.wro-shell__state.is-failed {\n color: #f87171;\n}\n\n.wro-shell__number {\n margin-top: 8px;\n padding: 0 16px;\n color: #fff;\n font-weight: 700;\n font-size: 26px;\n line-height: 1.2;\n text-align: center;\n letter-spacing: 0.5px;\n}\n\n.wro-shell__name {\n margin-top: 6px;\n padding: 0 16px;\n overflow: hidden;\n color: var(--wro-shell-muted);\n font-size: 13px;\n text-align: center;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-shell__idle-hint {\n min-height: 8px;\n margin-top: 12px;\n}\n\n.wro-shell__duration {\n margin-top: 14px;\n color: var(--wro-shell-green);\n font-weight: 700;\n font-size: 28px;\n font-variant-numeric: tabular-nums;\n text-align: center;\n letter-spacing: 1px;\n}\n\n.wro-shell__actions {\n display: flex;\n gap: 20px;\n justify-content: center;\n margin-top: 14px;\n}\n\n.wro-shell__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 52px;\n height: 52px;\n padding: 0;\n color: #fff;\n border: none;\n border-radius: 50%;\n cursor: pointer;\n}\n\n.wro-shell__circle.is-unmuted {\n background: #16a34a;\n}\n\n.wro-shell__circle.is-muted {\n background: #dc2626;\n}\n\n.wro-shell__circle.is-hangup {\n background: #ef4444;\n}\n\n.wro-shell__circle:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.wro-shell__hangup-icon {\n display: inline-flex;\n transform: rotate(135deg);\n}\n\n.wro-shell__batch {\n margin: 16px 14px 0;\n padding: 12px;\n background: var(--wro-shell-panel);\n border-radius: 8px;\n}\n\n.wro-shell__batch-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n color: var(--wro-shell-accent);\n font-size: 13px;\n}\n\n.wro-shell__batch-bar {\n height: 6px;\n overflow: hidden;\n background: rgba(255, 255, 255, 0.08);\n border-radius: 999px;\n}\n\n.wro-shell__batch-bar-fill {\n height: 100%;\n background: var(--wro-shell-accent);\n border-radius: 999px;\n transition: width 0.2s ease;\n}\n\n.wro-shell__batch-stats {\n display: flex;\n justify-content: space-between;\n margin-top: 8px;\n color: var(--wro-shell-muted);\n font-size: 12px;\n}\n\n.wro-shell-mini {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 220px;\n min-height: 64px;\n padding: 12px 14px;\n color: var(--wro-shell-text, #e8eef7);\n background: #1a2332;\n border: 1px solid rgba(255, 255, 255, 0.08);\n border-radius: 12px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n cursor: grab;\n user-select: none;\n}\n\n.wro-shell-mini.is-dragging {\n cursor: grabbing;\n}\n\n.wro-shell-mini__name {\n overflow: hidden;\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-shell-mini__duration {\n color: #22c55e;\n font-weight: 700;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-shell-mini__status {\n color: #2dd4bf;\n font-size: 12px;\n}\n";
|
|
2
|
+
export declare const STYLES_CSS = "/* @yinshan-tech/webrtc-react \u2014 override via CSS variables / className */\n\n.wro-root {\n --wro-btn-bg: #ef4444;\n --wro-btn-color: #fff;\n --wro-btn-radius: 8px;\n --wro-btn-padding: 6px 14px;\n --wro-btn-font-size: 14px;\n --wro-modal-z: 1100;\n font-family:\n system-ui,\n -apple-system,\n \"Segoe UI\",\n Roboto,\n sans-serif;\n}\n\n.wro-btn {\n background: var(--wro-btn-bg);\n color: var(--wro-btn-color);\n border: none;\n border-radius: var(--wro-btn-radius);\n padding: var(--wro-btn-padding);\n font-size: var(--wro-btn-font-size);\n cursor: pointer;\n}\n\n.wro-btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n/* Floating call card (no full-screen mask) */\n.wro-call {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n width: 320px;\n padding: 20px 24px 28px;\n background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%);\n color: #0f172a;\n border-radius: 20px;\n box-shadow:\n 0 12px 40px rgba(15, 23, 42, 0.16),\n 0 2px 8px rgba(15, 23, 42, 0.06);\n text-align: center;\n cursor: grab;\n user-select: none;\n}\n\n.wro-call.is-dragging {\n cursor: grabbing;\n}\n\n.wro-call button {\n cursor: pointer;\n}\n\n.wro-call__minimize {\n position: absolute;\n top: 10px;\n right: 10px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n color: rgba(0, 0, 0, 0.45);\n background: transparent;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.wro-call__minimize:hover {\n color: rgba(0, 0, 0, 0.85);\n background: rgba(0, 0, 0, 0.06);\n}\n\n.wro-call__avatar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 72px;\n height: 72px;\n margin: 8px auto 16px;\n color: #fff;\n font-weight: 600;\n font-size: 28px;\n background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);\n border-radius: 50%;\n box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);\n}\n\n.wro-call__avatar.is-calling::after {\n position: absolute;\n inset: -6px;\n border: 2px solid rgba(59, 130, 246, 0.45);\n border-radius: 50%;\n animation: wro-ring 1.6s ease-out infinite;\n content: \"\";\n}\n\n.wro-call__avatar.is-connected {\n background: linear-gradient(145deg, #22c55e 0%, #15803d 100%);\n box-shadow: 0 8px 20px rgba(34, 197, 94, 0.28);\n}\n\n.wro-call__avatar.is-failed {\n background: linear-gradient(145deg, #f87171 0%, #dc2626 100%);\n box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);\n}\n\n.wro-call__avatar.is-ended {\n background: linear-gradient(145deg, #94a3b8 0%, #64748b 100%);\n box-shadow: none;\n}\n\n.wro-call__name {\n max-width: 100%;\n margin-bottom: 8px;\n overflow: hidden;\n font-weight: 600;\n font-size: 20px;\n line-height: 1.3;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call__number {\n max-width: 100%;\n margin-bottom: 4px;\n overflow: hidden;\n color: #0f172a;\n font-weight: 700;\n font-size: 18px;\n letter-spacing: 0.02em;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call__status {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 36px;\n margin-bottom: 8px;\n}\n\n.wro-call__state {\n font-size: 14px;\n color: #64748b;\n}\n\n.wro-call__state.is-calling {\n color: #2563eb;\n animation: wro-blink 1.5s ease-in-out infinite;\n}\n\n.wro-call__state.is-failed {\n color: #dc2626;\n}\n\n.wro-call__state.is-timeout {\n color: #d97706;\n}\n\n.wro-call__state.is-ended {\n color: #64748b;\n}\n\n.wro-call__duration {\n color: #16a34a;\n font-weight: 700;\n font-size: 28px;\n font-variant-numeric: tabular-nums;\n letter-spacing: 1px;\n}\n\n.wro-call__actions {\n display: flex;\n gap: 28px;\n justify-content: center;\n margin-top: 16px;\n cursor: grab;\n}\n\n.wro-call__action {\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n}\n\n.wro-call__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n padding: 0;\n color: #fff;\n border: none;\n border-radius: 50%;\n box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);\n cursor: pointer;\n transition:\n transform 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.wro-call__circle:hover:not(:disabled) {\n transform: translateY(-1px);\n box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);\n}\n\n.wro-call__circle:disabled {\n background: #fecaca !important;\n box-shadow: none;\n cursor: not-allowed;\n}\n\n.wro-call__circle.is-unmuted {\n background: #16a34a;\n}\n\n.wro-call__circle.is-muted {\n background: #dc2626;\n}\n\n.wro-call__circle.is-hangup {\n background: #ef4444;\n}\n\n.wro-call__circle.is-hangup:hover:not(:disabled) {\n background: #dc2626;\n}\n\n.wro-call__hangup-icon {\n display: inline-flex;\n transform: rotate(135deg);\n}\n\n.wro-call__label {\n color: #475569;\n font-size: 13px;\n line-height: 1;\n}\n\n.wro-call-mini {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 220px;\n min-height: 64px;\n padding: 12px 14px;\n background: #fff;\n border: 1px solid #e2e8f0;\n border-radius: 12px;\n box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);\n cursor: grab;\n user-select: none;\n transition:\n box-shadow 0.2s ease,\n transform 0.2s ease;\n}\n\n.wro-call-mini.is-dragging {\n cursor: grabbing;\n transition: none;\n}\n\n.wro-call-mini:hover {\n box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);\n transform: translateY(-1px);\n}\n\n.wro-call-mini__name {\n overflow: hidden;\n color: #0f172a;\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call-mini__duration {\n color: #16a34a;\n font-weight: 700;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-call-mini__status {\n color: #2563eb;\n font-size: 12px;\n}\n\n@keyframes wro-blink {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.45;\n }\n}\n\n@keyframes wro-ring {\n 0% {\n transform: scale(0.92);\n opacity: 0.7;\n }\n 100% {\n transform: scale(1.18);\n opacity: 0;\n }\n}\n\n/* OutboundModeShell \u2014 dark workbench chrome */\n.wro-shell {\n --wro-shell-bg: #1a2332;\n --wro-shell-panel: #243044;\n --wro-shell-text: #e8eef7;\n --wro-shell-muted: #8b9bb4;\n --wro-shell-accent: #2dd4bf;\n --wro-shell-green: #22c55e;\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n width: 360px;\n padding: 0 0 16px;\n color: var(--wro-shell-text);\n background: var(--wro-shell-bg);\n border-radius: 12px;\n box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);\n cursor: grab;\n user-select: none;\n}\n\n.wro-shell.is-dragging {\n cursor: grabbing;\n}\n\n.wro-shell__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 14px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.06);\n}\n\n.wro-shell__title {\n display: inline-flex;\n gap: 8px;\n align-items: center;\n color: var(--wro-shell-accent);\n font-weight: 600;\n font-size: 14px;\n}\n\n.wro-shell__title-icon {\n display: inline-flex;\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__title-icon svg {\n width: 16px;\n height: 16px;\n}\n\n.wro-shell__header-actions {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.wro-shell__icon-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n color: var(--wro-shell-muted);\n background: transparent;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n}\n\n.wro-shell__icon-btn:hover {\n color: var(--wro-shell-text);\n background: rgba(255, 255, 255, 0.06);\n}\n\n.wro-shell__icon-btn.is-close {\n color: #d54941;\n background: rgba(213, 73, 65, 0.25);\n}\n\n.wro-shell__icon-btn.is-close:hover {\n color: #fff;\n background: rgba(213, 73, 65, 0.6);\n}\n\n.wro-shell__mode-bar {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px 14px 0;\n}\n\n.wro-shell__agent-status {\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: var(--wro-shell-muted);\n font-size: 13px;\n}\n\n.wro-shell__agent-status-value {\n color: var(--wro-shell-green);\n font-weight: 600;\n}\n\n.wro-shell__mode-actions {\n display: flex;\n gap: 8px;\n}\n\n.wro-shell__mode-actions > * {\n flex: 1;\n}\n\n.wro-shell__task-btn {\n border: 0;\n border-radius: 6px;\n padding: 6px 8px;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n\n.wro-shell__task-btn.is-pause {\n background: #e8730c;\n color: #fff;\n}\n\n.wro-shell__task-btn.is-resume {\n background: var(--wro-shell-accent, #42a5f5);\n color: #fff;\n}\n\n.wro-shell__task-btn.is-cancel {\n background: rgba(213, 73, 65, 0.16);\n color: #d54941;\n}\n\n.wro-shell__task-btn.is-disabled,\n.wro-shell__icon-btn.is-disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.wro-shell__call-status {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n justify-content: center;\n margin-top: 16px;\n padding: 0 16px;\n text-align: center;\n}\n\n.wro-shell__state {\n color: var(--wro-shell-muted);\n font-size: 14px;\n}\n\n.wro-shell__state.is-calling {\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__state.is-next-missed {\n color: var(--wro-shell-muted);\n}\n\n.wro-shell__countdown-sec {\n color: var(--wro-shell-green);\n font-weight: 700;\n}\n\n.wro-shell__state.is-connected {\n color: var(--wro-shell-green);\n}\n\n.wro-shell__state.is-failed {\n color: #f87171;\n}\n\n.wro-shell__number {\n margin-top: 8px;\n padding: 0 16px;\n color: #fff;\n font-weight: 700;\n font-size: 26px;\n line-height: 1.2;\n text-align: center;\n letter-spacing: 0.5px;\n}\n\n.wro-shell__name {\n margin-top: 6px;\n padding: 0 16px;\n overflow: hidden;\n color: var(--wro-shell-muted);\n font-size: 13px;\n text-align: center;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-shell__idle-hint {\n min-height: 36px;\n margin-top: 16px;\n padding: 0 16px;\n color: var(--wro-shell-accent);\n font-size: 14px;\n line-height: 36px;\n text-align: center;\n}\n\n.wro-shell__info {\n display: grid;\n grid-template-columns: repeat(5, 1fr);\n gap: 2px;\n width: calc(100% - 28px);\n margin: 10px 14px 4px;\n padding: 6px 4px;\n background: var(--wro-shell-panel);\n border-radius: 5px;\n}\n\n.wro-shell__info-item {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n padding: 2px 1px;\n text-align: center;\n border-right: 1px solid rgba(255, 255, 255, 0.08);\n}\n\n.wro-shell__info-item:last-child {\n border-right: none;\n}\n\n.wro-shell__info-label {\n display: flex;\n align-items: flex-end;\n justify-content: center;\n min-height: 2.4em;\n margin-bottom: 2px;\n color: var(--wro-shell-muted);\n font-size: 9px;\n line-height: 1.2;\n text-align: center;\n}\n\n.wro-shell__info-value {\n color: var(--wro-shell-text);\n font-weight: 600;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-shell__info-meta {\n margin: 0 14px 4px;\n color: var(--wro-shell-muted);\n font-size: 11px;\n text-align: center;\n}\n\n.wro-shell__info-meta-val {\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__duration {\n margin-top: 14px;\n color: var(--wro-shell-green);\n font-weight: 700;\n font-size: 28px;\n font-variant-numeric: tabular-nums;\n text-align: center;\n letter-spacing: 1px;\n}\n\n.wro-shell__actions {\n display: flex;\n gap: 20px;\n justify-content: center;\n margin-top: 14px;\n}\n\n.wro-shell__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 52px;\n height: 52px;\n padding: 0;\n color: #fff;\n border: none;\n border-radius: 50%;\n cursor: pointer;\n}\n\n.wro-shell__circle.is-unmuted {\n background: #16a34a;\n}\n\n.wro-shell__circle.is-muted {\n background: #dc2626;\n}\n\n.wro-shell__circle.is-hangup {\n background: #ef4444;\n}\n\n.wro-shell__circle:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.wro-shell__hangup-icon {\n display: inline-flex;\n transform: rotate(135deg);\n}\n\n.wro-shell__batch {\n margin: 16px 14px 0;\n padding: 12px;\n background: var(--wro-shell-panel);\n border-radius: 8px;\n}\n\n.wro-shell__batch-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n color: var(--wro-shell-accent);\n font-size: 13px;\n}\n\n.wro-shell__batch-bar {\n height: 6px;\n overflow: hidden;\n background: rgba(255, 255, 255, 0.08);\n border-radius: 999px;\n}\n\n.wro-shell__batch-bar-fill {\n height: 100%;\n background: var(--wro-shell-accent);\n border-radius: 999px;\n transition: width 0.2s ease;\n}\n\n.wro-shell__batch-stats {\n display: flex;\n justify-content: flex-start;\n gap: 16px;\n margin-top: 8px;\n color: var(--wro-shell-muted);\n font-size: 12px;\n}\n\n.wro-shell__batch-stats-val {\n color: var(--wro-shell-accent);\n font-weight: 600;\n}\n\n.wro-shell-mini {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 220px;\n min-height: 64px;\n padding: 12px 14px;\n color: var(--wro-shell-text, #e8eef7);\n background: #1a2332;\n border: 1px solid rgba(255, 255, 255, 0.08);\n border-radius: 12px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n cursor: grab;\n user-select: none;\n}\n\n.wro-shell-mini.is-dragging {\n cursor: grabbing;\n}\n\n.wro-shell-mini__name {\n overflow: hidden;\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-shell-mini__duration {\n color: #22c55e;\n font-weight: 700;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-shell-mini__status {\n color: #2dd4bf;\n font-size: 12px;\n}\n";
|
package/dist/stylesInject.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Auto-generated from styles.css — do not edit. */
|
|
2
|
-
export const STYLES_CSS = "/* @yinshan-tech/webrtc-react — override via CSS variables / className */\n\n.wro-root {\n --wro-btn-bg: #ef4444;\n --wro-btn-color: #fff;\n --wro-btn-radius: 8px;\n --wro-btn-padding: 6px 14px;\n --wro-btn-font-size: 14px;\n --wro-modal-z: 1000;\n font-family:\n system-ui,\n -apple-system,\n \"Segoe UI\",\n Roboto,\n sans-serif;\n}\n\n.wro-btn {\n background: var(--wro-btn-bg);\n color: var(--wro-btn-color);\n border: none;\n border-radius: var(--wro-btn-radius);\n padding: var(--wro-btn-padding);\n font-size: var(--wro-btn-font-size);\n cursor: pointer;\n}\n\n.wro-btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n/* Floating call card (no full-screen mask) */\n.wro-call {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n width: 320px;\n padding: 20px 24px 28px;\n background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%);\n color: #0f172a;\n border-radius: 20px;\n box-shadow:\n 0 12px 40px rgba(15, 23, 42, 0.16),\n 0 2px 8px rgba(15, 23, 42, 0.06);\n text-align: center;\n cursor: grab;\n user-select: none;\n}\n\n.wro-call.is-dragging {\n cursor: grabbing;\n}\n\n.wro-call button {\n cursor: pointer;\n}\n\n.wro-call__minimize {\n position: absolute;\n top: 10px;\n right: 10px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n color: rgba(0, 0, 0, 0.45);\n background: transparent;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.wro-call__minimize:hover {\n color: rgba(0, 0, 0, 0.85);\n background: rgba(0, 0, 0, 0.06);\n}\n\n.wro-call__avatar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 72px;\n height: 72px;\n margin: 8px auto 16px;\n color: #fff;\n font-weight: 600;\n font-size: 28px;\n background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);\n border-radius: 50%;\n box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);\n}\n\n.wro-call__avatar.is-calling::after {\n position: absolute;\n inset: -6px;\n border: 2px solid rgba(59, 130, 246, 0.45);\n border-radius: 50%;\n animation: wro-ring 1.6s ease-out infinite;\n content: \"\";\n}\n\n.wro-call__avatar.is-connected {\n background: linear-gradient(145deg, #22c55e 0%, #15803d 100%);\n box-shadow: 0 8px 20px rgba(34, 197, 94, 0.28);\n}\n\n.wro-call__avatar.is-failed {\n background: linear-gradient(145deg, #f87171 0%, #dc2626 100%);\n box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);\n}\n\n.wro-call__avatar.is-ended {\n background: linear-gradient(145deg, #94a3b8 0%, #64748b 100%);\n box-shadow: none;\n}\n\n.wro-call__name {\n max-width: 100%;\n margin-bottom: 8px;\n overflow: hidden;\n font-weight: 600;\n font-size: 20px;\n line-height: 1.3;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call__status {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 36px;\n margin-bottom: 8px;\n}\n\n.wro-call__state {\n font-size: 14px;\n color: #64748b;\n}\n\n.wro-call__state.is-calling {\n color: #2563eb;\n animation: wro-blink 1.5s ease-in-out infinite;\n}\n\n.wro-call__state.is-failed {\n color: #dc2626;\n}\n\n.wro-call__state.is-timeout {\n color: #d97706;\n}\n\n.wro-call__state.is-ended {\n color: #64748b;\n}\n\n.wro-call__duration {\n color: #16a34a;\n font-weight: 700;\n font-size: 28px;\n font-variant-numeric: tabular-nums;\n letter-spacing: 1px;\n}\n\n.wro-call__actions {\n display: flex;\n gap: 28px;\n justify-content: center;\n margin-top: 16px;\n cursor: grab;\n}\n\n.wro-call__action {\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n}\n\n.wro-call__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n padding: 0;\n color: #fff;\n border: none;\n border-radius: 50%;\n box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);\n cursor: pointer;\n transition:\n transform 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.wro-call__circle:hover:not(:disabled) {\n transform: translateY(-1px);\n box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);\n}\n\n.wro-call__circle:disabled {\n background: #fecaca !important;\n box-shadow: none;\n cursor: not-allowed;\n}\n\n.wro-call__circle.is-unmuted {\n background: #16a34a;\n}\n\n.wro-call__circle.is-muted {\n background: #dc2626;\n}\n\n.wro-call__circle.is-hangup {\n background: #ef4444;\n}\n\n.wro-call__circle.is-hangup:hover:not(:disabled) {\n background: #dc2626;\n}\n\n.wro-call__hangup-icon {\n display: inline-flex;\n transform: rotate(135deg);\n}\n\n.wro-call__label {\n color: #475569;\n font-size: 13px;\n line-height: 1;\n}\n\n.wro-call-mini {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 220px;\n min-height: 64px;\n padding: 12px 14px;\n background: #fff;\n border: 1px solid #e2e8f0;\n border-radius: 12px;\n box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);\n cursor: grab;\n user-select: none;\n transition:\n box-shadow 0.2s ease,\n transform 0.2s ease;\n}\n\n.wro-call-mini.is-dragging {\n cursor: grabbing;\n transition: none;\n}\n\n.wro-call-mini:hover {\n box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);\n transform: translateY(-1px);\n}\n\n.wro-call-mini__name {\n overflow: hidden;\n color: #0f172a;\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call-mini__duration {\n color: #16a34a;\n font-weight: 700;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-call-mini__status {\n color: #2563eb;\n font-size: 12px;\n}\n\n@keyframes wro-blink {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.45;\n }\n}\n\n@keyframes wro-ring {\n 0% {\n transform: scale(0.92);\n opacity: 0.7;\n }\n 100% {\n transform: scale(1.18);\n opacity: 0;\n }\n}\n\n/* OutboundModeShell — dark workbench chrome */\n.wro-shell {\n --wro-shell-bg: #1a2332;\n --wro-shell-panel: #243044;\n --wro-shell-text: #e8eef7;\n --wro-shell-muted: #8b9bb4;\n --wro-shell-accent: #2dd4bf;\n --wro-shell-green: #22c55e;\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n width: 360px;\n padding: 0 0 16px;\n color: var(--wro-shell-text);\n background: var(--wro-shell-bg);\n border-radius: 12px;\n box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);\n cursor: grab;\n user-select: none;\n}\n\n.wro-shell.is-dragging {\n cursor: grabbing;\n}\n\n.wro-shell__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 14px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.06);\n}\n\n.wro-shell__title {\n display: inline-flex;\n gap: 8px;\n align-items: center;\n color: var(--wro-shell-accent);\n font-weight: 600;\n font-size: 14px;\n}\n\n.wro-shell__title-icon {\n display: inline-flex;\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__title-icon svg {\n width: 16px;\n height: 16px;\n}\n\n.wro-shell__icon-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n color: var(--wro-shell-muted);\n background: transparent;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n}\n\n.wro-shell__icon-btn:hover {\n color: var(--wro-shell-text);\n background: rgba(255, 255, 255, 0.06);\n}\n\n.wro-shell__mode-bar {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px 14px 0;\n}\n\n.wro-shell__agent-status {\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: var(--wro-shell-muted);\n font-size: 13px;\n}\n\n.wro-shell__agent-status-value {\n color: var(--wro-shell-green);\n font-weight: 600;\n}\n\n.wro-shell__mode-actions {\n display: flex;\n gap: 8px;\n}\n\n.wro-shell__mode-actions > * {\n flex: 1;\n}\n\n.wro-shell__call-status {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n justify-content: center;\n margin-top: 16px;\n padding: 0 16px;\n text-align: center;\n}\n\n.wro-shell__state {\n color: var(--wro-shell-muted);\n font-size: 14px;\n}\n\n.wro-shell__state.is-calling {\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__state.is-connected {\n color: var(--wro-shell-green);\n}\n\n.wro-shell__state.is-failed {\n color: #f87171;\n}\n\n.wro-shell__number {\n margin-top: 8px;\n padding: 0 16px;\n color: #fff;\n font-weight: 700;\n font-size: 26px;\n line-height: 1.2;\n text-align: center;\n letter-spacing: 0.5px;\n}\n\n.wro-shell__name {\n margin-top: 6px;\n padding: 0 16px;\n overflow: hidden;\n color: var(--wro-shell-muted);\n font-size: 13px;\n text-align: center;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-shell__idle-hint {\n min-height: 8px;\n margin-top: 12px;\n}\n\n.wro-shell__duration {\n margin-top: 14px;\n color: var(--wro-shell-green);\n font-weight: 700;\n font-size: 28px;\n font-variant-numeric: tabular-nums;\n text-align: center;\n letter-spacing: 1px;\n}\n\n.wro-shell__actions {\n display: flex;\n gap: 20px;\n justify-content: center;\n margin-top: 14px;\n}\n\n.wro-shell__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 52px;\n height: 52px;\n padding: 0;\n color: #fff;\n border: none;\n border-radius: 50%;\n cursor: pointer;\n}\n\n.wro-shell__circle.is-unmuted {\n background: #16a34a;\n}\n\n.wro-shell__circle.is-muted {\n background: #dc2626;\n}\n\n.wro-shell__circle.is-hangup {\n background: #ef4444;\n}\n\n.wro-shell__circle:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.wro-shell__hangup-icon {\n display: inline-flex;\n transform: rotate(135deg);\n}\n\n.wro-shell__batch {\n margin: 16px 14px 0;\n padding: 12px;\n background: var(--wro-shell-panel);\n border-radius: 8px;\n}\n\n.wro-shell__batch-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n color: var(--wro-shell-accent);\n font-size: 13px;\n}\n\n.wro-shell__batch-bar {\n height: 6px;\n overflow: hidden;\n background: rgba(255, 255, 255, 0.08);\n border-radius: 999px;\n}\n\n.wro-shell__batch-bar-fill {\n height: 100%;\n background: var(--wro-shell-accent);\n border-radius: 999px;\n transition: width 0.2s ease;\n}\n\n.wro-shell__batch-stats {\n display: flex;\n justify-content: space-between;\n margin-top: 8px;\n color: var(--wro-shell-muted);\n font-size: 12px;\n}\n\n.wro-shell-mini {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 220px;\n min-height: 64px;\n padding: 12px 14px;\n color: var(--wro-shell-text, #e8eef7);\n background: #1a2332;\n border: 1px solid rgba(255, 255, 255, 0.08);\n border-radius: 12px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n cursor: grab;\n user-select: none;\n}\n\n.wro-shell-mini.is-dragging {\n cursor: grabbing;\n}\n\n.wro-shell-mini__name {\n overflow: hidden;\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-shell-mini__duration {\n color: #22c55e;\n font-weight: 700;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-shell-mini__status {\n color: #2dd4bf;\n font-size: 12px;\n}\n";
|
|
2
|
+
export const STYLES_CSS = "/* @yinshan-tech/webrtc-react — override via CSS variables / className */\n\n.wro-root {\n --wro-btn-bg: #ef4444;\n --wro-btn-color: #fff;\n --wro-btn-radius: 8px;\n --wro-btn-padding: 6px 14px;\n --wro-btn-font-size: 14px;\n --wro-modal-z: 1100;\n font-family:\n system-ui,\n -apple-system,\n \"Segoe UI\",\n Roboto,\n sans-serif;\n}\n\n.wro-btn {\n background: var(--wro-btn-bg);\n color: var(--wro-btn-color);\n border: none;\n border-radius: var(--wro-btn-radius);\n padding: var(--wro-btn-padding);\n font-size: var(--wro-btn-font-size);\n cursor: pointer;\n}\n\n.wro-btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n/* Floating call card (no full-screen mask) */\n.wro-call {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n width: 320px;\n padding: 20px 24px 28px;\n background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%);\n color: #0f172a;\n border-radius: 20px;\n box-shadow:\n 0 12px 40px rgba(15, 23, 42, 0.16),\n 0 2px 8px rgba(15, 23, 42, 0.06);\n text-align: center;\n cursor: grab;\n user-select: none;\n}\n\n.wro-call.is-dragging {\n cursor: grabbing;\n}\n\n.wro-call button {\n cursor: pointer;\n}\n\n.wro-call__minimize {\n position: absolute;\n top: 10px;\n right: 10px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n color: rgba(0, 0, 0, 0.45);\n background: transparent;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.wro-call__minimize:hover {\n color: rgba(0, 0, 0, 0.85);\n background: rgba(0, 0, 0, 0.06);\n}\n\n.wro-call__avatar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 72px;\n height: 72px;\n margin: 8px auto 16px;\n color: #fff;\n font-weight: 600;\n font-size: 28px;\n background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);\n border-radius: 50%;\n box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);\n}\n\n.wro-call__avatar.is-calling::after {\n position: absolute;\n inset: -6px;\n border: 2px solid rgba(59, 130, 246, 0.45);\n border-radius: 50%;\n animation: wro-ring 1.6s ease-out infinite;\n content: \"\";\n}\n\n.wro-call__avatar.is-connected {\n background: linear-gradient(145deg, #22c55e 0%, #15803d 100%);\n box-shadow: 0 8px 20px rgba(34, 197, 94, 0.28);\n}\n\n.wro-call__avatar.is-failed {\n background: linear-gradient(145deg, #f87171 0%, #dc2626 100%);\n box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);\n}\n\n.wro-call__avatar.is-ended {\n background: linear-gradient(145deg, #94a3b8 0%, #64748b 100%);\n box-shadow: none;\n}\n\n.wro-call__name {\n max-width: 100%;\n margin-bottom: 8px;\n overflow: hidden;\n font-weight: 600;\n font-size: 20px;\n line-height: 1.3;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call__number {\n max-width: 100%;\n margin-bottom: 4px;\n overflow: hidden;\n color: #0f172a;\n font-weight: 700;\n font-size: 18px;\n letter-spacing: 0.02em;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call__status {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 36px;\n margin-bottom: 8px;\n}\n\n.wro-call__state {\n font-size: 14px;\n color: #64748b;\n}\n\n.wro-call__state.is-calling {\n color: #2563eb;\n animation: wro-blink 1.5s ease-in-out infinite;\n}\n\n.wro-call__state.is-failed {\n color: #dc2626;\n}\n\n.wro-call__state.is-timeout {\n color: #d97706;\n}\n\n.wro-call__state.is-ended {\n color: #64748b;\n}\n\n.wro-call__duration {\n color: #16a34a;\n font-weight: 700;\n font-size: 28px;\n font-variant-numeric: tabular-nums;\n letter-spacing: 1px;\n}\n\n.wro-call__actions {\n display: flex;\n gap: 28px;\n justify-content: center;\n margin-top: 16px;\n cursor: grab;\n}\n\n.wro-call__action {\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n}\n\n.wro-call__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n padding: 0;\n color: #fff;\n border: none;\n border-radius: 50%;\n box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);\n cursor: pointer;\n transition:\n transform 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.wro-call__circle:hover:not(:disabled) {\n transform: translateY(-1px);\n box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);\n}\n\n.wro-call__circle:disabled {\n background: #fecaca !important;\n box-shadow: none;\n cursor: not-allowed;\n}\n\n.wro-call__circle.is-unmuted {\n background: #16a34a;\n}\n\n.wro-call__circle.is-muted {\n background: #dc2626;\n}\n\n.wro-call__circle.is-hangup {\n background: #ef4444;\n}\n\n.wro-call__circle.is-hangup:hover:not(:disabled) {\n background: #dc2626;\n}\n\n.wro-call__hangup-icon {\n display: inline-flex;\n transform: rotate(135deg);\n}\n\n.wro-call__label {\n color: #475569;\n font-size: 13px;\n line-height: 1;\n}\n\n.wro-call-mini {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 220px;\n min-height: 64px;\n padding: 12px 14px;\n background: #fff;\n border: 1px solid #e2e8f0;\n border-radius: 12px;\n box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);\n cursor: grab;\n user-select: none;\n transition:\n box-shadow 0.2s ease,\n transform 0.2s ease;\n}\n\n.wro-call-mini.is-dragging {\n cursor: grabbing;\n transition: none;\n}\n\n.wro-call-mini:hover {\n box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);\n transform: translateY(-1px);\n}\n\n.wro-call-mini__name {\n overflow: hidden;\n color: #0f172a;\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-call-mini__duration {\n color: #16a34a;\n font-weight: 700;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-call-mini__status {\n color: #2563eb;\n font-size: 12px;\n}\n\n@keyframes wro-blink {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.45;\n }\n}\n\n@keyframes wro-ring {\n 0% {\n transform: scale(0.92);\n opacity: 0.7;\n }\n 100% {\n transform: scale(1.18);\n opacity: 0;\n }\n}\n\n/* OutboundModeShell — dark workbench chrome */\n.wro-shell {\n --wro-shell-bg: #1a2332;\n --wro-shell-panel: #243044;\n --wro-shell-text: #e8eef7;\n --wro-shell-muted: #8b9bb4;\n --wro-shell-accent: #2dd4bf;\n --wro-shell-green: #22c55e;\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n width: 360px;\n padding: 0 0 16px;\n color: var(--wro-shell-text);\n background: var(--wro-shell-bg);\n border-radius: 12px;\n box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);\n cursor: grab;\n user-select: none;\n}\n\n.wro-shell.is-dragging {\n cursor: grabbing;\n}\n\n.wro-shell__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 14px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.06);\n}\n\n.wro-shell__title {\n display: inline-flex;\n gap: 8px;\n align-items: center;\n color: var(--wro-shell-accent);\n font-weight: 600;\n font-size: 14px;\n}\n\n.wro-shell__title-icon {\n display: inline-flex;\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__title-icon svg {\n width: 16px;\n height: 16px;\n}\n\n.wro-shell__header-actions {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.wro-shell__icon-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n color: var(--wro-shell-muted);\n background: transparent;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n}\n\n.wro-shell__icon-btn:hover {\n color: var(--wro-shell-text);\n background: rgba(255, 255, 255, 0.06);\n}\n\n.wro-shell__icon-btn.is-close {\n color: #d54941;\n background: rgba(213, 73, 65, 0.25);\n}\n\n.wro-shell__icon-btn.is-close:hover {\n color: #fff;\n background: rgba(213, 73, 65, 0.6);\n}\n\n.wro-shell__mode-bar {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px 14px 0;\n}\n\n.wro-shell__agent-status {\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: var(--wro-shell-muted);\n font-size: 13px;\n}\n\n.wro-shell__agent-status-value {\n color: var(--wro-shell-green);\n font-weight: 600;\n}\n\n.wro-shell__mode-actions {\n display: flex;\n gap: 8px;\n}\n\n.wro-shell__mode-actions > * {\n flex: 1;\n}\n\n.wro-shell__task-btn {\n border: 0;\n border-radius: 6px;\n padding: 6px 8px;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n\n.wro-shell__task-btn.is-pause {\n background: #e8730c;\n color: #fff;\n}\n\n.wro-shell__task-btn.is-resume {\n background: var(--wro-shell-accent, #42a5f5);\n color: #fff;\n}\n\n.wro-shell__task-btn.is-cancel {\n background: rgba(213, 73, 65, 0.16);\n color: #d54941;\n}\n\n.wro-shell__task-btn.is-disabled,\n.wro-shell__icon-btn.is-disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.wro-shell__call-status {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n justify-content: center;\n margin-top: 16px;\n padding: 0 16px;\n text-align: center;\n}\n\n.wro-shell__state {\n color: var(--wro-shell-muted);\n font-size: 14px;\n}\n\n.wro-shell__state.is-calling {\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__state.is-next-missed {\n color: var(--wro-shell-muted);\n}\n\n.wro-shell__countdown-sec {\n color: var(--wro-shell-green);\n font-weight: 700;\n}\n\n.wro-shell__state.is-connected {\n color: var(--wro-shell-green);\n}\n\n.wro-shell__state.is-failed {\n color: #f87171;\n}\n\n.wro-shell__number {\n margin-top: 8px;\n padding: 0 16px;\n color: #fff;\n font-weight: 700;\n font-size: 26px;\n line-height: 1.2;\n text-align: center;\n letter-spacing: 0.5px;\n}\n\n.wro-shell__name {\n margin-top: 6px;\n padding: 0 16px;\n overflow: hidden;\n color: var(--wro-shell-muted);\n font-size: 13px;\n text-align: center;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-shell__idle-hint {\n min-height: 36px;\n margin-top: 16px;\n padding: 0 16px;\n color: var(--wro-shell-accent);\n font-size: 14px;\n line-height: 36px;\n text-align: center;\n}\n\n.wro-shell__info {\n display: grid;\n grid-template-columns: repeat(5, 1fr);\n gap: 2px;\n width: calc(100% - 28px);\n margin: 10px 14px 4px;\n padding: 6px 4px;\n background: var(--wro-shell-panel);\n border-radius: 5px;\n}\n\n.wro-shell__info-item {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n padding: 2px 1px;\n text-align: center;\n border-right: 1px solid rgba(255, 255, 255, 0.08);\n}\n\n.wro-shell__info-item:last-child {\n border-right: none;\n}\n\n.wro-shell__info-label {\n display: flex;\n align-items: flex-end;\n justify-content: center;\n min-height: 2.4em;\n margin-bottom: 2px;\n color: var(--wro-shell-muted);\n font-size: 9px;\n line-height: 1.2;\n text-align: center;\n}\n\n.wro-shell__info-value {\n color: var(--wro-shell-text);\n font-weight: 600;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-shell__info-meta {\n margin: 0 14px 4px;\n color: var(--wro-shell-muted);\n font-size: 11px;\n text-align: center;\n}\n\n.wro-shell__info-meta-val {\n color: var(--wro-shell-accent);\n}\n\n.wro-shell__duration {\n margin-top: 14px;\n color: var(--wro-shell-green);\n font-weight: 700;\n font-size: 28px;\n font-variant-numeric: tabular-nums;\n text-align: center;\n letter-spacing: 1px;\n}\n\n.wro-shell__actions {\n display: flex;\n gap: 20px;\n justify-content: center;\n margin-top: 14px;\n}\n\n.wro-shell__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 52px;\n height: 52px;\n padding: 0;\n color: #fff;\n border: none;\n border-radius: 50%;\n cursor: pointer;\n}\n\n.wro-shell__circle.is-unmuted {\n background: #16a34a;\n}\n\n.wro-shell__circle.is-muted {\n background: #dc2626;\n}\n\n.wro-shell__circle.is-hangup {\n background: #ef4444;\n}\n\n.wro-shell__circle:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.wro-shell__hangup-icon {\n display: inline-flex;\n transform: rotate(135deg);\n}\n\n.wro-shell__batch {\n margin: 16px 14px 0;\n padding: 12px;\n background: var(--wro-shell-panel);\n border-radius: 8px;\n}\n\n.wro-shell__batch-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n color: var(--wro-shell-accent);\n font-size: 13px;\n}\n\n.wro-shell__batch-bar {\n height: 6px;\n overflow: hidden;\n background: rgba(255, 255, 255, 0.08);\n border-radius: 999px;\n}\n\n.wro-shell__batch-bar-fill {\n height: 100%;\n background: var(--wro-shell-accent);\n border-radius: 999px;\n transition: width 0.2s ease;\n}\n\n.wro-shell__batch-stats {\n display: flex;\n justify-content: flex-start;\n gap: 16px;\n margin-top: 8px;\n color: var(--wro-shell-muted);\n font-size: 12px;\n}\n\n.wro-shell__batch-stats-val {\n color: var(--wro-shell-accent);\n font-weight: 600;\n}\n\n.wro-shell-mini {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: var(--wro-modal-z);\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 220px;\n min-height: 64px;\n padding: 12px 14px;\n color: var(--wro-shell-text, #e8eef7);\n background: #1a2332;\n border: 1px solid rgba(255, 255, 255, 0.08);\n border-radius: 12px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n cursor: grab;\n user-select: none;\n}\n\n.wro-shell-mini.is-dragging {\n cursor: grabbing;\n}\n\n.wro-shell-mini__name {\n overflow: hidden;\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.wro-shell-mini__duration {\n color: #22c55e;\n font-weight: 700;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n}\n\n.wro-shell-mini__status {\n color: #2dd4bf;\n font-size: 12px;\n}\n";
|
|
3
3
|
//# sourceMappingURL=stylesInject.js.map
|
package/dist/stylesInject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stylesInject.js","sourceRoot":"","sources":["../src/stylesInject.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG
|
|
1
|
+
{"version":3,"file":"stylesInject.js","sourceRoot":"","sources":["../src/stylesInject.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG,2qbAA2qb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yinshan-tech/webrtc-react",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "React UI for @yinshan-tech/webrtc-sdk Softphone: button, call widget, hooks (no antd)",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"prepublishOnly": "npm run build"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@yinshan-tech/webrtc-sdk": "^0.8.
|
|
31
|
-
"react": ">=
|
|
32
|
-
"react-dom": ">=
|
|
30
|
+
"@yinshan-tech/webrtc-sdk": "^0.8.5",
|
|
31
|
+
"react": ">=17.0.0",
|
|
32
|
+
"react-dom": ">=17.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/react": "^18.3.0",
|