@arbidocs/blocks 0.4.88 → 0.4.90

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 (38) hide show
  1. package/dist/agents/index.cjs +207 -207
  2. package/dist/agents/index.js +2 -2
  3. package/dist/{chunk-2CFW2ELM.cjs → chunk-2EI7NCUA.cjs} +2 -8
  4. package/dist/chunk-2EI7NCUA.cjs.map +1 -0
  5. package/dist/{chunk-UZV27QLC.js → chunk-NQS7NFGM.js} +3 -3
  6. package/dist/{chunk-UZV27QLC.js.map → chunk-NQS7NFGM.js.map} +1 -1
  7. package/dist/{chunk-FNEL2BYV.cjs → chunk-TMKJACMP.cjs} +6 -6
  8. package/dist/{chunk-FNEL2BYV.cjs.map → chunk-TMKJACMP.cjs.map} +1 -1
  9. package/dist/{chunk-ZX2VPMBJ.js → chunk-YU2KUMGE.js} +2 -8
  10. package/dist/chunk-YU2KUMGE.js.map +1 -0
  11. package/dist/connect/index.cjs +52 -10
  12. package/dist/connect/index.cjs.map +1 -1
  13. package/dist/connect/index.js +52 -10
  14. package/dist/connect/index.js.map +1 -1
  15. package/dist/connection/WorkflowRunnerDialogs.d.ts +2 -0
  16. package/dist/facts/FactSourceGroup.d.ts +2 -1
  17. package/dist/facts/index.cjs +6 -6
  18. package/dist/facts/index.cjs.map +1 -1
  19. package/dist/facts/index.js +3 -3
  20. package/dist/facts/index.js.map +1 -1
  21. package/dist/files/cells/LabelMultiSelect.d.ts +11 -3
  22. package/dist/files/index.cjs +19 -13
  23. package/dist/files/index.cjs.map +1 -1
  24. package/dist/files/index.js +18 -12
  25. package/dist/files/index.js.map +1 -1
  26. package/dist/index.cjs +322 -318
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +49 -45
  29. package/dist/index.js.map +1 -1
  30. package/dist/shell/FilterInput.d.ts +1 -3
  31. package/dist/shell/index.cjs +4 -4
  32. package/dist/shell/index.js +1 -1
  33. package/dist/tags/TagDetail.d.ts +10 -1
  34. package/dist/workflow-canvas/index.cjs +9 -9
  35. package/dist/workflow-canvas/index.js +2 -2
  36. package/package.json +4 -4
  37. package/dist/chunk-2CFW2ELM.cjs.map +0 -1
  38. package/dist/chunk-ZX2VPMBJ.js.map +0 -1
@@ -13,7 +13,7 @@ import { splitDocRef, WorkflowStepBar, stepLevels, WorkflowRunner, initialRunInp
13
13
  import { TriStateFilterMenu } from '../chunk-6S5FLMWG.js';
14
14
  import { TabHeader } from '../chunk-4WWM3GQ5.js';
15
15
  import '../chunk-EVUEIBNU.js';
16
- import { FilterInput } from '../chunk-ZX2VPMBJ.js';
16
+ import { FilterInput } from '../chunk-YU2KUMGE.js';
17
17
  import '../chunk-XD2M6LIG.js';
18
18
  import { StreamedArtifactFrame } from '../chunk-LOJVUGBJ.js';
19
19
  import '../chunk-VILAPTCB.js';
@@ -29,7 +29,7 @@ import '../chunk-ZPLG7QYF.js';
29
29
  import '../chunk-SLSBJRWW.js';
30
30
  import '../chunk-7F6CBP3Z.js';
31
31
  import '../chunk-VUNV25KB.js';
32
- import { lazy, useState, useMemo, Suspense, useEffect, useRef, useCallback } from 'react';
32
+ import { lazy, useState, useMemo, Suspense, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
33
33
  import { QueryClient, QueryClientProvider, useQueryClient, useQuery } from '@tanstack/react-query';
34
34
  import { ArbiProvider, useConversations, useRunConversation, useWorkspaceActivity, useWorkspaceUsers, useWorkspaceNotificationLevel, useFollowThread, useUploadSkillFiles, ArtifactCanvas, useArbiChat, useArbi, useDocuments, useTagKindSchema, useTags, useSetTagValues, useUpdateTagKindSchema, useInvalidateTagData, useWorkspaces, useShellWorkspaces, useProfile, useUpdateProfile, useRequestEmailChange, useConfirmEmailChange, useNameEditor, useAvatarCrop, useEmailChange, ImageCropModal, useIdentityVerification, usePasswordChange, usePasswordChangeForm, useNotificationPreferences, useSessions, useCurrentSessionId, useTerminateSession, useLogoutAllSessions, useDeleteAccount, useDeleteAccountFlow, useArbiWebSocket, notify, useWorkNotifications, mailDraftIdFromContent, useMailClient, defaultMailAlias, useClaimNativeAlias, useMailOnline, useConnectMailAccount, useDisconnectMailAccount, useMailPolicy, useMailAccounts, useMailUnlock, useMailFolders, useMailMessages, useMailDraftCompose, useMailCache, useMailMessage, MailOfflineUnavailableError, accountPath, useAgentSession, useStartAgentSession, useCloseAgentSession, isAliasTakenError, nextAliasSuggestion, aliasTakenMessage, mailJson, ArbiWebSocketProvider, useCreateWork, useActOnStep, useConversationActivity, useConversationThreads, fileAttachment, useSaveMailDraft, useSendMail, AiAnswer } from '@arbidocs/react';
35
35
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -558,6 +558,8 @@ var DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS = {
558
558
  reviewDescription: "Each document against each review column.",
559
559
  document: "Document",
560
560
  empty: "\u2014",
561
+ showMore: "Show more",
562
+ showLess: "Show less",
561
563
  wordTitle: "Tracked changes"
562
564
  };
563
565
  var SIGN_PDF_RETRIES = 4;
@@ -699,18 +701,25 @@ function WorkflowReviewGridDialog({
699
701
  labels.loadingDocument
700
702
  ] }) : /* @__PURE__ */ jsxs("table", { className: "w-full border-collapse text-sm", children: [
701
703
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
702
- /* @__PURE__ */ jsx("th", { className: "sticky left-0 border-b border-border bg-card p-2 text-left font-medium", children: labels.document }),
703
- columns.map((c) => /* @__PURE__ */ jsx("th", { className: "border-b border-border p-2 text-left font-medium", children: c.name }, c.id))
704
+ /* @__PURE__ */ jsx("th", { className: "sticky left-0 z-10 border-b border-border bg-background p-2 text-left align-bottom font-medium", children: labels.document }),
705
+ columns.map((c) => /* @__PURE__ */ jsx(
706
+ "th",
707
+ {
708
+ className: "border-b border-border p-2 text-left align-bottom font-medium",
709
+ children: /* @__PURE__ */ jsx("div", { className: `${VALUE_WIDTH} line-clamp-2 break-words`, title: c.name, children: c.name })
710
+ },
711
+ c.id
712
+ ))
704
713
  ] }) }),
