@arbidocs/blocks 0.4.76 → 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.
- package/dist/agents/index.cjs +331 -255
- package/dist/agents/index.js +2 -2
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
- package/dist/agents/tasks/WorkflowThreadStrip.d.ts +7 -1
- package/dist/agents/workflows/SchemaForm.d.ts +6 -1
- package/dist/agents/workflows/StepParts.d.ts +109 -0
- package/dist/agents/workflows/WorkflowRunner.d.ts +11 -2
- package/dist/agents/workflows/index.d.ts +3 -2
- package/dist/agents/workflows/planSteps.d.ts +8 -1
- package/dist/agents/workflows/run.d.ts +61 -8
- package/dist/agents/workflows/types.d.ts +133 -4
- package/dist/agents/workflows/useWorkflowPreview.d.ts +2 -1
- package/dist/agents/workflows/useWorkflowView.d.ts +19 -0
- package/dist/chat/ChatPage.d.ts +1 -1
- package/dist/chat/WorkflowStepChip.d.ts +24 -0
- package/dist/chat/chat-page-types.d.ts +4 -0
- package/dist/chat/index.cjs +130 -122
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/index.js +2 -2
- package/dist/{chunk-22P5KNIM.js → chunk-34UW6XUQ.js} +928 -38
- package/dist/chunk-34UW6XUQ.js.map +1 -0
- package/dist/{chunk-VYRKO3XU.cjs → chunk-3XR3IEGU.cjs} +944 -35
- package/dist/chunk-3XR3IEGU.cjs.map +1 -0
- package/dist/{chunk-ZWA7UUZL.cjs → chunk-7YUFMNFW.cjs} +2 -54
- package/dist/chunk-7YUFMNFW.cjs.map +1 -0
- package/dist/chunk-A24C6BNA.js +92 -0
- package/dist/chunk-A24C6BNA.js.map +1 -0
- package/dist/chunk-AINNADMT.cjs +62 -0
- package/dist/chunk-AINNADMT.cjs.map +1 -0
- package/dist/{chunk-7CVF3DK2.cjs → chunk-EKIUMNCN.cjs} +5 -5
- package/dist/{chunk-7CVF3DK2.cjs.map → chunk-EKIUMNCN.cjs.map} +1 -1
- package/dist/chunk-FE4ULGOR.js +151 -0
- package/dist/chunk-FE4ULGOR.js.map +1 -0
- package/dist/chunk-FT5FFXSJ.js +60 -0
- package/dist/chunk-FT5FFXSJ.js.map +1 -0
- package/dist/{chunk-HITAN7JF.cjs → chunk-GTXOV7IJ.cjs} +4 -4
- package/dist/{chunk-HITAN7JF.cjs.map → chunk-GTXOV7IJ.cjs.map} +1 -1
- package/dist/{chunk-TKB7TVMW.js → chunk-HEVVT6IT.js} +78 -14
- package/dist/chunk-HEVVT6IT.js.map +1 -0
- package/dist/{chunk-IPGKTUF7.cjs → chunk-HOD6OM7L.cjs} +68 -3
- package/dist/chunk-HOD6OM7L.cjs.map +1 -0
- package/dist/{chunk-7FKARMA3.cjs → chunk-JFUN4D7D.cjs} +101 -37
- package/dist/chunk-JFUN4D7D.cjs.map +1 -0
- package/dist/{chunk-UIWLDSTF.js → chunk-NIP5BOP7.js} +68 -5
- package/dist/chunk-NIP5BOP7.js.map +1 -0
- package/dist/{chunk-MK6NJQGF.js → chunk-OEM5ARVM.js} +3 -3
- package/dist/{chunk-MK6NJQGF.js.map → chunk-OEM5ARVM.js.map} +1 -1
- package/dist/{chunk-5EBGRG3X.js → chunk-OPA2Y6YZ.js} +3 -54
- package/dist/chunk-OPA2Y6YZ.js.map +1 -0
- package/dist/chunk-TZR36PPP.cjs +95 -0
- package/dist/chunk-TZR36PPP.cjs.map +1 -0
- package/dist/{chunk-WJEKRSPH.js → chunk-UEU23PTW.js} +3 -3
- package/dist/{chunk-WJEKRSPH.js.map → chunk-UEU23PTW.js.map} +1 -1
- package/dist/chunk-ZVBPRMHJ.cjs +153 -0
- package/dist/chunk-ZVBPRMHJ.cjs.map +1 -0
- package/dist/connect/docx.cjs +10 -88
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +6 -86
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +293 -30
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +278 -15
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedWorkflowRunner.d.ts +16 -2
- package/dist/connection/WorkflowRunnerDialogs.d.ts +37 -0
- package/dist/connection/useWorkflowThread.d.ts +12 -0
- package/dist/document-tools/index.cjs +7 -143
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +5 -144
- package/dist/document-tools/index.js.map +1 -1
- package/dist/docx/index.cjs +18 -17
- package/dist/docx/index.cjs.map +1 -1
- package/dist/docx/index.js +3 -2
- package/dist/docx/index.js.map +1 -1
- package/dist/index.cjs +467 -383
- package/dist/index.js +5 -5
- package/dist/studio/index.cjs +3 -3
- package/dist/studio/index.js +2 -2
- package/dist/workflow-canvas/StepActionSettings.d.ts +132 -0
- package/dist/workflow-canvas/StepInspector.d.ts +25 -2
- package/dist/workflow-canvas/WorkflowBuilder.d.ts +11 -3
- package/dist/workflow-canvas/WorkflowCanvas.d.ts +27 -2
- package/dist/workflow-canvas/edit.d.ts +9 -1
- package/dist/workflow-canvas/index.cjs +879 -99
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +846 -66
- package/dist/workflow-canvas/index.js.map +1 -1
- package/package.json +4 -4
- package/src/workflow-canvas/canvas.css +9 -0
- package/dist/chunk-22P5KNIM.js.map +0 -1
- package/dist/chunk-5EBGRG3X.js.map +0 -1
- package/dist/chunk-7FKARMA3.cjs.map +0 -1
- package/dist/chunk-IPGKTUF7.cjs.map +0 -1
- package/dist/chunk-TKB7TVMW.js.map +0 -1
- package/dist/chunk-UIWLDSTF.js.map +0 -1
- package/dist/chunk-VYRKO3XU.cjs.map +0 -1
- 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({
|
|
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-
|
|
2385
|
-
//# sourceMappingURL=chunk-
|
|
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
|