@arbidocs/blocks 0.4.156 → 0.4.157
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConnectedNativeDocxComparison-2PLOOXSH.js +1 -1
- package/dist/ConnectedNativeDocxComparison-S25BPUH5.cjs +1 -1
- package/dist/ConnectedNativeDocxEditor-JJAGMHZC.js +1 -1
- package/dist/ConnectedNativeDocxEditor-YA4HWLY4.cjs +1 -1
- package/dist/ConnectedStreamedWordArtifact-EXYZAU4Y.cjs +1 -1
- package/dist/ConnectedStreamedWordArtifact-YAAXY5KY.js +1 -1
- package/dist/agents/index.cjs +238 -238
- package/dist/agents/index.js +4 -4
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/{chunk-6HMCF4AJ.js → chunk-5ZIYPZYE.js} +1033 -5
- package/dist/chunk-5ZIYPZYE.js.map +1 -0
- package/dist/{chunk-O3FB62T5.cjs → chunk-6QAAIDQQ.cjs} +47 -47
- package/dist/{chunk-O3FB62T5.cjs.map → chunk-6QAAIDQQ.cjs.map} +1 -1
- package/dist/{chunk-UKT3WH5Z.cjs → chunk-B3FMUFAW.cjs} +3 -3
- package/dist/{chunk-UKT3WH5Z.cjs.map → chunk-B3FMUFAW.cjs.map} +1 -1
- package/dist/{chunk-W7CWGURO.js → chunk-FTZ45WHY.js} +6 -685
- package/dist/chunk-FTZ45WHY.js.map +1 -0
- package/dist/{chunk-HDJRSCRE.cjs → chunk-GC2FSPSQ.cjs} +6 -6
- package/dist/{chunk-HDJRSCRE.cjs.map → chunk-GC2FSPSQ.cjs.map} +1 -1
- package/dist/{chunk-UKCCV63X.js → chunk-MNG7N6M2.js} +4 -4
- package/dist/{chunk-UKCCV63X.js.map → chunk-MNG7N6M2.js.map} +1 -1
- package/dist/{chunk-MUDEL7UL.cjs → chunk-NPLGB4LI.cjs} +4 -703
- package/dist/chunk-NPLGB4LI.cjs.map +1 -0
- package/dist/{chunk-UPMADXDU.js → chunk-P6RIBIVN.js} +3 -3
- package/dist/{chunk-UPMADXDU.js.map → chunk-P6RIBIVN.js.map} +1 -1
- package/dist/{chunk-WV4TD2HZ.cjs → chunk-QJFJ5JBF.cjs} +1055 -2
- package/dist/chunk-QJFJ5JBF.cjs.map +1 -0
- package/dist/{chunk-6HG56GCT.js → chunk-QKR5LWDO.js} +4 -4
- package/dist/{chunk-6HG56GCT.js.map → chunk-QKR5LWDO.js.map} +1 -1
- package/dist/{chunk-YMQDDUKW.js → chunk-WU34CHU5.js} +3 -3
- package/dist/{chunk-YMQDDUKW.js.map → chunk-WU34CHU5.js.map} +1 -1
- package/dist/{chunk-FEGXFABZ.cjs → chunk-YF3QUHKN.cjs} +3 -3
- package/dist/{chunk-FEGXFABZ.cjs.map → chunk-YF3QUHKN.cjs.map} +1 -1
- package/dist/connect/docx.cjs +1 -1
- package/dist/connect/docx.js +1 -1
- package/dist/connect/index.cjs +730 -170
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +571 -16
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +45 -45
- package/dist/connect/viewer.js +7 -7
- package/dist/connection/files/index.d.ts +5 -0
- package/dist/connection/files/support.d.ts +2 -0
- package/dist/connection/files/upload/AddFromAccountsButton.d.ts +16 -0
- package/dist/connection/files/upload/ConnectedUpload.d.ts +36 -0
- package/dist/connection/files/upload/ConnectedUploadDropzone.d.ts +36 -0
- package/dist/connection/files/upload/EmptyWorkspaceUpload.d.ts +13 -0
- package/dist/connection/files/upload/useAddFromUrls.d.ts +13 -0
- package/dist/document-tools/index.cjs +1 -1
- package/dist/document-tools/index.js +1 -1
- package/dist/facts/index.cjs +54 -54
- package/dist/facts/index.js +4 -4
- package/dist/files/PrivacyExplainerModal.d.ts +8 -0
- package/dist/files/ShareToggle.d.ts +8 -0
- package/dist/files/UrlInputDialog.d.ts +24 -0
- package/dist/files/index.cjs +298 -278
- package/dist/files/index.d.ts +4 -0
- package/dist/files/index.js +2 -2
- package/dist/files/media-preview.d.ts +24 -0
- package/dist/index.cjs +347 -347
- package/dist/index.js +8 -8
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/workflow-canvas/index.cjs +16 -16
- package/dist/workflow-canvas/index.js +4 -4
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/chunk-6HMCF4AJ.js.map +0 -1
- package/dist/chunk-MUDEL7UL.cjs.map +0 -1
- package/dist/chunk-W7CWGURO.js.map +0 -1
- package/dist/chunk-WV4TD2HZ.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkQJFJ5JBF_cjs = require('./chunk-QJFJ5JBF.cjs');
|
|
5
5
|
var chunk223D4727_cjs = require('./chunk-223D4727.cjs');
|
|
6
6
|
var chunkVLCY46K6_cjs = require('./chunk-VLCY46K6.cjs');
|
|
7
7
|
var chunkFAXXN7KI_cjs = require('./chunk-FAXXN7KI.cjs');
|
|
@@ -92,420 +92,6 @@ function documentGridLayoutProps(layout, presets) {
|
|
|
92
92
|
height: layout === "modal" ? presets.modalHeight ?? "50vh" : "100%"
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
var DEFAULT_UPLOAD_PARTS_LABELS = {
|
|
96
|
-
rejectedReasons: {
|
|
97
|
-
too_large: "The following files exceed the 1 GB size limit:",
|
|
98
|
-
unsupported: "The following files are not in a supported format (PDF, DOC(X), PPT(X), XLS(X), RTF, TXT, MD, HTML, images, audio, video, email, Outlook archive (.pst/.ost), or ZIP):",
|
|
99
|
-
empty: "The following files are empty (0 bytes):",
|
|
100
|
-
no_extension: "The following files have no file extension:",
|
|
101
|
-
empty_zip: "The following ZIP archives contain no supported files:",
|
|
102
|
-
zip_error: "The following ZIP archives could not be processed:"
|
|
103
|
-
},
|
|
104
|
-
rejectedFallback: "The following files cannot be uploaded:",
|
|
105
|
-
clearRejected: "Clear rejected files",
|
|
106
|
-
selectedFiles: (count) => `Selected Files (${count})`,
|
|
107
|
-
total: (size) => `Total: ${size}`,
|
|
108
|
-
clearAll: "Clear All",
|
|
109
|
-
remove: (fileName) => `Remove ${fileName}`,
|
|
110
|
-
uploadComplete: (entity) => `Upload complete! Processing ${entity} in the background...`,
|
|
111
|
-
uploading: (count, entity) => `Uploading ${count} ${entity}...`,
|
|
112
|
-
uploadedIndexing: "Files uploaded successfully. ARBI is now indexing them in the background.",
|
|
113
|
-
afterUpload: "After upload completes, ARBI will index files in the background."
|
|
114
|
-
};
|
|
115
|
-
function mergeUploadLabels(labels) {
|
|
116
|
-
return {
|
|
117
|
-
...DEFAULT_UPLOAD_PARTS_LABELS,
|
|
118
|
-
...labels,
|
|
119
|
-
rejectedReasons: {
|
|
120
|
-
...DEFAULT_UPLOAD_PARTS_LABELS.rejectedReasons,
|
|
121
|
-
...labels?.rejectedReasons
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function UploadErrorMessage({
|
|
126
|
-
message,
|
|
127
|
-
className,
|
|
128
|
-
testId
|
|
129
|
-
}) {
|
|
130
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
131
|
-
"div",
|
|
132
|
-
{
|
|
133
|
-
role: "alert",
|
|
134
|
-
className: ui.cn("mt-6 flex items-center gap-2 rounded-lg bg-red-bg p-3", className),
|
|
135
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "error-message" }),
|
|
136
|
-
children: [
|
|
137
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "size-5 shrink-0 text-red-text" }),
|
|
138
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-red-text", children: message })
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
function RejectedFilesList({ files, onClear, labels, testIds }) {
|
|
144
|
-
if (files.length === 0) return null;
|
|
145
|
-
const l = mergeUploadLabels(labels);
|
|
146
|
-
const byReason = /* @__PURE__ */ new Map();
|
|
147
|
-
for (const file of files) {
|
|
148
|
-
const reason = typeof file === "string" ? "unsupported" : file.reason || "unsupported";
|
|
149
|
-
const name = typeof file === "string" ? file : file.name;
|
|
150
|
-
byReason.set(reason, [...byReason.get(reason) ?? [], name]);
|
|
151
|
-
}
|
|
152
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
-
"div",
|
|
154
|
-
{
|
|
155
|
-
className: "mt-4 rounded-lg bg-red-bg p-3",
|
|
156
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.root, { testId: "rejected-files-list" }),
|
|
157
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
158
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "mt-0.5 size-5 shrink-0 text-red-text" }),
|
|
159
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: Array.from(byReason.entries()).map(([reason, names], groupIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: groupIndex > 0 ? "mt-3" : "", children: [
|
|
160
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-medium text-red-text", children: l.rejectedReasons[reason] ?? l.rejectedFallback }),
|
|
161
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: names.map((name, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
162
|
-
"div",
|
|
163
|
-
{
|
|
164
|
-
className: "rounded-md bg-background/60 p-2",
|
|
165
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.item?.(groupIndex, index), {
|
|
166
|
-
testId: `rejected-file-item-${groupIndex}-${index}`
|
|
167
|
-
}),
|
|
168
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-red-text", children: name })
|
|
169
|
-
},
|
|
170
|
-
index
|
|
171
|
-
)) })
|
|
172
|
-
] }, reason)) }),
|
|
173
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
174
|
-
ui.Button,
|
|
175
|
-
{
|
|
176
|
-
variant: "ghost",
|
|
177
|
-
size: "icon",
|
|
178
|
-
onClick: onClear,
|
|
179
|
-
"aria-label": l.clearRejected,
|
|
180
|
-
className: "size-6 text-red-text hover:text-red-text pointer-coarse:size-11",
|
|
181
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.clear, { testId: "clear-rejected-files-button" }),
|
|
182
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" })
|
|
183
|
-
}
|
|
184
|
-
)
|
|
185
|
-
] })
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
function folderPathOf(file) {
|
|
190
|
-
const rel = file.webkitRelativePath;
|
|
191
|
-
if (!rel) return null;
|
|
192
|
-
const slash = rel.lastIndexOf("/");
|
|
193
|
-
return slash > 0 ? rel.substring(0, slash) : null;
|
|
194
|
-
}
|
|
195
|
-
function SelectedFilesList({
|
|
196
|
-
files,
|
|
197
|
-
onRemoveFile,
|
|
198
|
-
onClearAll,
|
|
199
|
-
formatFileSize,
|
|
200
|
-
renderFileIcon,
|
|
201
|
-
labels,
|
|
202
|
-
testIds
|
|
203
|
-
}) {
|
|
204
|
-
if (files.length === 0) return null;
|
|
205
|
-
const l = mergeUploadLabels(labels);
|
|
206
|
-
const total = files.reduce((sum, f) => sum + f.size, 0);
|
|
207
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
208
|
-
"div",
|
|
209
|
-
{
|
|
210
|
-
className: "mt-2 sm:mt-6",
|
|
211
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.root, { testId: "selected-files-list" }),
|
|
212
|
-
children: [
|
|
213
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between gap-3", children: [
|
|
214
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col sm:flex-row sm:items-center sm:gap-4", children: [
|
|
215
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-medium", children: l.selectedFiles(files.length) }),
|
|
216
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.total(formatFileSize(total)) })
|
|
217
|
-
] }),
|
|
218
|
-
onClearAll && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
219
|
-
ui.Button,
|
|
220
|
-
{
|
|
221
|
-
variant: "ghost",
|
|
222
|
-
size: "sm",
|
|
223
|
-
onClick: onClearAll,
|
|
224
|
-
className: "h-8 shrink-0 whitespace-nowrap text-muted-foreground hover:text-foreground pointer-coarse:h-11",
|
|
225
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.clearAll, { testId: "clear-all-files-button" }),
|
|
226
|
-
children: [
|
|
227
|
-
l.clearAll,
|
|
228
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "ml-1 hidden size-4 sm:block" })
|
|
229
|
-
]
|
|
230
|
-
}
|
|
231
|
-
)
|
|
232
|
-
] }),
|
|
233
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1 overflow-y-auto overscroll-contain pr-1 sm:max-h-[300px]", children: files.map((file, index) => {
|
|
234
|
-
const folder = folderPathOf(file);
|
|
235
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
236
|
-
"div",
|
|
237
|
-
{
|
|
238
|
-
className: "flex min-w-0 items-center gap-2 rounded-lg bg-muted p-3",
|
|
239
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.item?.(index), {
|
|
240
|
-
testId: `selected-file-item-${index}`
|
|
241
|
-
}),
|
|
242
|
-
children: [
|
|
243
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: renderFileIcon(file.name) }),
|
|
244
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
245
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-base", title: file.name, children: file.name }),
|
|
246
|
-
folder && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
|
|
247
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { className: "size-3" }),
|
|
248
|
-
folder
|
|
249
|
-
] })
|
|
250
|
-
] }),
|
|
251
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
252
|
-
ui.Button,
|
|
253
|
-
{
|
|
254
|
-
variant: "ghost",
|
|
255
|
-
size: "icon",
|
|
256
|
-
onClick: () => onRemoveFile(index),
|
|
257
|
-
"aria-label": l.remove(file.name),
|
|
258
|
-
className: "size-6 shrink-0 pointer-coarse:size-11",
|
|
259
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.remove?.(index), {
|
|
260
|
-
testId: `remove-file-button-${index}`
|
|
261
|
-
}),
|
|
262
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" })
|
|
263
|
-
}
|
|
264
|
-
)
|
|
265
|
-
]
|
|
266
|
-
},
|
|
267
|
-
index
|
|
268
|
-
);
|
|
269
|
-
}) })
|
|
270
|
-
]
|
|
271
|
-
}
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
function UploadProgress({
|
|
275
|
-
fileCount,
|
|
276
|
-
entityLabel,
|
|
277
|
-
percentage,
|
|
278
|
-
batchInfo,
|
|
279
|
-
labels,
|
|
280
|
-
testId
|
|
281
|
-
}) {
|
|
282
|
-
const l = mergeUploadLabels(labels);
|
|
283
|
-
const isComplete = percentage >= 100;
|
|
284
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", "data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "upload-progress" }), children: [
|
|
285
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-lg font-medium", children: isComplete ? l.uploadComplete(entityLabel) : l.uploading(fileCount, entityLabel) }),
|
|
286
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto mb-4 max-w-md", children: [
|
|
287
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
288
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Progress, { value: percentage, className: "h-3" }),
|
|
289
|
-
batchInfo && batchInfo.total > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": "true", children: Array.from({ length: batchInfo.total - 1 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
290
|
-
"span",
|
|
291
|
-
{
|
|
292
|
-
className: "absolute top-0 h-full w-px bg-background/50",
|
|
293
|
-
style: { left: `${(i + 1) / batchInfo.total * 100}%` }
|
|
294
|
-
},
|
|
295
|
-
i
|
|
296
|
-
)) })
|
|
297
|
-
] }),
|
|
298
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex items-center justify-center text-sm text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
299
|
-
Math.round(percentage),
|
|
300
|
-
"%"
|
|
301
|
-
] }) })
|
|
302
|
-
] }),
|
|
303
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: isComplete ? l.uploadedIndexing : l.afterUpload })
|
|
304
|
-
] });
|
|
305
|
-
}
|
|
306
|
-
var DEFAULT_UPLOAD_SOURCES_LABELS = {
|
|
307
|
-
uploadFiles: "Choose files",
|
|
308
|
-
uploadFolder: "Choose a folder"
|
|
309
|
-
};
|
|
310
|
-
function UploadFrame({ isCompact, isDimmed, className, children }) {
|
|
311
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
312
|
-
"div",
|
|
313
|
-
{
|
|
314
|
-
"data-slot": "upload-frame",
|
|
315
|
-
className: ui.cn(
|
|
316
|
-
"relative flex w-full flex-col items-center",
|
|
317
|
-
isCompact ? "gap-4" : "gap-6",
|
|
318
|
-
isDimmed && "opacity-50",
|
|
319
|
-
className
|
|
320
|
-
),
|
|
321
|
-
children
|
|
322
|
-
}
|
|
323
|
-
);
|
|
324
|
-
}
|
|
325
|
-
function UploadDropArea({
|
|
326
|
-
isActive,
|
|
327
|
-
isDisabled,
|
|
328
|
-
isProcessing,
|
|
329
|
-
processingMessage,
|
|
330
|
-
isCompact,
|
|
331
|
-
title,
|
|
332
|
-
subtitle,
|
|
333
|
-
onDrag,
|
|
334
|
-
onDrop,
|
|
335
|
-
onClick,
|
|
336
|
-
actions,
|
|
337
|
-
testId = "upload-dropzone-area"
|
|
338
|
-
}) {
|
|
339
|
-
const active = isActive && !isDisabled;
|
|
340
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
341
|
-
"div",
|
|
342
|
-
{
|
|
343
|
-
"data-slot": "upload-drop-area",
|
|
344
|
-
"data-testid": testId,
|
|
345
|
-
onDragEnter: onDrag,
|
|
346
|
-
onDragLeave: onDrag,
|
|
347
|
-
onDragOver: onDrag,
|
|
348
|
-
onDrop,
|
|
349
|
-
onClick,
|
|
350
|
-
className: ui.cn(
|
|
351
|
-
"relative flex w-full flex-col items-center justify-center rounded-lg border text-center transition-colors",
|
|
352
|
-
active ? "border-dashed border-primary bg-accent" : "border-border bg-card shadow-xs hover:border-ring/50 hover:bg-accent/40",
|
|
353
|
-
isDisabled || isProcessing ? "cursor-not-allowed" : "cursor-pointer",
|
|
354
|
-
isCompact ? "min-h-[150px] p-4" : "min-h-[200px] p-5",
|
|
355
|
-
// Touch screens cannot drag files in: the area stays in the DOM (assistive tech, e2e) but
|
|
356
|
-
// the "Choose files / folder" buttons are the whole affordance.
|
|
357
|
-
"pointer-coarse:sr-only"
|
|
358
|
-
),
|
|
359
|
-
children: [
|
|
360
|
-
isProcessing && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
361
|
-
"div",
|
|
362
|
-
{
|
|
363
|
-
role: "status",
|
|
364
|
-
className: "absolute inset-0 z-10 flex flex-col items-center justify-center rounded-lg bg-background/80",
|
|
365
|
-
children: [
|
|
366
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mb-3 size-8 animate-spin text-primary" }),
|
|
367
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "progress-bar-processing mb-3 h-1.5 w-48 rounded-sm" }),
|
|
368
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: processingMessage })
|
|
369
|
-
]
|
|
370
|
-
}
|
|
371
|
-
),
|
|
372
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
373
|
-
"div",
|
|
374
|
-
{
|
|
375
|
-
className: ui.cn(
|
|
376
|
-
"mb-2 flex items-center justify-center rounded-full bg-muted text-muted-foreground",
|
|
377
|
-
isCompact ? "size-11" : "size-10",
|
|
378
|
-
active && "bg-primary/10 text-primary"
|
|
379
|
-
),
|
|
380
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "size-5" })
|
|
381
|
-
}
|
|
382
|
-
),
|
|
383
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
384
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: subtitle }),
|
|
385
|
-
actions
|
|
386
|
-
]
|
|
387
|
-
}
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
function UploadBrowseButtons({
|
|
391
|
-
onFiles,
|
|
392
|
-
onFolder,
|
|
393
|
-
isDisabled,
|
|
394
|
-
layout = "inline",
|
|
395
|
-
labels
|
|
396
|
-
}) {
|
|
397
|
-
const l = { ...DEFAULT_UPLOAD_SOURCES_LABELS, ...labels };
|
|
398
|
-
const isInline = layout === "inline";
|
|
399
|
-
const size = isInline ? "sm" : "default";
|
|
400
|
-
const width = isInline ? void 0 : "w-full";
|
|
401
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
402
|
-
"div",
|
|
403
|
-
{
|
|
404
|
-
"data-slot": "upload-browse-buttons",
|
|
405
|
-
className: isInline ? "mt-3 flex flex-wrap items-center justify-center gap-2" : "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
406
|
-
children: [
|
|
407
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
408
|
-
ui.Button,
|
|
409
|
-
{
|
|
410
|
-
variant: isInline ? "outline" : "default",
|
|
411
|
-
size,
|
|
412
|
-
className: width,
|
|
413
|
-
onClick: onFiles,
|
|
414
|
-
disabled: isDisabled,
|
|
415
|
-
"data-testid": "upload-files-button",
|
|
416
|
-
children: [
|
|
417
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "mr-2 size-4" }),
|
|
418
|
-
l.uploadFiles
|
|
419
|
-
]
|
|
420
|
-
}
|
|
421
|
-
),
|
|
422
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
423
|
-
ui.Button,
|
|
424
|
-
{
|
|
425
|
-
variant: "outline",
|
|
426
|
-
size,
|
|
427
|
-
className: width,
|
|
428
|
-
onClick: onFolder,
|
|
429
|
-
disabled: isDisabled,
|
|
430
|
-
"data-testid": "upload-folder-button",
|
|
431
|
-
children: [
|
|
432
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderPlus, { className: "mr-2 size-4" }),
|
|
433
|
-
l.uploadFolder
|
|
434
|
-
]
|
|
435
|
-
}
|
|
436
|
-
)
|
|
437
|
-
]
|
|
438
|
-
}
|
|
439
|
-
);
|
|
440
|
-
}
|
|
441
|
-
function UploadSourcePicker({ options, isDisabled }) {
|
|
442
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
443
|
-
"div",
|
|
444
|
-
{
|
|
445
|
-
"data-slot": "upload-source-picker",
|
|
446
|
-
className: "flex w-full flex-col gap-2",
|
|
447
|
-
"data-testid": "upload-source-picker",
|
|
448
|
-
children: options.map((o) => {
|
|
449
|
-
const button = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
450
|
-
ui.Button,
|
|
451
|
-
{
|
|
452
|
-
variant: "outline",
|
|
453
|
-
onClick: o.onClick,
|
|
454
|
-
disabled: isDisabled,
|
|
455
|
-
"data-testid": `upload-source-pick-${o.key}`,
|
|
456
|
-
className: "h-auto w-full justify-start gap-3 px-4 py-3 text-left",
|
|
457
|
-
children: [
|
|
458
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-muted-foreground [&_svg]:size-5", children: o.icon }),
|
|
459
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col", children: [
|
|
460
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: o.label }),
|
|
461
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: o.description })
|
|
462
|
-
] })
|
|
463
|
-
]
|
|
464
|
-
}
|
|
465
|
-
);
|
|
466
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "contents", children: o.wrap ? o.wrap(button) : button }, o.key);
|
|
467
|
-
})
|
|
468
|
-
}
|
|
469
|
-
);
|
|
470
|
-
}
|
|
471
|
-
function UploadUrlButton({
|
|
472
|
-
isCompact,
|
|
473
|
-
isDisabled,
|
|
474
|
-
label = "Add from URL",
|
|
475
|
-
onClick
|
|
476
|
-
}) {
|
|
477
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
478
|
-
ui.Button,
|
|
479
|
-
{
|
|
480
|
-
variant: "outline",
|
|
481
|
-
size: isCompact ? "sm" : "default",
|
|
482
|
-
disabled: isDisabled,
|
|
483
|
-
onClick,
|
|
484
|
-
"data-testid": "upload-url-button",
|
|
485
|
-
children: [
|
|
486
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "mr-2 size-4" }),
|
|
487
|
-
label
|
|
488
|
-
]
|
|
489
|
-
}
|
|
490
|
-
);
|
|
491
|
-
}
|
|
492
|
-
function UploadSourceSection({
|
|
493
|
-
testId,
|
|
494
|
-
className,
|
|
495
|
-
isIsolated,
|
|
496
|
-
children
|
|
497
|
-
}) {
|
|
498
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
499
|
-
"div",
|
|
500
|
-
{
|
|
501
|
-
"data-slot": "upload-source-section",
|
|
502
|
-
"data-testid": testId,
|
|
503
|
-
className,
|
|
504
|
-
onClick: isIsolated ? (e) => e.stopPropagation() : void 0,
|
|
505
|
-
children
|
|
506
|
-
}
|
|
507
|
-
);
|
|
508
|
-
}
|
|
509
95
|
var DEFAULT_EXPORT_LABELS = {
|
|
510
96
|
export: "Export, copy or move",
|
|
511
97
|
selected: (count) => `${count} selected`,
|
|
@@ -1859,131 +1445,6 @@ function ViewerLoadError({
|
|
|
1859
1445
|
}
|
|
1860
1446
|
);
|
|
1861
1447
|
}
|
|
1862
|
-
var DEFAULT_UPLOAD_FOOTER_LABELS = {
|
|
1863
|
-
skipDuplicates: "Skip duplicates",
|
|
1864
|
-
skipDuplicatesActive: "Skip identical files already in the workspace",
|
|
1865
|
-
skipDuplicatesInactive: "Allow uploading identical files",
|
|
1866
|
-
autoRename: "Auto-rename",
|
|
1867
|
-
autoRenameActive: "Generate a descriptive title via AI instead of using the filename",
|
|
1868
|
-
autoRenameInactive: "Keep the original filename",
|
|
1869
|
-
titleInstruction: "Title instruction",
|
|
1870
|
-
titleInstructionPlaceholder: "Optional: how should AI name these documents?"
|
|
1871
|
-
};
|
|
1872
|
-
function UploadContainer({
|
|
1873
|
-
children,
|
|
1874
|
-
className = "p-4 sm:p-6",
|
|
1875
|
-
testId
|
|
1876
|
-
}) {
|
|
1877
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1878
|
-
"div",
|
|
1879
|
-
{
|
|
1880
|
-
className,
|
|
1881
|
-
"data-slot": "upload-container",
|
|
1882
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "upload-container" }),
|
|
1883
|
-
children
|
|
1884
|
-
}
|
|
1885
|
-
);
|
|
1886
|
-
}
|
|
1887
|
-
function UploadShareNote({
|
|
1888
|
-
description,
|
|
1889
|
-
children,
|
|
1890
|
-
compact = false,
|
|
1891
|
-
testId
|
|
1892
|
-
}) {
|
|
1893
|
-
const id = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "share-toggle" });
|
|
1894
|
-
if (compact) {
|
|
1895
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
1896
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": id, children }) }),
|
|
1897
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", children: description }) })
|
|
1898
|
-
] });
|
|
1899
|
-
}
|
|
1900
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted p-4", "data-testid": id, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
1901
|
-
children,
|
|
1902
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
1903
|
-
] }) });
|
|
1904
|
-
}
|
|
1905
|
-
var TOGGLE_COLORS = { text: "text-primary", bg: "bg-primary" };
|
|
1906
|
-
function UploadFooterBar({
|
|
1907
|
-
skipDuplicates,
|
|
1908
|
-
onSkipDuplicatesChange,
|
|
1909
|
-
autoRename,
|
|
1910
|
-
onAutoRenameChange,
|
|
1911
|
-
autoRenameInstruction,
|
|
1912
|
-
onAutoRenameInstructionChange,
|
|
1913
|
-
shareToggle,
|
|
1914
|
-
children,
|
|
1915
|
-
className,
|
|
1916
|
-
labels,
|
|
1917
|
-
testIds
|
|
1918
|
-
}) {
|
|
1919
|
-
const l = { ...DEFAULT_UPLOAD_FOOTER_LABELS, ...labels };
|
|
1920
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1921
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1922
|
-
"div",
|
|
1923
|
-
{
|
|
1924
|
-
className: ui.cn(
|
|
1925
|
-
"flex shrink-0 flex-wrap items-center gap-x-3 gap-y-2 border-t border-border bg-background px-4 py-3 sm:px-6",
|
|
1926
|
-
className
|
|
1927
|
-
),
|
|
1928
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.bar, { testId: "upload-footer-bar" }),
|
|
1929
|
-
children: [
|
|
1930
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1931
|
-
ui.IconToggle,
|
|
1932
|
-
{
|
|
1933
|
-
icon: lucideReact.CopyX,
|
|
1934
|
-
isActive: skipDuplicates,
|
|
1935
|
-
onToggle: onSkipDuplicatesChange,
|
|
1936
|
-
colors: TOGGLE_COLORS,
|
|
1937
|
-
showLabel: true,
|
|
1938
|
-
label: l.skipDuplicates,
|
|
1939
|
-
tooltipActive: l.skipDuplicatesActive,
|
|
1940
|
-
tooltipInactive: l.skipDuplicatesInactive,
|
|
1941
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.skipDuplicates, { testId: "toggle-skip-duplicates" })
|
|
1942
|
-
}
|
|
1943
|
-
),
|
|
1944
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1945
|
-
ui.IconToggle,
|
|
1946
|
-
{
|
|
1947
|
-
icon: lucideReact.Sparkles,
|
|
1948
|
-
isActive: autoRename,
|
|
1949
|
-
onToggle: onAutoRenameChange,
|
|
1950
|
-
colors: TOGGLE_COLORS,
|
|
1951
|
-
showLabel: true,
|
|
1952
|
-
label: l.autoRename,
|
|
1953
|
-
tooltipActive: l.autoRenameActive,
|
|
1954
|
-
tooltipInactive: l.autoRenameInactive,
|
|
1955
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.autoRename, { testId: "toggle-auto-rename" })
|
|
1956
|
-
}
|
|
1957
|
-
),
|
|
1958
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden flex-1 sm:block" }),
|
|
1959
|
-
shareToggle,
|
|
1960
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full sm:w-auto max-sm:[&>button]:w-full", children })
|
|
1961
|
-
]
|
|
1962
|
-
}
|
|
1963
|
-
),
|
|
1964
|
-
autoRename && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1965
|
-
"div",
|
|
1966
|
-
{
|
|
1967
|
-
className: "shrink-0 border-t border-border bg-background px-4 py-3 sm:px-6",
|
|
1968
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.settingsPanel, { testId: "upload-settings-panel" }),
|
|
1969
|
-
children: [
|
|
1970
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "auto-rename-instruction", className: "text-sm font-medium", children: l.titleInstruction }),
|
|
1971
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1972
|
-
ui.Textarea,
|
|
1973
|
-
{
|
|
1974
|
-
id: "auto-rename-instruction",
|
|
1975
|
-
value: autoRenameInstruction,
|
|
1976
|
-
onChange: (e) => onAutoRenameInstructionChange(e.target.value),
|
|
1977
|
-
placeholder: l.titleInstructionPlaceholder,
|
|
1978
|
-
className: "mt-1 min-h-[60px] text-sm",
|
|
1979
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.instruction, { testId: "auto-rename-instruction" })
|
|
1980
|
-
}
|
|
1981
|
-
)
|
|
1982
|
-
]
|
|
1983
|
-
}
|
|
1984
|
-
)
|
|
1985
|
-
] });
|
|
1986
|
-
}
|
|
1987
1448
|
var DEFAULT_TAG_PASSAGE_PANEL_LABELS = {
|
|
1988
1449
|
title: "Tag Passage",
|
|
1989
1450
|
page: (n) => `Page ${n}`,
|
|
@@ -2553,146 +2014,6 @@ function TaskSection({
|
|
|
2553
2014
|
hasItems && isExpanded && children
|
|
2554
2015
|
] });
|
|
2555
2016
|
}
|
|
2556
|
-
var DEFAULT_URL_INPUT_DIALOG_LABELS = {
|
|
2557
|
-
title: "Add from the internet",
|
|
2558
|
-
description: "Enter one or more URLs to download documents \u2014 paste several separated by commas or new lines.",
|
|
2559
|
-
supports: "Supports PDF, Word, PowerPoint, Excel, RTF, TXT, MD, HTML, ZIP, and audio/video links (YouTube et al.).",
|
|
2560
|
-
url: (position) => position === null ? "URL " : `URL ${position}`,
|
|
2561
|
-
placeholder: "https://example.com/document.pdf or a YouTube / audio / video link",
|
|
2562
|
-
removeUrl: (position) => `Remove URL ${position}`,
|
|
2563
|
-
addAnother: "Add Another URL",
|
|
2564
|
-
adding: "Adding\u2026",
|
|
2565
|
-
addDocuments: "Add Documents",
|
|
2566
|
-
mediaPreview: "Media preview"
|
|
2567
|
-
};
|
|
2568
|
-
function UrlInputDialogView({
|
|
2569
|
-
open,
|
|
2570
|
-
onOpenChange,
|
|
2571
|
-
trigger,
|
|
2572
|
-
title,
|
|
2573
|
-
urls,
|
|
2574
|
-
errors,
|
|
2575
|
-
onUrlChange,
|
|
2576
|
-
onUrlPaste,
|
|
2577
|
-
onAddUrl,
|
|
2578
|
-
onRemoveUrl,
|
|
2579
|
-
renderPreview,
|
|
2580
|
-
submitError,
|
|
2581
|
-
isSubmitting,
|
|
2582
|
-
onSubmit,
|
|
2583
|
-
labels,
|
|
2584
|
-
testIds
|
|
2585
|
-
}) {
|
|
2586
|
-
const l = { ...DEFAULT_URL_INPUT_DIALOG_LABELS, ...labels };
|
|
2587
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Dialog, { open, onOpenChange, children: [
|
|
2588
|
-
trigger !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTrigger, { asChild: true, children: trigger }),
|
|
2589
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2590
|
-
ui.DialogContent,
|
|
2591
|
-
{
|
|
2592
|
-
presentation: "sheet",
|
|
2593
|
-
className: "flex flex-col gap-0 overflow-hidden p-0 sm:max-w-[525px]",
|
|
2594
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.modal, { testId: "upload-modal-internet" }),
|
|
2595
|
-
children: [
|
|
2596
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: title ?? l.title }) }),
|
|
2597
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 pb-6", children: [
|
|
2598
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.DialogDescription, { className: "pt-4 text-sm text-muted-foreground", children: [
|
|
2599
|
-
l.description,
|
|
2600
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 block text-xs", children: l.supports })
|
|
2601
|
-
] }),
|
|
2602
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4 py-4", children: [
|
|
2603
|
-
urls.map((url, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2604
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2605
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
2606
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: `url-${index}`, className: "text-sm", children: l.url(urls.length > 1 ? index + 1 : null) }),
|
|
2607
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2608
|
-
ui.Input,
|
|
2609
|
-
{
|
|
2610
|
-
id: `url-${index}`,
|
|
2611
|
-
type: "text",
|
|
2612
|
-
placeholder: l.placeholder,
|
|
2613
|
-
value: url,
|
|
2614
|
-
onChange: (e) => onUrlChange(index, e.target.value),
|
|
2615
|
-
onPaste: (e) => {
|
|
2616
|
-
e.preventDefault();
|
|
2617
|
-
onUrlPaste(index, e.clipboardData.getData("text"));
|
|
2618
|
-
},
|
|
2619
|
-
className: ui.cn(errors[index] && "border-red-border")
|
|
2620
|
-
}
|
|
2621
|
-
),
|
|
2622
|
-
errors[index] && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-red-text", children: errors[index] })
|
|
2623
|
-
] }),
|
|
2624
|
-
urls.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2625
|
-
ui.Button,
|
|
2626
|
-
{
|
|
2627
|
-
type: "button",
|
|
2628
|
-
variant: "ghost",
|
|
2629
|
-
size: "icon",
|
|
2630
|
-
onClick: () => onRemoveUrl(index),
|
|
2631
|
-
className: "mt-6",
|
|
2632
|
-
"aria-label": l.removeUrl(index + 1),
|
|
2633
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
2634
|
-
}
|
|
2635
|
-
)
|
|
2636
|
-
] }),
|
|
2637
|
-
renderPreview?.(url, index)
|
|
2638
|
-
] }, index)),
|
|
2639
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { type: "button", variant: "outline", size: "sm", onClick: onAddUrl, className: "w-full", children: [
|
|
2640
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "mr-2 h-4 w-4" }),
|
|
2641
|
-
l.addAnother
|
|
2642
|
-
] })
|
|
2643
|
-
] }),
|
|
2644
|
-
submitError && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2645
|
-
"p",
|
|
2646
|
-
{
|
|
2647
|
-
className: "text-sm text-red-text",
|
|
2648
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.submitError, { testId: "url-submit-error" }),
|
|
2649
|
-
children: submitError
|
|
2650
|
-
}
|
|
2651
|
-
),
|
|
2652
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col-reverse sm:flex-row sm:justify-end gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2653
|
-
ui.Button,
|
|
2654
|
-
{
|
|
2655
|
-
onClick: onSubmit,
|
|
2656
|
-
disabled: isSubmitting,
|
|
2657
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.submit, { testId: "url-submit-button" }),
|
|
2658
|
-
children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2659
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
2660
|
-
l.adding
|
|
2661
|
-
] }) : l.addDocuments
|
|
2662
|
-
}
|
|
2663
|
-
) })
|
|
2664
|
-
] })
|
|
2665
|
-
]
|
|
2666
|
-
}
|
|
2667
|
-
)
|
|
2668
|
-
] });
|
|
2669
|
-
}
|
|
2670
|
-
function UrlDialogTitle({ icon, workspaceName, labels }) {
|
|
2671
|
-
const l = { ...DEFAULT_URL_INPUT_DIALOG_LABELS, ...labels };
|
|
2672
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("flex min-w-0 items-center", icon ? "gap-3" : "gap-2"), children: [
|
|
2673
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
2674
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", title: workspaceName, children: workspaceName }),
|
|
2675
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: "/" }),
|
|
2676
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: l.title })
|
|
2677
|
-
] });
|
|
2678
|
-
}
|
|
2679
|
-
function MediaPreviewView({ kind, src, testId, labels }) {
|
|
2680
|
-
const l = { ...DEFAULT_URL_INPUT_DIALOG_LABELS, ...labels };
|
|
2681
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 overflow-hidden rounded-md border", "data-testid": testId, children: [
|
|
2682
|
-
kind === "youtube" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2683
|
-
"iframe",
|
|
2684
|
-
{
|
|
2685
|
-
className: "aspect-video w-full",
|
|
2686
|
-
src,
|
|
2687
|
-
title: l.mediaPreview,
|
|
2688
|
-
allow: "accelerometer; encrypted-media; picture-in-picture",
|
|
2689
|
-
allowFullScreen: true
|
|
2690
|
-
}
|
|
2691
|
-
),
|
|
2692
|
-
kind === "video" && /* @__PURE__ */ jsxRuntime.jsx("video", { className: "max-h-56 w-full bg-black", src, controls: true, preload: "metadata" }),
|
|
2693
|
-
kind === "audio" && /* @__PURE__ */ jsxRuntime.jsx("audio", { className: "w-full p-2", src, controls: true, preload: "metadata" })
|
|
2694
|
-
] });
|
|
2695
|
-
}
|
|
2696
2017
|
function RelatedBadge({
|
|
2697
2018
|
icon: Icon,
|
|
2698
2019
|
count,
|
|
@@ -5699,7 +5020,7 @@ function DocStatusIcon({
|
|
|
5699
5020
|
const key = status.toLowerCase();
|
|
5700
5021
|
if (key === "failed") {
|
|
5701
5022
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5702
|
-
|
|
5023
|
+
chunkQJFJ5JBF_cjs.FailedStageIcon,
|
|
5703
5024
|
{
|
|
5704
5025
|
stage: failedStage,
|
|
5705
5026
|
errorMessage,
|
|
@@ -5757,10 +5078,6 @@ exports.DEFAULT_MOVE_TO_FOLDER_LABELS = DEFAULT_MOVE_TO_FOLDER_LABELS;
|
|
|
5757
5078
|
exports.DEFAULT_TAG_MANAGER_LABELS = DEFAULT_TAG_MANAGER_LABELS;
|
|
5758
5079
|
exports.DEFAULT_TAG_PASSAGE_PANEL_LABELS = DEFAULT_TAG_PASSAGE_PANEL_LABELS;
|
|
5759
5080
|
exports.DEFAULT_TRANSFER_LABELS = DEFAULT_TRANSFER_LABELS;
|
|
5760
|
-
exports.DEFAULT_UPLOAD_FOOTER_LABELS = DEFAULT_UPLOAD_FOOTER_LABELS;
|
|
5761
|
-
exports.DEFAULT_UPLOAD_PARTS_LABELS = DEFAULT_UPLOAD_PARTS_LABELS;
|
|
5762
|
-
exports.DEFAULT_UPLOAD_SOURCES_LABELS = DEFAULT_UPLOAD_SOURCES_LABELS;
|
|
5763
|
-
exports.DEFAULT_URL_INPUT_DIALOG_LABELS = DEFAULT_URL_INPUT_DIALOG_LABELS;
|
|
5764
5081
|
exports.DEFAULT_VIEWER_LABELS = DEFAULT_VIEWER_LABELS;
|
|
5765
5082
|
exports.DEFAULT_VIEW_SELECTOR_LABELS = DEFAULT_VIEW_SELECTOR_LABELS;
|
|
5766
5083
|
exports.DocStatusIcon = DocStatusIcon;
|
|
@@ -5816,14 +5133,11 @@ exports.ImportProgress = ImportProgress;
|
|
|
5816
5133
|
exports.ImportRow = ImportRow;
|
|
5817
5134
|
exports.ImportRunActions = ImportRunActions;
|
|
5818
5135
|
exports.ImportSummary = ImportSummary;
|
|
5819
|
-
exports.MediaPreviewView = MediaPreviewView;
|
|
5820
5136
|
exports.MoveToFolderDialog = MoveToFolderDialog;
|
|
5821
5137
|
exports.PassageStepper = PassageStepper;
|
|
5822
5138
|
exports.PdfPageNav = PdfPageNav;
|
|
5823
|
-
exports.RejectedFilesList = RejectedFilesList;
|
|
5824
5139
|
exports.RelatedDocsCell = RelatedDocsCell;
|
|
5825
5140
|
exports.SELECTION_COL_ID = SELECTION_COL_ID;
|
|
5826
|
-
exports.SelectedFilesList = SelectedFilesList;
|
|
5827
5141
|
exports.TagColumnHeader = TagColumnHeader;
|
|
5828
5142
|
exports.TagFormField = TagFormField;
|
|
5829
5143
|
exports.TagFormFooter = TagFormFooter;
|
|
@@ -5845,19 +5159,6 @@ exports.TransferProgressView = TransferProgressView;
|
|
|
5845
5159
|
exports.TransferReferencesChooser = TransferReferencesChooser;
|
|
5846
5160
|
exports.TransferResumeBanner = TransferResumeBanner;
|
|
5847
5161
|
exports.TransferScopeChooser = TransferScopeChooser;
|
|
5848
|
-
exports.UploadBrowseButtons = UploadBrowseButtons;
|
|
5849
|
-
exports.UploadContainer = UploadContainer;
|
|
5850
|
-
exports.UploadDropArea = UploadDropArea;
|
|
5851
|
-
exports.UploadErrorMessage = UploadErrorMessage;
|
|
5852
|
-
exports.UploadFooterBar = UploadFooterBar;
|
|
5853
|
-
exports.UploadFrame = UploadFrame;
|
|
5854
|
-
exports.UploadProgress = UploadProgress;
|
|
5855
|
-
exports.UploadShareNote = UploadShareNote;
|
|
5856
|
-
exports.UploadSourcePicker = UploadSourcePicker;
|
|
5857
|
-
exports.UploadSourceSection = UploadSourceSection;
|
|
5858
|
-
exports.UploadUrlButton = UploadUrlButton;
|
|
5859
|
-
exports.UrlDialogTitle = UrlDialogTitle;
|
|
5860
|
-
exports.UrlInputDialogView = UrlInputDialogView;
|
|
5861
5162
|
exports.ViewSelectorMenu = ViewSelectorMenu;
|
|
5862
5163
|
exports.ViewerControlBar = ViewerControlBar;
|
|
5863
5164
|
exports.ViewerFrame = ViewerFrame;
|
|
@@ -5888,5 +5189,5 @@ exports.upsertView = upsertView;
|
|
|
5888
5189
|
exports.useGridViews = useGridViews;
|
|
5889
5190
|
exports.visibleColumns = visibleColumns;
|
|
5890
5191
|
exports.widthsMatch = widthsMatch;
|
|
5891
|
-
//# sourceMappingURL=chunk-
|
|
5892
|
-
//# sourceMappingURL=chunk-
|
|
5192
|
+
//# sourceMappingURL=chunk-NPLGB4LI.cjs.map
|
|
5193
|
+
//# sourceMappingURL=chunk-NPLGB4LI.cjs.map
|