@arbidocs/blocks 0.5.48 → 0.5.50

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 (81) hide show
  1. package/dist/DocumentReviewCard-DLR4XOIZ.cjs +516 -0
  2. package/dist/DocumentReviewCard-DLR4XOIZ.cjs.map +1 -0
  3. package/dist/DocumentReviewCard-Y67FFRPC.js +514 -0
  4. package/dist/DocumentReviewCard-Y67FFRPC.js.map +1 -0
  5. package/dist/calls/connected/ConnectedCallPage.d.ts +23 -0
  6. package/dist/calls/connected/index.d.ts +1 -0
  7. package/dist/calls/index.cjs +172 -0
  8. package/dist/calls/index.cjs.map +1 -1
  9. package/dist/calls/index.js +175 -4
  10. package/dist/calls/index.js.map +1 -1
  11. package/dist/chunk-3Y4UTPCD.js +1521 -0
  12. package/dist/chunk-3Y4UTPCD.js.map +1 -0
  13. package/dist/chunk-5TDGVOR5.js +142 -0
  14. package/dist/chunk-5TDGVOR5.js.map +1 -0
  15. package/dist/{chunk-QKOFQMAY.cjs → chunk-5YX3R6CK.cjs} +5 -4
  16. package/dist/chunk-5YX3R6CK.cjs.map +1 -0
  17. package/dist/chunk-63IH7V5F.js +13 -0
  18. package/dist/chunk-63IH7V5F.js.map +1 -0
  19. package/dist/chunk-C3VTWM74.js +123 -0
  20. package/dist/chunk-C3VTWM74.js.map +1 -0
  21. package/dist/chunk-DVE6NNZ2.cjs +15 -0
  22. package/dist/chunk-DVE6NNZ2.cjs.map +1 -0
  23. package/dist/{chunk-XBITXJZU.js → chunk-EQ433QPZ.js} +4 -3
  24. package/dist/chunk-EQ433QPZ.js.map +1 -0
  25. package/dist/{chunk-UAEYU2NN.cjs → chunk-H32DV7XS.cjs} +2 -136
  26. package/dist/chunk-H32DV7XS.cjs.map +1 -0
  27. package/dist/{chunk-EARQ2CUX.js → chunk-IQ3VDTR7.js} +6 -119
  28. package/dist/chunk-IQ3VDTR7.js.map +1 -0
  29. package/dist/chunk-NUQ3RY7M.cjs +130 -0
  30. package/dist/chunk-NUQ3RY7M.cjs.map +1 -0
  31. package/dist/{chunk-V2UQR7P6.cjs → chunk-QLY22ZZW.cjs} +9 -8
  32. package/dist/chunk-QLY22ZZW.cjs.map +1 -0
  33. package/dist/chunk-REH7PX3N.cjs +145 -0
  34. package/dist/chunk-REH7PX3N.cjs.map +1 -0
  35. package/dist/{chunk-VQHXVY26.cjs → chunk-RTS3B2W7.cjs} +2 -121
  36. package/dist/chunk-RTS3B2W7.cjs.map +1 -0
  37. package/dist/chunk-S7B5E3RU.cjs +1553 -0
  38. package/dist/chunk-S7B5E3RU.cjs.map +1 -0
  39. package/dist/{chunk-WZ63HE2C.js → chunk-XRL4R2TT.js} +4 -136
  40. package/dist/chunk-XRL4R2TT.js.map +1 -0
  41. package/dist/{chunk-E6EYRQC2.js → chunk-YYZH6VRP.js} +6 -5
  42. package/dist/chunk-YYZH6VRP.js.map +1 -0
  43. package/dist/connect/index.cjs +464 -1861
  44. package/dist/connect/index.cjs.map +1 -1
  45. package/dist/connect/index.js +55 -1538
  46. package/dist/connect/index.js.map +1 -1
  47. package/dist/connect/viewer.cjs +39 -39
  48. package/dist/connect/viewer.js +1 -1
  49. package/dist/connection/config/useDeveloperConfig.d.ts +1 -1
  50. package/dist/connection/files/fields/DocumentFieldParts.d.ts +2 -1
  51. package/dist/connection/files/fields/documentField.d.ts +1 -0
  52. package/dist/connection/files/grid/cells.d.ts +1 -0
  53. package/dist/connection/files/page/ConnectedFilesPage.d.ts +5 -2
  54. package/dist/connection/files/review/DocumentReviewCard.d.ts +32 -0
  55. package/dist/connection/files/review/useDocumentValueWrites.d.ts +15 -0
  56. package/dist/connection/files/review/useReviewColumns.d.ts +33 -0
  57. package/dist/files/cells/RelatedDocsCell.d.ts +3 -1
  58. package/dist/files/index.cjs +221 -221
  59. package/dist/files/index.js +1 -1
  60. package/dist/home/index.cjs +7 -6
  61. package/dist/home/index.cjs.map +1 -1
  62. package/dist/home/index.js +2 -1
  63. package/dist/home/index.js.map +1 -1
  64. package/dist/index.cjs +82 -82
  65. package/dist/index.cjs.map +1 -1
  66. package/dist/index.js +5 -8
  67. package/dist/index.js.map +1 -1
  68. package/dist/workspaces/index.cjs +29 -28
  69. package/dist/workspaces/index.cjs.map +1 -1
  70. package/dist/workspaces/index.js +4 -3
  71. package/dist/workspaces/index.js.map +1 -1
  72. package/node_modules/@arbidocs/coedit/package.json +1 -1
  73. package/package.json +5 -5
  74. package/dist/chunk-E6EYRQC2.js.map +0 -1
  75. package/dist/chunk-EARQ2CUX.js.map +0 -1
  76. package/dist/chunk-QKOFQMAY.cjs.map +0 -1
  77. package/dist/chunk-UAEYU2NN.cjs.map +0 -1
  78. package/dist/chunk-V2UQR7P6.cjs.map +0 -1
  79. package/dist/chunk-VQHXVY26.cjs.map +0 -1
  80. package/dist/chunk-WZ63HE2C.js.map +0 -1
  81. package/dist/chunk-XBITXJZU.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkBB4PMCU6_cjs = require('../chunk-BB4PMCU6.cjs');
