@yinshan-tech/webrtc-react 0.8.0 → 0.8.2

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 (121) hide show
  1. package/README.md +128 -56
  2. package/dist/CallWidget.d.ts +3 -0
  3. package/dist/CallWidget.js +36 -10
  4. package/dist/CallWidget.js.map +1 -1
  5. package/dist/OutboundCallButton.d.ts +1 -1
  6. package/dist/OutboundCallButton.js +45 -5
  7. package/dist/OutboundCallButton.js.map +1 -1
  8. package/dist/OutboundModeShell.d.ts +33 -1
  9. package/dist/OutboundModeShell.js +285 -71
  10. package/dist/OutboundModeShell.js.map +1 -1
  11. package/dist/SoftphoneProvider.d.ts +1 -1
  12. package/dist/SoftphoneProvider.js.map +1 -1
  13. package/dist/ensureCallWidgetHost.js +27 -2
  14. package/dist/ensureCallWidgetHost.js.map +1 -1
  15. package/dist/host/SoftphoneConnectToast.d.ts +10 -0
  16. package/dist/host/SoftphoneConnectToast.js +36 -0
  17. package/dist/host/SoftphoneConnectToast.js.map +1 -0
  18. package/dist/host/SoftphoneHost.d.ts +21 -0
  19. package/dist/host/SoftphoneHost.js +55 -0
  20. package/dist/host/SoftphoneHost.js.map +1 -0
  21. package/dist/host/SoftphoneNotifyBridge.d.ts +9 -0
  22. package/dist/host/SoftphoneNotifyBridge.js +26 -0
  23. package/dist/host/SoftphoneNotifyBridge.js.map +1 -0
  24. package/dist/host/connectToast.d.ts +8 -0
  25. package/dist/host/connectToast.js +32 -0
  26. package/dist/host/connectToast.js.map +1 -0
  27. package/dist/host/types.d.ts +8 -0
  28. package/dist/host/types.js +2 -0
  29. package/dist/host/types.js.map +1 -0
  30. package/dist/index.d.ts +32 -1
  31. package/dist/index.js +21 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/kit/asPartyContext.d.ts +15 -0
  34. package/dist/kit/asPartyContext.js +50 -0
  35. package/dist/kit/asPartyContext.js.map +1 -0
  36. package/dist/kit/assets.d.ts +7 -0
  37. package/dist/kit/assets.js +13 -0
  38. package/dist/kit/assets.js.map +1 -0
  39. package/dist/kit/bindDialHangupCallId.d.ts +11 -0
  40. package/dist/kit/bindDialHangupCallId.js +38 -0
  41. package/dist/kit/bindDialHangupCallId.js.map +1 -0
  42. package/dist/kit/callCenterTaskEndpoints.d.ts +9 -0
  43. package/dist/kit/callCenterTaskEndpoints.js +11 -0
  44. package/dist/kit/callCenterTaskEndpoints.js.map +1 -0
  45. package/dist/kit/clickCallChrome.d.ts +7 -0
  46. package/dist/kit/clickCallChrome.js +22 -0
  47. package/dist/kit/clickCallChrome.js.map +1 -0
  48. package/dist/kit/clickCallMutex.d.ts +34 -0
  49. package/dist/kit/clickCallMutex.js +33 -0
  50. package/dist/kit/clickCallMutex.js.map +1 -0
  51. package/dist/kit/createCallCenterSoftphone.d.ts +24 -0
  52. package/dist/kit/createCallCenterSoftphone.js +10 -0
  53. package/dist/kit/createCallCenterSoftphone.js.map +1 -0
  54. package/dist/kit/createSoftphoneHttp.d.ts +9 -0
  55. package/dist/kit/createSoftphoneHttp.js +10 -0
  56. package/dist/kit/createSoftphoneHttp.js.map +1 -0
  57. package/dist/kit/executeSoftphoneHttp.d.ts +31 -0
  58. package/dist/kit/executeSoftphoneHttp.js +49 -0
  59. package/dist/kit/executeSoftphoneHttp.js.map +1 -0
  60. package/dist/kit/hooks.d.ts +12 -0
  61. package/dist/kit/hooks.js +117 -0
  62. package/dist/kit/hooks.js.map +1 -0
  63. package/dist/kit/mergeTopLevelDialSession.d.ts +6 -0
  64. package/dist/kit/mergeTopLevelDialSession.js +12 -0
  65. package/dist/kit/mergeTopLevelDialSession.js.map +1 -0
  66. package/dist/kit/overlayFetch.d.ts +3 -0
  67. package/dist/kit/overlayFetch.js +11 -0
  68. package/dist/kit/overlayFetch.js.map +1 -0
  69. package/dist/kit/parseHangupCallId.d.ts +6 -0
  70. package/dist/kit/parseHangupCallId.js +42 -0
  71. package/dist/kit/parseHangupCallId.js.map +1 -0
  72. package/dist/kit/softphoneHostMatch.d.ts +1 -0
  73. package/dist/kit/softphoneHostMatch.js +7 -0
  74. package/dist/kit/softphoneHostMatch.js.map +1 -0
  75. package/dist/kit/useProgressiveOverlay.d.ts +5 -0
  76. package/dist/kit/useProgressiveOverlay.js +69 -0
  77. package/dist/kit/useProgressiveOverlay.js.map +1 -0
  78. package/dist/kit/useProgressiveSession.d.ts +8 -0
  79. package/dist/kit/useProgressiveSession.js +66 -0
  80. package/dist/kit/useProgressiveSession.js.map +1 -0
  81. package/dist/kit/waitingHostKind.d.ts +6 -0
  82. package/dist/kit/waitingHostKind.js +11 -0
  83. package/dist/kit/waitingHostKind.js.map +1 -0
  84. package/dist/locales/en-US.d.ts +1 -0
  85. package/dist/locales/en-US.js +2 -0
  86. package/dist/locales/en-US.js.map +1 -0
  87. package/dist/locales/id-ID.d.ts +1 -0
  88. package/dist/locales/id-ID.js +2 -0
  89. package/dist/locales/id-ID.js.map +1 -0
  90. package/dist/locales/resolveNotifyMessage.d.ts +2 -0
  91. package/dist/locales/resolveNotifyMessage.js +43 -0
  92. package/dist/locales/resolveNotifyMessage.js.map +1 -0
  93. package/dist/locales/resolveSoftphoneTexts.d.ts +7 -0
  94. package/dist/locales/resolveSoftphoneTexts.js +165 -0
  95. package/dist/locales/resolveSoftphoneTexts.js.map +1 -0
  96. package/dist/locales/types.d.ts +46 -0
  97. package/dist/locales/types.js +45 -0
  98. package/dist/locales/types.js.map +1 -0
  99. package/dist/locales/zh-CN.d.ts +1 -0
  100. package/dist/locales/zh-CN.js +2 -0
  101. package/dist/locales/zh-CN.js.map +1 -0
  102. package/dist/outboundShell/ManualCallBody.d.ts +12 -0
  103. package/dist/outboundShell/ManualCallBody.js +12 -0
  104. package/dist/outboundShell/ManualCallBody.js.map +1 -0
  105. package/dist/outboundShell/PredictiveTaskBody.d.ts +6 -0
  106. package/dist/outboundShell/PredictiveTaskBody.js +23 -0
  107. package/dist/outboundShell/PredictiveTaskBody.js.map +1 -0
  108. package/dist/outboundShell/ProgressiveTaskBody.d.ts +24 -0
  109. package/dist/outboundShell/ProgressiveTaskBody.js +68 -0
  110. package/dist/outboundShell/ProgressiveTaskBody.js.map +1 -0
  111. package/dist/outboundTaskUi.d.ts +57 -0
  112. package/dist/outboundTaskUi.js +86 -0
  113. package/dist/outboundTaskUi.js.map +1 -0
  114. package/dist/progressiveStatusLine.d.ts +22 -0
  115. package/dist/progressiveStatusLine.js +135 -0
  116. package/dist/progressiveStatusLine.js.map +1 -0
  117. package/dist/styles.css +136 -4
  118. package/dist/stylesInject.d.ts +1 -1
  119. package/dist/stylesInject.js +1 -1
  120. package/dist/stylesInject.js.map +1 -1
  121. package/package.json +5 -5
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Progressive cancel UX: confirm vs dismiss vs still hit cancel API.
3
+ */
4
+ export function isProgressComplete(task) {
5
+ const progress = task === null || task === void 0 ? void 0 : task.progress;
6
+ return !!progress && progress.total > 0 && progress.done >= progress.total;
7
+ }
8
+ export function shouldDismissCancelWithoutApi(completing, task) {
9
+ return completing || (task === null || task === void 0 ? void 0 : task.status) === 'completed' || (task === null || task === void 0 ? void 0 : task.status) === 'cancelled' || (task === null || task === void 0 ? void 0 : task.status) === 'expired';
10
+ }
11
+ export function shouldSkipCancelConfirm(completing, task) {
12
+ if (shouldDismissCancelWithoutApi(completing, task))
13
+ return true;
14
+ return isProgressComplete(task);
15
+ }
16
+ export function shouldStashCallUiContext(phase) {
17
+ return phase === 'dialing' || phase === 'ringing' || phase === 'active';
18
+ }
19
+ export function nextLastUiContext(prev, call) {
20
+ if (!(call === null || call === void 0 ? void 0 : call.uiContext) || !shouldStashCallUiContext(call.phase)) {
21
+ return prev;
22
+ }
23
+ return call.uiContext;
24
+ }
25
+ export function shouldClearLastUiContextOnOutboundTaskStart(prev, next) {
26
+ if (!next || (next.status !== 'running' && next.status !== 'paused')) {
27
+ return false;
28
+ }
29
+ return !prev || prev.taskId !== next.taskId;
30
+ }
31
+ export function resolveShellUiMode(input) {
32
+ var _a;
33
+ const hostMode = (_a = input.hostMode) !== null && _a !== void 0 ? _a : 'manual';
34
+ const task = input.task;
35
+ const taskOwnsUi = isOutboundTaskHoldingShell(task, input.completing);
36
+ if (!taskOwnsUi) {
37
+ return hostMode;
38
+ }
39
+ return (task === null || task === void 0 ? void 0 : task.mode) === 'predictive' ? 'predictive' : 'progressive';
40
+ }
41
+ export function isOutboundTaskHoldingShell(task, completing) {
42
+ if (completing)
43
+ return true;
44
+ const status = task === null || task === void 0 ? void 0 : task.status;
45
+ return (status === 'running' ||
46
+ status === 'paused' ||
47
+ status === 'completed' ||
48
+ status === 'expired');
49
+ }
50
+ export function shouldBlockDismissWhileInCall(phase) {
51
+ return phase === 'active';
52
+ }
53
+ export function canHangupProgressiveCall(phase) {
54
+ return phase === 'ringing' || phase === 'active';
55
+ }
56
+ export function canMuteCall(phase) {
57
+ return phase === 'active';
58
+ }
59
+ export function nextStashForMode(stash, mode, call) {
60
+ if (!(call === null || call === void 0 ? void 0 : call.uiContext) || !shouldStashCallUiContext(call.phase)) {
61
+ return stash;
62
+ }
63
+ if (stash[mode] === call.uiContext) {
64
+ return stash;
65
+ }
66
+ return Object.assign(Object.assign({}, stash), { [mode]: call.uiContext });
67
+ }
68
+ export function uiContextForMode(stash, mode, call) {
69
+ if (shouldStashCallUiContext(call === null || call === void 0 ? void 0 : call.phase) && (call === null || call === void 0 ? void 0 : call.uiContext)) {
70
+ return call.uiContext;
71
+ }
72
+ if (mode === 'progressive') {
73
+ return undefined;
74
+ }
75
+ return stash[mode];
76
+ }
77
+ export function shellTitleKey(effectiveMode) {
78
+ return effectiveMode === 'manual' ? 'title' : 'progressiveTitle';
79
+ }
80
+ export function shellTitleFallback(effectiveMode) {
81
+ return effectiveMode === 'manual' ? 'Auto Agent Phone' : 'Progressive outbound';
82
+ }
83
+ export function shouldDisableDialTrigger(input) {
84
+ return !!(input.disabled || input.loading || input.requestBusy || input.originBusy);
85
+ }
86
+ //# sourceMappingURL=outboundTaskUi.js.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CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AACtF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { CallSnapshot, OutboundTaskUi } from '@yinshan-tech/webrtc-sdk';
2
+ import type { OutboundModeShellTexts } from './OutboundModeShell';
3
+ export type ProgressiveStatusLine = {
4
+ className: string;
5
+ text: string | null;
6
+ highlight?: string;
7
+ prefix?: string;
8
+ suffix?: string;
9
+ };
10
+ export declare function formatNextDialAt(iso: string, locale: string, now: Date, timeZone?: string): string;
11
+ export declare function resolveProgressiveStatusLine(input: {
12
+ call: CallSnapshot | null;
13
+ ui?: OutboundTaskUi;
14
+ taskStatus?: string | null;
15
+ completing?: boolean;
16
+ completeExitSeconds?: number;
17
+ texts: OutboundModeShellTexts;
18
+ now: number;
19
+ locale?: string;
20
+ sipText?: (phase: CallSnapshot['phase']) => string;
21
+ waitingText: string;
22
+ }): ProgressiveStatusLine;
@@ -0,0 +1,135 @@
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;
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
+ if (phase === 'dialing' || phase === 'ringing' || phase === 'active' || phase === 'ending' || phase === 'failed') {
68
+ const sip = ((_b = input.sipText) === null || _b === void 0 ? void 0 : _b.call(input, phase)) || '';
69
+ const className = phase === 'active'
70
+ ? 'wro-shell__state is-connected'
71
+ : phase === 'failed'
72
+ ? 'wro-shell__state is-failed'
73
+ : 'wro-shell__state is-calling';
74
+ return { className, text: sip };
75
+ }
76
+ if (input.taskStatus === 'paused' && ((_c = input.ui) === null || _c === void 0 ? void 0 : _c.phase) === 'dialing') {
77
+ return {
78
+ className: 'wro-shell__state is-calling',
79
+ text: t('pausedStillDialing', 'Paused · current number still dialing'),
80
+ };
81
+ }
82
+ if (input.taskStatus === 'paused') {
83
+ return {
84
+ className: 'wro-shell__state',
85
+ text: t('pausedStatus', 'Paused'),
86
+ };
87
+ }
88
+ const ui = input.ui;
89
+ if ((ui === null || ui === void 0 ? void 0 : ui.phase) === 'dialing') {
90
+ return {
91
+ className: 'wro-shell__state is-calling',
92
+ text: t('dialing', 'Dialing'),
93
+ };
94
+ }
95
+ if ((ui === null || ui === void 0 ? void 0 : ui.phase) === 'waiting_next') {
96
+ if (ui.waitKind === 'rest' && ui.nextDialAt) {
97
+ const time = formatNextDialAt(ui.nextDialAt, input.locale || 'en-US', new Date(input.now));
98
+ const template = ui.reason === 'ended'
99
+ ? t('nextDialAtEnded', 'Call ended · next dial at {time}...')
100
+ : t('nextDialAtMissed', 'No answer · next dial at {time}...');
101
+ const parts = fillTemplate(template, '{time}');
102
+ return {
103
+ className: 'wro-shell__state is-next-missed',
104
+ text: null,
105
+ prefix: parts.prefix,
106
+ highlight: time,
107
+ suffix: parts.suffix,
108
+ };
109
+ }
110
+ if (ui.reason === 'ended') {
111
+ const remaining = remainingDelaySeconds(ui, input.now);
112
+ if (remaining > 0) {
113
+ const template = t('nextDialEndedCountdown', 'Call ended · next dial in {n}s...');
114
+ const parts = fillTemplate(template, '{n}');
115
+ return {
116
+ className: 'wro-shell__state is-next-missed',
117
+ text: null,
118
+ prefix: parts.prefix,
119
+ highlight: String(remaining),
120
+ suffix: parts.suffix,
121
+ };
122
+ }
123
+ return {
124
+ className: 'wro-shell__state is-next-missed',
125
+ text: t('nextDialEnded', 'Call ended · dialing next...'),
126
+ };
127
+ }
128
+ return {
129
+ className: 'wro-shell__state is-next-missed',
130
+ text: t('nextDialMissed', 'No answer · dialing next...'),
131
+ };
132
+ }
133
+ return { className: 'wro-shell__state', text: null };
134
+ }
135
+ //# sourceMappingURL=progressiveStatusLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progressiveStatusLine.js","sourceRoot":"","sources":["../src/progressiveStatusLine.ts"],"names":[],"mappings":"AAWA,SAAS,YAAY,CAAC,QAAgB,EAAE,KAAa;;IACnD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,EAAE,MAAA,KAAK,CAAC,CAAC,CAAC,mCAAI,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACxE,CAAC;AAED,SAAS,qBAAqB,CAAC,EAA8B,EAAE,KAAa;IAC1E,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,YAAY,IAAI,IAAI,EAAE;QAClC,OAAO,CAAC,CAAC;KACV;IACD,IAAI,EAAE,CAAC,QAAQ,KAAK,UAAU,IAAI,EAAE,CAAC,SAAS,IAAI,IAAI,EAAE;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;KACrC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IACvE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,GAAG,OAAO,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAW,EAAE,MAAc,EAAE,GAAS,EAAE,QAAiB;IACxF,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE;QAC9B,OAAO,EAAE,CAAC;KACX;IACD,MAAM,OA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C;gBAC5C,IAAI,EAAE,IAAI;gBACV,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,SAAS,EAAE,IAAI;gBACf,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC;SACH;QACD,IAAI,EAAE,CAAC,MAAM,KAAK,OAAO,EAAE;YACzB,MAAM,SAAS,GAAG,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;YACvD,IAAI,SAAS,GAAG,CAAC,EAAE;gBACjB,MAAM,QAAQ,GAAG,CAAC,CAAC,wBAAwB,EAAE,mCAAmC,CAAC,CAAC;gBAClF,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;gBAC5C,OAAO;oBACL,SAAS,EAAE,iCAAiC;oBAC5C,IAAI,EAAE,IAAI;oBACV,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC;oBAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;iBACrB,CAAC;aACH;YACD,OAAO;gBACL,SAAS,EAAE,iCAAiC;gBAC5C,IAAI,EAAE,CAAC,CAAC,eAAe,EAAE,8BAA8B,CAAC;aACzD,CAAC;SACH;QACD,OAAO;YACL,SAAS,EAAE,iCAAiC;YAC5C,IAAI,EAAE,CAAC,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;SACzD,CAAC;KACH;IAED,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACvD,CAAC"}
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: 1000;
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: 8px;
468
- margin-top: 12px;
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: space-between;
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;
@@ -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";
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"stylesInject.js","sourceRoot":"","sources":["../src/stylesInject.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG,+rWAA+rW,CAAC"}
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.0",
3
+ "version": "0.8.2",
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,14 +27,14 @@
27
27
  "prepublishOnly": "npm run build"
28
28
  },
29
29
  "peerDependencies": {
30
- "@yinshan-tech/webrtc-sdk": "^0.8.0",
31
- "react": ">=18.0.0",
32
- "react-dom": ">=18.0.0"
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",
36
36
  "@types/react-dom": "^18.3.0",
37
- "@yinshan-tech/webrtc-sdk": "file:../webrtc-sdk",
37
+ "@yinshan-tech/webrtc-sdk": "^0.8.5",
38
38
  "typescript": "^4.8.3"
39
39
  },
40
40
  "keywords": [