705
714
  /* @__PURE__ */ jsx("tbody", { children: (docs.data ?? []).map((d) => /* @__PURE__ */ jsxs("tr", { "data-testid": `workflow-review-grid-row-${d.external_id}`, children: [
706
- /* @__PURE__ */ jsx("td", { className: "sticky left-0 max-w-56 border-b border-border bg-card p-2 align-top", children: /* @__PURE__ */ jsx(Cell, { onClick: onOpenDocument && (() => onOpenDocument(d.external_id)), children: d.file_name ?? d.external_id }) }),
715
+ /* @__PURE__ */ jsx("td", { className: "sticky left-0 z-10 border-b border-border bg-background p-2 align-top", children: /* @__PURE__ */ jsx(DocumentName, { onClick: onOpenDocument && (() => onOpenDocument(d.external_id)), children: d.file_name ?? d.external_id }) }),
707
716
  columns.map((c) => {
708
717
  const note = d.doctags?.find((t) => t.tag_ext_id === c.id)?.note;
709
718
  return /* @__PURE__ */ jsx(
710
719
  "td",
711
720
  {
712
- className: "max-w-72 border-b border-border p-2 align-top text-muted-foreground",
713
- children: /* @__PURE__ */ jsx("span", { className: "line-clamp-4 whitespace-pre-line", children: note || labels.empty })
721
+ className: "border-b border-border p-2 align-top text-muted-foreground",
722
+ children: /* @__PURE__ */ jsx(ReviewValue, { value: note || labels.empty, labels })
714
723
  },
715
724
  c.id
716
725
  );
@@ -720,16 +729,49 @@ function WorkflowReviewGridDialog({
720
729
  }
721
730
  );
722
731
  }
723
- function Cell({ onClick, children }) {
732
+ var DOCUMENT_WIDTH = "w-40 sm:w-56";
733
+ var VALUE_WIDTH = "min-w-48 max-w-80";
734
+ function DocumentName({ onClick, children }) {
735
+ const className = `${DOCUMENT_WIDTH} line-clamp-2 break-words text-left font-medium`;
724
736
  return onClick ? /* @__PURE__ */ jsx(
725
737
  "button",
726
738
  {
727
739
  type: "button",
728
740
  onClick,
729
- className: "truncate text-left font-medium text-primary hover:underline",
741
+ title: children,
742
+ className: `${className} text-primary hover:underline`,
730
743
  children
731
744
  }
732
- ) : /* @__PURE__ */ jsx("span", { className: "truncate font-medium", children });
745
+ ) : /* @__PURE__ */ jsx("div", { title: children, className, children });
746
+ }
747
+ function ReviewValue({ value, labels }) {
748
+ const ref = useRef(null);
749
+ const [expanded, setExpanded] = useState(false);
750
+ const [clamped, setClamped] = useState(false);
751
+ useLayoutEffect(() => {
752
+ const el = ref.current;
753
+ if (el && !expanded) setClamped(el.scrollHeight > el.clientHeight + 1);
754
+ }, [value, expanded]);
755
+ return /* @__PURE__ */ jsxs("div", { className: VALUE_WIDTH, children: [
756
+ /* @__PURE__ */ jsx(
757
+ "div",
758
+ {
759
+ ref,
760
+ title: clamped && !expanded ? value : void 0,
761
+ className: `whitespace-pre-line break-words ${expanded ? "" : "line-clamp-4"}`,
762
+ children: value
763
+ }
764
+ ),
765
+ (clamped || expanded) && /* @__PURE__ */ jsx(
766
+ "button",
767
+ {
768
+ type: "button",
769
+ onClick: () => setExpanded((e) => !e),
770
+ className: "mt-1 text-xs font-medium text-primary hover:underline",
771
+ children: expanded ? labels.showLess : labels.showMore
772
+ }
773
+ )
774
+ ] });
733
775
  }
734
776
  var DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = {
735
777
  notify: "Ask to approve",