5
- var chunkQKOFQMAY_cjs = require('../chunk-QKOFQMAY.cjs');
5
+ var chunk5YX3R6CK_cjs = require('../chunk-5YX3R6CK.cjs');
6
6
  require('../chunk-2WLXQGWC.cjs');
7
7
  require('../chunk-223D4727.cjs');
8
8
  var chunkCKNUL4LM_cjs = require('../chunk-CKNUL4LM.cjs');
@@ -166,7 +166,7 @@ function useViewedDocument(documentId) {
166
166
  const documentData = record?.external_id === documentId ? record : void 0;
167
167
  const { data: tags } = chunkV5QAXGGT_cjs.useConnectedTags();
168
168
  const labelSummaries = React.useMemo(
169
- () => chunkQKOFQMAY_cjs.summariseDocTags(documentData?.doctags ?? [], tags.filter(chunkQKOFQMAY_cjs.isDocumentLabel)),
169
+ () => chunk5YX3R6CK_cjs.summariseDocTags(documentData?.doctags ?? [], tags.filter(chunk5YX3R6CK_cjs.isDocumentLabel)),
170
170
  [documentData, tags]
171
171
  );
172
172
  const fileName = documentData?.file_name;
@@ -671,7 +671,7 @@ function PassageTagPanel({
671
671
  [workspaceTags]
672
672
  );
673
673
  return /* @__PURE__ */ jsxRuntime.jsx(
674
- chunkQKOFQMAY_cjs.TagPassagePanel,
674
+ chunk5YX3R6CK_cjs.TagPassagePanel,
675
675
  {
676
676
  pageNumber,
677
677
  preview,
@@ -796,7 +796,7 @@ var ParsedPassage = React.memo(function ParsedPassage2({
796
796
  ];
797
797
  }) : [];
798
798
  return /* @__PURE__ */ jsxRuntime.jsx(
799
- chunkQKOFQMAY_cjs.HtmlPassage,
799
+ chunk5YX3R6CK_cjs.HtmlPassage,
800
800
  {
801
801
  chunkId,
802
802
  highlight: isStrong ? "strong" : isLight ? "light" : void 0,
@@ -973,11 +973,11 @@ function useDocumentLabels(documentId, doctags, orderedChunkIds) {
973
973
  const workspaceTags = React.useMemo(() => allTags.filter(isDocumentTag), [allTags]);
974
974
  const documentDoctags = React.useMemo(() => doctags ?? [], [doctags]);
975
975
  const tagSummaries = React.useMemo(
976
- () => chunkQKOFQMAY_cjs.summariseDocTags(documentDoctags, workspaceTags),
976
+ () => chunk5YX3R6CK_cjs.summariseDocTags(documentDoctags, workspaceTags),
977
977
  [documentDoctags, workspaceTags]
978
978
  );
979
979
  const labelSummaries = React.useMemo(
980
- () => chunkQKOFQMAY_cjs.summariseDocTags(documentDoctags, workspaceTags.filter(chunkQKOFQMAY_cjs.isDocumentLabel)),
980
+ () => chunk5YX3R6CK_cjs.summariseDocTags(documentDoctags, workspaceTags.filter(chunk5YX3R6CK_cjs.isDocumentLabel)),
981
981
  [documentDoctags, workspaceTags]
982
982
  );
983
983
  const labelsByChunk = React.useMemo(() => {
@@ -1485,14 +1485,14 @@ function ParsedTextView({
1485
1485
  }
1486
1486
  }
1487
1487
  }, [maxPageNumber, onLoadSuccess]);
1488
- if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "Loading parsed document..." });
1488
+ if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "Loading parsed document..." });
1489
1489
  if (error) {
1490
- return /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: "Failed to load parsed document" }) });
1490
+ return /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: "Failed to load parsed document" }) });
1491
1491
  }
