@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.
Files changed (72) hide show
  1. package/dist/ConnectedNativeDocxComparison-2PLOOXSH.js +1 -1
  2. package/dist/ConnectedNativeDocxComparison-S25BPUH5.cjs +1 -1
  3. package/dist/ConnectedNativeDocxEditor-JJAGMHZC.js +1 -1
  4. package/dist/ConnectedNativeDocxEditor-YA4HWLY4.cjs +1 -1
  5. package/dist/ConnectedStreamedWordArtifact-EXYZAU4Y.cjs +1 -1
  6. package/dist/ConnectedStreamedWordArtifact-YAAXY5KY.js +1 -1
  7. package/dist/agents/index.cjs +238 -238
  8. package/dist/agents/index.js +4 -4
  9. package/dist/chat/index.cjs +1 -1
  10. package/dist/chat/index.js +1 -1
  11. package/dist/{chunk-6HMCF4AJ.js → chunk-5ZIYPZYE.js} +1033 -5
  12. package/dist/chunk-5ZIYPZYE.js.map +1 -0
  13. package/dist/{chunk-O3FB62T5.cjs → chunk-6QAAIDQQ.cjs} +47 -47
  14. package/dist/{chunk-O3FB62T5.cjs.map → chunk-6QAAIDQQ.cjs.map} +1 -1
  15. package/dist/{chunk-UKT3WH5Z.cjs → chunk-B3FMUFAW.cjs} +3 -3
  16. package/dist/{chunk-UKT3WH5Z.cjs.map → chunk-B3FMUFAW.cjs.map} +1 -1
  17. package/dist/{chunk-W7CWGURO.js → chunk-FTZ45WHY.js} +6 -685
  18. package/dist/chunk-FTZ45WHY.js.map +1 -0
  19. package/dist/{chunk-HDJRSCRE.cjs → chunk-GC2FSPSQ.cjs} +6 -6
  20. package/dist/{chunk-HDJRSCRE.cjs.map → chunk-GC2FSPSQ.cjs.map} +1 -1
  21. package/dist/{chunk-UKCCV63X.js → chunk-MNG7N6M2.js} +4 -4
  22. package/dist/{chunk-UKCCV63X.js.map → chunk-MNG7N6M2.js.map} +1 -1
  23. package/dist/{chunk-MUDEL7UL.cjs → chunk-NPLGB4LI.cjs} +4 -703
  24. package/dist/chunk-NPLGB4LI.cjs.map +1 -0
  25. package/dist/{chunk-UPMADXDU.js → chunk-P6RIBIVN.js} +3 -3
  26. package/dist/{chunk-UPMADXDU.js.map → chunk-P6RIBIVN.js.map} +1 -1
  27. package/dist/{chunk-WV4TD2HZ.cjs → chunk-QJFJ5JBF.cjs} +1055 -2
  28. package/dist/chunk-QJFJ5JBF.cjs.map +1 -0
  29. package/dist/{chunk-6HG56GCT.js → chunk-QKR5LWDO.js} +4 -4
  30. package/dist/{chunk-6HG56GCT.js.map → chunk-QKR5LWDO.js.map} +1 -1
  31. package/dist/{chunk-YMQDDUKW.js → chunk-WU34CHU5.js} +3 -3
  32. package/dist/{chunk-YMQDDUKW.js.map → chunk-WU34CHU5.js.map} +1 -1
  33. package/dist/{chunk-FEGXFABZ.cjs → chunk-YF3QUHKN.cjs} +3 -3
  34. package/dist/{chunk-FEGXFABZ.cjs.map → chunk-YF3QUHKN.cjs.map} +1 -1
  35. package/dist/connect/docx.cjs +1 -1
  36. package/dist/connect/docx.js +1 -1
  37. package/dist/connect/index.cjs +730 -170
  38. package/dist/connect/index.cjs.map +1 -1
  39. package/dist/connect/index.js +571 -16
  40. package/dist/connect/index.js.map +1 -1
  41. package/dist/connect/viewer.cjs +45 -45
  42. package/dist/connect/viewer.js +7 -7
  43. package/dist/connection/files/index.d.ts +5 -0
  44. package/dist/connection/files/support.d.ts +2 -0
  45. package/dist/connection/files/upload/AddFromAccountsButton.d.ts +16 -0
  46. package/dist/connection/files/upload/ConnectedUpload.d.ts +36 -0
  47. package/dist/connection/files/upload/ConnectedUploadDropzone.d.ts +36 -0
  48. package/dist/connection/files/upload/EmptyWorkspaceUpload.d.ts +13 -0
  49. package/dist/connection/files/upload/useAddFromUrls.d.ts +13 -0
  50. package/dist/document-tools/index.cjs +1 -1
  51. package/dist/document-tools/index.js +1 -1
  52. package/dist/facts/index.cjs +54 -54
  53. package/dist/facts/index.js +4 -4
  54. package/dist/files/PrivacyExplainerModal.d.ts +8 -0
  55. package/dist/files/ShareToggle.d.ts +8 -0
  56. package/dist/files/UrlInputDialog.d.ts +24 -0
  57. package/dist/files/index.cjs +298 -278
  58. package/dist/files/index.d.ts +4 -0
  59. package/dist/files/index.js +2 -2
  60. package/dist/files/media-preview.d.ts +24 -0
  61. package/dist/index.cjs +347 -347
  62. package/dist/index.js +8 -8
  63. package/dist/studio/index.cjs +1 -1
  64. package/dist/studio/index.js +1 -1
  65. package/dist/workflow-canvas/index.cjs +16 -16
  66. package/dist/workflow-canvas/index.js +4 -4
  67. package/node_modules/@arbidocs/coedit/package.json +1 -1
  68. package/package.json +5 -5
  69. package/dist/chunk-6HMCF4AJ.js.map +0 -1
  70. package/dist/chunk-MUDEL7UL.cjs.map +0 -1
  71. package/dist/chunk-W7CWGURO.js.map +0 -1
  72. package/dist/chunk-WV4TD2HZ.cjs.map +0 -1
