@arbidocs/blocks 0.4.75 → 0.4.77

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 (113) hide show
  1. package/dist/agents/index.cjs +341 -253
  2. package/dist/agents/index.js +3 -3
  3. package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
  4. package/dist/agents/tasks/WorkflowThreadStrip.d.ts +44 -1
  5. package/dist/agents/tasks/index.d.ts +2 -1
  6. package/dist/agents/tasks/linkedRuns.d.ts +31 -0
  7. package/dist/agents/workflows/SchemaForm.d.ts +6 -1
  8. package/dist/agents/workflows/StepParts.d.ts +109 -0
  9. package/dist/agents/workflows/WorkflowRunner.d.ts +11 -2
  10. package/dist/agents/workflows/index.d.ts +3 -2
  11. package/dist/agents/workflows/planSteps.d.ts +10 -1
  12. package/dist/agents/workflows/run.d.ts +61 -8
  13. package/dist/agents/workflows/types.d.ts +160 -4
  14. package/dist/agents/workflows/useWorkflowPreview.d.ts +2 -1
  15. package/dist/agents/workflows/useWorkflowView.d.ts +19 -0
  16. package/dist/chat/ChatPage.d.ts +1 -1
  17. package/dist/chat/WorkflowStepChip.d.ts +24 -0
  18. package/dist/chat/chat-page-types.d.ts +4 -0
  19. package/dist/chat/index.cjs +130 -122
  20. package/dist/chat/index.d.ts +1 -0
  21. package/dist/chat/index.js +2 -2
  22. package/dist/{chunk-YWYVIQ7T.js → chunk-34UW6XUQ.js} +948 -38
  23. package/dist/chunk-34UW6XUQ.js.map +1 -0
  24. package/dist/{chunk-P2RBE3FD.cjs → chunk-3XR3IEGU.cjs} +965 -35
  25. package/dist/chunk-3XR3IEGU.cjs.map +1 -0
  26. package/dist/{chunk-ZWA7UUZL.cjs → chunk-7YUFMNFW.cjs} +2 -54
  27. package/dist/chunk-7YUFMNFW.cjs.map +1 -0
  28. package/dist/chunk-A24C6BNA.js +92 -0
  29. package/dist/chunk-A24C6BNA.js.map +1 -0
  30. package/dist/chunk-AINNADMT.cjs +62 -0
  31. package/dist/chunk-AINNADMT.cjs.map +1 -0
  32. package/dist/{chunk-7CVF3DK2.cjs → chunk-EKIUMNCN.cjs} +5 -5
  33. package/dist/{chunk-7CVF3DK2.cjs.map → chunk-EKIUMNCN.cjs.map} +1 -1
  34. package/dist/chunk-FE4ULGOR.js +151 -0
  35. package/dist/chunk-FE4ULGOR.js.map +1 -0
  36. package/dist/chunk-FT5FFXSJ.js +60 -0
  37. package/dist/chunk-FT5FFXSJ.js.map +1 -0
  38. package/dist/{chunk-HITAN7JF.cjs → chunk-GTXOV7IJ.cjs} +4 -4
  39. package/dist/{chunk-HITAN7JF.cjs.map → chunk-GTXOV7IJ.cjs.map} +1 -1
  40. package/dist/{chunk-LT2UORRG.js → chunk-HEVVT6IT.js} +205 -38
  41. package/dist/chunk-HEVVT6IT.js.map +1 -0
  42. package/dist/{chunk-IPGKTUF7.cjs → chunk-HOD6OM7L.cjs} +68 -3
  43. package/dist/chunk-HOD6OM7L.cjs.map +1 -0
  44. package/dist/{chunk-F4LUD3YC.cjs → chunk-JFUN4D7D.cjs} +229 -60
  45. package/dist/chunk-JFUN4D7D.cjs.map +1 -0
  46. package/dist/{chunk-UIWLDSTF.js → chunk-NIP5BOP7.js} +68 -5
  47. package/dist/chunk-NIP5BOP7.js.map +1 -0
  48. package/dist/{chunk-MK6NJQGF.js → chunk-OEM5ARVM.js} +3 -3
  49. package/dist/{chunk-MK6NJQGF.js.map → chunk-OEM5ARVM.js.map} +1 -1
  50. package/dist/{chunk-5EBGRG3X.js → chunk-OPA2Y6YZ.js} +3 -54
  51. package/dist/chunk-OPA2Y6YZ.js.map +1 -0
  52. package/dist/chunk-TZR36PPP.cjs +95 -0
  53. package/dist/chunk-TZR36PPP.cjs.map +1 -0
  54. package/dist/{chunk-WJEKRSPH.js → chunk-UEU23PTW.js} +3 -3
  55. package/dist/{chunk-WJEKRSPH.js.map → chunk-UEU23PTW.js.map} +1 -1
  56. package/dist/chunk-ZVBPRMHJ.cjs +153 -0
  57. package/dist/chunk-ZVBPRMHJ.cjs.map +1 -0
  58. package/dist/connect/docx.cjs +10 -88
  59. package/dist/connect/docx.cjs.map +1 -1
  60. package/dist/connect/docx.js +6 -86
  61. package/dist/connect/docx.js.map +1 -1
  62. package/dist/connect/index.cjs +295 -32
  63. package/dist/connect/index.cjs.map +1 -1
  64. package/dist/connect/index.js +280 -17
  65. package/dist/connect/index.js.map +1 -1
  66. package/dist/connection/ConnectedWorkflowRunner.d.ts +16 -2
  67. package/dist/connection/WorkflowRunnerDialogs.d.ts +37 -0
  68. package/dist/connection/useWorkflowThread.d.ts +12 -0
  69. package/dist/document-tools/index.cjs +7 -143
  70. package/dist/document-tools/index.cjs.map +1 -1
  71. package/dist/document-tools/index.js +5 -144
  72. package/dist/document-tools/index.js.map +1 -1
  73. package/dist/docx/index.cjs +18 -17
  74. package/dist/docx/index.cjs.map +1 -1
  75. package/dist/docx/index.js +3 -2
  76. package/dist/docx/index.js.map +1 -1
  77. package/dist/facts/index.cjs +1 -1
  78. package/dist/facts/index.js +1 -1
  79. package/dist/files/index.cjs +1 -1
  80. package/dist/files/index.js +1 -1
  81. package/dist/home/index.cjs +1 -1
  82. package/dist/home/index.js +1 -1
  83. package/dist/index.cjs +631 -535
  84. package/dist/index.js +8 -8
  85. package/dist/settings/index.cjs +1 -1
  86. package/dist/settings/index.js +1 -1
  87. package/dist/shell/index.cjs +1 -1
  88. package/dist/shell/index.js +1 -1
  89. package/dist/studio/index.cjs +4 -4
  90. package/dist/studio/index.js +3 -3
  91. package/dist/workflow-canvas/SignalsEditor.d.ts +41 -0
  92. package/dist/workflow-canvas/StepActionSettings.d.ts +132 -0
  93. package/dist/workflow-canvas/StepInspector.d.ts +28 -2
  94. package/dist/workflow-canvas/TriggerInspector.d.ts +11 -2
  95. package/dist/workflow-canvas/WorkflowBuilder.d.ts +17 -4
  96. package/dist/workflow-canvas/WorkflowCanvas.d.ts +27 -2
  97. package/dist/workflow-canvas/edit.d.ts +9 -1
  98. package/dist/workflow-canvas/index.cjs +1282 -208
  99. package/dist/workflow-canvas/index.cjs.map +1 -1
  100. package/dist/workflow-canvas/index.d.ts +2 -1
  101. package/dist/workflow-canvas/index.js +1255 -188
  102. package/dist/workflow-canvas/index.js.map +1 -1
  103. package/dist/workflow-canvas/trigger.d.ts +20 -1
  104. package/package.json +4 -4
  105. package/src/workflow-canvas/canvas.css +9 -0
  106. package/dist/chunk-5EBGRG3X.js.map +0 -1
  107. package/dist/chunk-F4LUD3YC.cjs.map +0 -1
  108. package/dist/chunk-IPGKTUF7.cjs.map +0 -1
  109. package/dist/chunk-LT2UORRG.js.map +0 -1
  110. package/dist/chunk-P2RBE3FD.cjs.map +0 -1
  111. package/dist/chunk-UIWLDSTF.js.map +0 -1
  112. package/dist/chunk-YWYVIQ7T.js.map +0 -1
  113. package/dist/chunk-ZWA7UUZL.cjs.map +0 -1
