@flytedan/flytebot-design-system 0.78.1 → 0.80.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/dist/index.js CHANGED
@@ -3292,6 +3292,7 @@ function RowActionCell({ action }) {
3292
3292
  return /* @__PURE__ */ jsx46("td", { className: "fd-table-action", children: action ? /* @__PURE__ */ jsx46(RowActionButton, { action, size: "sm" }) : null });
3293
3293
  }
3294
3294
  var cellOf = (c, row) => c.render ? c.render(row) : row[c.key];
3295
+ var cellClassOf = (c) => [c.numeric ? "is-num" : "", c.noWrap ? "fd-table-nowrap" : ""].filter(Boolean).join(" ") || void 0;
3295
3296
  var cardCellOf = (c, row) => c.phoneRender ? c.phoneRender(row) : cellOf(c, row);
3296
3297
  function rowInteraction(row, onRowClick) {
3297
3298
  if (!onRowClick) return {};
@@ -3375,7 +3376,7 @@ function DataTable({
3375
3376
  rowAction ? /* @__PURE__ */ jsx46("th", { scope: "col", className: "fd-table-action-head", children: /* @__PURE__ */ jsx46("span", { className: "fd-sr-only", children: "Actions" }) }) : null
3376
3377
  ] }) }),
3377
3378
  /* @__PURE__ */ jsx46("tbody", { className: stale ? "fd-stale" : void 0, children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsxs37("tr", { children: [
3378
- columns.map((c) => /* @__PURE__ */ jsx46("td", { className: c.numeric ? "is-num" : "", children: /* @__PURE__ */ jsx46("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)),
3379
+ columns.map((c) => /* @__PURE__ */ jsx46("td", { className: cellClassOf(c), children: /* @__PURE__ */ jsx46("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)),
3379
3380
  rowAction ? /* @__PURE__ */ jsx46("td", { className: "fd-table-action" }) : null
3380
3381
  ] }, i)) : rows.map((r) => /* @__PURE__ */ jsxs37(
3381
3382
  "tr",
@@ -3384,7 +3385,7 @@ function DataTable({
3384
3385
  title: rowTitle ? rowTitle(r) : void 0,
3385
3386
  ...rowInteraction(r, onRowClick),
3386
3387
  children: [
3387
- columns.map((c) => /* @__PURE__ */ jsx46("td", { className: c.numeric ? "is-num" : "", children: cellOf(c, r) }, c.key)),
3388
+ columns.map((c) => /* @__PURE__ */ jsx46("td", { className: cellClassOf(c), children: cellOf(c, r) }, c.key)),
3388
3389
  rowAction ? /* @__PURE__ */ jsx46(RowActionCell, { action: rowAction(r) }) : null
3389
3390
  ]
3390
3391
  },
@@ -3436,7 +3437,7 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
3436
3437
  ...rowInteraction(r, onRowClick),
3437
3438
  children: [
3438
3439
  /* @__PURE__ */ jsx46("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ jsx46("span", { className: c.numeric ? "is-num" : void 0, children: cardCellOf(c, r) }, c.key)) }),
3439
- secondary.length ? /* @__PURE__ */ jsx46("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ jsxs37("span", { className: c.numeric ? "is-num" : void 0, children: [
3440
+ secondary.length ? /* @__PURE__ */ jsx46("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ jsxs37("span", { className: cellClassOf(c), children: [
3440
3441
  /* @__PURE__ */ jsx46("span", { className: "fd-dt-card-label", children: c.label }),
3441
3442
  " ",
3442
3443
  cardCellOf(c, r)
@@ -14229,9 +14230,155 @@ function AgentChatPanel({
14229
14230
  );
14230
14231
  }
14231
14232
 
14232
- // src/components/files/FileViewer.tsx
14233
+ // src/components/chat/QueryResultCard.tsx
14233
14234
  import * as React81 from "react";
14234
14235
  import { jsx as jsx107, jsxs as jsxs94 } from "react/jsx-runtime";
14236
+ var STATUS2 = {
14237
+ queued: { label: "Queued", tone: "neutral" },
14238
+ running: { label: "Running", tone: "info" },
14239
+ done: { label: "Done", tone: "success" },
14240
+ failed: { label: "Failed", tone: "danger" },
14241
+ canceled: { label: "Stopped", tone: "neutral" }
14242
+ };
14243
+ var QUERY_EMPTY_MESSAGE = "No rows to show.";
14244
+ function useElapsed(status, startedAt) {
14245
+ const [now, setNow] = React81.useState(() => Date.now());
14246
+ const running = status === "running" && startedAt != null;
14247
+ React81.useEffect(() => {
14248
+ if (!running) return;
14249
+ const tick = setInterval(() => setNow(Date.now()), 1e3);
14250
+ return () => clearInterval(tick);
14251
+ }, [running]);
14252
+ if (!running) return null;
14253
+ return formatDuration(Math.max(0, now - Date.parse(startedAt)));
14254
+ }
14255
+ function QueryResultCard({
14256
+ title,
14257
+ status,
14258
+ startedAt,
14259
+ failureMessage,
14260
+ facts = [],
14261
+ columns,
14262
+ rows = [],
14263
+ rowKey = "id",
14264
+ actions
14265
+ }) {
14266
+ const { label, tone } = STATUS2[status];
14267
+ const elapsed = useElapsed(status, startedAt);
14268
+ const empty = status === "done" && facts.length === 0 && rows.length === 0;
14269
+ return /* @__PURE__ */ jsxs94("div", { className: "fd-stack fd-gap-sm", role: "group", "aria-label": `Query: ${title}`, children: [
14270
+ /* @__PURE__ */ jsxs94("div", { className: "fd-row fd-wrap fd-justify-between fd-align-center fd-gap-sm", children: [
14271
+ /* @__PURE__ */ jsx107("span", { className: "fd-body-sm", style: { overflowWrap: "anywhere", minWidth: 0 }, children: title }),
14272
+ /* @__PURE__ */ jsx107(Badge, { tone, dot: status === "running", children: elapsed === null ? label : `${label} \xB7 ${elapsed}` })
14273
+ ] }),
14274
+ failureMessage ? /* @__PURE__ */ jsx107("p", { className: "fd-body-sm fd-danger", children: failureMessage }) : null,
14275
+ facts.length === 0 ? null : /* @__PURE__ */ jsx107(FactList, { facts }),
14276
+ rows.length === 0 || !columns ? null : /* @__PURE__ */ jsx107(DataTable, { compact: true, columns, rows, rowKey }),
14277
+ empty ? /* @__PURE__ */ jsx107("p", { className: "fd-body-sm fd-muted", children: QUERY_EMPTY_MESSAGE }) : null,
14278
+ actions ? /* @__PURE__ */ jsx107("div", { className: "fd-row fd-wrap fd-gap-sm", children: actions }) : null
14279
+ ] });
14280
+ }
14281
+
14282
+ // src/components/chat/CsvCard.tsx
14283
+ import * as React83 from "react";
14284
+
14285
+ // src/kits/exports/exportState.ts
14286
+ import * as React82 from "react";
14287
+
14288
+ // src/kits/exports/exportJob.ts
14289
+ function isLiveExport(job) {
14290
+ return job.status === "PENDING" || job.status === "RUNNING";
14291
+ }
14292
+ function isExpiredExport(job, now) {
14293
+ return job.expiresAt !== null && Date.parse(job.expiresAt) <= now;
14294
+ }
14295
+
14296
+ // src/kits/exports/exportState.ts
14297
+ function exportStateOf(job, now) {
14298
+ switch (job.status) {
14299
+ case "PENDING":
14300
+ return "queued";
14301
+ case "RUNNING":
14302
+ return "preparing";
14303
+ case "FAILED":
14304
+ return "failed";
14305
+ case "SUCCEEDED":
14306
+ return isExpiredExport(job, now) ? "expired" : "ready";
14307
+ }
14308
+ }
14309
+ function useExpiryClock(job) {
14310
+ const [now, setNow] = React82.useState(() => Date.now());
14311
+ const { status, expiresAt } = job;
14312
+ React82.useEffect(() => {
14313
+ if (status !== "SUCCEEDED" || expiresAt === null) return;
14314
+ const wait = Date.parse(expiresAt) - Date.now();
14315
+ if (wait <= 0) return;
14316
+ const timer = setTimeout(() => setNow(Date.now()), wait);
14317
+ return () => clearTimeout(timer);
14318
+ }, [status, expiresAt]);
14319
+ return now;
14320
+ }
14321
+ function useLastListed(listed) {
14322
+ const [last, setLast] = React82.useState(listed);
14323
+ if (listed !== void 0 && listed !== last) setLast(listed);
14324
+ return listed ?? last;
14325
+ }
14326
+ function useShownExport(held, exports, refresh2) {
14327
+ const lastListed = useLastListed(exports.find((candidate) => candidate.id === held.id));
14328
+ const unlisted = isLiveExport(held) && lastListed === void 0;
14329
+ React82.useEffect(() => {
14330
+ if (unlisted) refresh2();
14331
+ }, [unlisted, refresh2]);
14332
+ return isLiveExport(held) && lastListed !== void 0 ? lastListed : held;
14333
+ }
14334
+
14335
+ // src/components/chat/CsvCard.tsx
14336
+ import { jsx as jsx108, jsxs as jsxs95 } from "react/jsx-runtime";
14337
+ var STATE = {
14338
+ queued: { label: "Queued", tone: "neutral" },
14339
+ preparing: { label: "Preparing", tone: "info" },
14340
+ ready: { label: "Ready", tone: "success" },
14341
+ expired: { label: "Expired", tone: "neutral" },
14342
+ failed: { label: "Failed", tone: "danger" }
14343
+ };
14344
+ var CSV_FAILED_FALLBACK = "The CSV could not be made.";
14345
+ var CSV_KEPT_NOTE = "Kept 24 hours";
14346
+ function CsvCard({ job, onDownload }) {
14347
+ const [downloading, setDownloading] = React83.useState(false);
14348
+ const now = useExpiryClock(job);
14349
+ const state = exportStateOf(job, now);
14350
+ const { label, tone } = STATE[state];
14351
+ const facts = job.rowCount === null ? [] : [{ label: "Rows", value: job.rowCount.toLocaleString("en-US") }];
14352
+ function download() {
14353
+ setDownloading(true);
14354
+ void onDownload(job.id).finally(() => setDownloading(false));
14355
+ }
14356
+ return /* @__PURE__ */ jsxs95("div", { className: "fd-stack fd-gap-sm", role: "group", "aria-label": `CSV: ${job.fileName}`, children: [
14357
+ /* @__PURE__ */ jsxs95("div", { className: "fd-row fd-wrap fd-justify-between fd-align-center fd-gap-sm", children: [
14358
+ /* @__PURE__ */ jsx108("span", { className: "fd-body-sm fd-mono", style: { overflowWrap: "anywhere", minWidth: 0 }, children: job.fileName }),
14359
+ /* @__PURE__ */ jsx108(Badge, { tone, dot: state === "preparing", children: label })
14360
+ ] }),
14361
+ state === "failed" ? /* @__PURE__ */ jsx108("p", { className: "fd-body-sm fd-danger", children: job.failureMessage ?? CSV_FAILED_FALLBACK }) : null,
14362
+ facts.length === 0 ? null : /* @__PURE__ */ jsx108(FactList, { facts }),
14363
+ state === "ready" ? /* @__PURE__ */ jsx108("p", { className: "fd-body-sm fd-muted", children: CSV_KEPT_NOTE }) : null,
14364
+ /* @__PURE__ */ jsx108("div", { className: "fd-row fd-wrap fd-gap-sm", children: /* @__PURE__ */ jsx108(
14365
+ Button,
14366
+ {
14367
+ size: "sm",
14368
+ variant: "secondary",
14369
+ icon: "download-simple",
14370
+ disabled: state !== "ready",
14371
+ loading: downloading,
14372
+ onClick: download,
14373
+ children: "Download"
14374
+ }
14375
+ ) })
14376
+ ] });
14377
+ }
14378
+
14379
+ // src/components/files/FileViewer.tsx
14380
+ import * as React84 from "react";
14381
+ import { jsx as jsx109, jsxs as jsxs96 } from "react/jsx-runtime";
14235
14382
  function previewKindOf(file) {
14236
14383
  const mime = (file.mime || "").toLowerCase();
14237
14384
  const ext = extensionOf(file.name || "");
@@ -14287,13 +14434,13 @@ function parseDelimited(text, delimiter) {
14287
14434
  return rows;
14288
14435
  }
14289
14436
  function usePreview(file, kind, resolveUrl) {
14290
- const [state, setState] = React81.useState({ status: "loading" });
14291
- const [attempt, setAttempt] = React81.useState(0);
14292
- const resolveRef = React81.useRef(resolveUrl);
14293
- React81.useEffect(() => {
14437
+ const [state, setState] = React84.useState({ status: "loading" });
14438
+ const [attempt, setAttempt] = React84.useState(0);
14439
+ const resolveRef = React84.useRef(resolveUrl);
14440
+ React84.useEffect(() => {
14294
14441
  resolveRef.current = resolveUrl;
14295
14442
  }, [resolveUrl]);
14296
- React81.useEffect(() => {
14443
+ React84.useEffect(() => {
14297
14444
  if (kind === "none") {
14298
14445
  setState({ status: "ready" });
14299
14446
  return;
@@ -14323,19 +14470,19 @@ function usePreview(file, kind, resolveUrl) {
14323
14470
  if (ac) ac.abort();
14324
14471
  };
14325
14472
  }, [file.id, kind, attempt]);
14326
- return { ...state, retry: React81.useCallback(() => setAttempt((a) => a + 1), []) };
14473
+ return { ...state, retry: React84.useCallback(() => setAttempt((a) => a + 1), []) };
14327
14474
  }
14328
14475
  function PreviewBody({ file, kind, state }) {
14329
- if (kind === "image") return /* @__PURE__ */ jsx107("img", { className: "fd-fv-image", src: state.url, alt: file.name || "Preview" });
14330
- if (kind === "pdf") return /* @__PURE__ */ jsx107("iframe", { className: "fd-fv-pdf", src: state.url, title: file.name || "PDF preview" });
14331
- if (kind === "markdown") return /* @__PURE__ */ jsx107(Markdown, { className: "fd-fv-markdown", source: state.text || "" });
14476
+ if (kind === "image") return /* @__PURE__ */ jsx109("img", { className: "fd-fv-image", src: state.url, alt: file.name || "Preview" });
14477
+ if (kind === "pdf") return /* @__PURE__ */ jsx109("iframe", { className: "fd-fv-pdf", src: state.url, title: file.name || "PDF preview" });
14478
+ if (kind === "markdown") return /* @__PURE__ */ jsx109(Markdown, { className: "fd-fv-markdown", source: state.text || "" });
14332
14479
  if (kind === "json") {
14333
14480
  let pretty = state.text || "";
14334
14481
  try {
14335
14482
  pretty = JSON.stringify(JSON.parse(pretty), null, 2);
14336
14483
  } catch {
14337
14484
  }
14338
- return /* @__PURE__ */ jsx107(CodeBlock, { code: pretty, language: "json" });
14485
+ return /* @__PURE__ */ jsx109(CodeBlock, { code: pretty, language: "json" });
14339
14486
  }
14340
14487
  if (kind === "csv") {
14341
14488
  const tsv = extensionOf(file.name || "") === "tsv" || (file.mime || "").toLowerCase().includes("tab-separated");
@@ -14343,12 +14490,12 @@ function PreviewBody({ file, kind, state }) {
14343
14490
  const head = rows[0] || [];
14344
14491
  const dataRows = rows.slice(1);
14345
14492
  const shown = dataRows.slice(0, FILE_VIEWER_CSV_ROW_LIMIT);
14346
- return /* @__PURE__ */ jsxs94("div", { className: "fd-fv-csv", children: [
14347
- /* @__PURE__ */ jsxs94("table", { className: "fd-fv-csv-table", children: [
14348
- /* @__PURE__ */ jsx107("thead", { children: /* @__PURE__ */ jsx107("tr", { children: head.map((c, i) => /* @__PURE__ */ jsx107("th", { children: c }, i)) }) }),
14349
- /* @__PURE__ */ jsx107("tbody", { children: shown.map((r, ri) => /* @__PURE__ */ jsx107("tr", { children: head.map((_, ci) => /* @__PURE__ */ jsx107("td", { children: r[ci] ?? "" }, ci)) }, ri)) })
14493
+ return /* @__PURE__ */ jsxs96("div", { className: "fd-fv-csv", children: [
14494
+ /* @__PURE__ */ jsxs96("table", { className: "fd-fv-csv-table", children: [
14495
+ /* @__PURE__ */ jsx109("thead", { children: /* @__PURE__ */ jsx109("tr", { children: head.map((c, i) => /* @__PURE__ */ jsx109("th", { children: c }, i)) }) }),
14496
+ /* @__PURE__ */ jsx109("tbody", { children: shown.map((r, ri) => /* @__PURE__ */ jsx109("tr", { children: head.map((_, ci) => /* @__PURE__ */ jsx109("td", { children: r[ci] ?? "" }, ci)) }, ri)) })
14350
14497
  ] }),
14351
- dataRows.length > FILE_VIEWER_CSV_ROW_LIMIT ? /* @__PURE__ */ jsxs94("p", { className: "fd-fv-csv-note fd-body-sm fd-muted", children: [
14498
+ dataRows.length > FILE_VIEWER_CSV_ROW_LIMIT ? /* @__PURE__ */ jsxs96("p", { className: "fd-fv-csv-note fd-body-sm fd-muted", children: [
14352
14499
  "Showing the first ",
14353
14500
  FILE_VIEWER_CSV_ROW_LIMIT.toLocaleString(),
14354
14501
  " of ",
@@ -14357,24 +14504,24 @@ function PreviewBody({ file, kind, state }) {
14357
14504
  ] }) : null
14358
14505
  ] });
14359
14506
  }
14360
- if (kind === "text") return /* @__PURE__ */ jsx107(CodeBlock, { code: state.text || "", language: extensionOf(file.name || "") || void 0 });
14361
- return /* @__PURE__ */ jsxs94("div", { className: "fd-fv-fallback", children: [
14362
- /* @__PURE__ */ jsx107("span", { className: "fd-fv-fallback-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx107("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
14363
- /* @__PURE__ */ jsx107("span", { className: "fd-fv-fallback-title", children: "No preview available" }),
14364
- /* @__PURE__ */ jsxs94("span", { className: "fd-fv-fallback-meta", children: [
14507
+ if (kind === "text") return /* @__PURE__ */ jsx109(CodeBlock, { code: state.text || "", language: extensionOf(file.name || "") || void 0 });
14508
+ return /* @__PURE__ */ jsxs96("div", { className: "fd-fv-fallback", children: [
14509
+ /* @__PURE__ */ jsx109("span", { className: "fd-fv-fallback-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx109("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
14510
+ /* @__PURE__ */ jsx109("span", { className: "fd-fv-fallback-title", children: "No preview available" }),
14511
+ /* @__PURE__ */ jsxs96("span", { className: "fd-fv-fallback-meta", children: [
14365
14512
  file.mime || "Unknown type",
14366
14513
  file.size ? " \xB7 " + formatBytes(file.size) : ""
14367
14514
  ] })
14368
14515
  ] });
14369
14516
  }
14370
14517
  function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", onClose, actions, className = "" }) {
14371
- const kind = React81.useMemo(() => previewKindOf(file), [file]);
14518
+ const kind = React84.useMemo(() => previewKindOf(file), [file]);
14372
14519
  const preview = usePreview(file, kind, resolveUrl);
14373
- const [tab, setTab] = React81.useState("preview");
14374
- const [downloading, setDownloading] = React81.useState(false);
14375
- const [downloadError, setDownloadError] = React81.useState(null);
14520
+ const [tab, setTab] = React84.useState("preview");
14521
+ const [downloading, setDownloading] = React84.useState(false);
14522
+ const [downloadError, setDownloadError] = React84.useState(null);
14376
14523
  const hasSide = sidePanel != null;
14377
- React81.useEffect(() => {
14524
+ React84.useEffect(() => {
14378
14525
  setTab("preview");
14379
14526
  }, [file.id]);
14380
14527
  const download = () => {
@@ -14390,29 +14537,29 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
14390
14537
  a.remove();
14391
14538
  }).catch((err) => setDownloadError(err && err.message || "Download failed.")).finally(() => setDownloading(false));
14392
14539
  };
14393
- return /* @__PURE__ */ jsxs94(
14540
+ return /* @__PURE__ */ jsxs96(
14394
14541
  "section",
14395
14542
  {
14396
14543
  className: ["fd-fv", hasSide && tab === "side" ? "is-tab-side" : "is-tab-preview", className].filter(Boolean).join(" "),
14397
14544
  "aria-label": file.name || "File",
14398
14545
  children: [
14399
- /* @__PURE__ */ jsxs94("header", { className: "fd-fv-head", children: [
14400
- /* @__PURE__ */ jsx107("span", { className: "fd-fv-head-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx107("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
14401
- /* @__PURE__ */ jsxs94("span", { className: "fd-fv-head-titles", children: [
14402
- /* @__PURE__ */ jsx107("span", { className: "fd-fv-head-title", title: file.name, children: file.name }),
14403
- /* @__PURE__ */ jsxs94("span", { className: "fd-fv-head-meta", children: [
14546
+ /* @__PURE__ */ jsxs96("header", { className: "fd-fv-head", children: [
14547
+ /* @__PURE__ */ jsx109("span", { className: "fd-fv-head-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx109("i", { className: "ph ph-" + iconForMime(file.mime, file.name) }) }),
14548
+ /* @__PURE__ */ jsxs96("span", { className: "fd-fv-head-titles", children: [
14549
+ /* @__PURE__ */ jsx109("span", { className: "fd-fv-head-title", title: file.name, children: file.name }),
14550
+ /* @__PURE__ */ jsxs96("span", { className: "fd-fv-head-meta", children: [
14404
14551
  file.mime || "Unknown type",
14405
14552
  file.size ? " \xB7 " + formatBytes(file.size) : ""
14406
14553
  ] })
14407
14554
  ] }),
14408
- /* @__PURE__ */ jsxs94("span", { className: "fd-fv-head-actions", children: [
14555
+ /* @__PURE__ */ jsxs96("span", { className: "fd-fv-head-actions", children: [
14409
14556
  actions,
14410
- /* @__PURE__ */ jsx107(Button, { variant: "secondary", size: "sm", icon: "download-simple", loading: downloading, onClick: download, children: "Download" }),
14411
- onClose ? /* @__PURE__ */ jsx107(IconButton, { icon: "x", label: "Close", onClick: onClose }) : null
14557
+ /* @__PURE__ */ jsx109(Button, { variant: "secondary", size: "sm", icon: "download-simple", loading: downloading, onClick: download, children: "Download" }),
14558
+ onClose ? /* @__PURE__ */ jsx109(IconButton, { icon: "x", label: "Close", onClick: onClose }) : null
14412
14559
  ] })
14413
14560
  ] }),
14414
- downloadError ? /* @__PURE__ */ jsx107("div", { className: "fd-fv-download-error", role: "alert", children: downloadError }) : null,
14415
- hasSide ? /* @__PURE__ */ jsx107(
14561
+ downloadError ? /* @__PURE__ */ jsx109("div", { className: "fd-fv-download-error", role: "alert", children: downloadError }) : null,
14562
+ hasSide ? /* @__PURE__ */ jsx109(
14416
14563
  Tabs,
14417
14564
  {
14418
14565
  className: "fd-fv-tabs",
@@ -14421,19 +14568,19 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
14421
14568
  onChange: (v) => setTab(v)
14422
14569
  }
14423
14570
  ) : null,
14424
- /* @__PURE__ */ jsxs94("div", { className: "fd-fv-body", children: [
14425
- /* @__PURE__ */ jsx107("div", { className: "fd-fv-preview", role: "region", "aria-label": "Preview of " + (file.name || "file"), children: /* @__PURE__ */ jsx107(
14571
+ /* @__PURE__ */ jsxs96("div", { className: "fd-fv-body", children: [
14572
+ /* @__PURE__ */ jsx109("div", { className: "fd-fv-preview", role: "region", "aria-label": "Preview of " + (file.name || "file"), children: /* @__PURE__ */ jsx109(
14426
14573
  LoadingRegion,
14427
14574
  {
14428
14575
  state: preview.status === "loading" ? "loading" : preview.status === "error" ? "error" : "ready",
14429
14576
  error: preview.error,
14430
14577
  label: "Loading preview of " + (file.name || "file"),
14431
14578
  onRetry: preview.status === "error" ? preview.retry : void 0,
14432
- skeleton: /* @__PURE__ */ jsx107(Skeleton, { shape: "card", h: 220 }),
14433
- children: /* @__PURE__ */ jsx107(PreviewBody, { file, kind, state: preview })
14579
+ skeleton: /* @__PURE__ */ jsx109(Skeleton, { shape: "card", h: 220 }),
14580
+ children: /* @__PURE__ */ jsx109(PreviewBody, { file, kind, state: preview })
14434
14581
  }
14435
14582
  ) }),
14436
- hasSide ? /* @__PURE__ */ jsx107("div", { className: "fd-fv-side", role: "region", "aria-label": sidePanelLabel, children: sidePanel }) : null
14583
+ hasSide ? /* @__PURE__ */ jsx109("div", { className: "fd-fv-side", role: "region", "aria-label": sidePanelLabel, children: sidePanel }) : null
14437
14584
  ] })
14438
14585
  ]
14439
14586
  }
@@ -14441,8 +14588,8 @@ function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = "Details", o
14441
14588
  }
14442
14589
 
14443
14590
  // src/components/files/FileBrowser.tsx
14444
- import * as React82 from "react";
14445
- import { Fragment as Fragment32, jsx as jsx108, jsxs as jsxs95 } from "react/jsx-runtime";
14591
+ import * as React85 from "react";
14592
+ import { Fragment as Fragment32, jsx as jsx110, jsxs as jsxs97 } from "react/jsx-runtime";
14446
14593
  function childrenOf(folders, parentId) {
14447
14594
  return folders.filter((f) => f.parentId === parentId).sort((a, b) => a.name.localeCompare(b.name));
14448
14595
  }
@@ -14514,8 +14661,8 @@ function FolderPickerMenu({
14514
14661
  }) {
14515
14662
  const panel = useInlinePanel();
14516
14663
  const { open: open2, setOpen, ref } = panel;
14517
- return /* @__PURE__ */ jsxs95("span", { className: "fd-fb-menu-anchor", ref, children: [
14518
- /* @__PURE__ */ jsx108(
14664
+ return /* @__PURE__ */ jsxs97("span", { className: "fd-fb-menu-anchor", ref, children: [
14665
+ /* @__PURE__ */ jsx110(
14519
14666
  IconButton,
14520
14667
  {
14521
14668
  icon: "arrows-out-cardinal",
@@ -14527,9 +14674,9 @@ function FolderPickerMenu({
14527
14674
  onClick: () => setOpen((v) => !v)
14528
14675
  }
14529
14676
  ),
14530
- /* @__PURE__ */ jsx108(InlinePanelSurface, { panel, align: "right", offset: 4, width: 220, maxHeight: 280, role: "menu", label, children: /* @__PURE__ */ jsxs95("div", { className: "fd-fb-menu", children: [
14531
- /* @__PURE__ */ jsx108("span", { className: "fd-overline fd-muted fd-fb-menu-title", children: "Move to\u2026" }),
14532
- destinations.map((d) => /* @__PURE__ */ jsxs95(
14677
+ /* @__PURE__ */ jsx110(InlinePanelSurface, { panel, align: "right", offset: 4, width: 220, maxHeight: 280, role: "menu", label, children: /* @__PURE__ */ jsxs97("div", { className: "fd-fb-menu", children: [
14678
+ /* @__PURE__ */ jsx110("span", { className: "fd-overline fd-muted fd-fb-menu-title", children: "Move to\u2026" }),
14679
+ destinations.map((d) => /* @__PURE__ */ jsxs97(
14533
14680
  "button",
14534
14681
  {
14535
14682
  type: "button",
@@ -14541,7 +14688,7 @@ function FolderPickerMenu({
14541
14688
  setOpen(false);
14542
14689
  },
14543
14690
  children: [
14544
- /* @__PURE__ */ jsx108("i", { className: "ph ph-" + (d.id == null ? "house-simple" : "folder-simple"), "aria-hidden": "true" }),
14691
+ /* @__PURE__ */ jsx110("i", { className: "ph ph-" + (d.id == null ? "house-simple" : "folder-simple"), "aria-hidden": "true" }),
14545
14692
  d.name
14546
14693
  ]
14547
14694
  },
@@ -14551,8 +14698,8 @@ function FolderPickerMenu({
14551
14698
  ] });
14552
14699
  }
14553
14700
  function RowShell({ icon, name, meta, onOpen, draggableId, isDropTarget, onDropPayload, actions, className = "" }) {
14554
- const [over, setOver] = React82.useState(false);
14555
- const dragCounter = React82.useRef(0);
14701
+ const [over, setOver] = React85.useState(false);
14702
+ const dragCounter = React85.useRef(0);
14556
14703
  const dropHandlers = isDropTarget ? {
14557
14704
  onDragEnter: (e) => {
14558
14705
  if (!hasInternalPayload(e)) return;
@@ -14577,8 +14724,8 @@ function RowShell({ icon, name, meta, onOpen, draggableId, isDropTarget, onDropP
14577
14724
  if (payload && onDropPayload) onDropPayload(payload);
14578
14725
  }
14579
14726
  } : {};
14580
- return /* @__PURE__ */ jsxs95("div", { className: ["fd-fb-row", over ? "is-drop-target" : "", className].filter(Boolean).join(" "), ...dropHandlers, children: [
14581
- /* @__PURE__ */ jsxs95(
14727
+ return /* @__PURE__ */ jsxs97("div", { className: ["fd-fb-row", over ? "is-drop-target" : "", className].filter(Boolean).join(" "), ...dropHandlers, children: [
14728
+ /* @__PURE__ */ jsxs97(
14582
14729
  "button",
14583
14730
  {
14584
14731
  type: "button",
@@ -14587,26 +14734,26 @@ function RowShell({ icon, name, meta, onOpen, draggableId, isDropTarget, onDropP
14587
14734
  draggable: !!draggableId,
14588
14735
  onDragStart: draggableId ? (e) => writeDragPayload(e, draggableId) : void 0,
14589
14736
  children: [
14590
- /* @__PURE__ */ jsx108("span", { className: "fd-fb-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx108("i", { className: "ph ph-" + icon }) }),
14591
- /* @__PURE__ */ jsxs95("span", { className: "fd-fb-row-text", children: [
14592
- /* @__PURE__ */ jsx108("span", { className: "fd-fb-row-name", title: name, children: name }),
14593
- meta ? /* @__PURE__ */ jsx108("span", { className: "fd-fb-row-meta", children: meta }) : null
14737
+ /* @__PURE__ */ jsx110("span", { className: "fd-fb-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx110("i", { className: "ph ph-" + icon }) }),
14738
+ /* @__PURE__ */ jsxs97("span", { className: "fd-fb-row-text", children: [
14739
+ /* @__PURE__ */ jsx110("span", { className: "fd-fb-row-name", title: name, children: name }),
14740
+ meta ? /* @__PURE__ */ jsx110("span", { className: "fd-fb-row-meta", children: meta }) : null
14594
14741
  ] })
14595
14742
  ]
14596
14743
  }
14597
14744
  ),
14598
- actions ? /* @__PURE__ */ jsx108("span", { className: "fd-fb-row-actions", children: actions }) : null
14745
+ actions ? /* @__PURE__ */ jsx110("span", { className: "fd-fb-row-actions", children: actions }) : null
14599
14746
  ] });
14600
14747
  }
14601
14748
  function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveInto, canMove }) {
14602
14749
  const kids = childrenOf(folders, folder.id);
14603
- const [expanded, setExpanded] = React82.useState(() => currentFolderId != null && isSelfOrDescendant(folders, folder.id, currentFolderId));
14604
- React82.useEffect(() => {
14750
+ const [expanded, setExpanded] = React85.useState(() => currentFolderId != null && isSelfOrDescendant(folders, folder.id, currentFolderId));
14751
+ React85.useEffect(() => {
14605
14752
  if (currentFolderId != null && isSelfOrDescendant(folders, folder.id, currentFolderId)) setExpanded(true);
14606
14753
  }, [currentFolderId, folder.id, folders]);
14607
14754
  const isCurrent = folder.id === currentFolderId;
14608
- return /* @__PURE__ */ jsxs95("div", { className: "fd-fb-tree-node", children: [
14609
- /* @__PURE__ */ jsx108(
14755
+ return /* @__PURE__ */ jsxs97("div", { className: "fd-fb-tree-node", children: [
14756
+ /* @__PURE__ */ jsx110(
14610
14757
  RowShell,
14611
14758
  {
14612
14759
  icon: folder.id === currentFolderId ? "folder-open" : "folder-simple",
@@ -14616,7 +14763,7 @@ function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveI
14616
14763
  isDropTarget: canMove,
14617
14764
  onDropPayload: (payload) => onMoveInto(payload, folder.id),
14618
14765
  className: ["fd-fb-tree-row", isCurrent ? "is-current" : ""].filter(Boolean).join(" "),
14619
- actions: kids.length ? /* @__PURE__ */ jsx108(
14766
+ actions: kids.length ? /* @__PURE__ */ jsx110(
14620
14767
  IconButton,
14621
14768
  {
14622
14769
  icon: expanded ? "caret-down" : "caret-right",
@@ -14628,7 +14775,7 @@ function TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveI
14628
14775
  ) : void 0
14629
14776
  }
14630
14777
  ),
14631
- expanded && kids.length ? /* @__PURE__ */ jsx108("div", { className: "fd-fb-tree-children", style: { paddingLeft: 14 }, children: kids.map((k) => /* @__PURE__ */ jsx108(
14778
+ expanded && kids.length ? /* @__PURE__ */ jsx110("div", { className: "fd-fb-tree-children", style: { paddingLeft: 14 }, children: kids.map((k) => /* @__PURE__ */ jsx110(
14632
14779
  TreeNode,
14633
14780
  {
14634
14781
  folder: k,
@@ -14667,15 +14814,15 @@ function FileBrowser({
14667
14814
  const canUpload = perm.canUpload !== false && !!onUpload;
14668
14815
  const canRemoveFile = perm.canRemoveFile !== false && !!onRemoveFile;
14669
14816
  const canDeleteFolder = perm.canDeleteFolder !== false && !!onDeleteFolder;
14670
- const [createOpen, setCreateOpen] = React82.useState(false);
14671
- const [createName, setCreateName] = React82.useState("");
14672
- const [renameTarget, setRenameTarget] = React82.useState(null);
14673
- const [renameValue, setRenameValue] = React82.useState("");
14674
- const [deleteTarget, setDeleteTarget] = React82.useState(null);
14675
- const uploadInputRef = React82.useRef(null);
14676
- const crumbFolders = React82.useMemo(() => ancestorsOf(folders, currentFolderId), [folders, currentFolderId]);
14677
- const subfolders = React82.useMemo(() => childrenOf(folders, currentFolderId), [folders, currentFolderId]);
14678
- const currentFiles = React82.useMemo(
14817
+ const [createOpen, setCreateOpen] = React85.useState(false);
14818
+ const [createName, setCreateName] = React85.useState("");
14819
+ const [renameTarget, setRenameTarget] = React85.useState(null);
14820
+ const [renameValue, setRenameValue] = React85.useState("");
14821
+ const [deleteTarget, setDeleteTarget] = React85.useState(null);
14822
+ const uploadInputRef = React85.useRef(null);
14823
+ const crumbFolders = React85.useMemo(() => ancestorsOf(folders, currentFolderId), [folders, currentFolderId]);
14824
+ const subfolders = React85.useMemo(() => childrenOf(folders, currentFolderId), [folders, currentFolderId]);
14825
+ const currentFiles = React85.useMemo(
14679
14826
  () => files.filter((f) => f.folderId === currentFolderId).sort((a, b) => a.name.localeCompare(b.name)),
14680
14827
  [files, currentFolderId]
14681
14828
  );
@@ -14714,10 +14861,10 @@ function FileBrowser({
14714
14861
  if (deleteTarget && onDeleteFolder) onDeleteFolder(deleteTarget);
14715
14862
  setDeleteTarget(null);
14716
14863
  };
14717
- const content = /* @__PURE__ */ jsxs95("div", { className: ["fd-fb", className].filter(Boolean).join(" "), children: [
14718
- /* @__PURE__ */ jsxs95("div", { className: "fd-fb-head", children: [
14719
- /* @__PURE__ */ jsxs95("nav", { className: "fd-fb-crumbs", "aria-label": "Folder path", children: [
14720
- /* @__PURE__ */ jsx108(
14864
+ const content = /* @__PURE__ */ jsxs97("div", { className: ["fd-fb", className].filter(Boolean).join(" "), children: [
14865
+ /* @__PURE__ */ jsxs97("div", { className: "fd-fb-head", children: [
14866
+ /* @__PURE__ */ jsxs97("nav", { className: "fd-fb-crumbs", "aria-label": "Folder path", children: [
14867
+ /* @__PURE__ */ jsx110(
14721
14868
  BreadcrumbCrumb,
14722
14869
  {
14723
14870
  label: "Home",
@@ -14727,7 +14874,7 @@ function FileBrowser({
14727
14874
  onDropPayload: (p) => moveIntoFolder(p, null)
14728
14875
  }
14729
14876
  ),
14730
- crumbFolders.map((f, i) => /* @__PURE__ */ jsx108(
14877
+ crumbFolders.map((f, i) => /* @__PURE__ */ jsx110(
14731
14878
  BreadcrumbCrumb,
14732
14879
  {
14733
14880
  label: f.name,
@@ -14739,11 +14886,11 @@ function FileBrowser({
14739
14886
  f.id
14740
14887
  ))
14741
14888
  ] }),
14742
- /* @__PURE__ */ jsxs95("span", { className: "fd-fb-actions", children: [
14743
- canCreateFolder ? /* @__PURE__ */ jsx108(Button, { variant: "secondary", size: "sm", icon: "folder-simple-plus", onClick: openCreate, children: "New folder" }) : null,
14744
- canUpload ? /* @__PURE__ */ jsxs95(Fragment32, { children: [
14745
- /* @__PURE__ */ jsx108(Button, { variant: "secondary", size: "sm", icon: "upload-simple", onClick: () => uploadInputRef.current && uploadInputRef.current.click(), children: "Upload" }),
14746
- /* @__PURE__ */ jsx108(
14889
+ /* @__PURE__ */ jsxs97("span", { className: "fd-fb-actions", children: [
14890
+ canCreateFolder ? /* @__PURE__ */ jsx110(Button, { variant: "secondary", size: "sm", icon: "folder-simple-plus", onClick: openCreate, children: "New folder" }) : null,
14891
+ canUpload ? /* @__PURE__ */ jsxs97(Fragment32, { children: [
14892
+ /* @__PURE__ */ jsx110(Button, { variant: "secondary", size: "sm", icon: "upload-simple", onClick: () => uploadInputRef.current && uploadInputRef.current.click(), children: "Upload" }),
14893
+ /* @__PURE__ */ jsx110(
14747
14894
  "input",
14748
14895
  {
14749
14896
  ref: uploadInputRef,
@@ -14761,9 +14908,9 @@ function FileBrowser({
14761
14908
  ] }) : null
14762
14909
  ] })
14763
14910
  ] }),
14764
- /* @__PURE__ */ jsxs95("div", { className: "fd-fb-body", children: [
14765
- /* @__PURE__ */ jsxs95("div", { className: "fd-fb-tree", role: "region", "aria-label": "Folder tree", children: [
14766
- /* @__PURE__ */ jsx108(
14911
+ /* @__PURE__ */ jsxs97("div", { className: "fd-fb-body", children: [
14912
+ /* @__PURE__ */ jsxs97("div", { className: "fd-fb-tree", role: "region", "aria-label": "Folder tree", children: [
14913
+ /* @__PURE__ */ jsx110(
14767
14914
  RowShell,
14768
14915
  {
14769
14916
  icon: "house-simple",
@@ -14774,7 +14921,7 @@ function FileBrowser({
14774
14921
  className: ["fd-fb-tree-row", currentFolderId == null ? "is-current" : ""].filter(Boolean).join(" ")
14775
14922
  }
14776
14923
  ),
14777
- childrenOf(folders, null).map((f) => /* @__PURE__ */ jsx108(
14924
+ childrenOf(folders, null).map((f) => /* @__PURE__ */ jsx110(
14778
14925
  TreeNode,
14779
14926
  {
14780
14927
  folder: f,
@@ -14788,18 +14935,18 @@ function FileBrowser({
14788
14935
  f.id
14789
14936
  ))
14790
14937
  ] }),
14791
- /* @__PURE__ */ jsx108("div", { className: "fd-fb-main", role: "region", "aria-label": "Folder contents", children: /* @__PURE__ */ jsx108(
14938
+ /* @__PURE__ */ jsx110("div", { className: "fd-fb-main", role: "region", "aria-label": "Folder contents", children: /* @__PURE__ */ jsx110(
14792
14939
  LoadingRegion,
14793
14940
  {
14794
14941
  state: loading ? "loading" : "ready",
14795
14942
  label: "Loading folder contents",
14796
- skeleton: /* @__PURE__ */ jsxs95("div", { className: "fd-stack", style: { gap: 8, padding: 12 }, children: [
14797
- /* @__PURE__ */ jsx108(Skeleton, { h: 44, radius: "10px" }),
14798
- /* @__PURE__ */ jsx108(Skeleton, { h: 44, radius: "10px" }),
14799
- /* @__PURE__ */ jsx108(Skeleton, { h: 44, radius: "10px" })
14943
+ skeleton: /* @__PURE__ */ jsxs97("div", { className: "fd-stack", style: { gap: 8, padding: 12 }, children: [
14944
+ /* @__PURE__ */ jsx110(Skeleton, { h: 44, radius: "10px" }),
14945
+ /* @__PURE__ */ jsx110(Skeleton, { h: 44, radius: "10px" }),
14946
+ /* @__PURE__ */ jsx110(Skeleton, { h: 44, radius: "10px" })
14800
14947
  ] }),
14801
- children: isEmpty ? /* @__PURE__ */ jsx108(EmptyState, { icon: "folder-open", title: "This folder is empty", children: canUpload ? "Drop files here, or use Upload above." : "Nothing has been filed here yet." }) : /* @__PURE__ */ jsxs95("div", { className: "fd-fb-list", children: [
14802
- subfolders.map((f) => /* @__PURE__ */ jsx108(
14948
+ children: isEmpty ? /* @__PURE__ */ jsx110(EmptyState, { icon: "folder-open", title: "This folder is empty", children: canUpload ? "Drop files here, or use Upload above." : "Nothing has been filed here yet." }) : /* @__PURE__ */ jsxs97("div", { className: "fd-fb-list", children: [
14949
+ subfolders.map((f) => /* @__PURE__ */ jsx110(
14803
14950
  RowShell,
14804
14951
  {
14805
14952
  icon: "folder-simple",
@@ -14808,9 +14955,9 @@ function FileBrowser({
14808
14955
  draggableId: canMove ? { kind: "folder", id: f.id } : void 0,
14809
14956
  isDropTarget: canMove,
14810
14957
  onDropPayload: (p) => moveIntoFolder(p, f.id),
14811
- actions: /* @__PURE__ */ jsxs95(Fragment32, { children: [
14812
- canRenameFolder ? /* @__PURE__ */ jsx108(IconButton, { icon: "pencil-simple", label: "Rename " + f.name, size: "sm", variant: "ghost", onClick: () => openRename(f) }) : null,
14813
- canMove ? /* @__PURE__ */ jsx108(
14958
+ actions: /* @__PURE__ */ jsxs97(Fragment32, { children: [
14959
+ canRenameFolder ? /* @__PURE__ */ jsx110(IconButton, { icon: "pencil-simple", label: "Rename " + f.name, size: "sm", variant: "ghost", onClick: () => openRename(f) }) : null,
14960
+ canMove ? /* @__PURE__ */ jsx110(
14814
14961
  FolderPickerMenu,
14815
14962
  {
14816
14963
  label: "Move " + f.name,
@@ -14818,12 +14965,12 @@ function FileBrowser({
14818
14965
  onPick: (target) => moveIntoFolder({ kind: "folder", id: f.id }, target)
14819
14966
  }
14820
14967
  ) : null,
14821
- canDeleteFolder ? /* @__PURE__ */ jsx108(IconButton, { icon: "trash-simple", label: "Delete " + f.name, size: "sm", variant: "ghost", onClick: () => openDelete(f) }) : null
14968
+ canDeleteFolder ? /* @__PURE__ */ jsx110(IconButton, { icon: "trash-simple", label: "Delete " + f.name, size: "sm", variant: "ghost", onClick: () => openDelete(f) }) : null
14822
14969
  ] })
14823
14970
  },
14824
14971
  f.id
14825
14972
  )),
14826
- currentFiles.map((file) => /* @__PURE__ */ jsx108(
14973
+ currentFiles.map((file) => /* @__PURE__ */ jsx110(
14827
14974
  RowShell,
14828
14975
  {
14829
14976
  icon: iconForMime(file.mime, file.name),
@@ -14831,8 +14978,8 @@ function FileBrowser({
14831
14978
  meta: file.size ? formatBytes(file.size) : void 0,
14832
14979
  onOpen: onOpenFile ? () => onOpenFile(file) : void 0,
14833
14980
  draggableId: canMove ? { kind: "file", id: file.id } : void 0,
14834
- actions: /* @__PURE__ */ jsxs95(Fragment32, { children: [
14835
- canMove ? /* @__PURE__ */ jsx108(
14981
+ actions: /* @__PURE__ */ jsxs97(Fragment32, { children: [
14982
+ canMove ? /* @__PURE__ */ jsx110(
14836
14983
  FolderPickerMenu,
14837
14984
  {
14838
14985
  label: "Move " + file.name,
@@ -14840,7 +14987,7 @@ function FileBrowser({
14840
14987
  onPick: (target) => onMoveFile && onMoveFile(file.id, target)
14841
14988
  }
14842
14989
  ) : null,
14843
- canRemoveFile ? /* @__PURE__ */ jsx108(IconButton, { icon: "trash-simple", label: "Remove " + file.name, size: "sm", variant: "ghost", onClick: () => onRemoveFile && onRemoveFile(file) }) : null
14990
+ canRemoveFile ? /* @__PURE__ */ jsx110(IconButton, { icon: "trash-simple", label: "Remove " + file.name, size: "sm", variant: "ghost", onClick: () => onRemoveFile && onRemoveFile(file) }) : null
14844
14991
  ] })
14845
14992
  },
14846
14993
  file.id
@@ -14849,10 +14996,10 @@ function FileBrowser({
14849
14996
  }
14850
14997
  ) })
14851
14998
  ] }),
14852
- /* @__PURE__ */ jsx108(Modal, { open: createOpen, title: "New folder", onClose: () => setCreateOpen(false), footer: /* @__PURE__ */ jsxs95(Fragment32, { children: [
14853
- /* @__PURE__ */ jsx108(Button, { variant: "secondary", onClick: () => setCreateOpen(false), children: "Cancel" }),
14854
- /* @__PURE__ */ jsx108(Button, { onClick: submitCreate, disabled: !createName.trim(), children: "Create" })
14855
- ] }), children: /* @__PURE__ */ jsx108(
14999
+ /* @__PURE__ */ jsx110(Modal, { open: createOpen, title: "New folder", onClose: () => setCreateOpen(false), footer: /* @__PURE__ */ jsxs97(Fragment32, { children: [
15000
+ /* @__PURE__ */ jsx110(Button, { variant: "secondary", onClick: () => setCreateOpen(false), children: "Cancel" }),
15001
+ /* @__PURE__ */ jsx110(Button, { onClick: submitCreate, disabled: !createName.trim(), children: "Create" })
15002
+ ] }), children: /* @__PURE__ */ jsx110(
14856
15003
  "input",
14857
15004
  {
14858
15005
  className: "fd-fb-input",
@@ -14866,10 +15013,10 @@ function FileBrowser({
14866
15013
  autoFocus: true
14867
15014
  }
14868
15015
  ) }),
14869
- /* @__PURE__ */ jsx108(Modal, { open: renameTarget != null, title: "Rename folder", onClose: () => setRenameTarget(null), footer: /* @__PURE__ */ jsxs95(Fragment32, { children: [
14870
- /* @__PURE__ */ jsx108(Button, { variant: "secondary", onClick: () => setRenameTarget(null), children: "Cancel" }),
14871
- /* @__PURE__ */ jsx108(Button, { onClick: submitRename, disabled: !renameValue.trim(), children: "Save" })
14872
- ] }), children: /* @__PURE__ */ jsx108(
15016
+ /* @__PURE__ */ jsx110(Modal, { open: renameTarget != null, title: "Rename folder", onClose: () => setRenameTarget(null), footer: /* @__PURE__ */ jsxs97(Fragment32, { children: [
15017
+ /* @__PURE__ */ jsx110(Button, { variant: "secondary", onClick: () => setRenameTarget(null), children: "Cancel" }),
15018
+ /* @__PURE__ */ jsx110(Button, { onClick: submitRename, disabled: !renameValue.trim(), children: "Save" })
15019
+ ] }), children: /* @__PURE__ */ jsx110(
14873
15020
  "input",
14874
15021
  {
14875
15022
  className: "fd-fb-input",
@@ -14883,22 +15030,22 @@ function FileBrowser({
14883
15030
  autoFocus: true
14884
15031
  }
14885
15032
  ) }),
14886
- /* @__PURE__ */ jsx108(
15033
+ /* @__PURE__ */ jsx110(
14887
15034
  Modal,
14888
15035
  {
14889
15036
  open: deleteTarget != null,
14890
15037
  title: deleteTarget ? "Delete \u201C" + deleteTarget.name + "\u201D?" : "Delete folder?",
14891
15038
  description: "This can't be undone. The folder must be empty.",
14892
15039
  onClose: () => setDeleteTarget(null),
14893
- footer: /* @__PURE__ */ jsxs95(Fragment32, { children: [
14894
- /* @__PURE__ */ jsx108(Button, { variant: "secondary", onClick: () => setDeleteTarget(null), children: "Cancel" }),
14895
- /* @__PURE__ */ jsx108(Button, { variant: "danger", onClick: confirmDelete, children: "Delete" })
15040
+ footer: /* @__PURE__ */ jsxs97(Fragment32, { children: [
15041
+ /* @__PURE__ */ jsx110(Button, { variant: "secondary", onClick: () => setDeleteTarget(null), children: "Cancel" }),
15042
+ /* @__PURE__ */ jsx110(Button, { variant: "danger", onClick: confirmDelete, children: "Delete" })
14896
15043
  ] })
14897
15044
  }
14898
15045
  )
14899
15046
  ] });
14900
15047
  if (!canUpload) return content;
14901
- return /* @__PURE__ */ jsx108(Dropzone, { className: "fd-fb-dropzone", onFiles: (picked) => onUpload && onUpload(picked, currentFolderId), label: "Drop files to upload", children: content });
15048
+ return /* @__PURE__ */ jsx110(Dropzone, { className: "fd-fb-dropzone", onFiles: (picked) => onUpload && onUpload(picked, currentFolderId), label: "Drop files to upload", children: content });
14902
15049
  }
14903
15050
  function BreadcrumbCrumb({
14904
15051
  label,
@@ -14907,8 +15054,8 @@ function BreadcrumbCrumb({
14907
15054
  isDropTarget,
14908
15055
  onDropPayload
14909
15056
  }) {
14910
- const [over, setOver] = React82.useState(false);
14911
- const dragCounter = React82.useRef(0);
15057
+ const [over, setOver] = React85.useState(false);
15058
+ const dragCounter = React85.useRef(0);
14912
15059
  const dropHandlers = isDropTarget ? {
14913
15060
  onDragEnter: (e) => {
14914
15061
  if (!hasInternalPayload(e)) return;
@@ -14933,11 +15080,11 @@ function BreadcrumbCrumb({
14933
15080
  if (payload && onDropPayload) onDropPayload(payload);
14934
15081
  }
14935
15082
  } : {};
14936
- return /* @__PURE__ */ jsx108("span", { className: ["fd-fb-crumb", over ? "is-drop-target" : ""].filter(Boolean).join(" "), ...dropHandlers, children: isCurrent ? /* @__PURE__ */ jsx108("span", { className: "fd-fb-crumb-current", "aria-current": "page", children: label }) : /* @__PURE__ */ jsx108("button", { type: "button", className: "fd-fb-crumb-link", onClick, children: label }) });
15083
+ return /* @__PURE__ */ jsx110("span", { className: ["fd-fb-crumb", over ? "is-drop-target" : ""].filter(Boolean).join(" "), ...dropHandlers, children: isCurrent ? /* @__PURE__ */ jsx110("span", { className: "fd-fb-crumb-current", "aria-current": "page", children: label }) : /* @__PURE__ */ jsx110("button", { type: "button", className: "fd-fb-crumb-link", onClick, children: label }) });
14937
15084
  }
14938
15085
 
14939
15086
  // src/kits/query.ts
14940
- import * as React83 from "react";
15087
+ import * as React86 from "react";
14941
15088
 
14942
15089
  // src/kits/queryUrl.ts
14943
15090
  var historyUrlAdapter = {
@@ -15075,38 +15222,38 @@ function requestFor(params, query, paging, after) {
15075
15222
  }
15076
15223
  var toError = (e) => e instanceof Error ? e : new Error(String(e));
15077
15224
  function useServerTable({ endpoint, params, defaults, deps, prefsKey, paging = "page", url }) {
15078
- const [base] = React83.useState(() => {
15225
+ const [base] = React86.useState(() => {
15079
15226
  const store = PREFS || window.PlannerPrefs;
15080
15227
  const saved = prefsKey && store ? store.getTable(prefsKey) : {};
15081
15228
  return { ...DEFAULTS, ...defaults || {}, ...saved.pageSize ? { pageSize: saved.pageSize } : {}, ...saved.sort ? { sort: saved.sort, dir: saved.dir || "desc" } : {} };
15082
15229
  });
15083
- const [mountParams] = React83.useState(() => url ? (url.adapter ?? historyUrlAdapter).read() : null);
15084
- const address = React83.useRef(mountParams);
15085
- const [query, setQuery] = React83.useState(() => url && mountParams ? readQueryFromUrl(mountParams, url.scope, base, paging) : base);
15086
- const savePref = React83.useCallback((patch2) => {
15230
+ const [mountParams] = React86.useState(() => url ? (url.adapter ?? historyUrlAdapter).read() : null);
15231
+ const address = React86.useRef(mountParams);
15232
+ const [query, setQuery] = React86.useState(() => url && mountParams ? readQueryFromUrl(mountParams, url.scope, base, paging) : base);
15233
+ const savePref = React86.useCallback((patch2) => {
15087
15234
  const store = PREFS || window.PlannerPrefs;
15088
15235
  if (prefsKey && store) store.setTable(prefsKey, patch2);
15089
15236
  }, [prefsKey]);
15090
- const [res, setRes] = React83.useState(null);
15091
- const [loading, setLoading] = React83.useState(true);
15092
- const [loadingMore, setLoadingMore] = React83.useState(false);
15093
- const [failure, setFailure] = React83.useState(null);
15094
- const [reloadToken, setReloadToken] = React83.useState(0);
15095
- const moreController = React83.useRef(null);
15237
+ const [res, setRes] = React86.useState(null);
15238
+ const [loading, setLoading] = React86.useState(true);
15239
+ const [loadingMore, setLoadingMore] = React86.useState(false);
15240
+ const [failure, setFailure] = React86.useState(null);
15241
+ const [reloadToken, setReloadToken] = React86.useState(0);
15242
+ const moreController = React86.useRef(null);
15096
15243
  const depKey = (deps || []).join("|");
15097
15244
  const paramKey = JSON.stringify(params || {});
15098
15245
  const queryKey = JSON.stringify(query);
15099
- const lifetime = React83.useRef(null);
15100
- React83.useEffect(() => {
15246
+ const lifetime = React86.useRef(null);
15247
+ React86.useEffect(() => {
15101
15248
  const controller = new AbortController();
15102
15249
  lifetime.current = controller;
15103
15250
  return () => controller.abort();
15104
15251
  }, []);
15105
- const latest = React83.useRef({ res, loading, query, params, endpoint, url, base });
15106
- React83.useLayoutEffect(() => {
15252
+ const latest = React86.useRef({ res, loading, query, params, endpoint, url, base });
15253
+ React86.useLayoutEffect(() => {
15107
15254
  latest.current = { res, loading, query, params, endpoint, url, base };
15108
15255
  });
15109
- React83.useEffect(() => {
15256
+ React86.useEffect(() => {
15110
15257
  const controller = new AbortController();
15111
15258
  const { signal } = controller;
15112
15259
  setLoading(true);
@@ -15142,7 +15289,7 @@ function useServerTable({ endpoint, params, defaults, deps, prefsKey, paging = "
15142
15289
  };
15143
15290
  }, [endpoint, queryKey, paramKey, depKey, paging, reloadToken]);
15144
15291
  const adapter = url ? url.adapter ?? historyUrlAdapter : null;
15145
- React83.useEffect(() => {
15292
+ React86.useEffect(() => {
15146
15293
  if (!adapter) return;
15147
15294
  return adapter.subscribe((params2) => {
15148
15295
  const { url: u, base: b } = latest.current;
@@ -15492,16 +15639,219 @@ function createVersionStore(initialState, options) {
15492
15639
  }
15493
15640
 
15494
15641
  // src/kits/documentTitle.ts
15495
- import * as React84 from "react";
15642
+ import * as React87 from "react";
15496
15643
  function formatDocumentTitle(routeTitle, appName) {
15497
15644
  return [routeTitle, appName, "Flytedesk"].filter((part2) => !!part2 && part2.length > 0).join(" \xB7 ");
15498
15645
  }
15499
15646
  function useDocumentTitle(routeTitle, appName) {
15500
- React84.useEffect(() => {
15647
+ React87.useEffect(() => {
15501
15648
  if (typeof document === "undefined") return;
15502
15649
  document.title = formatDocumentTitle(routeTitle, appName);
15503
15650
  }, [routeTitle, appName]);
15504
15651
  }
15652
+
15653
+ // src/kits/chatTransport/deadline.ts
15654
+ var CHAT_CALL_DEADLINE_MS = 3e4;
15655
+ var CallDeadlineError = class extends Error {
15656
+ constructor(call, deadlineMs) {
15657
+ super(`${call} did not answer within ${deadlineMs}ms`);
15658
+ this.call = call;
15659
+ this.deadlineMs = deadlineMs;
15660
+ this.name = "CallDeadlineError";
15661
+ }
15662
+ call;
15663
+ deadlineMs;
15664
+ };
15665
+ function withDeadline(call, deadlineMs, work) {
15666
+ let timer;
15667
+ const deadline = new Promise((_resolve, reject) => {
15668
+ timer = setTimeout(() => reject(new CallDeadlineError(call, deadlineMs)), deadlineMs);
15669
+ });
15670
+ return Promise.race([work, deadline]).finally(() => clearTimeout(timer));
15671
+ }
15672
+
15673
+ // src/kits/chatTransport/chatAdapter.ts
15674
+ var CHAT_UNAVAILABLE_MESSAGE = "chat_unavailable";
15675
+ var ChatUnreachableError = class extends Error {
15676
+ constructor(message = CHAT_UNAVAILABLE_MESSAGE) {
15677
+ super(message);
15678
+ this.name = "ChatUnreachableError";
15679
+ }
15680
+ };
15681
+ function createChatAdapter(transport, { onTurnStarted, deadlineMs = CHAT_CALL_DEADLINE_MS } = {}) {
15682
+ const within = (call, work) => withDeadline(call, deadlineMs, work);
15683
+ const common = {
15684
+ async resolveThread(context) {
15685
+ try {
15686
+ const { thread_id } = await within("resolveThread", transport.resolveThread(context));
15687
+ return { thread_id };
15688
+ } catch {
15689
+ throw new Error(CHAT_UNAVAILABLE_MESSAGE);
15690
+ }
15691
+ },
15692
+ async getThread(threadId) {
15693
+ return { messages: await within("getThread", transport.getMessages(threadId)) };
15694
+ },
15695
+ cancelJob: transport.cancelTurn ? (jobId) => within("cancelJob", transport.cancelTurn(jobId)) : void 0
15696
+ };
15697
+ if (transport.streamTurn) {
15698
+ const { streamTurn } = transport;
15699
+ return {
15700
+ ...common,
15701
+ // The engine streams whenever `streamMessage` is present and calls neither of these for a turn that settles.
15702
+ // A streamed turn that answered a job id would have the engine poll one that does not exist: fail loudly.
15703
+ sendMessage: () => Promise.reject(new Error("A streaming chat starts its turns with streamMessage.")),
15704
+ getJob: () => Promise.reject(new Error("A streaming chat has no turn status to poll.")),
15705
+ async streamMessage(threadId, text, handlers, signal, attachments) {
15706
+ let started = false;
15707
+ const markStarted = () => {
15708
+ if (started) return;
15709
+ started = true;
15710
+ onTurnStarted?.();
15711
+ };
15712
+ const accepting = {
15713
+ onToken: (chunk) => (markStarted(), handlers.onToken(chunk)),
15714
+ onStep: handlers.onStep && ((step) => (markStarted(), handlers.onStep(step))),
15715
+ onThinking: handlers.onThinking && ((chunk) => (markStarted(), handlers.onThinking(chunk)))
15716
+ };
15717
+ let result;
15718
+ try {
15719
+ result = await streamTurn(threadId, text, accepting, signal, attachments);
15720
+ } catch (err) {
15721
+ if (err instanceof ChatUnreachableError) throw new Error(CHAT_UNAVAILABLE_MESSAGE);
15722
+ throw err;
15723
+ }
15724
+ if (result.job_id) throw new Error("A streamed turn must end with its final result, not a job to poll.");
15725
+ markStarted();
15726
+ return result;
15727
+ }
15728
+ };
15729
+ }
15730
+ const { startTurn, getTurn } = transport;
15731
+ return {
15732
+ ...common,
15733
+ // `signal` (the engine's Stop-button plumbing) is deliberately not wired to this call: it only starts a dispatch and
15734
+ // never streams, and aborting it could leave a dispatch started server-side with no job id for the engine to track.
15735
+ // Stop is `cancelJob`.
15736
+ async sendMessage(threadId, text, _signal, attachments) {
15737
+ const { jobId } = await within("sendMessage", startTurn(threadId, text, attachments));
15738
+ onTurnStarted?.();
15739
+ return { dispatched: true, job_id: jobId };
15740
+ },
15741
+ async getJob(jobId) {
15742
+ const status = await within("getJob", getTurn(jobId));
15743
+ return status ?? { status: "failed", error: "turn_not_found" };
15744
+ }
15745
+ };
15746
+ }
15747
+
15748
+ // src/kits/chatTransport/useChatThreads.ts
15749
+ import * as React88 from "react";
15750
+ var THREADS_LOAD_FAILED = "Your earlier conversations could not be loaded.";
15751
+ var NEW_THREAD_FAILED = "A new conversation could not be started.";
15752
+ function useChatThreads(transport, { deadlineMs = CHAT_CALL_DEADLINE_MS } = {}) {
15753
+ const toast = useToast();
15754
+ const [threads, setThreads] = React88.useState([]);
15755
+ const [reads, setReads] = React88.useState(0);
15756
+ const transportRef = useLatest(transport);
15757
+ const deadlineRef = useLatest(deadlineMs);
15758
+ const refresh2 = React88.useCallback(() => setReads((n) => n + 1), []);
15759
+ React88.useEffect(() => {
15760
+ const controller = new AbortController();
15761
+ const { signal } = controller;
15762
+ withDeadline("listThreads", deadlineRef.current, transportRef.current.listThreads(signal)).then(
15763
+ (listed) => {
15764
+ if (!signal.aborted) setThreads(listed);
15765
+ },
15766
+ () => {
15767
+ if (!signal.aborted) toast.show(THREADS_LOAD_FAILED, { tone: "error" });
15768
+ }
15769
+ );
15770
+ return () => controller.abort();
15771
+ }, [reads, toast, transportRef, deadlineRef]);
15772
+ const startNewThread = React88.useCallback(
15773
+ (onCreated) => withDeadline("createThread", deadlineRef.current, transportRef.current.createThread()).then(
15774
+ ({ thread_id }) => {
15775
+ onCreated(thread_id);
15776
+ refresh2();
15777
+ },
15778
+ () => toast.show(NEW_THREAD_FAILED, { tone: "error" })
15779
+ ),
15780
+ [deadlineRef, transportRef, refresh2, toast]
15781
+ );
15782
+ return { threads, refresh: refresh2, startNewThread };
15783
+ }
15784
+
15785
+ // src/kits/exports/downloadExport.ts
15786
+ function createExportDownloader({
15787
+ mintUrl,
15788
+ navigate = (url) => window.location.assign(url)
15789
+ }) {
15790
+ return (id) => mintUrl(id).then(
15791
+ (url) => {
15792
+ if (url) navigate(url);
15793
+ },
15794
+ () => {
15795
+ }
15796
+ );
15797
+ }
15798
+
15799
+ // src/kits/exports/useExportJobs.ts
15800
+ import * as React89 from "react";
15801
+ var EXPORT_POLL_INTERVAL_MS = 3e3;
15802
+ var EXPORT_IDLE_POLL_INTERVAL_MS = 3e4;
15803
+ function useExportJobs({ list, acknowledge }) {
15804
+ const [rows, setRows] = React89.useState([]);
15805
+ const listRef = useLatest(list);
15806
+ const acknowledgeRef = useLatest(acknowledge);
15807
+ const reload = React89.useCallback(
15808
+ () => listRef.current().then(
15809
+ (fresh) => setRows(fresh),
15810
+ () => {
15811
+ }
15812
+ ),
15813
+ [listRef]
15814
+ );
15815
+ React89.useEffect(() => {
15816
+ void reload();
15817
+ }, [reload]);
15818
+ const anyLive = rows.some(isLiveExport);
15819
+ React89.useEffect(() => {
15820
+ const timer = setInterval(() => void reload(), anyLive ? EXPORT_POLL_INTERVAL_MS : EXPORT_IDLE_POLL_INTERVAL_MS);
15821
+ return () => clearInterval(timer);
15822
+ }, [anyLive, reload]);
15823
+ const refresh2 = React89.useCallback(() => void reload(), [reload]);
15824
+ const ackExport = React89.useCallback(
15825
+ (id) => void acknowledgeRef.current(id).then(reload),
15826
+ [acknowledgeRef, reload]
15827
+ );
15828
+ return { exports: rows, ackExport, refresh: refresh2 };
15829
+ }
15830
+
15831
+ // src/kits/exports/ExportTray.tsx
15832
+ import * as React90 from "react";
15833
+ import { jsx as jsx111 } from "react/jsx-runtime";
15834
+ var EXPORT_KEPT_NOTE = "Kept for 24 hours";
15835
+ var EXPORT_FAILED_FALLBACK = "Unknown error.";
15836
+ function exportToJob(job, onDownload) {
15837
+ const base = { id: job.id, title: job.title, note: job.note };
15838
+ if (job.status === "SUCCEEDED") {
15839
+ return {
15840
+ ...base,
15841
+ status: "done",
15842
+ action: { label: "Download", icon: "download-simple", onClick: () => onDownload(job.id) },
15843
+ doneNote: EXPORT_KEPT_NOTE
15844
+ };
15845
+ }
15846
+ if (job.status === "FAILED") {
15847
+ return { ...base, status: "failed", failureReason: job.failureMessage ?? EXPORT_FAILED_FALLBACK };
15848
+ }
15849
+ return { ...base, status: "active" };
15850
+ }
15851
+ function ExportTray({ exports, onDownload, onDismiss }) {
15852
+ const jobs2 = React90.useMemo(() => exports.map((job) => exportToJob(job, onDownload)), [exports, onDownload]);
15853
+ return /* @__PURE__ */ jsx111(JobTray, { jobs: jobs2, onDismiss });
15854
+ }
15505
15855
  export {
15506
15856
  AccountMenu,
15507
15857
  AgentChatPanel,
@@ -15521,11 +15871,16 @@ export {
15521
15871
  Button,
15522
15872
  CHANNELS,
15523
15873
  CHANNEL_WEIGHTS,
15874
+ CHAT_CALL_DEADLINE_MS,
15524
15875
  CHAT_UNAVAILABLE,
15876
+ CHAT_UNAVAILABLE_MESSAGE,
15525
15877
  COPIED_FEEDBACK_MS,
15526
15878
  CORNER_STACK_INSET_PROPERTY,
15527
15879
  CORNER_STACK_OFFSET_PROPERTY,
15880
+ CSV_FAILED_FALLBACK,
15881
+ CSV_KEPT_NOTE,
15528
15882
  Calendar,
15883
+ CallDeadlineError,
15529
15884
  Card,
15530
15885
  CardGrid,
15531
15886
  CardRow,
@@ -15538,6 +15893,7 @@ export {
15538
15893
  ChatSessionBar,
15539
15894
  ChatTranscript,
15540
15895
  ChatTurn,
15896
+ ChatUnreachableError,
15541
15897
  Checkbox,
15542
15898
  Citations,
15543
15899
  Clamp,
@@ -15550,6 +15906,7 @@ export {
15550
15906
  CsiBadge,
15551
15907
  CsiHero,
15552
15908
  CsiMeter,
15909
+ CsvCard,
15553
15910
  DEFAULT_PREFS,
15554
15911
  DEFAULT_STORAGE_KEY,
15555
15912
  DEFAULT_TOAST_DURATION_MS,
@@ -15562,9 +15919,14 @@ export {
15562
15919
  Dropzone,
15563
15920
  DropzoneKit,
15564
15921
  ENTITY_ROW_METRIC_WIDTH,
15922
+ EXPORT_FAILED_FALLBACK,
15923
+ EXPORT_IDLE_POLL_INTERVAL_MS,
15924
+ EXPORT_KEPT_NOTE,
15925
+ EXPORT_POLL_INTERVAL_MS,
15565
15926
  EmptyState,
15566
15927
  EntityRow,
15567
15928
  EntityRowMetrics,
15929
+ ExportTray,
15568
15930
  FILE_VIEWER_CSV_ROW_LIMIT,
15569
15931
  FILE_VIEWER_TEXT_LIMIT,
15570
15932
  FactList,
@@ -15607,6 +15969,7 @@ export {
15607
15969
  Modal,
15608
15970
  ModeSwitch,
15609
15971
  ModelControls,
15972
+ NEW_THREAD_FAILED,
15610
15973
  NumberInput,
15611
15974
  OVERLAY_BREAKPOINT,
15612
15975
  OVERLAY_CEILING,
@@ -15620,7 +15983,9 @@ export {
15620
15983
  PreferenceMeter,
15621
15984
  ProfilePage,
15622
15985
  ProgressBar,
15986
+ QUERY_EMPTY_MESSAGE,
15623
15987
  QueryKit,
15988
+ QueryResultCard,
15624
15989
  QuotaRow,
15625
15990
  ROOT_STEP,
15626
15991
  Radio,
@@ -15654,6 +16019,7 @@ export {
15654
16019
  StepList,
15655
16020
  SurroundSound,
15656
16021
  Switch,
16022
+ THREADS_LOAD_FAILED,
15657
16023
  Tabs,
15658
16024
  Tag,
15659
16025
  TestModeBar,
@@ -15683,9 +16049,13 @@ export {
15683
16049
  computeNeedMore,
15684
16050
  computeVirtualWindow,
15685
16051
  copyToClipboard,
16052
+ createChatAdapter,
16053
+ createExportDownloader,
15686
16054
  createLocalStorageAppearanceStore,
15687
16055
  createVersionStore,
15688
16056
  eqFilter,
16057
+ exportStateOf,
16058
+ exportToJob,
15689
16059
  extensionOf,
15690
16060
  extractClipboardFiles,
15691
16061
  filterFiles,
@@ -15704,7 +16074,9 @@ export {
15704
16074
  importanceLevel,
15705
16075
  importanceTokens,
15706
16076
  installFlytedeskFavicon,
16077
+ isExpiredExport,
15707
16078
  isImage,
16079
+ isLiveExport,
15708
16080
  isSystemMessage,
15709
16081
  isUsStateCode,
15710
16082
  isWithinLayerTree,
@@ -15729,9 +16101,12 @@ export {
15729
16101
  useAppearancePrefs,
15730
16102
  useAppearanceStore,
15731
16103
  useChatEngine,
16104
+ useChatThreads,
15732
16105
  useCopyToClipboard,
15733
16106
  useCornerStackSlot,
15734
16107
  useDocumentTitle,
16108
+ useExpiryClock,
16109
+ useExportJobs,
15735
16110
  useFeatureStatus,
15736
16111
  useLayerZIndex,
15737
16112
  useOverlayLayout,
@@ -15742,6 +16117,7 @@ export {
15742
16117
  useServerTable,
15743
16118
  useSessionContext,
15744
16119
  useSheetOpenMark,
16120
+ useShownExport,
15745
16121
  useStackedLayer,
15746
16122
  useStagedFiles,
15747
16123
  useToast,
@@ -15749,6 +16125,7 @@ export {
15749
16125
  validateFilterValue,
15750
16126
  visibleMessages,
15751
16127
  watchAppearance,
16128
+ withDeadline,
15752
16129
  writeQueryToUrl
15753
16130
  };
15754
16131
  //# sourceMappingURL=index.js.map