@@ -1,25 +1,25 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
+ var chunkNPLGB4LI_cjs = require('../chunk-NPLGB4LI.cjs');
4
5
  var chunk6I6CVX5G_cjs = require('../chunk-6I6CVX5G.cjs');
6
+ var chunkQJFJ5JBF_cjs = require('../chunk-QJFJ5JBF.cjs');
7
+ require('../chunk-223D4727.cjs');
5
8
  var chunkCB4TIDEX_cjs = require('../chunk-CB4TIDEX.cjs');
6
9
  var chunkFM3IRQJW_cjs = require('../chunk-FM3IRQJW.cjs');
7
10
  var chunkD3WFIFRY_cjs = require('../chunk-D3WFIFRY.cjs');
8
11
  require('../chunk-6MG62I5B.cjs');
9
- var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
10
- var chunkMUDEL7UL_cjs = require('../chunk-MUDEL7UL.cjs');
11
- var chunkWV4TD2HZ_cjs = require('../chunk-WV4TD2HZ.cjs');
12
- require('../chunk-223D4727.cjs');
13
12
  var chunkUWIILWDI_cjs = require('../chunk-UWIILWDI.cjs');
13
+ var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
14
14
  require('../chunk-2WLXQGWC.cjs');
15
15
  require('../chunk-OFV3PRF2.cjs');
16
- require('../chunk-V46W7YLI.cjs');
17
- var chunkLJJJ6CYH_cjs = require('../chunk-LJJJ6CYH.cjs');
18
16
  var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
19
17
  require('../chunk-FAXXN7KI.cjs');
20
- require('../chunk-AHDJXIUB.cjs');
18
+ require('../chunk-V46W7YLI.cjs');
19
+ var chunkLJJJ6CYH_cjs = require('../chunk-LJJJ6CYH.cjs');
21
20
  require('../chunk-SIB6C7P7.cjs');
22
21
  require('../chunk-DVUZTGVL.cjs');
22
+ require('../chunk-AHDJXIUB.cjs');
23
23
  require('../chunk-3VULDTNL.cjs');
24
24
  require('../chunk-V4ISCZJ7.cjs');
25
25
  require('../chunk-2EI7NCUA.cjs');