@@ -6,10 +6,54 @@ import { observeResize } from './chunk-NPLYHR2E.js';
6
6
  import { formatCount } from './chunk-OXF2IFXG.js';
7
7
  import { testIdOr } from './chunk-7F6CBP3Z.js';
8
8
  import { forwardRef, useState, useRef, useCallback, useEffect, useMemo, useSyncExternalStore, useLayoutEffect } from 'react';
9
- import { FileText, ChevronDown, Pencil, Sparkles, ChevronUp, MoreHorizontal, RotateCw, AlertCircle, ArrowLeft, Edit3, Send, Loader2, Square, Mic, ArrowDown, MessagesSquare, Bot, GanttChartSquare, ArrowUpRight, Upload, MessageSquarePlus, Trash2, PanelRight, MessageSquare, X, FileUp } from 'lucide-react';
9
+ import { FileText, ChevronDown, Pencil, Workflow, ChevronRight, Sparkles, ChevronUp, MoreHorizontal, RotateCw, AlertCircle, ArrowLeft, Edit3, Send, Loader2, Square, Mic, ArrowDown, MessagesSquare, Bot, GanttChartSquare, ArrowUpRight, Upload, MessageSquarePlus, Trash2, PanelRight, MessageSquare, X, FileUp } from 'lucide-react';
10
10
  import { cn, Textarea, Button, PopoverTrigger, Popover, PopoverAnchor, PopoverContent, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuItem, Tooltip, TooltipTrigger, TooltipContent, MarkdownRenderer, closeOpenEmphasis, trimOpenCitation } from '@arbidocs/react/ui';