1492
1492
  const taggingChunk = labels.taggingChunkId ? processedChunks.flatMap((page) => page.chunks).find((c) => c.chunkExtId === labels.taggingChunkId) : void 0;
1493
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkQKOFQMAY_cjs.HtmlViewerRoot, { children: [
1493
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk5YX3R6CK_cjs.HtmlViewerRoot, { children: [
1494
1494
  /* @__PURE__ */ jsxRuntime.jsx(
1495
- chunkQKOFQMAY_cjs.DocumentLabelBar,
1495
+ chunk5YX3R6CK_cjs.DocumentLabelBar,
1496
1496
  {
1497
1497
  summaries: labels.labelSummaries,
1498
1498
  activeTagExtId: labels.activeTagExtId,
@@ -1517,15 +1517,15 @@ function ParsedTextView({
1517
1517
  }
1518
1518
  ),
1519
1519
  !citation.factCitationActive && citation.runStartIds.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1520
- chunkQKOFQMAY_cjs.CitedRunNav,
1520
+ chunk5YX3R6CK_cjs.CitedRunNav,
1521
1521
  {
1522
1522
  position: citation.runCursor + 1,
1523
1523
  total: citation.runStartIds.length,
1524
1524
  onStep: citation.gotoRun
1525
1525
  }
1526
1526
  ),
1527
- /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.HtmlViewerSurface, { surfaceRef: containerRef, onMouseUp: citation.handleSelectionEnd, children: processedChunks.length > 0 ? processedChunks.map((page, pageIndex) => /* @__PURE__ */ jsxRuntime.jsx(
1528
- chunkQKOFQMAY_cjs.HtmlPage,
1527
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.HtmlViewerSurface, { surfaceRef: containerRef, onMouseUp: citation.handleSelectionEnd, children: processedChunks.length > 0 ? processedChunks.map((page, pageIndex) => /* @__PURE__ */ jsxRuntime.jsx(
1528
+ chunk5YX3R6CK_cjs.HtmlPage,
1529
1529
  {
1530
1530
  pageNumber: page.pageNumber,
1531
1531
  totalPages,
@@ -1566,7 +1566,7 @@ function ParsedTextView({
1566
1566
  })
1567
1567
  },
1568
1568
  pageIndex
1569
- )) : /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.HtmlViewerEmpty, {}) })
1569
+ )) : /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.HtmlViewerEmpty, {}) })
1570
1570
  ] });
1571
1571
  }
1572
1572
  var AnnotatedPdfViewer = React.lazy(
@@ -1616,7 +1616,7 @@ function ViewerPdfPane({
1616
1616
  const showMarkup = markup.hasMarkup && !markup.showOriginal;
1617
1617
  if (isDownloadOnly) {
1618
1618
  return /* @__PURE__ */ jsxRuntime.jsx(
1619
- chunkQKOFQMAY_cjs.ViewerPreviewUnavailable,
1619
+ chunk5YX3R6CK_cjs.ViewerPreviewUnavailable,
1620
1620
  {
1621
1621
  extension: fileExtension(documentData?.file_name),
1622
1622
  onDownload
@@ -1626,26 +1626,26 @@ function ViewerPdfPane({
1626
1626
  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...";
1627
1627
  const errorLabel = isVideo ? "Failed to load video" : isAudio ? "Failed to load audio" : isImage ? "Failed to load image" : "Failed to load PDF";
1628
1628
  if (isDocx && documentData && !["completed", "low-content", "failed"].includes(documentData.status || "")) {
1629
- return /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "PDF and search indexing are processing. Open the DOCX tab to edit now." });
1629
+ return /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "PDF and search indexing are processing. Open the DOCX tab to edit now." });
1630
1630
  }
1631
- if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: loadingLabel });
1631
+ if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: loadingLabel });
1632
1632
  if (pdfError) {
1633
1633
  return /* @__PURE__ */ jsxRuntime.jsx(
1634
- chunkQKOFQMAY_cjs.ViewerLoadError,
1634
+ chunk5YX3R6CK_cjs.ViewerLoadError,
1635
1635
  {
1636
1636
  message: isVideo || isAudio || isImage ? `${errorLabel} \u2014 download it instead.` : "Couldn't display the PDF \u2014 download it instead.",
1637
1637
  onDownload
1638
1638
  }
1639
1639
  );
1640
1640
  }