@@ -219,7 +219,7 @@ function useViewedDocument(documentId) {
219
219
  const documentData = record?.external_id === documentId ? record : void 0;
220
220
  const { data: tags } = chunkCB4TIDEX_cjs.useConnectedTags();
221
221
  const labelSummaries = React.useMemo(
222
- () => chunkMUDEL7UL_cjs.summariseDocTags(documentData?.doctags ?? [], tags.filter(chunkMUDEL7UL_cjs.isDocumentLabel)),
222
+ () => chunkNPLGB4LI_cjs.summariseDocTags(documentData?.doctags ?? [], tags.filter(chunkNPLGB4LI_cjs.isDocumentLabel)),
223
223
  [documentData, tags]
224
224
  );
225
225
  const fileName = documentData?.file_name;
@@ -725,7 +725,7 @@ function PassageTagPanel({
725
725
  [workspaceTags]
726
726
  );
727
727
  return /* @__PURE__ */ jsxRuntime.jsx(
728
- chunkMUDEL7UL_cjs.TagPassagePanel,
728
+ chunkNPLGB4LI_cjs.TagPassagePanel,
729
729
  {
730
730
  pageNumber,
731
731
  preview,
@@ -850,7 +850,7 @@ var ParsedPassage = React.memo(function ParsedPassage2({
850
850
  ];
851
851
  }) : [];
852
852
  return /* @__PURE__ */ jsxRuntime.jsx(
853
- chunkMUDEL7UL_cjs.HtmlPassage,
853
+ chunkNPLGB4LI_cjs.HtmlPassage,
854
854
  {
855
855
  chunkId,
856
856
  highlight: isStrong ? "strong" : isLight ? "light" : void 0,
@@ -1027,11 +1027,11 @@ function useDocumentLabels(documentId, doctags, orderedChunkIds) {
1027
1027
  const workspaceTags = React.useMemo(() => allTags.filter(isDocumentTag), [allTags]);
1028
1028
  const documentDoctags = React.useMemo(() => doctags ?? [], [doctags]);
1029
1029
  const tagSummaries = React.useMemo(
1030
- () => chunkMUDEL7UL_cjs.summariseDocTags(documentDoctags, workspaceTags),
1030
+ () => chunkNPLGB4LI_cjs.summariseDocTags(documentDoctags, workspaceTags),
1031
1031
  [documentDoctags, workspaceTags]
1032
1032
  );
1033
1033
  const labelSummaries = React.useMemo(
1034
- () => chunkMUDEL7UL_cjs.summariseDocTags(documentDoctags, workspaceTags.filter(chunkMUDEL7UL_cjs.isDocumentLabel)),
1034
+ () => chunkNPLGB4LI_cjs.summariseDocTags(documentDoctags, workspaceTags.filter(chunkNPLGB4LI_cjs.isDocumentLabel)),
1035
1035
  [documentDoctags, workspaceTags]
1036
1036
  );
1037
1037
  const labelsByChunk = React.useMemo(() => {
@@ -1539,14 +1539,14 @@ function ParsedTextView({
1539
1539
  }
1540
1540
  }
1541
1541
  }, [maxPageNumber, onLoadSuccess]);
1542
- if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "Loading parsed document..." });
1542
+ if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading parsed document..." });
1543
1543
  if (error) {
1544
- return /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: "Failed to load parsed document" }) });
1544
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: "Failed to load parsed document" }) });
1545
1545
  }
1546
1546
  const taggingChunk = labels.taggingChunkId ? processedChunks.flatMap((page) => page.chunks).find((c) => c.chunkExtId === labels.taggingChunkId) : void 0;
1547
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkMUDEL7UL_cjs.HtmlViewerRoot, { children: [
1547
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkNPLGB4LI_cjs.HtmlViewerRoot, { children: [
1548
1548
  /* @__PURE__ */ jsxRuntime.jsx(
1549
- chunkMUDEL7UL_cjs.DocumentLabelBar,
1549
+ chunkNPLGB4LI_cjs.DocumentLabelBar,
1550
1550
  {
1551
1551
  summaries: labels.labelSummaries,
1552
1552
  activeTagExtId: labels.activeTagExtId,
@@ -1571,15 +1571,15 @@ function ParsedTextView({
1571
1571
  }
1572
1572
  ),
1573
1573
  !citation.factCitationActive && citation.runStartIds.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1574
- chunkMUDEL7UL_cjs.CitedRunNav,
1574
+ chunkNPLGB4LI_cjs.CitedRunNav,
1575
1575
  {
1576
1576
  position: citation.runCursor + 1,
1577
1577
  total: citation.runStartIds.length,
1578
1578
  onStep: citation.gotoRun
1579
1579
  }
1580
1580
  ),
1581
- /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.HtmlViewerSurface, { surfaceRef: containerRef, onMouseUp: citation.handleSelectionEnd, children: processedChunks.length > 0 ? processedChunks.map((page, pageIndex) => /* @__PURE__ */ jsxRuntime.jsx(
1582
- chunkMUDEL7UL_cjs.HtmlPage,
1581
+ /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.HtmlViewerSurface, { surfaceRef: containerRef, onMouseUp: citation.handleSelectionEnd, children: processedChunks.length > 0 ? processedChunks.map((page, pageIndex) => /* @__PURE__ */ jsxRuntime.jsx(
1582
+ chunkNPLGB4LI_cjs.HtmlPage,
1583
1583
  {
1584
1584
  pageNumber: page.pageNumber,
1585
1585
  totalPages,
@@ -1620,7 +1620,7 @@ function ParsedTextView({
1620
1620
  })
1621
1621
  },
1622
1622
  pageIndex
1623
- )) : /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.HtmlViewerEmpty, {}) })
1623
+ )) : /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.HtmlViewerEmpty, {}) })
1624
1624
  ] });
1625
1625
  }
