@meshagent/meshagent-tailwind 0.43.3 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/chat/agent-thread-message-status-store.d.ts +107 -0
- package/dist/cjs/chat/agent-thread-message-status-store.js +649 -0
- package/dist/cjs/chat/agent-thread.d.ts +76 -4
- package/dist/cjs/chat/agent-thread.js +1114 -54
- package/dist/cjs/chat/chat-bot-view.d.ts +7 -4
- package/dist/cjs/chat/chat-bot-view.js +33 -525
- package/dist/cjs/chat/chat-hooks.d.ts +6 -5
- package/dist/cjs/chat/chat-hooks.js +21 -466
- package/dist/cjs/chat/chat-typing-indicator.d.ts +15 -1
- package/dist/cjs/chat/chat-typing-indicator.js +35 -5
- package/dist/cjs/chat/file-attachment.d.ts +7 -3
- package/dist/cjs/chat/file-attachment.js +30 -6
- package/dist/cjs/chat/multi-thread-view.d.ts +3 -1
- package/dist/cjs/chat/multi-thread-view.js +4 -2
- package/dist/cjs/chat/new-chat-thread.d.ts +3 -1
- package/dist/cjs/chat/new-chat-thread.js +7 -3
- package/dist/cjs/chat/thread-list-view.d.ts +22 -0
- package/dist/cjs/chat/thread-list-view.js +518 -0
- package/dist/cjs/chat/tool-call-status-accumulator.d.ts +69 -0
- package/dist/cjs/chat/tool-call-status-accumulator.js +268 -0
- package/dist/cjs/components/pane-example.d.ts +1 -1
- package/dist/cjs/components/ui/avatar.d.ts +3 -3
- package/dist/cjs/components/ui/button.d.ts +3 -3
- package/dist/cjs/components/ui/card.d.ts +7 -7
- package/dist/cjs/components/ui/dialog.d.ts +10 -10
- package/dist/cjs/components/ui/form.d.ts +7 -7
- package/dist/cjs/components/ui/input.d.ts +1 -1
- package/dist/cjs/components/ui/label.d.ts +1 -1
- package/dist/cjs/components/ui/progress.d.ts +1 -1
- package/dist/cjs/components/ui/radio-group.d.ts +2 -2
- package/dist/cjs/components/ui/select.d.ts +10 -10
- package/dist/cjs/components/ui/sheet.d.ts +8 -8
- package/dist/cjs/components/ui/skeleton.d.ts +1 -1
- package/dist/cjs/components/ui/sonner.d.ts +1 -1
- package/dist/cjs/components/ui/spinner.d.ts +2 -2
- package/dist/cjs/components/ui/textarea.d.ts +1 -1
- package/dist/cjs/file-preview/file-preview.d.ts +1 -0
- package/dist/cjs/file-preview/file-preview.js +41 -5
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +13 -0
- package/dist/cjs/meetings/camera-grid.d.ts +2 -2
- package/dist/cjs/tools/ask-user-for-file.js +2 -2
- package/dist/cjs/tools/file-dialog.d.ts +2 -1
- package/dist/cjs/tools/form-dialog.d.ts +2 -1
- package/dist/esm/chat/agent-thread-message-status-store.d.ts +107 -0
- package/dist/esm/chat/agent-thread-message-status-store.js +647 -0
- package/dist/esm/chat/agent-thread.d.ts +76 -4
- package/dist/esm/chat/agent-thread.js +1132 -56
- package/dist/esm/chat/chat-bot-view.d.ts +7 -4
- package/dist/esm/chat/chat-bot-view.js +40 -555
- package/dist/esm/chat/chat-hooks.d.ts +6 -5
- package/dist/esm/chat/chat-hooks.js +23 -468
- package/dist/esm/chat/chat-typing-indicator.d.ts +15 -1
- package/dist/esm/chat/chat-typing-indicator.js +35 -5
- package/dist/esm/chat/file-attachment.d.ts +7 -3
- package/dist/esm/chat/file-attachment.js +30 -6
- package/dist/esm/chat/multi-thread-view.d.ts +3 -1
- package/dist/esm/chat/multi-thread-view.js +4 -2
- package/dist/esm/chat/new-chat-thread.d.ts +3 -1
- package/dist/esm/chat/new-chat-thread.js +8 -4
- package/dist/esm/chat/thread-list-view.d.ts +22 -0
- package/dist/esm/chat/thread-list-view.js +514 -0
- package/dist/esm/chat/tool-call-status-accumulator.d.ts +69 -0
- package/dist/esm/chat/tool-call-status-accumulator.js +248 -0
- package/dist/esm/components/pane-example.d.ts +1 -1
- package/dist/esm/components/ui/avatar.d.ts +3 -3
- package/dist/esm/components/ui/button.d.ts +3 -3
- package/dist/esm/components/ui/card.d.ts +7 -7
- package/dist/esm/components/ui/dialog.d.ts +10 -10
- package/dist/esm/components/ui/form.d.ts +7 -7
- package/dist/esm/components/ui/input.d.ts +1 -1
- package/dist/esm/components/ui/label.d.ts +1 -1
- package/dist/esm/components/ui/progress.d.ts +1 -1
- package/dist/esm/components/ui/radio-group.d.ts +2 -2
- package/dist/esm/components/ui/select.d.ts +10 -10
- package/dist/esm/components/ui/sheet.d.ts +8 -8
- package/dist/esm/components/ui/skeleton.d.ts +1 -1
- package/dist/esm/components/ui/sonner.d.ts +1 -1
- package/dist/esm/components/ui/spinner.d.ts +2 -2
- package/dist/esm/components/ui/textarea.d.ts +1 -1
- package/dist/esm/file-preview/file-preview.d.ts +1 -0
- package/dist/esm/file-preview/file-preview.js +29 -3
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/meetings/camera-grid.d.ts +2 -2
- package/dist/esm/tools/ask-user-for-file.js +2 -2
- package/dist/esm/tools/file-dialog.d.ts +2 -1
- package/dist/esm/tools/form-dialog.d.ts +2 -1
- package/dist/index.css +1 -1
- package/package.json +4 -4
- package/dist/cjs/chat/chat-bot-view.test.js +0 -325
- package/dist/cjs/chat/live-chat-widgets.test.js +0 -256
- package/dist/esm/chat/chat-bot-view.test.js +0 -336
- package/dist/esm/chat/live-chat-widgets.test.js +0 -262
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
class ToolCallStatusSnapshot {
|
|
2
|
+
itemId;
|
|
3
|
+
status;
|
|
4
|
+
text;
|
|
5
|
+
totalBytes;
|
|
6
|
+
linesAdded;
|
|
7
|
+
linesRemoved;
|
|
8
|
+
constructor(params) {
|
|
9
|
+
this.itemId = params.itemId;
|
|
10
|
+
this.status = params.status ?? "in_progress";
|
|
11
|
+
this.text = params.text;
|
|
12
|
+
this.totalBytes = params.totalBytes;
|
|
13
|
+
this.linesAdded = params.linesAdded;
|
|
14
|
+
this.linesRemoved = params.linesRemoved;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class AccumulatedLiveToolCall {
|
|
18
|
+
tool;
|
|
19
|
+
arguments;
|
|
20
|
+
status = "in_progress";
|
|
21
|
+
argumentBytes = 0;
|
|
22
|
+
argumentText = "";
|
|
23
|
+
}
|
|
24
|
+
class LiveToolCallAccumulator {
|
|
25
|
+
callsByItemId = /* @__PURE__ */ new Map();
|
|
26
|
+
textEncoder = new TextEncoder();
|
|
27
|
+
get isEmpty() {
|
|
28
|
+
return this.callsByItemId.size === 0;
|
|
29
|
+
}
|
|
30
|
+
hasSingleItem(itemId) {
|
|
31
|
+
return this.callsByItemId.size === 1 && this.callsByItemId.has(itemId);
|
|
32
|
+
}
|
|
33
|
+
get(itemId) {
|
|
34
|
+
return this.callsByItemId.get(itemId);
|
|
35
|
+
}
|
|
36
|
+
totalBytes(itemId) {
|
|
37
|
+
const normalizedItemId = itemId?.trim();
|
|
38
|
+
if (!normalizedItemId) {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
const bytes = this.callsByItemId.get(normalizedItemId)?.argumentBytes;
|
|
42
|
+
return bytes != null && bytes > 0 ? bytes : void 0;
|
|
43
|
+
}
|
|
44
|
+
appendDelta(params) {
|
|
45
|
+
const normalizedItemId = params.itemId.trim();
|
|
46
|
+
const call = this.callFor(normalizedItemId);
|
|
47
|
+
call.status = "in_progress";
|
|
48
|
+
call.argumentBytes += this.textEncoder.encode(params.delta).length;
|
|
49
|
+
call.argumentText = `${call.argumentText}${params.delta}`;
|
|
50
|
+
return this.snapshotFor(normalizedItemId, call, params.fallbackText);
|
|
51
|
+
}
|
|
52
|
+
upsert(params) {
|
|
53
|
+
const normalizedItemId = params.itemId.trim();
|
|
54
|
+
const call = this.callFor(normalizedItemId);
|
|
55
|
+
call.status = "in_progress";
|
|
56
|
+
const normalizedTool = params.tool.trim();
|
|
57
|
+
if (normalizedTool !== "") {
|
|
58
|
+
call.tool = normalizedTool;
|
|
59
|
+
}
|
|
60
|
+
if (params.arguments != null) {
|
|
61
|
+
call.arguments = params.arguments;
|
|
62
|
+
}
|
|
63
|
+
return this.snapshotFor(normalizedItemId, call, params.fallbackText);
|
|
64
|
+
}
|
|
65
|
+
complete(params) {
|
|
66
|
+
const normalizedItemId = params.itemId.trim();
|
|
67
|
+
const call = this.callsByItemId.get(normalizedItemId);
|
|
68
|
+
if (call == null) {
|
|
69
|
+
return void 0;
|
|
70
|
+
}
|
|
71
|
+
call.status = params.status ?? "completed";
|
|
72
|
+
return this.snapshotFor(normalizedItemId, call, params.fallbackText);
|
|
73
|
+
}
|
|
74
|
+
remove(itemId) {
|
|
75
|
+
return this.callsByItemId.delete(itemId);
|
|
76
|
+
}
|
|
77
|
+
callFor(itemId) {
|
|
78
|
+
let call = this.callsByItemId.get(itemId);
|
|
79
|
+
if (call == null) {
|
|
80
|
+
call = new AccumulatedLiveToolCall();
|
|
81
|
+
this.callsByItemId.set(itemId, call);
|
|
82
|
+
}
|
|
83
|
+
return call;
|
|
84
|
+
}
|
|
85
|
+
snapshotFor(itemId, call, fallbackText) {
|
|
86
|
+
const normalizedTool = call.tool?.trim().toLowerCase();
|
|
87
|
+
const isApplyPatch = normalizedTool === "apply_patch";
|
|
88
|
+
const isCodexDiff = normalizedTool?.startsWith("diff") === true && applyPatchTextFromArguments(call.arguments?.diff) != null;
|
|
89
|
+
const patchInfo = this.patchStatusInfo(call);
|
|
90
|
+
const path = patchInfo?.path;
|
|
91
|
+
const patchText = patchInfo == null && !isApplyPatch && !isCodexDiff ? void 0 : path == null ? statusTextForPatch(call.status) : statusTextForPatchPath(call.status, path);
|
|
92
|
+
return new ToolCallStatusSnapshot({
|
|
93
|
+
itemId,
|
|
94
|
+
status: call.status,
|
|
95
|
+
text: patchText ?? fallbackText,
|
|
96
|
+
totalBytes: call.argumentBytes > 0 ? call.argumentBytes : void 0,
|
|
97
|
+
linesAdded: patchInfo?.counts?.added,
|
|
98
|
+
linesRemoved: patchInfo?.counts?.removed
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
patchStatusInfo(call) {
|
|
102
|
+
const tool = call.tool?.trim().toLowerCase();
|
|
103
|
+
const deltaText = call.argumentText.trim() === "" ? void 0 : call.argumentText;
|
|
104
|
+
const looksLikePatch = tool === "apply_patch" || tool?.startsWith("diff") === true || deltaText != null && (deltaText.includes("*** Begin Patch") || deltaText.includes("@@"));
|
|
105
|
+
if (!looksLikePatch) {
|
|
106
|
+
return void 0;
|
|
107
|
+
}
|
|
108
|
+
return applyPatchStatusInfo({ arguments: call.arguments, deltaText });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function applyPatchTextFromArguments(value) {
|
|
112
|
+
if (typeof value === "string") {
|
|
113
|
+
return value.trim() === "" ? void 0 : value;
|
|
114
|
+
}
|
|
115
|
+
if (Array.isArray(value)) {
|
|
116
|
+
for (const nested of value) {
|
|
117
|
+
const text = applyPatchTextFromArguments(nested);
|
|
118
|
+
if (text != null) {
|
|
119
|
+
return text;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return void 0;
|
|
123
|
+
}
|
|
124
|
+
if (isRecord(value)) {
|
|
125
|
+
for (const key of ["patch", "input", "diff"]) {
|
|
126
|
+
const text = applyPatchTextFromArguments(value[key]);
|
|
127
|
+
if (text != null) {
|
|
128
|
+
return text;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
for (const nested of Object.values(value)) {
|
|
132
|
+
const text = applyPatchTextFromArguments(nested);
|
|
133
|
+
if (text != null) {
|
|
134
|
+
return text;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return void 0;
|
|
139
|
+
}
|
|
140
|
+
function applyPatchPathFromArguments(value) {
|
|
141
|
+
if (Array.isArray(value)) {
|
|
142
|
+
for (const nested of value) {
|
|
143
|
+
const nestedPath = applyPatchPathFromArguments(nested);
|
|
144
|
+
if (nestedPath != null) {
|
|
145
|
+
return nestedPath;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return void 0;
|
|
149
|
+
}
|
|
150
|
+
if (isRecord(value)) {
|
|
151
|
+
const path = value.path;
|
|
152
|
+
if (typeof path === "string" && path.trim() !== "") {
|
|
153
|
+
return path.trim();
|
|
154
|
+
}
|
|
155
|
+
const operationPath = applyPatchPathFromArguments(value.operation);
|
|
156
|
+
if (operationPath != null) {
|
|
157
|
+
return operationPath;
|
|
158
|
+
}
|
|
159
|
+
for (const nested of Object.values(value)) {
|
|
160
|
+
const nestedPath = applyPatchPathFromArguments(nested);
|
|
161
|
+
if (nestedPath != null) {
|
|
162
|
+
return nestedPath;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return void 0;
|
|
167
|
+
}
|
|
168
|
+
function applyPatchPathFromText(patch) {
|
|
169
|
+
const filePattern = /^\*\*\* (?:Update|Add|Delete) File: (.+)$/;
|
|
170
|
+
const diffPattern = /^(?:\+\+\+ b\/|--- a\/)(.+)$/;
|
|
171
|
+
for (const line of patch.replace(/\r\n/g, "\n").split("\n")) {
|
|
172
|
+
const path = filePattern.exec(line)?.[1]?.trim() ?? diffPattern.exec(line)?.[1]?.trim();
|
|
173
|
+
if (path != null && path !== "") {
|
|
174
|
+
return path;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return void 0;
|
|
178
|
+
}
|
|
179
|
+
function diffLineCountsFromText(diff) {
|
|
180
|
+
let added = 0;
|
|
181
|
+
let removed = 0;
|
|
182
|
+
for (const line of diff.replace(/\r\n/g, "\n").split("\n")) {
|
|
183
|
+
if (line.startsWith("+") && !line.startsWith("+++")) {
|
|
184
|
+
added += 1;
|
|
185
|
+
} else if (line.startsWith("-") && !line.startsWith("---")) {
|
|
186
|
+
removed += 1;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return added === 0 && removed === 0 ? void 0 : { added, removed };
|
|
190
|
+
}
|
|
191
|
+
function applyPatchLineCountsFromText(patch) {
|
|
192
|
+
const normalized = patch.replace(/\r\n/g, "\n");
|
|
193
|
+
const looksLikePatch = normalized.includes("*** Begin Patch") || normalized.includes("*** Update File:") || normalized.includes("*** Add File:") || normalized.includes("*** Delete File:");
|
|
194
|
+
if (!looksLikePatch && !normalized.includes("@@")) {
|
|
195
|
+
return void 0;
|
|
196
|
+
}
|
|
197
|
+
return diffLineCountsFromText(normalized);
|
|
198
|
+
}
|
|
199
|
+
function applyPatchStatusInfo(params) {
|
|
200
|
+
const path = applyPatchPathFromArguments(params.arguments);
|
|
201
|
+
const argumentText = applyPatchTextFromArguments(params.arguments);
|
|
202
|
+
const text = params.deltaText != null && params.deltaText.trim() !== "" ? params.deltaText : argumentText;
|
|
203
|
+
const counts = text == null ? void 0 : applyPatchLineCountsFromText(text);
|
|
204
|
+
const patchPath = text == null ? void 0 : applyPatchPathFromText(text);
|
|
205
|
+
const resolvedPath = path ?? patchPath;
|
|
206
|
+
if (resolvedPath == null && counts == null) {
|
|
207
|
+
return void 0;
|
|
208
|
+
}
|
|
209
|
+
return { path: resolvedPath, counts };
|
|
210
|
+
}
|
|
211
|
+
function isRecord(value) {
|
|
212
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
213
|
+
}
|
|
214
|
+
function statusTextForPatch(status) {
|
|
215
|
+
switch (status) {
|
|
216
|
+
case "completed":
|
|
217
|
+
return "Applied patch";
|
|
218
|
+
case "failed":
|
|
219
|
+
return "Attempted to patch";
|
|
220
|
+
case "cancelled":
|
|
221
|
+
return "Patch cancelled";
|
|
222
|
+
default:
|
|
223
|
+
return "Applying patch";
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function statusTextForPatchPath(status, path) {
|
|
227
|
+
switch (status) {
|
|
228
|
+
case "completed":
|
|
229
|
+
return `Edited ${path}`;
|
|
230
|
+
case "failed":
|
|
231
|
+
return `Attempted to patch ${path}`;
|
|
232
|
+
case "cancelled":
|
|
233
|
+
return `Patch cancelled: ${path}`;
|
|
234
|
+
default:
|
|
235
|
+
return `Editing ${path}`;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
export {
|
|
239
|
+
AccumulatedLiveToolCall,
|
|
240
|
+
LiveToolCallAccumulator,
|
|
241
|
+
ToolCallStatusSnapshot,
|
|
242
|
+
applyPatchLineCountsFromText,
|
|
243
|
+
applyPatchPathFromArguments,
|
|
244
|
+
applyPatchPathFromText,
|
|
245
|
+
applyPatchStatusInfo,
|
|
246
|
+
applyPatchTextFromArguments,
|
|
247
|
+
diffLineCountsFromText
|
|
248
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function PaneExample(): import("react
|
|
1
|
+
export default function PaneExample(): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
3
|
-
declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>):
|
|
4
|
-
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>):
|
|
5
|
-
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>):
|
|
3
|
+
declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
|
|
5
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
|
|
6
6
|
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" |
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "sm" | "lg" | "default" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): React.JSX.Element;
|
|
10
10
|
export { Button, buttonVariants };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare function Card({ className, ...props }: React.ComponentProps<"div">):
|
|
3
|
-
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">):
|
|
4
|
-
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">):
|
|
5
|
-
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">):
|
|
6
|
-
declare function CardAction({ className, ...props }: React.ComponentProps<"div">):
|
|
7
|
-
declare function CardContent({ className, ...props }: React.ComponentProps<"div">):
|
|
8
|
-
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">):
|
|
2
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
4
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
9
|
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>):
|
|
4
|
-
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>):
|
|
5
|
-
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>):
|
|
6
|
-
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>):
|
|
7
|
-
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>):
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
|
|
8
8
|
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
9
|
showCloseButton?: boolean;
|
|
10
|
-
}):
|
|
11
|
-
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">):
|
|
12
|
-
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">):
|
|
13
|
-
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>):
|
|
14
|
-
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>):
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
|
|
14
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
|
|
15
15
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
5
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(
|
|
6
|
-
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) =>
|
|
5
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
6
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
7
7
|
declare const useFormField: () => {
|
|
8
8
|
invalid: boolean;
|
|
9
9
|
isDirty: boolean;
|
|
@@ -16,9 +16,9 @@ declare const useFormField: () => {
|
|
|
16
16
|
formDescriptionId: string;
|
|
17
17
|
formMessageId: string;
|
|
18
18
|
};
|
|
19
|
-
declare function FormItem({ className, ...props }: React.ComponentProps<"div">):
|
|
20
|
-
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>):
|
|
21
|
-
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>):
|
|
22
|
-
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">):
|
|
23
|
-
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">):
|
|
19
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
20
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
|
|
21
|
+
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): React.JSX.Element;
|
|
22
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
23
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element | null;
|
|
24
24
|
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare function Input({ className, type, ...props }: React.ComponentProps<"input">):
|
|
2
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
3
3
|
export { Input };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>):
|
|
3
|
+
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
export { Label };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3
|
-
export declare function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>):
|
|
3
|
+
export declare function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
-
declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>):
|
|
4
|
-
declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>):
|
|
3
|
+
declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): React.JSX.Element;
|
|
5
5
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
-
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>):
|
|
4
|
-
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>):
|
|
5
|
-
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>):
|
|
3
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
|
|
5
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
|
6
6
|
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
7
7
|
size?: "sm" | "default";
|
|
8
|
-
}):
|
|
9
|
-
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>):
|
|
10
|
-
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>):
|
|
11
|
-
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>):
|
|
12
|
-
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>):
|
|
13
|
-
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>):
|
|
14
|
-
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>):
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
|
|
10
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
|
|
11
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
|
|
12
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
|
|
13
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
|
|
14
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
|
|
15
15
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>):
|
|
4
|
-
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>):
|
|
5
|
-
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>):
|
|
3
|
+
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
|
|
6
6
|
declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
7
7
|
side?: "top" | "right" | "bottom" | "left";
|
|
8
|
-
}):
|
|
9
|
-
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">):
|
|
10
|
-
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">):
|
|
11
|
-
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>):
|
|
12
|
-
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>):
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
|
|
12
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
|
|
13
13
|
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react
|
|
1
|
+
declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
2
2
|
export { Skeleton };
|
|
@@ -9,7 +9,7 @@ export interface SpinnerProps extends React.SVGProps<SVGSVGElement> {
|
|
|
9
9
|
/**
|
|
10
10
|
* A simple rotating spinner component using Lucide's Loader2 icon and Tailwind CSS
|
|
11
11
|
*/
|
|
12
|
-
export declare function Spinner({ size, className, ...props }: SpinnerProps):
|
|
12
|
+
export declare function Spinner({ size, className, ...props }: SpinnerProps): React.JSX.Element;
|
|
13
13
|
export interface LoadingOverlayProps {
|
|
14
14
|
/**
|
|
15
15
|
* When true, shows the overlay spinner; otherwise renders children normally
|
|
@@ -21,4 +21,4 @@ export interface LoadingOverlayProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* Wraps content and displays a centered spinner overlay when loading
|
|
23
23
|
*/
|
|
24
|
-
export declare function LoadingOverlay({ isLoading, className, children }: LoadingOverlayProps):
|
|
24
|
+
export declare function LoadingOverlay({ isLoading, className, children }: LoadingOverlayProps): React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">):
|
|
2
|
+
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
3
3
|
export { Textarea };
|
|
@@ -11,6 +11,7 @@ export declare enum FileKind {
|
|
|
11
11
|
export declare function filePreviewName(path: string): string;
|
|
12
12
|
export declare function classifyFile(path: string): FileKind;
|
|
13
13
|
export declare function isImagePath(path: string): boolean;
|
|
14
|
+
export declare function filePreviewLoadsFromRoomStorage(path: string): boolean;
|
|
14
15
|
export declare function ImagePreview({ room, path, alt, }: {
|
|
15
16
|
room: RoomClient;
|
|
16
17
|
path: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { Download, FileText } from "lucide-react";
|
|
4
|
-
import { Document, Page, pdfjs } from "react-pdf";
|
|
5
4
|
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
6
5
|
import { oneLight } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
7
6
|
import {
|
|
@@ -16,7 +15,6 @@ import { Button } from "../components/ui/button.js";
|
|
|
16
15
|
import { Spinner } from "../components/ui/spinner.js";
|
|
17
16
|
import { cn } from "../lib/utils.js";
|
|
18
17
|
import { AgentThread } from "../chat/agent-thread.js";
|
|
19
|
-
pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
|
|
20
18
|
var FileKind = /* @__PURE__ */ ((FileKind2) => {
|
|
21
19
|
FileKind2["Image"] = "image";
|
|
22
20
|
FileKind2["Video"] = "video";
|
|
@@ -203,6 +201,10 @@ function classifyFile(path) {
|
|
|
203
201
|
function isImagePath(path) {
|
|
204
202
|
return classifyFile(path) === "image" /* Image */;
|
|
205
203
|
}
|
|
204
|
+
function filePreviewLoadsFromRoomStorage(path) {
|
|
205
|
+
const kind = classifyFile(path);
|
|
206
|
+
return kind === "source" /* Source */ || kind === "pdf" /* Pdf */;
|
|
207
|
+
}
|
|
206
208
|
function useDownloadUrl(room, path) {
|
|
207
209
|
const [url, setUrl] = useState(null);
|
|
208
210
|
const [error, setError] = useState(null);
|
|
@@ -400,12 +402,35 @@ function useElementWidth() {
|
|
|
400
402
|
function PdfPreview({ room, path }) {
|
|
401
403
|
const { url, error } = usePdfUrl(room, path);
|
|
402
404
|
const [numPages, setNumPages] = useState(0);
|
|
405
|
+
const [reactPdf, setReactPdf] = useState(null);
|
|
406
|
+
const [reactPdfError, setReactPdfError] = useState(null);
|
|
403
407
|
const [containerRef, containerWidth] = useElementWidth();
|
|
404
408
|
const pageWidth = Math.max(Math.min(containerWidth, 960), 320);
|
|
409
|
+
useEffect(() => {
|
|
410
|
+
let stopped = false;
|
|
411
|
+
import("react-pdf").then((nextReactPdf) => {
|
|
412
|
+
nextReactPdf.pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${nextReactPdf.pdfjs.version}/build/pdf.worker.min.mjs`;
|
|
413
|
+
if (!stopped) {
|
|
414
|
+
setReactPdf(nextReactPdf);
|
|
415
|
+
}
|
|
416
|
+
}).catch((nextError) => {
|
|
417
|
+
if (!stopped) {
|
|
418
|
+
setReactPdfError(nextError);
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
return () => {
|
|
422
|
+
stopped = true;
|
|
423
|
+
};
|
|
424
|
+
}, []);
|
|
405
425
|
if (error != null) {
|
|
406
426
|
return /* @__PURE__ */ jsx(ErrorPreview, { message: `Unable to load PDF: ${String(error)}` });
|
|
407
427
|
}
|
|
408
|
-
|
|
428
|
+
if (reactPdfError != null) {
|
|
429
|
+
return /* @__PURE__ */ jsx(ErrorPreview, { message: `Unable to load PDF renderer: ${String(reactPdfError)}` });
|
|
430
|
+
}
|
|
431
|
+
const Document = reactPdf?.Document;
|
|
432
|
+
const Page = reactPdf?.Page;
|
|
433
|
+
return /* @__PURE__ */ jsx("div", { ref: containerRef, className: "h-full overflow-auto bg-muted/30 p-4", children: url == null || Document == null || Page == null ? /* @__PURE__ */ jsx(LoadingPreview, {}) : /* @__PURE__ */ jsx(
|
|
409
434
|
Document,
|
|
410
435
|
{
|
|
411
436
|
file: url,
|
|
@@ -531,6 +556,7 @@ export {
|
|
|
531
556
|
SourcePreview,
|
|
532
557
|
VideoPreview,
|
|
533
558
|
classifyFile,
|
|
559
|
+
filePreviewLoadsFromRoomStorage,
|
|
534
560
|
filePreviewName,
|
|
535
561
|
isImagePath
|
|
536
562
|
};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -7,8 +7,11 @@ export * from './chat/conversation-descriptor.js';
|
|
|
7
7
|
export * from './chat/file-attachment.js';
|
|
8
8
|
export * from './chat/file-uploader.js';
|
|
9
9
|
export * from './chat/multi-thread-view.js';
|
|
10
|
+
export * from './chat/thread-list-view.js';
|
|
10
11
|
export * from './chat/agent-thread.js';
|
|
11
12
|
export * from './chat/new-chat-thread.js';
|
|
13
|
+
export * from './chat/tool-call-status-accumulator.js';
|
|
14
|
+
export { AgentThreadMessageStatusStore, resolveChatThreadStatusFromStore, shouldShowChatThreadStatus, trackAgentThreadStatusMessageInStore } from './chat/agent-thread-message-status-store.js';
|
|
12
15
|
export * from './file-preview/file-preview.js';
|
|
13
16
|
export * from './forms/email-address.js';
|
|
14
17
|
export * from './forms/form.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -7,8 +7,11 @@ export * from "./chat/conversation-descriptor.js";
|
|
|
7
7
|
export * from "./chat/file-attachment.js";
|
|
8
8
|
export * from "./chat/file-uploader.js";
|
|
9
9
|
export * from "./chat/multi-thread-view.js";
|
|
10
|
+
export * from "./chat/thread-list-view.js";
|
|
10
11
|
export * from "./chat/agent-thread.js";
|
|
11
12
|
export * from "./chat/new-chat-thread.js";
|
|
13
|
+
export * from "./chat/tool-call-status-accumulator.js";
|
|
14
|
+
import { AgentThreadMessageStatusStore, resolveChatThreadStatusFromStore, shouldShowChatThreadStatus, trackAgentThreadStatusMessageInStore } from "./chat/agent-thread-message-status-store.js";
|
|
12
15
|
export * from "./file-preview/file-preview.js";
|
|
13
16
|
export * from "./forms/email-address.js";
|
|
14
17
|
export * from "./forms/form.js";
|
|
@@ -16,3 +19,9 @@ export * from "./forms/multi-select-autocomplete.js";
|
|
|
16
19
|
export * from "./forms/select-users.js";
|
|
17
20
|
export * from "./forms/select-users-dialog.js";
|
|
18
21
|
export * from "./meetings/meetings.js";
|
|
22
|
+
export {
|
|
23
|
+
AgentThreadMessageStatusStore,
|
|
24
|
+
resolveChatThreadStatusFromStore,
|
|
25
|
+
shouldShowChatThreadStatus,
|
|
26
|
+
trackAgentThreadStatusMessageInStore
|
|
27
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { Track } from "livekit-client";
|
|
3
3
|
import type { Participant, TrackPublication, VideoTrack } from "livekit-client";
|
|
4
4
|
export declare const TrackSource: {
|
|
@@ -43,4 +43,4 @@ export interface CameraGridProps {
|
|
|
43
43
|
/** Equivalent to frameBuilder. */
|
|
44
44
|
frameBuilder: (args: CameraGridFrameArgs) => ReactNode;
|
|
45
45
|
}
|
|
46
|
-
export declare function CameraGrid({ participants, room, spacing, showNames, showAllVideos, preferredSource, rowsDesired, columnsDesired, tryFill, activeVideoPublicationForSource, activeVideoPublications, renderVideoTrack, renderAudioStats, frameBuilder, }: CameraGridProps):
|
|
46
|
+
export declare function CameraGrid({ participants, room, spacing, showNames, showAllVideos, preferredSource, rowsDesired, columnsDesired, tryFill, activeVideoPublicationForSource, activeVideoPublications, renderVideoTrack, renderAudioStats, frameBuilder, }: CameraGridProps): React.JSX.Element | null;
|
|
@@ -30,11 +30,11 @@ class AskUserForFile extends Tool {
|
|
|
30
30
|
description: arguments_.description
|
|
31
31
|
});
|
|
32
32
|
if (file) {
|
|
33
|
-
const data = await file.arrayBuffer();
|
|
33
|
+
const data = new Uint8Array(await file.arrayBuffer());
|
|
34
34
|
const name = file ? file.name : "unknown";
|
|
35
35
|
const mimeType = file ? file.type : "application/octet-stream";
|
|
36
36
|
return new FileContent({
|
|
37
|
-
data
|
|
37
|
+
data,
|
|
38
38
|
name,
|
|
39
39
|
mimeType
|
|
40
40
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export declare function showFileDialog({ title, description }: {
|
|
2
3
|
title?: string;
|
|
3
4
|
description?: string;
|
|
@@ -8,4 +9,4 @@ export declare function FileDialog({ title, description, onSubmit, onDismiss, on
|
|
|
8
9
|
onSubmit: (file: File | null) => void;
|
|
9
10
|
onDismiss: () => void;
|
|
10
11
|
onCleanup: () => void;
|
|
11
|
-
}):
|
|
12
|
+
}): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { FormSchema } from "./form-schema.js";
|
|
2
3
|
export declare function showUserFormDialog({ formSchema, title }: {
|
|
3
4
|
formSchema: FormSchema;
|
|
@@ -9,4 +10,4 @@ export declare function FormDialog({ title, formSchema, onSubmit, onDismiss, onC
|
|
|
9
10
|
onSubmit: (data: Record<string, any>) => void;
|
|
10
11
|
onDismiss: () => void;
|
|
11
12
|
onCleanup: () => void;
|
|
12
|
-
}):
|
|
13
|
+
}): React.JSX.Element;
|