1641
- if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: loadingLabel });
1641
+ if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: loadingLabel });
1642
1642
  if (isVideo) return /* @__PURE__ */ jsxRuntime.jsx(viewers.VideoViewer, { blob: pdfBlob, title: documentData?.file_name || "Video" });
1643
1643
  if (isAudio) return /* @__PURE__ */ jsxRuntime.jsx(viewers.AudioViewer, { blob: pdfBlob, title: documentData?.file_name || "Audio" });
1644
1644
  if (isImage) {
1645
1645
  return /* @__PURE__ */ jsxRuntime.jsx(viewers.ImageViewer, { blob: pdfBlob, alt: documentData?.file_name || "Document image" });
1646
1646
  }
1647
1647
  if (signatureFlow?.kind === "prepare") {
1648
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1648
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1649
1649
  SignatureRequestEditor,
1650
1650
  {
1651
1651
  ...viewerProps,
@@ -1663,7 +1663,7 @@ function ViewerPdfPane({
1663
1663
  }
1664
1664
  if (signatureFlow?.kind === "sign" && currentUserId) {
1665
1665
  const { currentPage: _page, scrollTrigger: _trigger, ...guidedProps } = viewerProps;
1666
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1666
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1667
1667
  GuidedSigningViewer,
1668
1668
  {
1669
1669
  ...guidedProps,
@@ -1677,7 +1677,7 @@ function ViewerPdfPane({
1677
1677
  ) });
1678
1678
  }
1679
1679
  if (placingSignature) {
1680
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1680
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
1681
1681
  SignaturePlacementViewer,
1682
1682
  {
1683
1683
  ...viewerProps,
@@ -1693,7 +1693,7 @@ function ViewerPdfPane({
1693
1693
  return /* @__PURE__ */ jsxRuntime.jsx(
1694
1694
  React.Suspense,
1695
1695
  {
1696
- fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: annotating ? "Loading annotation tools\u2026" : "Loading markup\u2026" }),
1696
+ fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: annotating ? "Loading annotation tools\u2026" : "Loading markup\u2026" }),
1697
1697
  children: /* @__PURE__ */ jsxRuntime.jsx(
1698
1698
  AnnotatedPdfViewer,
1699
1699
  {
@@ -1878,15 +1878,15 @@ function DocumentViewerContent({
1878
1878
  };
1879
1879
  const documentTitle = streamingDoc?.title || draftDoc?.title || documentData?.doc_metadata?.title || documentData?.file_name || "Document";
1880
1880
  const pageNav = totalPages > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1881
- /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerZoomControl, { zoom, onCycle: () => setZoom(viewers.cycleZoom(zoom)) }),
1881
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerZoomControl, { zoom, onCycle: () => setZoom(viewers.cycleZoom(zoom)) }),
1882
1882
  /* @__PURE__ */ jsxRuntime.jsx(
1883
- chunkQKOFQMAY_cjs.PdfPageNav,
1883
+ chunk5YX3R6CK_cjs.PdfPageNav,
1884
1884
  {
1885
1885
  canPrev: (viewingDocumentPage || 1) > 1,
1886
1886
  canNext: (viewingDocumentPage || 1) < totalPages,
1887
1887
  onPrev: () => stepPage(-1),
1888
1888
  onNext: () => stepPage(1),
1889
- counter: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerPageCounter, { page: viewingDocumentPage || 1, total: totalPages, onGoTo: goToPage })
1889
+ counter: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerPageCounter, { page: viewingDocumentPage || 1, total: totalPages, onGoTo: goToPage })
1890
1890
  }
1891
1891
  )
1892
1892
  ] });
@@ -1910,7 +1910,7 @@ function DocumentViewerContent({
1910
1910
  );
1911
1911
  const titleBlock = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1912
1912
  isDraft ? support.renderDraftTitle?.(documentId) : /* @__PURE__ */ jsxRuntime.jsx(
1913
- chunkQKOFQMAY_cjs.ViewerTitle,
1913
+ chunk5YX3R6CK_cjs.ViewerTitle,
1914
1914
  {
1915
1915
  title: documentTitle,
1916
1916
  versionLabel: currentVersionLabel,
@@ -1935,7 +1935,7 @@ function DocumentViewerContent({
1935
1935
  // A draft's kind replaces the tabs: neither Versions nor the text view means anything
1936
1936
  // before the first save.
1937
1937
  support.renderDraftKind?.(documentId)
1938
- ) : /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerTabBar, { tabs: viewerTabs, activeId: activeTab, onChange: handleTabChange }),
1938
+ ) : /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerTabBar, { tabs: viewerTabs, activeId: activeTab, onChange: handleTabChange }),
1939
1939
  !isCompact && titleBlock
1940
1940
  ] });