1626
1626
  var AnnotatedPdfViewer = React.lazy(
@@ -1669,7 +1669,7 @@ function ViewerPdfPane({
1669
1669
  const showMarkup = markup.hasMarkup && !markup.showOriginal;
1670
1670
  if (isDownloadOnly) {
1671
1671
  return /* @__PURE__ */ jsxRuntime.jsx(
1672
- chunkMUDEL7UL_cjs.ViewerPreviewUnavailable,
1672
+ chunkNPLGB4LI_cjs.ViewerPreviewUnavailable,
1673
1673
  {
1674
1674
  extension: fileExtension(documentData?.file_name),
1675
1675
  onDownload
@@ -1679,26 +1679,26 @@ function ViewerPdfPane({
1679
1679
  const loadingLabel = isVideo ? "Loading video..." : isAudio ? "Loading audio..." : isImage ? "Loading image..." : !documentData ? "Loading document..." : ui.friendlyFileType(documentData.file_type, documentData.file_name) === "Text" ? "Loading text..." : "Loading PDF...";
1680
1680
  const errorLabel = isVideo ? "Failed to load video" : isAudio ? "Failed to load audio" : isImage ? "Failed to load image" : "Failed to load PDF";
1681
1681
  if (isDocx && documentData && !["completed", "low-content", "failed"].includes(documentData.status || "")) {
1682
- return /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "PDF and search indexing are processing. Open the DOCX tab to edit now." });
1682
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "PDF and search indexing are processing. Open the DOCX tab to edit now." });
1683
1683
  }
1684
- if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: loadingLabel });
1684
+ if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: loadingLabel });
1685
1685
  if (pdfError) {
1686
1686
  return /* @__PURE__ */ jsxRuntime.jsx(
1687
- chunkMUDEL7UL_cjs.ViewerLoadError,
1687
+ chunkNPLGB4LI_cjs.ViewerLoadError,
1688
1688
  {
1689
1689
  message: isVideo || isAudio || isImage ? `${errorLabel} \u2014 download it instead.` : "Couldn't display the PDF \u2014 download it instead.",
1690
1690
  onDownload
1691
1691
  }
1692
1692
  );
1693
1693
  }
1694
- if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: loadingLabel });
1694
+ if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: loadingLabel });
1695
1695
  if (isVideo) return /* @__PURE__ */ jsxRuntime.jsx(viewers.VideoViewer, { blob: pdfBlob, title: documentData?.file_name || "Video" });
1696
1696
  if (isAudio) return /* @__PURE__ */ jsxRuntime.jsx(viewers.AudioViewer, { blob: pdfBlob, title: documentData?.file_name || "Audio" });
1697
1697
  if (isImage) {
1698
1698
  return /* @__PURE__ */ jsxRuntime.jsx(viewers.ImageViewer, { blob: pdfBlob, alt: documentData?.file_name || "Document image" });
1699
1699
  }
1700
1700
  if (signatureFlow?.kind === "prepare") {
1701
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1701
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1702
1702
  SignatureRequestEditor,
1703
1703
  {
1704
1704
  ...viewerProps,
@@ -1714,7 +1714,7 @@ function ViewerPdfPane({
1714
1714
  }
1715
1715
  if (signatureFlow?.kind === "sign" && currentUserId) {
1716
1716
  const { currentPage: _page, scrollTrigger: _trigger, ...guidedProps } = viewerProps;
1717
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1717
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1718
1718
  GuidedSigningViewer,
1719
1719
  {
1720
1720
  ...guidedProps,
@@ -1728,7 +1728,7 @@ function ViewerPdfPane({
1728
1728
  ) });
1729
1729
  }
1730
1730
  if (placingSignature) {
1731
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1731
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1732
1732
  SignaturePlacementViewer,
1733
1733
  {
1734
1734
  ...viewerProps,
@@ -1744,7 +1744,7 @@ function ViewerPdfPane({
1744
1744
  return /* @__PURE__ */ jsxRuntime.jsx(
1745
1745
  React.Suspense,
1746
1746
  {
1747
- fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: annotating ? "Loading annotation tools\u2026" : "Loading markup\u2026" }),
1747
+ fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: annotating ? "Loading annotation tools\u2026" : "Loading markup\u2026" }),
1748
1748
  children: /* @__PURE__ */ jsxRuntime.jsx(
1749
1749
  AnnotatedPdfViewer,
1750
1750
  {
@@ -1904,15 +1904,15 @@ function DocumentViewerContent({
1904
1904
  };
1905
1905
  const documentTitle = streamingDoc?.title || draftDoc?.title || documentData?.doc_metadata?.title || documentData?.file_name || "Document";
1906
1906
  const pageNav = totalPages > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1907
- /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerZoomControl, { zoom, onCycle: () => setZoom(viewers.cycleZoom(zoom)) }),
1907
+ /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerZoomControl, { zoom, onCycle: () => setZoom(viewers.cycleZoom(zoom)) }),
1908
1908
  /* @__PURE__ */ jsxRuntime.jsx(
1909
- chunkMUDEL7UL_cjs.PdfPageNav,
1909
+ chunkNPLGB4LI_cjs.PdfPageNav,
1910
1910
  {
1911
1911
  canPrev: (viewingDocumentPage || 1) > 1,
1912
1912
  canNext: (viewingDocumentPage || 1) < totalPages,
1913
1913
  onPrev: () => stepPage(-1),
1914
1914
  onNext: () => stepPage(1),
1915
- counter: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerPageCounter, { page: viewingDocumentPage || 1, total: totalPages, onGoTo: goToPage })
1915
+ counter: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerPageCounter, { page: viewingDocumentPage || 1, total: totalPages, onGoTo: goToPage })
1916
1916
  }
1917
1917
  )
1918
1918
  ] });
@@ -1936,7 +1936,7 @@ function DocumentViewerContent({
1936
1936
  );
1937
1937
  const titleBlock = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1938
1938
  isDraft ? support.renderDraftTitle?.(documentId) : /* @__PURE__ */ jsxRuntime.jsx(
1939
- chunkMUDEL7UL_cjs.ViewerTitle,
1939
+ chunkNPLGB4LI_cjs.ViewerTitle,
1940
1940
  {
1941
1941
  title: documentTitle,
1942
1942
  versionLabel: currentVersionLabel,
@@ -1961,7 +1961,7 @@ function DocumentViewerContent({
1961
1961
  // A draft's kind replaces the tabs: neither Versions nor the text view means anything
1962
1962
  // before the first save.
1963
1963
  support.renderDraftKind?.(documentId)
1964
- ) : /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerTabBar, { tabs: viewerTabs, activeId: activeTab, onChange: handleTabChange }),
1964
+ ) : /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerTabBar, { tabs: viewerTabs, activeId: activeTab, onChange: handleTabChange }),
1965
1965
  !isCompact && titleBlock
1966
1966
  ] });
