@admin-layout/tailwind-ui 12.2.4-alpha.61 → 12.2.4-alpha.63
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/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.d.ts +2 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.js +396 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts.map +1 -1
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js +2 -2
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js.map +1 -1
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts.map +1 -1
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js.map +1 -1
- package/lib/components/AIToolbar/index.d.ts +1 -0
- package/lib/components/AIToolbar/index.d.ts.map +1 -1
- package/lib/components/Inbox/Channels/ChannelBar.d.ts +33 -0
- package/lib/components/Inbox/Channels/ChannelBar.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/ChannelBar.js +79 -0
- package/lib/components/Inbox/Channels/ChannelBar.js.map +1 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.d.ts +24 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.js +177 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.js.map +1 -0
- package/lib/components/Inbox/Channels/channelsMeta.d.ts +16 -0
- package/lib/components/Inbox/Channels/channelsMeta.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/channelsMeta.js +127 -0
- package/lib/components/Inbox/Channels/channelsMeta.js.map +1 -0
- package/lib/components/Inbox/Channels/index.d.ts +7 -0
- package/lib/components/Inbox/Channels/index.d.ts.map +1 -0
- package/lib/components/Inbox/index.d.ts +2 -0
- package/lib/components/Inbox/index.d.ts.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MicrophoneDiagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/speech/MicrophoneDiagnostics.tsx"],"names":[],"mappings":"AA+LA,wBAAgB,qBAAqB,4CAmPpC"}
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useRef,useCallback,useEffect}from'react';import'../../../../shardui/accordion.js';import'../../../../shardui/alert.js';import'../../../../shardui/alert-dialog.js';import'@radix-ui/react-aspect-ratio';import'../../../../shardui/avatar.js';import'../../../../shardui/badge.js';import'../../../../shardui/breadcrumb.js';import {Button}from'../../../../shardui/button.js';import'../../../../shardui/calendar.js';import'../../../../shardui/card.js';import'../../../../shardui/carousel.js';import'../../../../shardui/chart.js';import'../../../../shardui/checkbox.js';import'@radix-ui/react-collapsible';import'../../../../shardui/command.js';import'../../../../shardui/context-menu.js';import'../../../../shardui/dialog.js';import'../../../../shardui/drawer.js';import'../../../../shardui/dropdown-menu.js';import'../../../../shardui/form.js';import'../../../../shardui/hover-card.js';import'../../../../shardui/input.js';import'../../../../shardui/input-otp.js';import {Label}from'../../../../shardui/label.js';import'../../../../shardui/menubar.js';import'../../../../shardui/navigation-menu.js';import'../../../../shardui/pagination.js';import'../../../../shardui/popover.js';import'../../../../shardui/progress.js';import'../../../../shardui/radio-group.js';import {MicIcon,RefreshCwIcon,LoaderIcon,SettingsIcon,RotateCcwIcon,CheckCircle2Icon,CircleAlertIcon,HelpCircleIcon}from'lucide-react';import'react-resizable-panels';import'../../../../utils/isBrowser/index.js';import {cn}from'../../../../utils/util.js';import'fast-deep-equal/react.js';import'../../../../shardui/scroll-area.js';import'../../../../shardui/select.js';import'../../../../shardui/separator.js';import'../../../../shardui/sheet.js';import'../../../../shardui/sidebar.js';import'../../../../shardui/slider.js';import'../../../ThemeProvider/ThemeProvider.js';import'sonner';import'../../../../shardui/switch.js';import'../../../../shardui/table.js';import'../../../../shardui/tabs.js';import'../../../../shardui/textarea.js';import'../../../../shardui/toast.js';import'../../../../shardui/toggle.js';import'../../../../shardui/toggle-group.js';import'../../../../shardui/tooltip.js';// constants
|
|
2
|
+
const TEST_DURATION_MS = 3000;
|
|
3
|
+
const STATUS_POLL_MS = 2000;
|
|
4
|
+
const TCC_RESET_HINT = 'tccutil reset Microphone com.cdebase.yantra';
|
|
5
|
+
const STATUS_COPY = {
|
|
6
|
+
authorized: {
|
|
7
|
+
label: 'Authorized',
|
|
8
|
+
tone: 'ok'
|
|
9
|
+
},
|
|
10
|
+
not_determined: {
|
|
11
|
+
label: 'Not requested yet',
|
|
12
|
+
tone: 'warn'
|
|
13
|
+
},
|
|
14
|
+
denied: {
|
|
15
|
+
label: 'Denied',
|
|
16
|
+
tone: 'err'
|
|
17
|
+
},
|
|
18
|
+
restricted: {
|
|
19
|
+
label: 'Restricted (MDM)',
|
|
20
|
+
tone: 'err'
|
|
21
|
+
},
|
|
22
|
+
unsupported: {
|
|
23
|
+
label: 'Not gated on this OS',
|
|
24
|
+
tone: 'muted'
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
// helper functions
|
|
28
|
+
function isTauriInvokeAvailable() {
|
|
29
|
+
return typeof window !== 'undefined' && Boolean(window.__TAURI_INTERNALS__?.invoke);
|
|
30
|
+
}
|
|
31
|
+
async function invokeTauri(command, args) {
|
|
32
|
+
const {
|
|
33
|
+
invoke
|
|
34
|
+
} = await import('@tauri-apps/api/core');
|
|
35
|
+
return invoke(command, args);
|
|
36
|
+
}
|
|
37
|
+
function computeLevels(samples) {
|
|
38
|
+
if (samples.length === 0) return {
|
|
39
|
+
peak: 0,
|
|
40
|
+
rms: 0
|
|
41
|
+
};
|
|
42
|
+
let peak = 0;
|
|
43
|
+
let sumSquares = 0;
|
|
44
|
+
for (let i = 0; i < samples.length; i += 1) {
|
|
45
|
+
const value = Math.abs(samples[i]);
|
|
46
|
+
if (value > peak) peak = value;
|
|
47
|
+
sumSquares += samples[i] * samples[i];
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
peak,
|
|
51
|
+
rms: Math.sqrt(sumSquares / samples.length)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function delay(ms) {
|
|
55
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
56
|
+
}
|
|
57
|
+
async function copyToClipboard(text) {
|
|
58
|
+
try {
|
|
59
|
+
if (typeof navigator !== 'undefined' && navigator.clipboard?.writeText) {
|
|
60
|
+
await navigator.clipboard.writeText(text);
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
} catch {
|
|
64
|
+
/* fall through */
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
// sub components
|
|
69
|
+
function StatusBadge({
|
|
70
|
+
status
|
|
71
|
+
}) {
|
|
72
|
+
if (!status) {
|
|
73
|
+
return jsxs("span", {
|
|
74
|
+
className: "inline-flex items-center gap-1.5 text-[11px] text-muted-foreground",
|
|
75
|
+
children: [jsx(LoaderIcon, {
|
|
76
|
+
className: "w-3 h-3 animate-spin"
|
|
77
|
+
}), "Checking\u2026"]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const copy = STATUS_COPY[status];
|
|
81
|
+
const toneClass = copy.tone === 'ok' ? 'text-emerald-600 bg-emerald-500/10 border-emerald-500/30' : copy.tone === 'warn' ? 'text-amber-600 bg-amber-500/10 border-amber-500/30' : copy.tone === 'err' ? 'text-red-600 bg-red-500/10 border-red-500/30' : 'text-muted-foreground bg-muted border-border';
|
|
82
|
+
return jsxs("span", {
|
|
83
|
+
className: cn('inline-flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[11px] font-medium', toneClass),
|
|
84
|
+
children: [copy.tone === 'ok' ? jsx(CheckCircle2Icon, {
|
|
85
|
+
className: "w-3 h-3"
|
|
86
|
+
}) : copy.tone === 'err' ? jsx(CircleAlertIcon, {
|
|
87
|
+
className: "w-3 h-3"
|
|
88
|
+
}) : jsx(HelpCircleIcon, {
|
|
89
|
+
className: "w-3 h-3"
|
|
90
|
+
}), copy.label]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function LevelBar({
|
|
94
|
+
value
|
|
95
|
+
}) {
|
|
96
|
+
const pct = Math.min(100, Math.max(0, Math.round(value * 100)));
|
|
97
|
+
return jsx("div", {
|
|
98
|
+
className: "h-1.5 w-full rounded-full bg-muted overflow-hidden",
|
|
99
|
+
children: jsx("div", {
|
|
100
|
+
className: cn('h-full transition-all', pct < 5 ? 'bg-muted-foreground/40' : pct < 25 ? 'bg-emerald-500' : 'bg-emerald-400'),
|
|
101
|
+
style: {
|
|
102
|
+
width: `${pct}%`
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function TestResultView({
|
|
108
|
+
result
|
|
109
|
+
}) {
|
|
110
|
+
if (result.kind === 'idle') return null;
|
|
111
|
+
if (result.kind === 'running') {
|
|
112
|
+
return jsxs("div", {
|
|
113
|
+
className: "flex items-center gap-2 rounded-md border border-border/60 bg-muted/40 p-2 text-[11px]",
|
|
114
|
+
children: [jsx(LoaderIcon, {
|
|
115
|
+
className: "w-3.5 h-3.5 animate-spin text-muted-foreground"
|
|
116
|
+
}), jsxs("span", {
|
|
117
|
+
children: ["Recording ", Math.round(TEST_DURATION_MS / 1000), "s\u2026"]
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
if (result.kind === 'error') {
|
|
122
|
+
return jsxs("div", {
|
|
123
|
+
className: "rounded-md border border-red-500/30 bg-red-500/10 p-2 text-[11px] text-red-600",
|
|
124
|
+
children: [jsx("strong", {
|
|
125
|
+
children: "Test failed."
|
|
126
|
+
}), " ", result.message]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
if (result.kind === 'silent') {
|
|
130
|
+
return jsxs("div", {
|
|
131
|
+
className: "rounded-md border border-amber-500/30 bg-amber-500/10 p-2 text-[11px] text-amber-700",
|
|
132
|
+
children: [jsx("strong", {
|
|
133
|
+
children: "No audio detected."
|
|
134
|
+
}), " Captured ", result.samples, " samples but the signal was silent. The OS may have authorized us at the TCC layer but cpal/CoreAudio is still serving an empty stream \u2014 try Restart App, or reset TCC and re-grant."]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return jsxs("div", {
|
|
138
|
+
className: "space-y-1.5 rounded-md border border-emerald-500/30 bg-emerald-500/10 p-2 text-[11px] text-emerald-700",
|
|
139
|
+
children: [jsxs("div", {
|
|
140
|
+
className: "flex items-center justify-between font-medium",
|
|
141
|
+
children: [jsxs("span", {
|
|
142
|
+
className: "inline-flex items-center gap-1.5",
|
|
143
|
+
children: [jsx(CheckCircle2Icon, {
|
|
144
|
+
className: "w-3.5 h-3.5"
|
|
145
|
+
}), "Signal detected"]
|
|
146
|
+
}), jsxs("span", {
|
|
147
|
+
className: "font-mono text-[10px] text-emerald-700/80",
|
|
148
|
+
children: ["peak ", result.peak.toFixed(3), " \u00B7 rms ", result.rms.toFixed(3)]
|
|
149
|
+
})]
|
|
150
|
+
}), jsx(LevelBar, {
|
|
151
|
+
value: result.peak
|
|
152
|
+
}), jsxs("div", {
|
|
153
|
+
className: "text-[10px] text-emerald-700/80",
|
|
154
|
+
children: ["Captured ", result.samples, " samples over ", result.durationMs, "ms"]
|
|
155
|
+
})]
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
// main component
|
|
159
|
+
function MicrophoneDiagnostics() {
|
|
160
|
+
const [permission, setPermission] = useState(null);
|
|
161
|
+
const [devices, setDevices] = useState([]);
|
|
162
|
+
const [devicesLoading, setDevicesLoading] = useState(false);
|
|
163
|
+
const [testResult, setTestResult] = useState({
|
|
164
|
+
kind: 'idle'
|
|
165
|
+
});
|
|
166
|
+
const [tccCopied, setTccCopied] = useState(false);
|
|
167
|
+
const tauriAvailable = isTauriInvokeAvailable();
|
|
168
|
+
const inFlightRef = useRef(false);
|
|
169
|
+
const refreshPermission = useCallback(async () => {
|
|
170
|
+
if (!tauriAvailable) {
|
|
171
|
+
setPermission('unsupported');
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
try {
|
|
175
|
+
const status = await invokeTauri('check_microphone_permission');
|
|
176
|
+
setPermission(status);
|
|
177
|
+
} catch {
|
|
178
|
+
setPermission('unsupported');
|
|
179
|
+
}
|
|
180
|
+
}, [tauriAvailable]);
|
|
181
|
+
const refreshDevices = useCallback(async () => {
|
|
182
|
+
if (!tauriAvailable) return;
|
|
183
|
+
setDevicesLoading(true);
|
|
184
|
+
try {
|
|
185
|
+
const list = await invokeTauri('list_audio_input_devices');
|
|
186
|
+
setDevices(list ?? []);
|
|
187
|
+
} catch {
|
|
188
|
+
setDevices([]);
|
|
189
|
+
} finally {
|
|
190
|
+
setDevicesLoading(false);
|
|
191
|
+
}
|
|
192
|
+
}, [tauriAvailable]);
|
|
193
|
+
useEffect(() => {
|
|
194
|
+
void refreshPermission();
|
|
195
|
+
void refreshDevices();
|
|
196
|
+
if (!tauriAvailable) return;
|
|
197
|
+
const interval = setInterval(() => {
|
|
198
|
+
void refreshPermission();
|
|
199
|
+
}, STATUS_POLL_MS);
|
|
200
|
+
return () => clearInterval(interval);
|
|
201
|
+
}, [refreshPermission, refreshDevices, tauriAvailable]);
|
|
202
|
+
const handleRunTest = useCallback(async () => {
|
|
203
|
+
if (inFlightRef.current || !tauriAvailable) return;
|
|
204
|
+
inFlightRef.current = true;
|
|
205
|
+
setTestResult({
|
|
206
|
+
kind: 'running'
|
|
207
|
+
});
|
|
208
|
+
try {
|
|
209
|
+
try {
|
|
210
|
+
await invokeTauri('clear_audio_buffer_cmd');
|
|
211
|
+
} catch {
|
|
212
|
+
/* non-fatal */
|
|
213
|
+
}
|
|
214
|
+
await invokeTauri('start_system_audio_capture');
|
|
215
|
+
await delay(TEST_DURATION_MS);
|
|
216
|
+
const captured = await invokeTauri('get_captured_audio');
|
|
217
|
+
try {
|
|
218
|
+
await invokeTauri('stop_system_audio_capture');
|
|
219
|
+
} catch {
|
|
220
|
+
/* non-fatal */
|
|
221
|
+
}
|
|
222
|
+
const {
|
|
223
|
+
peak,
|
|
224
|
+
rms
|
|
225
|
+
} = computeLevels(captured.samples ?? []);
|
|
226
|
+
const sampleCount = captured.samples?.length ?? 0;
|
|
227
|
+
if (sampleCount === 0 || peak < 1e-4) {
|
|
228
|
+
setTestResult({
|
|
229
|
+
kind: 'silent',
|
|
230
|
+
samples: sampleCount,
|
|
231
|
+
durationMs: captured.duration_ms
|
|
232
|
+
});
|
|
233
|
+
} else {
|
|
234
|
+
setTestResult({
|
|
235
|
+
kind: 'ok',
|
|
236
|
+
peak,
|
|
237
|
+
rms,
|
|
238
|
+
samples: sampleCount,
|
|
239
|
+
durationMs: captured.duration_ms
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
} catch (e) {
|
|
243
|
+
setTestResult({
|
|
244
|
+
kind: 'error',
|
|
245
|
+
message: e instanceof Error ? e.message : String(e)
|
|
246
|
+
});
|
|
247
|
+
try {
|
|
248
|
+
await invokeTauri('stop_system_audio_capture');
|
|
249
|
+
} catch {
|
|
250
|
+
/* swallow */
|
|
251
|
+
}
|
|
252
|
+
} finally {
|
|
253
|
+
inFlightRef.current = false;
|
|
254
|
+
void refreshPermission();
|
|
255
|
+
}
|
|
256
|
+
}, [refreshPermission, tauriAvailable]);
|
|
257
|
+
const handleOpenSettings = useCallback(async () => {
|
|
258
|
+
if (!tauriAvailable) return;
|
|
259
|
+
try {
|
|
260
|
+
await invokeTauri('open_microphone_settings');
|
|
261
|
+
} catch {
|
|
262
|
+
/* noop */
|
|
263
|
+
}
|
|
264
|
+
}, [tauriAvailable]);
|
|
265
|
+
const handleRestart = useCallback(async () => {
|
|
266
|
+
if (!tauriAvailable) return;
|
|
267
|
+
try {
|
|
268
|
+
await invokeTauri('restart_app');
|
|
269
|
+
} catch {
|
|
270
|
+
/* process is exec'ing — nothing to do */
|
|
271
|
+
}
|
|
272
|
+
}, [tauriAvailable]);
|
|
273
|
+
const handleCopyTcc = useCallback(async () => {
|
|
274
|
+
const ok = await copyToClipboard(TCC_RESET_HINT);
|
|
275
|
+
if (ok) {
|
|
276
|
+
setTccCopied(true);
|
|
277
|
+
setTimeout(() => setTccCopied(false), 2000);
|
|
278
|
+
}
|
|
279
|
+
}, []);
|
|
280
|
+
const defaultDevice = devices.find(device => device.is_default) ?? devices[0];
|
|
281
|
+
const isAuthorized = permission === 'authorized' || permission === 'unsupported';
|
|
282
|
+
const testDisabled = !tauriAvailable || !isAuthorized || testResult.kind === 'running';
|
|
283
|
+
return jsxs("div", {
|
|
284
|
+
className: "space-y-3 pt-3 border-t border-border/50",
|
|
285
|
+
children: [jsxs("div", {
|
|
286
|
+
className: "flex items-center justify-between gap-2",
|
|
287
|
+
children: [jsx("h4", {
|
|
288
|
+
className: "text-xs font-semibold text-muted-foreground uppercase tracking-wide",
|
|
289
|
+
children: "Microphone Diagnostics"
|
|
290
|
+
}), jsx(StatusBadge, {
|
|
291
|
+
status: permission
|
|
292
|
+
})]
|
|
293
|
+
}), jsx("div", {
|
|
294
|
+
className: "rounded-md border border-border/60 bg-muted/30 p-2",
|
|
295
|
+
children: jsxs("div", {
|
|
296
|
+
className: "flex items-center justify-between gap-2",
|
|
297
|
+
children: [jsxs("div", {
|
|
298
|
+
className: "flex min-w-0 items-center gap-2",
|
|
299
|
+
children: [jsx(MicIcon, {
|
|
300
|
+
className: "w-3.5 h-3.5 shrink-0 text-muted-foreground"
|
|
301
|
+
}), jsxs("div", {
|
|
302
|
+
className: "min-w-0",
|
|
303
|
+
children: [jsx("div", {
|
|
304
|
+
className: "truncate text-xs font-medium",
|
|
305
|
+
children: devicesLoading ? 'Loading devices…' : defaultDevice ? defaultDevice.name : 'No input device found'
|
|
306
|
+
}), jsx("div", {
|
|
307
|
+
className: "text-[10px] text-muted-foreground",
|
|
308
|
+
children: devices.length > 1 ? `${devices.length} input devices · system default highlighted` : 'System default input'
|
|
309
|
+
})]
|
|
310
|
+
})]
|
|
311
|
+
}), jsx(Button, {
|
|
312
|
+
size: "icon",
|
|
313
|
+
variant: "ghost",
|
|
314
|
+
className: "h-7 w-7 shrink-0",
|
|
315
|
+
onClick: () => {
|
|
316
|
+
void refreshDevices();
|
|
317
|
+
void refreshPermission();
|
|
318
|
+
},
|
|
319
|
+
title: "Refresh",
|
|
320
|
+
disabled: !tauriAvailable,
|
|
321
|
+
children: jsx(RefreshCwIcon, {
|
|
322
|
+
className: cn('w-3.5 h-3.5', devicesLoading && 'animate-spin')
|
|
323
|
+
})
|
|
324
|
+
})]
|
|
325
|
+
})
|
|
326
|
+
}), jsxs("div", {
|
|
327
|
+
className: "space-y-2",
|
|
328
|
+
children: [jsx(Label, {
|
|
329
|
+
className: "text-xs font-medium",
|
|
330
|
+
children: "Live Mic Test"
|
|
331
|
+
}), jsx(Button, {
|
|
332
|
+
size: "sm",
|
|
333
|
+
variant: testResult.kind === 'ok' ? 'outline' : 'default',
|
|
334
|
+
onClick: () => void handleRunTest(),
|
|
335
|
+
disabled: testDisabled,
|
|
336
|
+
className: "w-full text-xs",
|
|
337
|
+
children: testResult.kind === 'running' ? jsxs(Fragment, {
|
|
338
|
+
children: [jsx(LoaderIcon, {
|
|
339
|
+
className: "w-3 h-3 mr-1.5 animate-spin"
|
|
340
|
+
}), "Listening\u2026"]
|
|
341
|
+
}) : jsxs(Fragment, {
|
|
342
|
+
children: [jsx(MicIcon, {
|
|
343
|
+
className: "w-3 h-3 mr-1.5"
|
|
344
|
+
}), testResult.kind === 'ok' || testResult.kind === 'silent' || testResult.kind === 'error' ? 'Run mic test again' : `Run mic test (${Math.round(TEST_DURATION_MS / 1000)}s)`]
|
|
345
|
+
})
|
|
346
|
+
}), jsx(TestResultView, {
|
|
347
|
+
result: testResult
|
|
348
|
+
}), !isAuthorized && permission && jsx("p", {
|
|
349
|
+
className: "text-[10px] text-muted-foreground",
|
|
350
|
+
children: "Grant microphone access below before running the test."
|
|
351
|
+
})]
|
|
352
|
+
}), jsxs("div", {
|
|
353
|
+
className: "grid grid-cols-2 gap-2",
|
|
354
|
+
children: [jsxs(Button, {
|
|
355
|
+
size: "sm",
|
|
356
|
+
variant: "outline",
|
|
357
|
+
onClick: () => void handleOpenSettings(),
|
|
358
|
+
disabled: !tauriAvailable,
|
|
359
|
+
className: "text-xs",
|
|
360
|
+
children: [jsx(SettingsIcon, {
|
|
361
|
+
className: "w-3 h-3 mr-1.5"
|
|
362
|
+
}), "Open System Settings"]
|
|
363
|
+
}), jsxs(Button, {
|
|
364
|
+
size: "sm",
|
|
365
|
+
variant: "outline",
|
|
366
|
+
onClick: () => void handleRestart(),
|
|
367
|
+
disabled: !tauriAvailable,
|
|
368
|
+
className: "text-xs",
|
|
369
|
+
children: [jsx(RotateCcwIcon, {
|
|
370
|
+
className: "w-3 h-3 mr-1.5"
|
|
371
|
+
}), "Restart App"]
|
|
372
|
+
})]
|
|
373
|
+
}), jsxs("div", {
|
|
374
|
+
className: "rounded-md border border-border/60 bg-muted/30 p-2 space-y-1.5",
|
|
375
|
+
children: [jsx("div", {
|
|
376
|
+
className: "text-[11px] font-medium",
|
|
377
|
+
children: "Still no signal after granting?"
|
|
378
|
+
}), jsx("p", {
|
|
379
|
+
className: "text-[10px] text-muted-foreground leading-relaxed",
|
|
380
|
+
children: "Dev builds and signed installs have separate TCC entries. Reset the entry for this bundle in a terminal, then restart the app to re-prompt:"
|
|
381
|
+
}), jsxs("div", {
|
|
382
|
+
className: "flex items-center gap-1.5",
|
|
383
|
+
children: [jsx("code", {
|
|
384
|
+
className: "flex-1 truncate rounded bg-background border border-border px-1.5 py-1 text-[10px] font-mono",
|
|
385
|
+
children: TCC_RESET_HINT
|
|
386
|
+
}), jsx(Button, {
|
|
387
|
+
size: "sm",
|
|
388
|
+
variant: "ghost",
|
|
389
|
+
className: "h-7 px-2 text-[10px]",
|
|
390
|
+
onClick: () => void handleCopyTcc(),
|
|
391
|
+
children: tccCopied ? 'Copied' : 'Copy'
|
|
392
|
+
})]
|
|
393
|
+
})]
|
|
394
|
+
})]
|
|
395
|
+
});
|
|
396
|
+
}export{MicrophoneDiagnostics};//# sourceMappingURL=MicrophoneDiagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MicrophoneDiagnostics.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/speech/SettingsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/speech/SettingsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA6B1C,UAAU,kBAAkB;IAExB,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IAE/C,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,uBAAuB,CAAC,EAAE,SAAS,CAAC;CACvC;AAED,eAAO,MAAM,aAAa,GAAI,oIAQ3B,kBAAkB,4CAyTpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState}from'react';import'../../../../shardui/accordion.js';import'../../../../shardui/alert.js';import'../../../../shardui/alert-dialog.js';import'@radix-ui/react-aspect-ratio';import'../../../../shardui/avatar.js';import'../../../../shardui/badge.js';import'../../../../shardui/breadcrumb.js';import {Button}from'../../../../shardui/button.js';import'../../../../shardui/calendar.js';import'../../../../shardui/card.js';import'../../../../shardui/carousel.js';import'../../../../shardui/chart.js';import'../../../../shardui/checkbox.js';import'@radix-ui/react-collapsible';import'../../../../shardui/command.js';import'../../../../shardui/context-menu.js';import'../../../../shardui/dialog.js';import'../../../../shardui/drawer.js';import'../../../../shardui/dropdown-menu.js';import'../../../../shardui/form.js';import'../../../../shardui/hover-card.js';import'../../../../shardui/input.js';import'../../../../shardui/input-otp.js';import {Label}from'../../../../shardui/label.js';import'../../../../shardui/menubar.js';import'../../../../shardui/navigation-menu.js';import'../../../../shardui/pagination.js';import'../../../../shardui/popover.js';import'../../../../shardui/progress.js';import'../../../../shardui/radio-group.js';import {SettingsIcon,ChevronDownIcon,WandIcon,ChevronUpIcon,RotateCcwIcon}from'lucide-react';import'react-resizable-panels';import'../../../../utils/isBrowser/index.js';import {cn}from'../../../../utils/util.js';import'fast-deep-equal/react.js';import'../../../../shardui/scroll-area.js';import {Select,SelectTrigger,SelectValue,SelectContent,SelectGroup,SelectLabel,SelectItem}from'../../../../shardui/select.js';import'../../../../shardui/separator.js';import'../../../../shardui/sheet.js';import'../../../../shardui/sidebar.js';import {Slider}from'../../../../shardui/slider.js';import'../../../ThemeProvider/ThemeProvider.js';import'sonner';import {Switch}from'../../../../shardui/switch.js';import'../../../../shardui/table.js';import'../../../../shardui/tabs.js';import {Textarea}from'../../../../shardui/textarea.js';import'../../../../shardui/toast.js';import'../../../../shardui/toggle.js';import'../../../../shardui/toggle-group.js';import'../../../../shardui/tooltip.js';import {PROMPT_TEMPLATES,getPromptTemplateById}from'./promptTemplates.js';// Sensitivity presets for simpler UX
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState}from'react';import'../../../../shardui/accordion.js';import'../../../../shardui/alert.js';import'../../../../shardui/alert-dialog.js';import'@radix-ui/react-aspect-ratio';import'../../../../shardui/avatar.js';import'../../../../shardui/badge.js';import'../../../../shardui/breadcrumb.js';import {Button}from'../../../../shardui/button.js';import'../../../../shardui/calendar.js';import'../../../../shardui/card.js';import'../../../../shardui/carousel.js';import'../../../../shardui/chart.js';import'../../../../shardui/checkbox.js';import'@radix-ui/react-collapsible';import'../../../../shardui/command.js';import'../../../../shardui/context-menu.js';import'../../../../shardui/dialog.js';import'../../../../shardui/drawer.js';import'../../../../shardui/dropdown-menu.js';import'../../../../shardui/form.js';import'../../../../shardui/hover-card.js';import'../../../../shardui/input.js';import'../../../../shardui/input-otp.js';import {Label}from'../../../../shardui/label.js';import'../../../../shardui/menubar.js';import'../../../../shardui/navigation-menu.js';import'../../../../shardui/pagination.js';import'../../../../shardui/popover.js';import'../../../../shardui/progress.js';import'../../../../shardui/radio-group.js';import {SettingsIcon,ChevronDownIcon,WandIcon,ChevronUpIcon,RotateCcwIcon}from'lucide-react';import'react-resizable-panels';import'../../../../utils/isBrowser/index.js';import {cn}from'../../../../utils/util.js';import'fast-deep-equal/react.js';import'../../../../shardui/scroll-area.js';import {Select,SelectTrigger,SelectValue,SelectContent,SelectGroup,SelectLabel,SelectItem}from'../../../../shardui/select.js';import'../../../../shardui/separator.js';import'../../../../shardui/sheet.js';import'../../../../shardui/sidebar.js';import {Slider}from'../../../../shardui/slider.js';import'../../../ThemeProvider/ThemeProvider.js';import'sonner';import {Switch}from'../../../../shardui/switch.js';import'../../../../shardui/table.js';import'../../../../shardui/tabs.js';import {Textarea}from'../../../../shardui/textarea.js';import'../../../../shardui/toast.js';import'../../../../shardui/toggle.js';import'../../../../shardui/toggle-group.js';import'../../../../shardui/tooltip.js';import {PROMPT_TEMPLATES,getPromptTemplateById}from'./promptTemplates.js';import {MicrophoneDiagnostics}from'./MicrophoneDiagnostics.js';// Sensitivity presets for simpler UX
|
|
2
2
|
const SENSITIVITY_PRESETS = {
|
|
3
3
|
low: {
|
|
4
4
|
sensitivity_rms: 0.015,
|
|
@@ -284,7 +284,7 @@ const SettingsPanel = ({
|
|
|
284
284
|
}), "Reset to Defaults"]
|
|
285
285
|
})]
|
|
286
286
|
})]
|
|
287
|
-
}), settingsDropdownContent ? jsx("div", {
|
|
287
|
+
}), jsx(MicrophoneDiagnostics, {}), settingsDropdownContent ? jsx("div", {
|
|
288
288
|
className: "border-t border-border/50 pt-2",
|
|
289
289
|
children: settingsDropdownContent
|
|
290
290
|
}) : null]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPanel.js","sources":["../../../../../src/components/AIToolbar/components/speech/SettingsPanel.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingsPanel.js","sources":["../../../../../src/components/AIToolbar/components/speech/SettingsPanel.tsx"],"sourcesContent":[null],"names":[],"mappings":";AAqDI,MAAA,mBAAoB,GAAA;KACpB,EAAA;AACH,IAAA,eAAA,EAAA,KAAA;AAED,IAAA,oBAAa,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveCharacter.d.ts","sourceRoot":"","sources":["../../../../src/components/AIToolbar/hooks/useActiveCharacter.ts"],"names":[],"mappings":"AAyCA,MAAM,WAAW,eAAe;IAC5B,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC5B,sDAAsD;IACtD,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,gFAAgF;IAChF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,iFAAiF;IACjF,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC5C;AASD;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"useActiveCharacter.d.ts","sourceRoot":"","sources":["../../../../src/components/AIToolbar/hooks/useActiveCharacter.ts"],"names":[],"mappings":"AAyCA,MAAM,WAAW,eAAe;IAC5B,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC5B,sDAAsD;IACtD,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,gFAAgF;IAChF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,iFAAiF;IACjF,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC5C;AASD;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAkCD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,EAAE,GAAG,IAAI,CASnF;AAkMD;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,GAAG,IAAI,CAqC3D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAmFpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveCharacter.js","sources":["../../../../src/components/AIToolbar/hooks/useActiveCharacter.ts"],"sourcesContent":[null],"names":[],"mappings":"2ZAyCA;;;;;;AAMI;AACH;AAED;;;AAGI;AACH;AAED;;;;AAII;;;AAGH;AASD;;;;;MASI,uBAAuB,GAAA,0BAAA;;AAEvB;AACH;
|
|
1
|
+
{"version":3,"file":"useActiveCharacter.js","sources":["../../../../src/components/AIToolbar/hooks/useActiveCharacter.ts"],"sourcesContent":[null],"names":[],"mappings":"2ZAyCA;;;;;;AAMI;AACH;AAED;;;AAGI;AACH;AAED;;;;AAII;;;AAGH;AASD;;;;;MASI,uBAAuB,GAAA,0BAAA;;AAEvB;AACH;AAkCD;;;;AAIG,MAAA,8BAAA,GAAA,iCAAA;AACH,MAAA,4BAAgB,GAAA;AA2MhB;;;;AAIG,MAAA,sBAAA,GAAA,IAAA,GAAA,EAAA;AACH,SAAA,oBAAgB,CAAA,EAAA,EAAA;AAuChB,EAAA,sBAAA,CAAA,GAAA,CAAA,EAAA,CAAA;;;AAGG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,5 +3,6 @@ export type { AIToolbarProps, AIToolbarSectionProps, AIToolbarInputSurfaceProps,
|
|
|
3
3
|
export * from './components';
|
|
4
4
|
export type { CompletionSubmitOptions, UseCompletionReturn, SystemAudioProps, AIToolbarAppProps, AIToolbarHostPlatform, ChatMessage, ChatConversation, VadConfig, ToolbarAiProvider, ToolbarSelectedProvider, ToolbarAudioDevices, ToolbarAttachedFile, ToolbarScreenshotConfiguration, } from './components/types';
|
|
5
5
|
export { setMarketplaceCharacters, useActiveCharacter, useCharacterPicker } from './hooks/useActiveCharacter';
|
|
6
|
+
export { readPreferredActiveCharacterFileName } from '../../hooks/activeCharacterPreference';
|
|
6
7
|
export type { MarketplaceCharacterEntry, ActiveCharacter, CharacterListEntry, CharacterPicker, } from './hooks/useActiveCharacter';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AIToolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,GACrB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACR,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,GAC1B,MAAM,kCAAkC,CAAC;AAE1C,cAAc,cAAc,CAAC;AAE7B,YAAY,EACR,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,8BAA8B,GACjC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC9G,YAAY,EACR,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,eAAe,GAClB,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AIToolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,GACrB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACR,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,GAC1B,MAAM,kCAAkC,CAAC;AAE1C,cAAc,cAAc,CAAC;AAE7B,YAAY,EACR,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,8BAA8B,GACjC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC9G,OAAO,EAAE,oCAAoC,EAAE,MAAM,uCAAuC,CAAC;AAC7F,YAAY,EACR,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,eAAe,GAClB,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ChannelMeta } from './channelsMeta';
|
|
3
|
+
import { type PairingTokenResult } from './ChannelConnectModal';
|
|
4
|
+
export interface ChannelBarProps {
|
|
5
|
+
/** Override the default channel list (Telegram/Discord/Slack/WhatsApp/Teams) */
|
|
6
|
+
channels?: ChannelMeta[];
|
|
7
|
+
/** Ids of currently connected channels (controlled) */
|
|
8
|
+
connectedChannelIds?: string[];
|
|
9
|
+
/** Called when a disconnected channel is clicked. If onConnect returns a PairingTokenResult
|
|
10
|
+
* (or a Promise that resolves to one), the modal switches to pairing mode and displays the
|
|
11
|
+
* QR + deep-link. Return void to render the token-entry / placeholder modal. */
|
|
12
|
+
onConnect?: (channel: ChannelMeta) => void | PairingTokenResult | Promise<void | PairingTokenResult>;
|
|
13
|
+
/** Called when the modal submits a token (non-pairing flow). */
|
|
14
|
+
onSubmitToken?: (channel: ChannelMeta, token: string) => void | Promise<void>;
|
|
15
|
+
/** Called when a connected channel is clicked. */
|
|
16
|
+
onDisconnect?: (channel: ChannelMeta) => void | Promise<void>;
|
|
17
|
+
/** Called when the modal is closed (cancel/X/backdrop). */
|
|
18
|
+
onModalClose?: (channel: ChannelMeta) => void;
|
|
19
|
+
/** External loading flag for the modal (e.g. while a parent gateway call is in flight) */
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/** External error string for the modal */
|
|
22
|
+
error?: string;
|
|
23
|
+
/** When supplied while modal is open, modal renders in pairing mode (QR + deep link). */
|
|
24
|
+
pairing?: PairingTokenResult;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
declare function ChannelBar({ channels, connectedChannelIds, onConnect, onSubmitToken, onDisconnect, onModalClose, loading, error, pairing, className, }: ChannelBarProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare namespace ChannelBar {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
declare const _default: React.MemoExoticComponent<typeof ChannelBar>;
|
|
32
|
+
export default _default;
|
|
33
|
+
//# sourceMappingURL=ChannelBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChannelBar.d.ts","sourceRoot":"","sources":["../../../../src/components/Inbox/Channels/ChannelBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAA4B,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAIrF,MAAM,WAAW,eAAe;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B;;qFAEiF;IACjF,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,kBAAkB,GAAG,OAAO,CAAC,IAAI,GAAG,kBAAkB,CAAC,CAAC;IACrG,gEAAgE;IAChE,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,kDAAkD;IAClD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,2DAA2D;IAC3D,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yFAAyF;IACzF,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,iBAAS,UAAU,CAAC,EAChB,QAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAS,GACZ,EAAE,eAAe,2CA8FjB;kBAzGQ,UAAU;;;;AA6GnB,wBAAsC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {jsxs,Fragment,jsx}from'react/jsx-runtime';import React__default,{useState,useMemo,useCallback}from'react';import {CHANNELS}from'./channelsMeta.js';import ChannelConnectModal from'./ChannelConnectModal.js';// main component
|
|
2
|
+
function ChannelBar({
|
|
3
|
+
channels = CHANNELS,
|
|
4
|
+
connectedChannelIds,
|
|
5
|
+
onConnect,
|
|
6
|
+
onSubmitToken,
|
|
7
|
+
onDisconnect,
|
|
8
|
+
onModalClose,
|
|
9
|
+
loading,
|
|
10
|
+
error,
|
|
11
|
+
pairing,
|
|
12
|
+
className
|
|
13
|
+
}) {
|
|
14
|
+
const [selected, setSelected] = useState(null);
|
|
15
|
+
const [internalPairing, setInternalPairing] = useState(null);
|
|
16
|
+
const [internalLoading, setInternalLoading] = useState(false);
|
|
17
|
+
const connectedSet = useMemo(() => new Set(connectedChannelIds ?? []), [connectedChannelIds]);
|
|
18
|
+
const handleClose = useCallback(() => {
|
|
19
|
+
const ch = selected;
|
|
20
|
+
setSelected(null);
|
|
21
|
+
setInternalPairing(null);
|
|
22
|
+
setInternalLoading(false);
|
|
23
|
+
if (ch) onModalClose?.(ch);
|
|
24
|
+
}, [selected, onModalClose]);
|
|
25
|
+
const handleClick = useCallback(async channel => {
|
|
26
|
+
if (connectedSet.has(channel.id)) {
|
|
27
|
+
await onDisconnect?.(channel);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
setSelected(channel);
|
|
31
|
+
setInternalPairing(null);
|
|
32
|
+
if (!onConnect) return;
|
|
33
|
+
setInternalLoading(true);
|
|
34
|
+
try {
|
|
35
|
+
const result = await onConnect(channel);
|
|
36
|
+
if (result && typeof result === 'object' && 'token' in result) {
|
|
37
|
+
setInternalPairing(result);
|
|
38
|
+
}
|
|
39
|
+
} finally {
|
|
40
|
+
setInternalLoading(false);
|
|
41
|
+
}
|
|
42
|
+
}, [connectedSet, onConnect, onDisconnect]);
|
|
43
|
+
const handleSubmitToken = useCallback(async token => {
|
|
44
|
+
if (!selected) return;
|
|
45
|
+
await onSubmitToken?.(selected, token);
|
|
46
|
+
handleClose();
|
|
47
|
+
}, [selected, onSubmitToken, handleClose]);
|
|
48
|
+
const effectivePairing = pairing ?? internalPairing ?? undefined;
|
|
49
|
+
const effectiveLoading = loading || internalLoading;
|
|
50
|
+
return jsxs(Fragment, {
|
|
51
|
+
children: [jsx("div", {
|
|
52
|
+
className: `flex items-center justify-center gap-1 mt-2 flex-wrap max-w-xs mx-auto ${className ?? ''}`,
|
|
53
|
+
children: channels.map(channel => {
|
|
54
|
+
const isConnected = connectedSet.has(channel.id);
|
|
55
|
+
return jsxs("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
onClick: () => handleClick(channel),
|
|
58
|
+
className: `relative group flex items-center justify-center w-8 h-8 rounded-lg transition-all ${isConnected ? 'text-green-600 bg-green-500/10 hover:bg-green-500/20' : 'text-gray-500 hover:text-gray-900 hover:bg-gray-100'}`,
|
|
59
|
+
title: `${channel.name}${isConnected ? ' (connected — click to disconnect)' : ''}`,
|
|
60
|
+
"aria-label": `Connect ${channel.name}`,
|
|
61
|
+
children: [channel.icon, isConnected && jsx("span", {
|
|
62
|
+
className: "absolute -bottom-0.5 -right-0.5 block w-3 h-3 rounded-full bg-green-500 ring-2 ring-white",
|
|
63
|
+
"aria-hidden": "true"
|
|
64
|
+
})]
|
|
65
|
+
}, channel.id);
|
|
66
|
+
})
|
|
67
|
+
}), selected && jsx(ChannelConnectModal, {
|
|
68
|
+
isOpen: !!selected,
|
|
69
|
+
channel: selected,
|
|
70
|
+
loading: effectiveLoading,
|
|
71
|
+
error: error,
|
|
72
|
+
pairing: effectivePairing,
|
|
73
|
+
onClose: handleClose,
|
|
74
|
+
onConnect: handleSubmitToken
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
ChannelBar.displayName = 'ChannelBar';
|
|
79
|
+
var ChannelBar_default = React__default.memo(ChannelBar);export{ChannelBar_default as default};//# sourceMappingURL=ChannelBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChannelBar.js","sources":["../../../../src/components/Inbox/Channels/ChannelBar.tsx"],"sourcesContent":[null],"names":[],"mappings":";AAQI,SAAA,UAAW,CAAA;UACX,GAAA,QAAA;AACA,EAAA,mBAAA;AACA,EAAA,SAAA;;AAEiF,EAAA,YAAA;AACjF,EAAA,YAAU;SACV;AACA,EAAA,KAAA;SACA;AACA,EAAA;;QAEA,CAAA,QAAa,EAAE,WAAU,CAAA,GAAA,QAAW,CAAA;QACpC,CAAA,eAAA,EAAA,kBAAA,CAAA,GAAA,QAAA,CAAA,IAAA,CAAA;QACA,CAAA,eAAkB,EAAA,kBAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;QAClB,YAAA,GAAA,OAAA,CAAA,MAAA,IAAA,GAAA,CAAA,mBAA0C,IAAA,EAAA,CAAA,EAAA,CAAA,mBAAA,CAAA,CAAA;QAC1C,WAAe,GAAA,WAAA,CAAA,MAAA;IACf,MAAA,EAAA,GAAA,QAAA;IACA,WAAU,CAAA,IAAA,CAAA;IACV,kBAAkB,CAAC,IAAA,CAAA;AACtB,IAAA,kBAAA,CAAA,KAAA,CAAA;AAID,IAAA,IAAA,EAAA,EAAA,YAAS,GAAU,EAAC,CAChB;4BADe,CAAA,CAAA;;;;AA6GnB,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ChannelMeta } from './channelsMeta';
|
|
3
|
+
export interface PairingTokenResult {
|
|
4
|
+
token: string;
|
|
5
|
+
deepLink?: string;
|
|
6
|
+
expiresAt?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ChannelConnectModalProps {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
channel: ChannelMeta;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
/** When present, modal renders QR + deep-link pairing UI instead of token entry. */
|
|
14
|
+
pairing?: PairingTokenResult;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
onConnect: (token: string) => Promise<void> | void;
|
|
17
|
+
}
|
|
18
|
+
declare function ChannelConnectModal({ isOpen, channel, loading, error, pairing, onClose, onConnect, }: ChannelConnectModalProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare namespace ChannelConnectModal {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
declare const _default: React.MemoExoticComponent<typeof ChannelConnectModal>;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=ChannelConnectModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChannelConnectModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Inbox/Channels/ChannelConnectModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACtD;AAUD,iBAAS,mBAAmB,CAAC,EACzB,MAAM,EACN,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,GACZ,EAAE,wBAAwB,2CAuM1B;kBA/MQ,mBAAmB;;;;AAmN5B,wBAA+C"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import React__default,{useState,useEffect,useCallback}from'react';// helper functions
|
|
2
|
+
function buildQrUrl(data) {
|
|
3
|
+
return `https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=${encodeURIComponent(data)}`;
|
|
4
|
+
}
|
|
5
|
+
// main component
|
|
6
|
+
function ChannelConnectModal({
|
|
7
|
+
isOpen,
|
|
8
|
+
channel,
|
|
9
|
+
loading,
|
|
10
|
+
error,
|
|
11
|
+
pairing,
|
|
12
|
+
onClose,
|
|
13
|
+
onConnect
|
|
14
|
+
}) {
|
|
15
|
+
const [token, setToken] = useState('');
|
|
16
|
+
const [copied, setCopied] = useState(false);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (isOpen) {
|
|
19
|
+
setToken('');
|
|
20
|
+
setCopied(false);
|
|
21
|
+
}
|
|
22
|
+
}, [isOpen, channel.id]);
|
|
23
|
+
const handleSubmit = useCallback(e => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
onConnect(token.trim());
|
|
26
|
+
}, [token, onConnect]);
|
|
27
|
+
const handleBackdropClick = useCallback(e => {
|
|
28
|
+
if (e.target === e.currentTarget && !loading) onClose();
|
|
29
|
+
}, [onClose, loading]);
|
|
30
|
+
const handleCopy = useCallback(() => {
|
|
31
|
+
if (!pairing?.token) return;
|
|
32
|
+
navigator.clipboard?.writeText(pairing.token).then(() => {
|
|
33
|
+
setCopied(true);
|
|
34
|
+
setTimeout(() => setCopied(false), 1500);
|
|
35
|
+
});
|
|
36
|
+
}, [pairing]);
|
|
37
|
+
if (!isOpen) return null;
|
|
38
|
+
const inPairingMode = !!pairing;
|
|
39
|
+
const tokenRequired = !inPairingMode && channel.tokenLabel.length > 0;
|
|
40
|
+
const canSubmit = tokenRequired ? token.trim().length > 0 && !loading : !loading;
|
|
41
|
+
const qrPayload = pairing ? pairing.deepLink ?? pairing.token : '';
|
|
42
|
+
return jsx("div", {
|
|
43
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm px-4",
|
|
44
|
+
onClick: handleBackdropClick,
|
|
45
|
+
role: "dialog",
|
|
46
|
+
"aria-modal": "true",
|
|
47
|
+
"aria-labelledby": "channel-connect-title",
|
|
48
|
+
children: jsx("div", {
|
|
49
|
+
className: "w-full max-w-md bg-white rounded-2xl shadow-xl overflow-hidden",
|
|
50
|
+
children: jsxs("form", {
|
|
51
|
+
onSubmit: handleSubmit,
|
|
52
|
+
children: [jsxs("div", {
|
|
53
|
+
className: "px-6 py-5 border-b border-gray-100 flex items-center gap-3",
|
|
54
|
+
children: [jsx("div", {
|
|
55
|
+
className: "flex items-center justify-center w-10 h-10 rounded-lg bg-gray-50 text-gray-700",
|
|
56
|
+
children: channel.icon
|
|
57
|
+
}), jsxs("div", {
|
|
58
|
+
className: "flex-1 min-w-0",
|
|
59
|
+
children: [jsxs("h3", {
|
|
60
|
+
id: "channel-connect-title",
|
|
61
|
+
className: "text-base font-semibold text-gray-900 truncate",
|
|
62
|
+
children: ["Connect ", channel.name]
|
|
63
|
+
}), jsx("p", {
|
|
64
|
+
className: "text-xs text-gray-500 truncate",
|
|
65
|
+
children: channel.description
|
|
66
|
+
})]
|
|
67
|
+
}), jsx("button", {
|
|
68
|
+
type: "button",
|
|
69
|
+
onClick: onClose,
|
|
70
|
+
disabled: loading,
|
|
71
|
+
className: "text-gray-400 hover:text-gray-700 disabled:opacity-50",
|
|
72
|
+
"aria-label": "Close",
|
|
73
|
+
children: jsx("svg", {
|
|
74
|
+
width: 20,
|
|
75
|
+
height: 20,
|
|
76
|
+
viewBox: "0 0 24 24",
|
|
77
|
+
fill: "none",
|
|
78
|
+
stroke: "currentColor",
|
|
79
|
+
strokeWidth: 2,
|
|
80
|
+
children: jsx("path", {
|
|
81
|
+
d: "M18 6L6 18M6 6l12 12"
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
}), jsxs("div", {
|
|
86
|
+
className: "px-6 py-5 space-y-4",
|
|
87
|
+
children: [inPairingMode ? jsxs("div", {
|
|
88
|
+
className: "flex flex-col items-center gap-3",
|
|
89
|
+
children: [jsx("div", {
|
|
90
|
+
className: "flex items-center justify-center p-3 rounded-lg bg-white border border-gray-200",
|
|
91
|
+
children: jsx("img", {
|
|
92
|
+
src: buildQrUrl(qrPayload),
|
|
93
|
+
alt: `QR code to pair ${channel.name}`,
|
|
94
|
+
width: 200,
|
|
95
|
+
height: 200,
|
|
96
|
+
className: "block"
|
|
97
|
+
})
|
|
98
|
+
}), pairing?.deepLink && jsxs("a", {
|
|
99
|
+
href: pairing.deepLink,
|
|
100
|
+
target: "_blank",
|
|
101
|
+
rel: "noopener noreferrer",
|
|
102
|
+
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm rounded-lg bg-blue-600 text-white hover:bg-blue-700",
|
|
103
|
+
children: ["Open ", channel.name]
|
|
104
|
+
}), pairing?.token && jsx("button", {
|
|
105
|
+
type: "button",
|
|
106
|
+
onClick: handleCopy,
|
|
107
|
+
className: "text-xs text-gray-600 hover:text-gray-900 underline",
|
|
108
|
+
children: copied ? 'Copied!' : 'Copy pairing token'
|
|
109
|
+
}), jsxs("div", {
|
|
110
|
+
className: "flex items-center gap-2 text-xs text-gray-500",
|
|
111
|
+
children: [jsx("svg", {
|
|
112
|
+
className: "animate-spin",
|
|
113
|
+
width: 14,
|
|
114
|
+
height: 14,
|
|
115
|
+
viewBox: "0 0 24 24",
|
|
116
|
+
fill: "none",
|
|
117
|
+
stroke: "currentColor",
|
|
118
|
+
strokeWidth: 2,
|
|
119
|
+
children: jsx("path", {
|
|
120
|
+
d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
|
|
121
|
+
})
|
|
122
|
+
}), "Waiting for pairing\u2026"]
|
|
123
|
+
})]
|
|
124
|
+
}) : tokenRequired ? jsxs("div", {
|
|
125
|
+
children: [jsx("label", {
|
|
126
|
+
htmlFor: "channel-token-input",
|
|
127
|
+
className: "block text-sm font-medium text-gray-700 mb-1.5",
|
|
128
|
+
children: channel.tokenLabel
|
|
129
|
+
}), jsx("input", {
|
|
130
|
+
id: "channel-token-input",
|
|
131
|
+
type: "text",
|
|
132
|
+
autoComplete: "off",
|
|
133
|
+
spellCheck: false,
|
|
134
|
+
value: token,
|
|
135
|
+
onChange: e => setToken(e.target.value),
|
|
136
|
+
placeholder: channel.tokenPlaceholder,
|
|
137
|
+
disabled: loading,
|
|
138
|
+
className: "w-full px-3 py-2 text-sm rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500/40 focus:border-blue-500 disabled:bg-gray-50"
|
|
139
|
+
})]
|
|
140
|
+
}) : jsx("div", {
|
|
141
|
+
className: "flex items-center justify-center h-32 rounded-lg border border-dashed border-gray-300 bg-gray-50 text-xs text-gray-500",
|
|
142
|
+
children: loading ? 'Generating pairing token…' : 'Click Connect to start pairing.'
|
|
143
|
+
}), jsxs("p", {
|
|
144
|
+
className: "text-xs text-gray-500 leading-relaxed whitespace-pre-line",
|
|
145
|
+
children: [channel.tokenHelp, channel.docsLink && jsxs(Fragment, {
|
|
146
|
+
children: [' ', jsx("a", {
|
|
147
|
+
href: channel.docsLink,
|
|
148
|
+
target: "_blank",
|
|
149
|
+
rel: "noopener noreferrer",
|
|
150
|
+
className: "text-blue-600 hover:underline",
|
|
151
|
+
children: "Learn more"
|
|
152
|
+
})]
|
|
153
|
+
})]
|
|
154
|
+
}), error && jsx("div", {
|
|
155
|
+
className: "text-xs text-red-600 bg-red-50 border border-red-200 rounded-lg px-3 py-2",
|
|
156
|
+
children: error
|
|
157
|
+
})]
|
|
158
|
+
}), jsxs("div", {
|
|
159
|
+
className: "px-6 py-4 bg-gray-50 flex items-center justify-end gap-2",
|
|
160
|
+
children: [jsx("button", {
|
|
161
|
+
type: "button",
|
|
162
|
+
onClick: onClose,
|
|
163
|
+
className: "px-4 py-2 text-sm rounded-lg text-gray-700 hover:bg-gray-200",
|
|
164
|
+
children: inPairingMode ? 'Close' : 'Cancel'
|
|
165
|
+
}), !inPairingMode && jsx("button", {
|
|
166
|
+
type: "submit",
|
|
167
|
+
disabled: !canSubmit,
|
|
168
|
+
className: "px-4 py-2 text-sm rounded-lg bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
169
|
+
children: loading ? 'Connecting…' : 'Connect'
|
|
170
|
+
})]
|
|
171
|
+
})]
|
|
172
|
+
})
|
|
173
|
+
})
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
ChannelConnectModal.displayName = 'ChannelConnectModal';
|
|
177
|
+
var ChannelConnectModal$1 = React__default.memo(ChannelConnectModal);export{ChannelConnectModal$1 as default};//# sourceMappingURL=ChannelConnectModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChannelConnectModal.js","sources":["../../../../src/components/Inbox/Channels/ChannelConnectModal.tsx"],"sourcesContent":[null],"names":[],"mappings":"oHAKA;SACS,UAAS,CAAA,IAAA,EAAA;SACd,CAAA,8DAAkB,EAAA,kBAAA,CAAA,IAAA,CAAA,CAAA,CAAA;;AAErB;AAED,4BAAiB,CAAA;QACb;SACA;SACA;OACA;SACA;SACA;;AAEA,CAAA,EAAA;AACH,EAAA,MAAA,CAAA,KAAA,EAAA,QAAA,CAAA,GAAA,QAAA,CAAA,EAAA,CAAA;AAUD,EAAA,MAAA,CAAA,MAAA,EAAS,qBAAoB,CACzB,MAAM;kBADD;;;;AAmNT,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ChannelMeta {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
/** Backend channel-type identifier consumers can map to their own gateway (e.g. 'telegram-webhook'). */
|
|
8
|
+
channelType?: string;
|
|
9
|
+
/** Token field label (empty string => pairing-only flow with no manual token entry) */
|
|
10
|
+
tokenLabel: string;
|
|
11
|
+
tokenPlaceholder: string;
|
|
12
|
+
tokenHelp: string;
|
|
13
|
+
docsLink?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const CHANNELS: ChannelMeta[];
|
|
16
|
+
//# sourceMappingURL=channelsMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelsMeta.d.ts","sourceRoot":"","sources":["../../../../src/components/Inbox/Channels/channelsMeta.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,wGAAwG;IACxG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAkED,eAAO,MAAM,QAAQ,EAAE,WAAW,EA0DjC,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';// helper functions
|
|
2
|
+
function TelegramIcon() {
|
|
3
|
+
return jsx("svg", {
|
|
4
|
+
width: 20,
|
|
5
|
+
height: 20,
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "currentColor",
|
|
8
|
+
"aria-hidden": "true",
|
|
9
|
+
children: jsx("path", {
|
|
10
|
+
d: "M12 0C5.37 0 0 5.37 0 12c0 6.627 5.37 12 12 12 6.627 0 12-5.373 12-12C24 5.37 18.627 0 12 0zm5.894 8.221-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.446 1.394c-.14.18-.357.295-.548.295l.189-2.91 5.305-4.789c.23-.205-.05-.318-.357-.113l-6.554 4.124-2.827-.88c-.614-.192-.627-.614.128-.91l11.05-4.264c.512-.191 1.01.127.814 1.144z"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function SlackIcon() {
|
|
15
|
+
return jsxs("svg", {
|
|
16
|
+
width: 20,
|
|
17
|
+
height: 20,
|
|
18
|
+
viewBox: "0 0 128 128",
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
children: [jsx("path", {
|
|
22
|
+
d: "M27.255 80.719c0 7.33-5.978 13.317-13.309 13.317C6.616 94.036.63 88.049.63 80.719s5.987-13.317 13.317-13.317h13.309zm6.709 0c0-7.33 5.987-13.317 13.317-13.317s13.317 5.986 13.317 13.317v33.335c0 7.33-5.986 13.317-13.317 13.317-7.33 0-13.317-5.987-13.317-13.317zm0 0",
|
|
23
|
+
fill: "#de1c59"
|
|
24
|
+
}), jsx("path", {
|
|
25
|
+
d: "M47.281 27.255c-7.33 0-13.317-5.978-13.317-13.309C33.964 6.616 39.951.63 47.281.63s13.317 5.987 13.317 13.317v13.309zm0 6.709c7.33 0 13.317 5.987 13.317 13.317s-5.986 13.317-13.317 13.317H13.946C6.616 60.598.63 54.612.63 47.281c0-7.33 5.987-13.317 13.317-13.317zm0 0",
|
|
26
|
+
fill: "#35c5f0"
|
|
27
|
+
}), jsx("path", {
|
|
28
|
+
d: "M100.745 47.281c0-7.33 5.978-13.317 13.309-13.317 7.33 0 13.317 5.987 13.317 13.317s-5.987 13.317-13.317 13.317h-13.309zm-6.709 0c0 7.33-5.987 13.317-13.317 13.317s-13.317-5.986-13.317-13.317V13.946C67.402 6.616 73.388.63 80.719.63c7.33 0 13.317 5.987 13.317 13.317zm0 0",
|
|
29
|
+
fill: "#2eb57d"
|
|
30
|
+
}), jsx("path", {
|
|
31
|
+
d: "M80.719 100.745c7.33 0 13.317 5.978 13.317 13.309 0 7.33-5.987 13.317-13.317 13.317s-13.317-5.987-13.317-13.317v-13.309zm0-6.709c-7.33 0-13.317-5.987-13.317-13.317s5.986-13.317 13.317-13.317h33.335c7.33 0 13.317 5.986 13.317 13.317 0 7.33-5.987 13.317-13.317 13.317zm0 0",
|
|
32
|
+
fill: "#ebb02e"
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function DiscordIcon() {
|
|
37
|
+
return jsx("svg", {
|
|
38
|
+
width: 20,
|
|
39
|
+
height: 20,
|
|
40
|
+
viewBox: "0 0 24 24",
|
|
41
|
+
fill: "currentColor",
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
children: jsx("path", {
|
|
44
|
+
d: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3333-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3333-.946 2.4189-2.1568 2.4189Z"
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function WhatsAppIcon() {
|
|
49
|
+
return jsx("svg", {
|
|
50
|
+
width: 20,
|
|
51
|
+
height: 20,
|
|
52
|
+
viewBox: "0 0 24 24",
|
|
53
|
+
fill: "currentColor",
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
children: jsx("path", {
|
|
56
|
+
d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function TeamsIcon() {
|
|
61
|
+
return jsxs("svg", {
|
|
62
|
+
width: 20,
|
|
63
|
+
height: 20,
|
|
64
|
+
viewBox: "0 0 48 48",
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
children: [jsx("path", {
|
|
67
|
+
fill: "#5c6bc0",
|
|
68
|
+
d: "M41.5 13A3.5 3.5 0 1 0 41.5 20 3.5 3.5 0 1 0 41.5 13zM4 40l23 4V4L4 8V40z"
|
|
69
|
+
}), jsx("path", {
|
|
70
|
+
fill: "#fff",
|
|
71
|
+
d: "M21 16.27L21 19 17.01 19.18 16.99 31.04 14.01 30.95 14.01 19.29 10 19.45 10 16.94z"
|
|
72
|
+
}), jsx("path", {
|
|
73
|
+
fill: "#5c6bc0",
|
|
74
|
+
d: "M36 14c0 2.21-1.79 4-4 4-1.2 0-2.27-.53-3-1.36v-5.28c.73-.83 1.8-1.36 3-1.36C34.21 10 36 11.79 36 14zM38 23v11c0 0 1.567 0 3.5 0 1.762 0 3.205-1.306 3.45-3H45v-8H38zM29 20v17c0 0 1.567 0 3.5 0 1.762 0 3.205-1.306 3.45-3H36V20H29z"
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
// constants
|
|
79
|
+
const CHANNELS = [{
|
|
80
|
+
id: 'telegram',
|
|
81
|
+
name: 'Telegram',
|
|
82
|
+
description: 'Bridge this chat to a Telegram bot',
|
|
83
|
+
icon: jsx(TelegramIcon, {}),
|
|
84
|
+
channelType: 'telegram-webhook',
|
|
85
|
+
tokenLabel: '',
|
|
86
|
+
tokenPlaceholder: '',
|
|
87
|
+
tokenHelp: '1. Open Telegram and find the configured bot\n2. Tap the deep link below (or scan the QR)\n3. Tap Start to complete pairing',
|
|
88
|
+
docsLink: 'https://core.telegram.org/bots#how-do-i-create-a-bot'
|
|
89
|
+
}, {
|
|
90
|
+
id: 'discord',
|
|
91
|
+
name: 'Discord',
|
|
92
|
+
description: 'Bridge this chat to a Discord channel',
|
|
93
|
+
icon: jsx(DiscordIcon, {}),
|
|
94
|
+
channelType: 'discord-webhook',
|
|
95
|
+
tokenLabel: '',
|
|
96
|
+
tokenPlaceholder: '',
|
|
97
|
+
tokenHelp: '1. Open Discord and DM the configured bot\n2. Send the deep-link command (or paste the token)\n3. The bot confirms pairing',
|
|
98
|
+
docsLink: 'https://discord.com/developers/applications'
|
|
99
|
+
}, {
|
|
100
|
+
id: 'slack',
|
|
101
|
+
name: 'Slack',
|
|
102
|
+
description: 'Bridge this chat to a Slack workspace',
|
|
103
|
+
icon: jsx(SlackIcon, {}),
|
|
104
|
+
channelType: 'slack-webhook',
|
|
105
|
+
tokenLabel: '',
|
|
106
|
+
tokenPlaceholder: '',
|
|
107
|
+
tokenHelp: '1. Open Slack and DM the configured bot\n2. Send the pairing command from the deep link\n3. The bot confirms pairing',
|
|
108
|
+
docsLink: 'https://api.slack.com/start'
|
|
109
|
+
}, {
|
|
110
|
+
id: 'whatsapp',
|
|
111
|
+
name: 'WhatsApp',
|
|
112
|
+
description: 'Pair WhatsApp via QR code',
|
|
113
|
+
icon: jsx(WhatsAppIcon, {}),
|
|
114
|
+
channelType: 'whatsapp-webhook',
|
|
115
|
+
tokenLabel: '',
|
|
116
|
+
tokenPlaceholder: '',
|
|
117
|
+
tokenHelp: 'Scan the QR code shown in the connect dialog with WhatsApp on your phone.'
|
|
118
|
+
}, {
|
|
119
|
+
id: 'teams',
|
|
120
|
+
name: 'Microsoft Teams',
|
|
121
|
+
description: 'Bridge this chat to Microsoft Teams',
|
|
122
|
+
icon: jsx(TeamsIcon, {}),
|
|
123
|
+
channelType: 'teams-webhook',
|
|
124
|
+
tokenLabel: '',
|
|
125
|
+
tokenPlaceholder: '',
|
|
126
|
+
tokenHelp: '1. Open Teams and DM the configured bot\n2. Send the pairing command from the deep link\n3. The bot confirms pairing'
|
|
127
|
+
}];export{CHANNELS};//# sourceMappingURL=channelsMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelsMeta.js","sources":["../../../../src/components/Inbox/Channels/channelsMeta.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"yCAIA;qBACe,GAAA;SACPA,SAAS,EAAA;IACb,KAAA,EAAA,EAAA;IACA,MAAM;IACN,OAAA,EAAA,WAAA;IACA,IAAA,EAAA,cAAoB;IACpB,aAAA,EAAA,MAAA;IACA,QAAA,EAAUA,UAAS,EAAA;MACnB,CAAA,EAAA;KACA;IACA;AACH;AAkED,SAAA,SAAO,GAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as ChannelBar } from './ChannelBar';
|
|
2
|
+
export type { ChannelBarProps } from './ChannelBar';
|
|
3
|
+
export { default as ChannelConnectModal } from './ChannelConnectModal';
|
|
4
|
+
export type { ChannelConnectModalProps, PairingTokenResult } from './ChannelConnectModal';
|
|
5
|
+
export { CHANNELS } from './channelsMeta';
|
|
6
|
+
export type { ChannelMeta } from './channelsMeta';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Inbox/Channels/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,YAAY,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Inbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -14,6 +14,7 @@ export * from './ThemeProvider';
|
|
|
14
14
|
export * from './LanguageMenuDropdown';
|
|
15
15
|
export * from './InputToolBar';
|
|
16
16
|
export * from './AIToolbar';
|
|
17
|
+
export * from './Inbox';
|
|
17
18
|
export * from './YantraIcon';
|
|
18
19
|
export { Markdown as AIToolbarMarkdown } from './AIToolbar/components/Markdown';
|
|
19
20
|
export * from './Markdown';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as PageLoading}from'./components/PageLoading/index.js';export{ApplicationErrorHandler}from'./components/ErrorHandlers/ApplicationErrorHandler.js';export{ErrorBoundary}from'./components/ErrorHandlers/ErrorBoundary.js';export{LayoutErrorBoundary}from'./components/ErrorHandlers/LayoutErrorBoundary.js';export{RemixErrorBoundary}from'./components/ErrorHandlers/RemixErrorBoundary.js';export{SPAErrorBoundary}from'./components/ErrorHandlers/SPAErrorBoundary.js';export{ReactTable}from'./components/ReactTable/Table.js';export{DefaultColumnFilter,SelectColumnFilter}from'./components/ReactTable/TableFilters.js';export{Error404}from'./components/ErrorPages/404.js';export{Error500}from'./components/ErrorPages/500.js';export{Error403}from'./components/ErrorPages/403.js';export{PageContainer}from'./components/PageContainer/PageContainer.js';export{Spin}from'./components/Spin/index.js';export{OTPInput}from'./components/OTP/OTPInput.js';export{SingleInput}from'./components/OTP/SingleInput.js';export{useOTPInput}from'./components/OTP/hooks.js';export{OTPVerification}from'./components/OTP/OTPVerification.js';export{SearchInput}from'./components/Search/SearchInput.js';export{Select,SelectContent,SelectItem,SelectSearch,SelectTrigger,SelectValue}from'./components/Select/Select.js';export{DatePicker}from'./components/DatePicker/DatePicker.js';export{Dialog}from'./components/Dialog/Dialog.js';export{TailwindUiButton}from'./components/Button/Button.js';export{TailwindThemeProvider,ThemeContext,themes}from'./components/ThemeProvider/ThemeProvider.js';export{ThemeToggle}from'./components/ThemeProvider/ThemeToggle.js';export{LanguageMenuDropdown}from'./components/LanguageMenuDropdown/LanguageMenuDropdown.js';export{InputToolBar}from'./components/InputToolBar/InputToolBar.js';export{getDefaultLeftItems,getDefaultRightItems}from'./components/InputToolBar/defaults.js';export{AIToolbar,AIToolbarInputSurface,AIToolbarLeading,AIToolbarMain,AIToolbarStatusDot,AIToolbarTrailing}from'./components/AIToolbar/components/AIToolbarPrimitives.js';export{Completion}from'./components/AIToolbar/components/completion/index.js';export{SystemAudio}from'./components/AIToolbar/components/speech/index.js';export{AudioVisualizer}from'./components/AIToolbar/components/speech/audio-visualizer.js';export{StatusIndicator}from'./components/AIToolbar/components/speech/StatusIndicator.js';export{AIToolBar}from'./components/AIToolbar/components/AIToolBar.js';export{CustomCursor}from'./components/AIToolbar/components/CustomCursor.js';export{MessageHistory}from'./components/AIToolbar/components/completion/MessageHistory.js';export{Screenshot}from'./components/AIToolbar/components/completion/Screenshot.js';export{Header}from'./components/AIToolbar/components/speech/Header.js';export{ModeSwitcher}from'./components/AIToolbar/components/speech/ModeSwitcher.js';export{PermissionFlow}from'./components/AIToolbar/components/speech/PermissionFlow.js';export{setMarketplaceCharacters,useActiveCharacter,useCharacterPicker}from'./components/AIToolbar/hooks/useActiveCharacter.js';export{YantraIcon}from'./components/YantraIcon.js';export{Markdown as AIToolbarMarkdown}from'./components/AIToolbar/components/Markdown/index.js';export{MarkdownBreadcrumbs}from'./components/Markdown/MarkdownBreadcrumbs.js';export{MarkdownCopyButton}from'./components/Markdown/MarkdownCopyButton.js';export{MarkdownHeader}from'./components/Markdown/MarkdownHeader.js';export{MarkdownNavigation}from'./components/Markdown/MarkdownNavigation.js';export{MarkdownPage}from'./components/Markdown/MarkdownPage.js';export{MarkdownTableOfContents}from'./components/Markdown/MarkdownTableOfContents.js';export{
|
|
1
|
+
export{default as PageLoading}from'./components/PageLoading/index.js';export{ApplicationErrorHandler}from'./components/ErrorHandlers/ApplicationErrorHandler.js';export{ErrorBoundary}from'./components/ErrorHandlers/ErrorBoundary.js';export{LayoutErrorBoundary}from'./components/ErrorHandlers/LayoutErrorBoundary.js';export{RemixErrorBoundary}from'./components/ErrorHandlers/RemixErrorBoundary.js';export{SPAErrorBoundary}from'./components/ErrorHandlers/SPAErrorBoundary.js';export{ReactTable}from'./components/ReactTable/Table.js';export{DefaultColumnFilter,SelectColumnFilter}from'./components/ReactTable/TableFilters.js';export{Error404}from'./components/ErrorPages/404.js';export{Error500}from'./components/ErrorPages/500.js';export{Error403}from'./components/ErrorPages/403.js';export{PageContainer}from'./components/PageContainer/PageContainer.js';export{Spin}from'./components/Spin/index.js';export{OTPInput}from'./components/OTP/OTPInput.js';export{SingleInput}from'./components/OTP/SingleInput.js';export{useOTPInput}from'./components/OTP/hooks.js';export{OTPVerification}from'./components/OTP/OTPVerification.js';export{SearchInput}from'./components/Search/SearchInput.js';export{Select,SelectContent,SelectItem,SelectSearch,SelectTrigger,SelectValue}from'./components/Select/Select.js';export{DatePicker}from'./components/DatePicker/DatePicker.js';export{Dialog}from'./components/Dialog/Dialog.js';export{TailwindUiButton}from'./components/Button/Button.js';export{TailwindThemeProvider,ThemeContext,themes}from'./components/ThemeProvider/ThemeProvider.js';export{ThemeToggle}from'./components/ThemeProvider/ThemeToggle.js';export{LanguageMenuDropdown}from'./components/LanguageMenuDropdown/LanguageMenuDropdown.js';export{InputToolBar}from'./components/InputToolBar/InputToolBar.js';export{getDefaultLeftItems,getDefaultRightItems}from'./components/InputToolBar/defaults.js';export{AIToolbar,AIToolbarInputSurface,AIToolbarLeading,AIToolbarMain,AIToolbarStatusDot,AIToolbarTrailing}from'./components/AIToolbar/components/AIToolbarPrimitives.js';export{Completion}from'./components/AIToolbar/components/completion/index.js';export{SystemAudio}from'./components/AIToolbar/components/speech/index.js';export{AudioVisualizer}from'./components/AIToolbar/components/speech/audio-visualizer.js';export{StatusIndicator}from'./components/AIToolbar/components/speech/StatusIndicator.js';export{AIToolBar}from'./components/AIToolbar/components/AIToolBar.js';export{CustomCursor}from'./components/AIToolbar/components/CustomCursor.js';export{MessageHistory}from'./components/AIToolbar/components/completion/MessageHistory.js';export{Screenshot}from'./components/AIToolbar/components/completion/Screenshot.js';export{Header}from'./components/AIToolbar/components/speech/Header.js';export{ModeSwitcher}from'./components/AIToolbar/components/speech/ModeSwitcher.js';export{PermissionFlow}from'./components/AIToolbar/components/speech/PermissionFlow.js';export{setMarketplaceCharacters,useActiveCharacter,useCharacterPicker}from'./components/AIToolbar/hooks/useActiveCharacter.js';export{ACTIVE_CHARACTER_CHANGE_EVENT,ACTIVE_CHARACTER_FILE_NAME_STORAGE_KEY,readPreferredActiveCharacterFileName,resolveActiveCharacterFromList,setPreferredActiveCharacterFileName}from'./hooks/activeCharacterPreference.js';export{default as ChannelBar}from'./components/Inbox/Channels/ChannelBar.js';export{default as ChannelConnectModal}from'./components/Inbox/Channels/ChannelConnectModal.js';export{CHANNELS}from'./components/Inbox/Channels/channelsMeta.js';export{YantraIcon}from'./components/YantraIcon.js';export{Markdown as AIToolbarMarkdown}from'./components/AIToolbar/components/Markdown/index.js';export{MarkdownBreadcrumbs}from'./components/Markdown/MarkdownBreadcrumbs.js';export{MarkdownCopyButton}from'./components/Markdown/MarkdownCopyButton.js';export{MarkdownHeader}from'./components/Markdown/MarkdownHeader.js';export{MarkdownNavigation}from'./components/Markdown/MarkdownNavigation.js';export{MarkdownPage}from'./components/Markdown/MarkdownPage.js';export{MarkdownTableOfContents}from'./components/Markdown/MarkdownTableOfContents.js';export{useTheme}from'./hooks/useTheme.js';export{useWindowSize}from'./hooks/useWindowSize.js';export{ToastContainer,useToast,useToastCloseAll}from'./hooks/useToast.js';export{useMediaQuery}from'./hooks/useMediaQuery.js';export{cn}from'./utils/util.js';export{AssistantMessageActions}from'./components/AIToolbar/components/completion/AssistantMessageActions.js';export{DragButton}from'./components/AIToolbar/components/DragButton.js';//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/tailwind-ui",
|
|
3
|
-
"version": "12.2.4-alpha.
|
|
3
|
+
"version": "12.2.4-alpha.63",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"typescript": {
|
|
97
97
|
"definition": "lib/index.d.ts"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "16effa4889e33aabfcc119a7bbcad67c5d14df42"
|
|
100
100
|
}
|