1941
1941
  const annotatable = documentTools.canAnnotate({
@@ -2008,7 +2008,7 @@ function DocumentViewerContent({
2008
2008
  }
2009
2009
  ),
2010
2010
  activeTab === "pdf" && isImage && pdfBlob && /* @__PURE__ */ jsxRuntime.jsx(
2011
- chunkQKOFQMAY_cjs.ViewerImageActions,
2011
+ chunk5YX3R6CK_cjs.ViewerImageActions,
2012
2012
  {
2013
2013
  compact: isCompact,
2014
2014
  onUseAsReference: support.useImageAsReference ? () => support.useImageAsReference(documentId) : void 0,
@@ -2077,7 +2077,7 @@ function DocumentViewerContent({
2077
2077
  {
2078
2078
  state: documentData?.shared ? "shared" : "private",
2079
2079
  onToggle: share,
2080
- disabled: !chunkQKOFQMAY_cjs.canChangeVisibility(documentData, currentUserId),
2080
+ disabled: !chunk5YX3R6CK_cjs.canChangeVisibility(documentData, currentUserId),
2081
2081
  disabledTooltip: "Only the owner can change visibility",
2082
2082
  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",
2083
2083
  variant: "outline",
@@ -2222,7 +2222,7 @@ function DocumentViewerContent({
2222
2222
  onZoomChange: setZoom
2223
2223
  };
2224
2224
  return /* @__PURE__ */ jsxRuntime.jsxs(
2225
- chunkQKOFQMAY_cjs.ViewerFrame,
2225
+ chunk5YX3R6CK_cjs.ViewerFrame,
2226
2226
  {
2227
2227
  frameRef: containerRef,
2228
2228
  contentId: documentId,
@@ -2267,7 +2267,7 @@ function DocumentViewerContent({
2267
2267
  )
2268
2268
  ),
2269
2269
  children: [
2270
- isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2270
+ isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2271
2271
  NativeDocxComparison,
2272
2272
  {
2273
2273
  baseId: compareDocumentId,
@@ -2277,7 +2277,7 @@ function DocumentViewerContent({
2277
2277
  ) }),
2278
2278
  isCaptureDraft && support.renderCaptureDraft?.(documentId),
2279
2279
  !isCaptureDraft && (activeTab === "pdf" || isMedia && activeTab === "html") && !isArtifact && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(chunkUWIILWDI_cjs.ViewerPane, { hidden: activeTab !== "pdf", children: [
2280
- /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.DocumentLabelBar, { summaries: labelSummaries }),
2280
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.DocumentLabelBar, { summaries: labelSummaries }),
2281
2281
  !isMedia && !isImage && signatureBanner,
2282
2282
  activeTab === "pdf" && !isMedia && !isImage && /* @__PURE__ */ jsxRuntime.jsx(
2283
2283
  chunkCKNUL4LM_cjs.MarkupNotices,
@@ -2287,7 +2287,7 @@ function DocumentViewerContent({
2287
2287
  onOpenVersion: (n) => setSnapshotDocumentId(`${documentId}@v${n}`)
2288
2288
  }
2289
2289
  ),
2290
- /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerControlBar, { controls: activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
2290
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerControlBar, { controls: activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
2291
2291
  ViewerPdfPane,
2292
2292
  {
2293
2293
  documentId,
@@ -2326,7 +2326,7 @@ function DocumentViewerContent({
2326
2326
  }
2327
2327
  ),
2328
2328
  activeTab === "edit" && isArtifact && liveKind && /* @__PURE__ */ jsxRuntime.jsx(chunk2YV7FBLO_cjs.ArtifactCodeView, { source: liveSource, fileName: documentData?.file_name ?? void 0 }),
2329
- activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
2329
+ activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
2330
2330
  isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkCKNUL4LM_cjs.SignedEditNote, {}),
2331
2331
  /* @__PURE__ */ jsxRuntime.jsx(
2332
2332
  NativeDocxEditor,
@@ -2369,8 +2369,8 @@ function DocumentViewerContent({
2369
2369
  onOpenTranslation: (id) => setViewingDocumentId(id)
2370
2370
  }
2371
2371
  ),
2372
- activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
2373
- activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
2372
+ activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
2373
+ activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
2374
2374
  signatureBanner,
2375
2375
  isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkCKNUL4LM_cjs.SignedEditNote, {}),
2376
2376
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2383,7 +2383,7 @@ function DocumentViewerContent({
2383
2383
  `${snapshotDocumentId || documentId}-${snapshotDocumentId ? "snapshot" : "live"}`
2384
2384
  )
2385
2385
  ] }),
2386
- streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerMessage, { children: "Opening draft\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2386
+ streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerMessage, { children: "Opening draft\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2387
2387
  StreamedWordArtifact,
2388
2388
  {
2389
2389
  documentId: documentId.startsWith("doc-") ? documentId : void 0,
@@ -2393,7 +2393,7 @@ function DocumentViewerContent({
2393
2393
  },
2394
2394
  documentId
2395
2395
  ) }),
2396
- !isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkUWIILWDI_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkQKOFQMAY_cjs.ViewerControlBar, { controls: pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
2396
+ !isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkUWIILWDI_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(chunk5YX3R6CK_cjs.ViewerControlBar, { controls: pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
2397
2397
  ParsedTextView,
2398
2398
  {
2399
2399
  documentId: pdfSnapshotId || documentId,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { ConnectedMarkdown, ConnectedDocumentToolsProvider, useDocumentViewerSupport, useViewerStreamingDocument, useViewerDraftDocument, useViewerIsDetached, useViewerPassageCitation } from '../chunk-A54WLQQA.js';
3
3
  export { ConnectedDocumentToolsProvider } from '../chunk-A54WLQQA.js';
4
- import { HtmlPassage, ViewerTitle, ViewerTabBar, ViewerImageActions, canChangeVisibility, ViewerFrame, ViewerMessage, DocumentLabelBar, ViewerControlBar, ViewerZoomControl, PdfPageNav, ViewerPageCounter, summariseDocTags, isDocumentLabel, ViewerPreviewUnavailable, ViewerLoadError, HtmlViewerRoot, CitedRunNav, HtmlViewerSurface, HtmlPage, HtmlViewerEmpty, TagPassagePanel } from '../chunk-E6EYRQC2.js';
4
+ import { HtmlPassage, ViewerTitle, ViewerTabBar, ViewerImageActions, canChangeVisibility, ViewerFrame, ViewerMessage, DocumentLabelBar, ViewerControlBar, ViewerZoomControl, PdfPageNav, ViewerPageCounter, summariseDocTags, isDocumentLabel, ViewerPreviewUnavailable, ViewerLoadError, HtmlViewerRoot, CitedRunNav, HtmlViewerSurface, HtmlPage, HtmlViewerEmpty, TagPassagePanel } from '../chunk-YYZH6VRP.js';
5
5
  import '../chunk-JJA6GQKH.js';
6
6
  import '../chunk-RC6VTY2H.js';
7
7
  import { MarkupViewNote, AnnotateButton, ShowOriginalButton, DownloadMarkupButton, FileShareDialog, PlaceMySignatureButton, MarkupNotices, SignedEditNote, VersionSnapshotBar, SignatureRequestBanner } from '../chunk-7P24MJQN.js';
@@ -44,7 +44,7 @@ export declare function useDeveloperConfig(): {
44
44
  premium_default?: string | null | undefined;
45
45
  }> | undefined;
46
46
  configField: {
47
- save: (instrument: string, field: string, value: unknown, title?: string) => void;
47
+ save: (instrument: string, field: string, value: unknown, title?: string) => undefined;
48
48
  saveDelta: (changes: Record<string, Record<string, unknown>>, title?: string) => Promise<{
49
49
  external_id: string;
50
50
  title: string | null;
@@ -12,11 +12,12 @@ export declare function FolderPicker({ documents, value, onSelect, }: {
12
12
  onSelect: (folder: string | null) => void;
13
13
  }): import("react").JSX.Element;
14
14
  /** The related documents, the one open in the viewer marked. */
15
- export declare function RelatedDocuments({ doc, related, onOpen, onDelete, onCompare, }: {
15
+ export declare function RelatedDocuments({ doc, related, onOpen, onDelete, canDelete, onCompare, }: {
16
16
  doc: WorkspaceDocument;
17
17
  related: RelatedDocs<WorkspaceDocument>;
18
18
  onOpen?: (docId: string) => void;
19
19
  onDelete?: (docId: string) => void;
20
+ canDelete?: (doc: WorkspaceDocument) => boolean;
20
21
  onCompare?: (docId: string, otherDocId: string) => void;
21
22
  }): import("react").JSX.Element;
22
23
  /** Who last set a value, and when: shown on hover. */
@@ -40,6 +40,7 @@ export interface DocumentFieldOptions {
40
40
  onOpenDocument?: (docId: string) => void;
41
41
  /** Delete a related document (asks first). */
42
42
  onDeleteDocument?: (docId: string) => void;
43
+ canDeleteRelatedDocument?: (doc: WorkspaceDocument) => boolean;
43
44
  /** Compare with a similar document. Absent: not offered. */
44
45
  onCompareDocuments?: (docId: string, otherDocId: string) => void;
45
46
  }
@@ -63,6 +63,7 @@ export declare const RelatedDocumentsCell: import("react").NamedExoticComponent<
63
63
  viewingDocumentId: string | null;
64
64
  onDocumentClick: (docId: string) => void;
65
65
  onDelete: (doc: FileTileDocument) => void;
66
+ canDelete?: (doc: FileTileDocument) => boolean;
66
67
  /** Compare with a similar document. Absent: not offered. */
67
68
  onCompare?: (docId: string, otherDocId: string) => void;
68
69
  }>;
@@ -22,6 +22,7 @@ export interface FilesReviewCardProps {
22
22
  gridApi: GridApi<Doc>;
23
23
  onNavigate: (docId: string) => void;
24
24
  onOpenDocumentViewer: (docId?: string) => void;
25
+ onCompareDocuments?: (docId: string, otherDocId: string) => void;
25
26
  onDeleteDocument: (docId: string) => void;
26
27
  isDocumentViewerEnabled: boolean;
27
28
  onReorderColumns: (newOrder: string[]) => void;
@@ -41,6 +42,8 @@ export interface ConnectedFilesPageProps {
41
42
  onClose?: () => void;
42
43
  /** Open a document in the host's viewer; the open one again closes it. */
43
44
  onToggleDocument: (docId?: string) => void;
45
+ /** Compare two documents in a real host viewer. Absent: no compare action. */
46
+ onCompareDocuments?: (docId: string, otherDocId: string) => void;
44
47
  /** Open the host's upload dialog. */
45
48
  onUpload: (request: FilesUploadRequest) => void;
46
49
  /** Open the host's processing details (a status was clicked). */
@@ -66,7 +69,7 @@ export interface ConnectedFilesPageProps {
66
69
  externalSearchQuery?: string;
67
70
  /** The host's search view (the "search" view mode). Absent: no search view. */
68
71
  renderSearch?: () => ReactNode;
69
- /** The host's review card (the "navigator" view mode). */
72
+ /** Override the shared review form (the "navigator" view mode). */
70
73
  renderReviewCard?: (props: FilesReviewCardProps) => ReactNode;
71
74
  /** The host's fields manager (columns and fields). */
72
75
  renderFieldsManager?: (props: {
@@ -93,5 +96,5 @@ export interface ConnectedFilesPageProps {
93
96
  /** The view until the person picks one on this page. Default: the explorer. */
94
97
  defaultViewMode?: FilesViewMode;
95
98
  }
96
- export declare function ConnectedFilesPage({ isModal, onClose, onToggleDocument, onUpload, onStatusClick, onOpenTags, onExport, onProduce, onEmailWorkspace, onCreateNew, onTakePhoto, headerExtras, workspaceIcon, externalSearchQuery, renderSearch, renderReviewCard, renderFieldsManager, bulkTagBreadcrumb, dialogs, GridComponent, gridStateVersion, onGridApi, onRelatedDocsChange, prefsKey, defaultViewMode, }: ConnectedFilesPageProps): import("react").JSX.Element;
99
+ export declare function ConnectedFilesPage({ isModal, onClose, onToggleDocument, onCompareDocuments, onUpload, onStatusClick, onOpenTags, onExport, onProduce, onEmailWorkspace, onCreateNew, onTakePhoto, headerExtras, workspaceIcon, externalSearchQuery, renderSearch, renderReviewCard, renderFieldsManager, bulkTagBreadcrumb, dialogs, GridComponent, gridStateVersion, onGridApi, onRelatedDocsChange, prefsKey, defaultViewMode, }: ConnectedFilesPageProps): import("react").JSX.Element;
97
100
  export {};
@@ -0,0 +1,32 @@
1
+ /**
2
+ * DocumentReviewCard Component
3
+ *
4
+ * Dynamic vertical form renderer for document fields.
5
+ * Renders columns (tags) vertically for a single document.
6
+ * Schema + Data pattern: Tags = columns, DocTags = cell values.
7
+ */
8
+ import type { GridApi } from 'ag-grid-community';
9
+ import type { WorkspaceDocument as Doc } from '@arbidocs/react';
10
+ interface DocumentReviewCardProps {
11
+ /** Current document to display */
12
+ currentDocument: Doc | null;
13
+ /** All documents for navigation (filtered/sorted) */
14
+ documents: Doc[];
15
+ /** Grid ID whose saved column order and visibility the form follows. */
16
+ gridId: string;
17
+ /** Grid API for column definitions */
18
+ gridApi: GridApi<Doc>;
19
+ /** Called when navigating to a different document */
20
+ onNavigate: (docId: string) => void;
21
+ onOpenDocumentViewer: (docId?: string) => void;
22
+ onDeleteDocument: (docId: string) => void;
23
+ isDocumentViewerEnabled?: boolean;
24
+ onReorderColumns?: (newOrder: string[]) => void;
25
+ onCompareDocuments?: (docId: string, otherDocId: string) => void;
26
+ /** Pre-computed nav state from the parent. If omitted, the hook runs internally. */
27
+ currentIndex?: number;
28
+ onPrevious?: () => void;
29
+ onNext?: () => void;
30
+ }
31
+ export declare function DocumentReviewCard({ currentDocument: currentDoc, documents, gridId, gridApi, onDeleteDocument, onOpenDocumentViewer, onReorderColumns, onCompareDocuments, }: DocumentReviewCardProps): import("react").JSX.Element;
32
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * useDocumentValueWrites Hook
3
+ *
4
+ * Provides stable mutation functions for creating, updating, and deleting document tags.
5
+ * Handles checkbox, text, number, and select tag types with citation support.
6
+ */
7
+ import type { WorkspaceDocument as Doc } from '@arbidocs/react';
8
+ import type { TagResponse as Tag } from '@arbidocs/sdk/browser';
9
+ import type { DocTagCitations as Citations } from '../fields/documentField';
10
+ interface UseDocumentValueWritesResult {
11
+ handleUpdateTagValue: (doc: Doc, tag: Tag, value: string | boolean) => Promise<void>;
12
+ handleUpdateTagWithCitations: (doc: Doc, tag: Tag, note: string, citations: Citations) => Promise<void>;
13
+ }
14
+ export declare function useDocumentValueWrites(): UseDocumentValueWritesResult;
15
+ export {};
@@ -0,0 +1,33 @@
1
+ import type { GridApi } from 'ag-grid-community';
2
+ import { useSensors, DragEndEvent, DragStartEvent } from '@dnd-kit/core';
3
+ import type { TagResponse as Tag } from '@arbidocs/sdk/browser';
4
+ interface ColumnInfo {
5
+ id: string;
6
+ label: string;
7
+ type: 'standard' | 'custom';
8
+ tag?: Tag;
9
+ }
10
+ interface UseReviewColumnsProps {
11
+ gridId: string;
12
+ gridApi?: Pick<GridApi, 'getState' | 'isDestroyed'> | null;
13
+ workspaceTags: Tag[];
14
+ getColumnLabel: (colId: string) => string;
15
+ onReorderColumns?: (newOrder: string[]) => void;
16
+ }
17
+ interface UseReviewColumnsResult {
18
+ activeId: string | null;
19
+ hiddenExpanded: boolean;
20
+ setHiddenExpanded: (expanded: boolean) => void;
21
+ sensors: ReturnType<typeof useSensors>;
22
+ visibleColumns: string[];
23
+ allColumns: ColumnInfo[];
24
+ visibleColumnsList: ColumnInfo[];
25
+ hiddenColumnsList: ColumnInfo[];
26
+ activeColumn: ColumnInfo | null;
27
+ handleDragStart: (event: DragStartEvent) => void;
28
+ handleDragEnd: (event: DragEndEvent) => void;
29
+ handleHideColumn: (colId: string) => void;
30
+ handleShowColumn: (colId: string) => void;
31
+ }
32
+ export declare function useReviewColumns({ gridId, gridApi, workspaceTags, getColumnLabel, onReorderColumns, }: UseReviewColumnsProps): UseReviewColumnsResult;
33
+ export {};
@@ -18,6 +18,8 @@ export interface RelatedDocsCellProps<T> {
18
18
  /** "Switch to": open the doc in the viewer. */
19
19
  onSwitchTo: (doc: T) => void;
20
20
  onDelete: (doc: T) => void;
21
+ /** Whether this viewer may delete a related document. Defaults to true for existing hosts. */
22
+ canDelete?: (doc: T) => boolean;
21
23
  /** Compare with a similar document. Absent: not offered. */
22
24
  onCompare?: (doc: T) => void;
23
25
  className?: string;
@@ -27,4 +29,4 @@ export interface RelatedDocsCellProps<T> {
27
29
  * duplicates, similar); clicking opens a popover grouping the related documents with an action
28
30
  * per group (Switch to / Delete / Compare). Renders nothing when there are no relations.
29
31
  */
30
- export declare function RelatedDocsCell<T>({ parent, attachments, madeFrom, copies, getRelation, duplicates, similar, renderDoc, getKey, onSwitchTo, onDelete, onCompare, className, }: RelatedDocsCellProps<T>): import("react").JSX.Element | null;
32
+ export declare function RelatedDocsCell<T>({ parent, attachments, madeFrom, copies, getRelation, duplicates, similar, renderDoc, getKey, onSwitchTo, onDelete, canDelete, onCompare, className, }: RelatedDocsCellProps<T>): import("react").JSX.Element | null;