1967
1967
  const annotatable = documentTools.canAnnotate({
@@ -2034,7 +2034,7 @@ function DocumentViewerContent({
2034
2034
  }
2035
2035
  ),
2036
2036
  activeTab === "pdf" && isImage && pdfBlob && /* @__PURE__ */ jsxRuntime.jsx(
2037
- chunkMUDEL7UL_cjs.ViewerImageActions,
2037
+ chunkNPLGB4LI_cjs.ViewerImageActions,
2038
2038
  {
2039
2039
  compact: isCompact,
2040
2040
  onUseAsReference: support.useImageAsReference ? () => support.useImageAsReference(documentId) : void 0,
@@ -2064,7 +2064,7 @@ function DocumentViewerContent({
2064
2064
  {
2065
2065
  state: documentData?.shared ? "shared" : "private",
2066
2066
  onToggle: share,
2067
- disabled: !chunkWV4TD2HZ_cjs.canChangeVisibility(documentData, currentUserId),
2067
+ disabled: !chunkQJFJ5JBF_cjs.canChangeVisibility(documentData, currentUserId),
2068
2068
  disabledTooltip: "Only the owner can change visibility",
2069
2069
  tooltip: documentData?.shared ? "Shared with the workspace \u2014 click to share with specific people" : "Share with the workspace, then optionally notify specific people by email",
2070
2070
  variant: "outline",
@@ -2162,7 +2162,7 @@ function DocumentViewerContent({
2162
2162
  onZoomChange: setZoom
2163
2163
  };
2164
2164
  return /* @__PURE__ */ jsxRuntime.jsxs(
2165
- chunkMUDEL7UL_cjs.ViewerFrame,
2165
+ chunkNPLGB4LI_cjs.ViewerFrame,
2166
2166
  {
2167
2167
  frameRef: containerRef,
2168
2168
  contentId: documentId,
@@ -2207,7 +2207,7 @@ function DocumentViewerContent({
2207
2207
  )
2208
2208
  ),
2209
2209
  children: [
2210
- isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2210
+ isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2211
2211
  NativeDocxComparison,
2212
2212
  {
2213
2213
  baseId: compareDocumentId,
@@ -2217,7 +2217,7 @@ function DocumentViewerContent({
2217
2217
  ) }),
2218
2218
  isCaptureDraft && support.renderCaptureDraft?.(documentId),
2219
2219
  !isCaptureDraft && (activeTab === "pdf" || isMedia && activeTab === "html") && !isArtifact && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(chunkUWIILWDI_cjs.ViewerPane, { hidden: activeTab !== "pdf", children: [
2220
- /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.DocumentLabelBar, { summaries: labelSummaries }),
2220
+ /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.DocumentLabelBar, { summaries: labelSummaries }),
2221
2221
  !isMedia && !isImage && signatureBanner,
2222
2222
  activeTab === "pdf" && !isMedia && !isImage && /* @__PURE__ */ jsxRuntime.jsx(
2223
2223
  chunkD3WFIFRY_cjs.MarkupNotices,
@@ -2227,7 +2227,7 @@ function DocumentViewerContent({
2227
2227
  onOpenVersion: (n) => setSnapshotDocumentId(`${documentId}@v${n}`)
2228
2228
  }
2229
2229
  ),
2230
- /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerControlBar, { controls: activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
2230
+ /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerControlBar, { controls: activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
2231
2231
  ViewerPdfPane,
2232
2232
  {
2233
2233
  documentId,
@@ -2265,7 +2265,7 @@ function DocumentViewerContent({
2265
2265
  }
2266
2266
  ),
2267
2267
  activeTab === "edit" && isArtifact && liveKind && /* @__PURE__ */ jsxRuntime.jsx(chunk2YV7FBLO_cjs.ArtifactCodeView, { source: liveSource, fileName: documentData?.file_name ?? void 0 }),
2268
- activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
2268
+ activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
2269
2269
  isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkD3WFIFRY_cjs.SignedEditNote, {}),
2270
2270
  /* @__PURE__ */ jsxRuntime.jsx(
2271
2271
  NativeDocxEditor,
@@ -2308,8 +2308,8 @@ function DocumentViewerContent({
2308
2308
  onOpenTranslation: (id) => setViewingDocumentId(id)
2309
2309
  }
2310
2310
  ),
2311
- activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
2312
- activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
2311
+ activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
2312
+ activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
2313
2313
  signatureBanner,
2314
2314
  isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkD3WFIFRY_cjs.SignedEditNote, {}),
2315
2315
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2322,7 +2322,7 @@ function DocumentViewerContent({
2322
2322
  `${snapshotDocumentId || documentId}-${snapshotDocumentId ? "snapshot" : "live"}`
2323
2323
  )
2324
2324
  ] }),
2325
- streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerMessage, { children: "Opening draft\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2325
+ streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Opening draft\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2326
2326
  StreamedWordArtifact,
2327
2327
  {
2328
2328
  documentId: documentId.startsWith("doc-") ? documentId : void 0,
@@ -2332,7 +2332,7 @@ function DocumentViewerContent({
2332
2332
  },
2333
2333
  documentId
2334
2334
  ) }),
2335
- !isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkUWIILWDI_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkMUDEL7UL_cjs.ViewerControlBar, { controls: pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
2335
+ !isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkUWIILWDI_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerControlBar, { controls: pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
2336
2336
  ParsedTextView,
2337
2337
  {
2338
2338
  documentId: pdfSnapshotId || documentId,
@@ -1,23 +1,23 @@
1
1
  "use client";
2
+ import { HtmlPassage, ViewerTitle, ViewerTabBar, ViewerImageActions, ViewerFrame, ViewerMessage, DocumentLabelBar, ViewerControlBar, ViewerZoomControl, PdfPageNav, ViewerPageCounter, summariseDocTags, isDocumentLabel, ViewerPreviewUnavailable, ViewerLoadError, HtmlViewerRoot, CitedRunNav, HtmlViewerSurface, HtmlPage, HtmlViewerEmpty, TagPassagePanel } from '../chunk-FTZ45WHY.js';
2
3
  import { useDocumentViewerSupport } from '../chunk-EYJMMGXF.js';
4
+ import { canChangeVisibility } from '../chunk-5ZIYPZYE.js';
5
+ import '../chunk-RC6VTY2H.js';
3
6
  import { useConnectedConversations, useConnectedDocuments, useConnectedTags } from '../chunk-KDLX5AA7.js';
4
7
  import { useConnectedWorkspace } from '../chunk-TF7HN5EU.js';
5
8
  import { MarkupViewNote, SignatureStatus, AnnotateButton, ShowOriginalButton, DownloadMarkupButton, SignButton, RequestSignaturesButton, MarkupNotices, SignedEditNote, VersionSnapshotBar, SignatureRequestBanner } from '../chunk-KQYPP72K.js';
6
9
  import '../chunk-EQB3WELX.js';
7
- import { SignDocumentDialog } from '../chunk-2YOVK524.js';
8
- import { HtmlPassage, ViewerTitle, ViewerTabBar, ViewerImageActions, ViewerFrame, ViewerMessage, DocumentLabelBar, ViewerControlBar, ViewerZoomControl, PdfPageNav, ViewerPageCounter, summariseDocTags, isDocumentLabel, ViewerPreviewUnavailable, ViewerLoadError, HtmlViewerRoot, CitedRunNav, HtmlViewerSurface, HtmlPage, HtmlViewerEmpty, TagPassagePanel } from '../chunk-W7CWGURO.js';
9
- import { canChangeVisibility } from '../chunk-6HMCF4AJ.js';
10
- import '../chunk-RC6VTY2H.js';
11
10
  import { ViewerStatusNote, ViewerHeaderStart, ViewerHeaderEnd, ViewerPane } from '../chunk-6HKLTYNN.js';
11
+ import { SignDocumentDialog } from '../chunk-2YOVK524.js';
12
12
  import '../chunk-JJA6GQKH.js';
13
13
  import '../chunk-YNMO3DSR.js';
14
- import '../chunk-A3XPS2EU.js';
15
- import { buildDeepLinkUrl } from '../chunk-SV65E4QW.js';
16
14
  import { ShareControl } from '../chunk-K4BGOPGG.js';
17
15
  import '../chunk-SDOEHEJP.js';
18
- import '../chunk-RLWIUUQ5.js';
16
+ import '../chunk-A3XPS2EU.js';
17
+ import { buildDeepLinkUrl } from '../chunk-SV65E4QW.js';
19
18
  import '../chunk-M4S75AEJ.js';
20
19
  import '../chunk-5LXQPP2K.js';
20
+ import '../chunk-RLWIUUQ5.js';
21
21
  import '../chunk-VF5EUAIV.js';
22
22
  import '../chunk-NUNKSZKU.js';
23
23
  import '../chunk-YU2KUMGE.js';
@@ -3,3 +3,8 @@ export { FileTooltipContent, isActiveDocumentStatus, startMenuItem, type FileTil
3
3
  export { DocumentSyncGlyph } from './DocumentSyncGlyph';
4
4
  export { FilesSupportProvider, useFilesSupport, useOfflineDocumentIds, useViewingDocumentId, type FilesStartItem, type FilesSupport, } from './support';
5
5
  export { useFilesStore, usePendingFolders } from './store';
6
+ export { ConnectedUpload, type ConnectedUploadFooterParts, type ConnectedUploadProps, } from './upload/ConnectedUpload';
7
+ export { ConnectedUploadDropzone, type ConnectedUploadDropzoneProps, type UploadSource, } from './upload/ConnectedUploadDropzone';
8
+ export { EmptyWorkspaceUpload, type EmptyWorkspaceUploadProps } from './upload/EmptyWorkspaceUpload';
9
+ export { AddFromAccountsButton } from './upload/AddFromAccountsButton';
10
+ export { useAddFromUrls, type AddFromUrlsOptions } from './upload/useAddFromUrls';
@@ -24,6 +24,8 @@ export interface FilesSupport {
24
24
  emailDocument?: (document: WorkspaceDocument) => Promise<void>;
25
25
  /** The documents kept on this device for offline use, as a hook. */
26
26
  useOfflineDocumentIds?: () => ReadonlySet<string>;
27
+ /** Show how to raise the plan's limits (an upload was refused for them). Absent: not offered. */
28
+ openUpgrade?: () => void;
27
29
  /** The document open in the host's viewer, as a hook (its tile is marked); null when closed. */
28
30
  useViewingDocumentId?: () => string | null;
29
31
  }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * AddFromAccountsButton
3
+ *
4
+ * "Add from accounts" shortcut into the accounts (email import) modal, showing
5
+ * the logos of every enabled/visible connector product — Outlook + OneDrive for
6
+ * the Microsoft grant, Gmail + Google Drive for the Google grant, iManage, etc.
7
+ * Renders nothing when no vendor is available/visible. Shared by the documents
8
+ * empty state and the chat empty state so the two stay identical.
9
+ */
10
+ interface AddFromAccountsButtonProps {
11
+ /** Opens the "Add from Email" modal. */
12
+ onImportFromEmail: () => void;
13
+ 'data-testid'?: string;
14
+ }
15
+ export declare function AddFromAccountsButton({ onImportFromEmail, 'data-testid': dataTestId, }: AddFromAccountsButtonProps): import("react").JSX.Element | null;
16
+ export {};
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Adding documents to the open workspace: choose files (or folders, zip archives, web addresses,
3
+ * the host's connected accounts), see what was refused and why, choose who sees them, upload with
4
+ * progress. The documents get AI titles and the workspace's shared AI fields per its settings; the
5
+ * upload runs with the host's configuration (`configExtId`).
6
+ */
7
+ import { type ReactNode } from 'react';
8
+ import { type UploadSource } from './ConnectedUploadDropzone';
9
+ export interface ConnectedUploadFooterParts {
10
+ /** The upload button. */
11
+ submit: ReactNode;
12
+ shared: boolean;
13
+ onSharedChange: (shared: boolean) => void;
14
+ }
15
+ export interface ConnectedUploadProps {
16
+ /** Files chosen before the upload opened (e.g. dropped on a view). */
17
+ initialFiles?: File[];
18
+ /** Web addresses to add as soon as the upload opens. */
19
+ initialUrls?: string[];
20
+ /** The folder the documents go to (files keep their sub-folders below it). */
21
+ folder?: string | null;
22
+ /** Show only this source; absent: a picker of sources. */
23
+ source?: UploadSource | null;
24
+ onPickSource?: (source: UploadSource) => void;
25
+ /** The configuration the documents are processed with. */
26
+ configExtId?: string | null;
27
+ /** Close once uploaded (default true). */
28
+ closeOnUpload?: boolean;
29
+ onClose?: () => void;
30
+ onUploadComplete?: () => void;
31
+ /** The host's connected accounts to import from. Absent: not offered. */
32
+ accounts?: ReactNode;
33
+ /** The bar under the chosen files, around the upload button (e.g. processing settings). */
34
+ renderFooter?: (parts: ConnectedUploadFooterParts) => ReactNode;
35
+ }
36
+ export declare function ConnectedUpload({ initialFiles, initialUrls, folder, source, onPickSource, configExtId, closeOnUpload, onClose, onUploadComplete, accounts, renderFooter, }: ConnectedUploadProps): import("react").JSX.Element;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Where files to upload are chosen: dropped (folders whole, zip archives opened into their files)
3
+ * or picked, checked against what an upload takes. Compact, it is a drop box with the browse
4
+ * buttons inside; otherwise it shows one source (`source`), or a picker of sources (computer, the
5
+ * host's connected accounts, the internet).
6
+ */
7
+ import { type ReactNode } from 'react';
8
+ import { type RefusedUploadFile } from '@arbidocs/react';
9
+ export type UploadSource = 'computer' | 'internet' | 'email';
10
+ export interface ConnectedUploadDropzoneProps {
11
+ onFilesSelected: (files: File[]) => void;
12
+ onFilesRejected?: (refused: RefusedUploadFile[]) => void;
13
+ /** Add from web addresses. Absent: not offered. */
14
+ onUrlsSubmit?: (urls: string[]) => void | boolean | Promise<void | boolean>;
15
+ disabled?: boolean;
16
+ className?: string;
17
+ /** The largest file taken (default 2 GB). */
18
+ maxFileSize?: number;
19
+ title?: string;
20
+ subtitle?: string;
21
+ /** A drop box with the browse buttons inside, for an empty view. */
22
+ compact?: boolean;
23
+ /** Instead of picking files here, open the full upload (e.g. a dialog). */
24
+ onOpenUpload?: () => void;
25
+ /** The workspace the files go to, named in the web-address dialog. */
26
+ workspaceName?: string;
27
+ /** Show only this source; absent: a picker of sources. */
28
+ source?: UploadSource | null;
29
+ /** A source was chosen from the picker. */
30
+ onPickSource?: (source: UploadSource) => void;
31
+ /** The host's connected accounts to import from (the "From accounts" source). Absent: none. */
32
+ accounts?: ReactNode;
33
+ /** An action before "Add from URL" in compact mode (e.g. "Add from accounts"). */
34
+ compactLeadingAction?: ReactNode;
35
+ }
36
+ export declare function ConnectedUploadDropzone({ onFilesSelected, onFilesRejected, onUrlsSubmit, disabled, className, maxFileSize, title, subtitle, compact, onOpenUpload, workspaceName, source, onPickSource, accounts, compactLeadingAction, }: ConnectedUploadDropzoneProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * A workspace with no documents yet: a centred drop box (files, folders, zip archives, web
3
+ * addresses), the host's "Add from accounts" shortcut, and the privacy promises. The same in every
4
+ * view of the files, so they stay identical.
5
+ */
6
+ export interface EmptyWorkspaceUploadProps {
7
+ onFilesSelected: (files: File[]) => void;
8
+ onUrlsSubmit?: (urls: string[]) => void;
9
+ /** Opens the host's accounts import. Absent: the shortcut is hidden. */
10
+ onImportFromEmail?: () => void;
11
+ 'data-testid'?: string;
12
+ }
13
+ export declare function EmptyWorkspaceUpload({ onFilesSelected, onUrlsSubmit, onImportFromEmail, 'data-testid': dataTestId, }: EmptyWorkspaceUploadProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Add documents from web addresses, telling the user how it went: the documents the server made,
3
+ * the addresses it skipped, and a zip archive's files (handed to `onZipFiles`, to upload like
4
+ * chosen files). Resolves false when the addresses could not be sent (the dialog stays open).
5
+ */
6
+ export interface AddFromUrlsOptions {
7
+ /** Shared with the workspace (default true). */
8
+ shared?: boolean;
9
+ configExtId?: string | null;
10
+ /** A zip archive's files, to upload like chosen files. */
11
+ onZipFiles?: (files: File[]) => void;
12
+ }
13
+ export declare function useAddFromUrls({ shared, configExtId, onZipFiles, }?: AddFromUrlsOptions): (urls: string[]) => Promise<boolean>;
@@ -3,8 +3,8 @@
3
3
 
4
4
  var chunkD3WFIFRY_cjs = require('../chunk-D3WFIFRY.cjs');
5
5
  var chunk6MG62I5B_cjs = require('../chunk-6MG62I5B.cjs');
6
- var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
7
6
  require('../chunk-UWIILWDI.cjs');
7
+ var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
8
8
  require('../chunk-ULWRNGGE.cjs');
9
9
  require('../chunk-DES3K4SD.cjs');
10
10
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  export { AnnotateButton, DEFAULT_VERSION_SNAPSHOT_BAR_LABELS, DownloadMarkupButton, MarkupNotices, MarkupViewNote, RequestSignaturesButton, ShowOriginalButton, SignButton, SignatureCertificate, SignatureRequestBanner, SignatureStatus, SignedEditNote, VersionSnapshotBar, formatSignedAt } from '../chunk-KQYPP72K.js';
3
3
  export { AdoptSignatureDialog, TYPED_SIGNATURE_STYLE } from '../chunk-EQB3WELX.js';
4
- export { SignDocumentDialog } from '../chunk-2YOVK524.js';
5
4
  import '../chunk-6HKLTYNN.js';
5
+ export { SignDocumentDialog } from '../chunk-2YOVK524.js';
6
6
  import '../chunk-TX2ZICS7.js';
7
7
  import '../chunk-VUNV25KB.js';
8
8
  //# sourceMappingURL=index.js.map