11
11
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
12
12
 
13
+ var DEFAULT_WORKFLOW_STEP_CHIP_LABELS = {
14
+ chip: "Workflow step \xB7 {title}",
15
+ show: "Show the instruction",
16
+ hide: "Hide the instruction"
17
+ };
18
+ function WorkflowStepChip({
19
+ step,
20
+ title,
21
+ content,
22
+ labels,
23
+ className,
24
+ testId = "workflow-step-message"
25
+ }) {
26
+ const l = { ...DEFAULT_WORKFLOW_STEP_CHIP_LABELS, ...labels };
27
+ const [open, setOpen] = useState(false);
28
+ const Chevron = open ? ChevronDown : ChevronRight;
29
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex max-w-full flex-col items-end gap-1", className), "data-testid": testId, children: [
30
+ /* @__PURE__ */ jsxs(
31
+ "button",
32
+ {
33
+ type: "button",
34
+ onClick: () => setOpen((o) => !o),
35
+ "aria-expanded": open,
36
+ title: open ? l.hide : l.show,
37
+ className: "inline-flex max-w-full items-center gap-1.5 rounded-full border border-border bg-muted/60 px-2.5 py-1 text-xs font-medium text-muted-foreground hover:text-foreground",
38
+ "data-step": step,
39
+ "data-testid": `${testId}-toggle`,
40
+ children: [
41
+ /* @__PURE__ */ jsx(Workflow, { className: "size-3.5 shrink-0 text-primary", "aria-hidden": true }),
42
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: l.chip.replace("{title}", title || step) }),
43
+ /* @__PURE__ */ jsx(Chevron, { className: "size-3.5 shrink-0", "aria-hidden": true })
44
+ ]
45
+ }
46
+ ),
47
+ open && /* @__PURE__ */ jsx(
48
+ "p",
49
+ {
50
+ className: "m-0 max-w-prose whitespace-pre-wrap break-words rounded-lg border border-border bg-card px-3 py-2 text-sm text-muted-foreground",
51
+ "data-testid": `${testId}-content`,
52
+ children: content
53
+ }
54
+ )
55
+ ] });
56
+ }
13
57
  var LINE_PX = 16;
14
58
  function wheelPixels(event, page) {
15
59
  if (event.deltaMode === 1) return event.deltaY * LINE_PX;
@@ -1791,7 +1835,24 @@ var USER_BUBBLE = "bg-[color:hsl(var(--chat-user-bubble,var(--muted)))] text-[co
1791
1835
  var NEAR_BOTTOM_PX = 96;
1792
1836
  var LIST_COLUMN_REM = 48;
1793
1837
  var DEFAULT_ASIDE_BREAKPOINT_REM = 60;
1794
- function MessageRow({ message, identity, renderContent, onOpenCitation, labels }) {
1838
+ function MessageRow({
1839
+ message,
1840
+ identity,
1841
+ renderContent,
1842
+ onOpenCitation,
1843
+ workflowStepTitle,
1844
+ labels
1845
+ }) {
1846
+ if (message.role === "user" && message.workflowStep) {
1847
+ return /* @__PURE__ */ jsx(Message.Root, { role: "user", messageId: message.id, children: /* @__PURE__ */ jsx(Message.Content, { role: "user", messageId: message.id, children: /* @__PURE__ */ jsx(
1848
+ WorkflowStepChip,
1849
+ {
1850
+ step: message.workflowStep,
1851
+ title: workflowStepTitle?.(message.workflowStep),
1852
+ content: message.content
1853
+ }
1854
+ ) }) });
1855
+ }
1795
1856
  if (message.role === "user") {
1796
1857
  return /* @__PURE__ */ jsx(Message.Root, { role: "user", messageId: message.id, children: /* @__PURE__ */ jsxs(Message.Content, { role: "user", messageId: message.id, children: [
1797
1858
  message.senderName && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: message.senderName }),
@@ -1857,6 +1918,7 @@ function ChatPage({
1857
1918
  identity,
1858
1919
  renderContent,
1859
1920
  onOpenCitation,
1921
+ workflowStepTitle,
1860
1922
  targetMessageId,
1861
1923
  asideBreakpoint = DEFAULT_ASIDE_BREAKPOINT_REM,
1862
1924
  fillHeight = false,
@@ -2137,6 +2199,7 @@ function ChatPage({
2137
2199
  identity,
2138
2200
  renderContent,
2139
2201
  onOpenCitation,
2202
+ workflowStepTitle,
2140
2203
  labels: l
2141
2204
  }
2142
2205
  )
@@ -2380,6 +2443,6 @@ function AssistantDock({
2380
2443
  );
2381
2444
  }
2382
2445
 
2383
- export { AssistantDock, AssistantDockToggle, AssistantModeToggle, ChatDocuments, ChatMessageContent, ChatPage, ChatThreadList, ChatThreadSelect, CitationMark, Composer, ComposerBranchingNotice, ComposerContainer, ComposerDock, ComposerFrame, ComposerInput, ComposerRoot, ComposerSend, ComposerToolbar, ComposerVoiceButton, ContextChip, ConversationEmpty, DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS, DEFAULT_CHAT_PAGE_LABELS, DEFAULT_COMPOSER_LABELS, DEFAULT_CONVERSATION_EMPTY_LABELS, DEFAULT_MESSAGE_ALERT_LABELS, DEFAULT_MESSAGE_LABELS, DEFAULT_MESSAGE_LIST_LABELS, Message, MessageActionButton, MessageActionMenu, MessageAlert, MessageBody, MessageBubble, MessageByline, MessageContent, MessageFooter, MessageList, MessageListBanner, MessageListEmpty, MessageListRoot, MessageListRow, MessageListRows, MessageListStatus, MessageListTail, MessageNarration, MessageRoot, MessageSources, MessageSubagentBadge, ScrollToBottom, SourceChip, toSpeakableText, useAssistantDock, useChatSurface, useRegisterEmbeddedChat, useStreamAnnouncement };
2384
- //# sourceMappingURL=chunk-UIWLDSTF.js.map
2385
- //# sourceMappingURL=chunk-UIWLDSTF.js.map
2446
+ export { AssistantDock, AssistantDockToggle, AssistantModeToggle, ChatDocuments, ChatMessageContent, ChatPage, ChatThreadList, ChatThreadSelect, CitationMark, Composer, ComposerBranchingNotice, ComposerContainer, ComposerDock, ComposerFrame, ComposerInput, ComposerRoot, ComposerSend, ComposerToolbar, ComposerVoiceButton, ContextChip, ConversationEmpty, DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS, DEFAULT_CHAT_PAGE_LABELS, DEFAULT_COMPOSER_LABELS, DEFAULT_CONVERSATION_EMPTY_LABELS, DEFAULT_MESSAGE_ALERT_LABELS, DEFAULT_MESSAGE_LABELS, DEFAULT_MESSAGE_LIST_LABELS, DEFAULT_WORKFLOW_STEP_CHIP_LABELS, Message, MessageActionButton, MessageActionMenu, MessageAlert, MessageBody, MessageBubble, MessageByline, MessageContent, MessageFooter, MessageList, MessageListBanner, MessageListEmpty, MessageListRoot, MessageListRow, MessageListRows, MessageListStatus, MessageListTail, MessageNarration, MessageRoot, MessageSources, MessageSubagentBadge, ScrollToBottom, SourceChip, WorkflowStepChip, toSpeakableText, useAssistantDock, useChatSurface, useRegisterEmbeddedChat, useStreamAnnouncement };
2447
+ //# sourceMappingURL=chunk-NIP5BOP7.js.map
2448
+ //# sourceMappingURL=chunk-NIP5BOP7.js.map