@arbidocs/blocks 0.4.92 → 0.4.93
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 +280 -280
- package/dist/agents/index.js +4 -4
- package/dist/{chunk-3US5OIDQ.cjs → chunk-3WW32OUU.cjs} +3 -3
- package/dist/{chunk-3US5OIDQ.cjs.map → chunk-3WW32OUU.cjs.map} +1 -1
- package/dist/{chunk-EHF63UYP.cjs → chunk-AMC5PMJ3.cjs} +5 -5
- package/dist/{chunk-EHF63UYP.cjs.map → chunk-AMC5PMJ3.cjs.map} +1 -1
- package/dist/{chunk-DDYXFALG.cjs → chunk-MROSCSPW.cjs} +43 -43
- package/dist/{chunk-DDYXFALG.cjs.map → chunk-MROSCSPW.cjs.map} +1 -1
- package/dist/{chunk-PGDL26TQ.js → chunk-SF4BDUZS.js} +3 -3
- package/dist/{chunk-PGDL26TQ.js.map → chunk-SF4BDUZS.js.map} +1 -1
- package/dist/{chunk-5NQIBJPP.js → chunk-SJVUKXS6.js} +5 -5
- package/dist/{chunk-5NQIBJPP.js.map → chunk-SJVUKXS6.js.map} +1 -1
- package/dist/{chunk-5RQOVALO.js → chunk-UO74FLRK.js} +3 -3
- package/dist/{chunk-5RQOVALO.js.map → chunk-UO74FLRK.js.map} +1 -1
- package/dist/connect/index.cjs +28 -30
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +8 -10
- package/dist/connect/index.js.map +1 -1
- package/dist/index.cjs +315 -315
- package/dist/index.js +7 -7
- package/dist/workflow-canvas/index.cjs +47 -47
- package/dist/workflow-canvas/index.js +4 -4
- package/package.json +4 -4
package/dist/connect/index.cjs
CHANGED
|
@@ -8,15 +8,15 @@ var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
|
|
|
8
8
|
var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
|
|
9
9
|
require('../chunk-2ZDFVRGV.cjs');
|
|
10
10
|
var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var chunk3US5OIDQ_cjs = require('../chunk-3US5OIDQ.cjs');
|
|
11
|
+
var chunkAMC5PMJ3_cjs = require('../chunk-AMC5PMJ3.cjs');
|
|
12
|
+
var chunk3WW32OUU_cjs = require('../chunk-3WW32OUU.cjs');
|
|
14
13
|
var chunkN26CXGXC_cjs = require('../chunk-N26CXGXC.cjs');
|
|
15
14
|
var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
15
|
+
require('../chunk-7D737FLE.cjs');
|
|
16
16
|
require('../chunk-DETZZBG2.cjs');
|
|
17
17
|
require('../chunk-32HW2Q33.cjs');
|
|
18
18
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
19
|
-
require('../chunk-
|
|
19
|
+
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
20
20
|
require('../chunk-ADOKTJHV.cjs');
|
|
21
21
|
var chunkMP6FK43E_cjs = require('../chunk-MP6FK43E.cjs');
|
|
22
22
|
require('../chunk-VGOFFCMT.cjs');
|
|
@@ -117,7 +117,7 @@ function ConnectedWorkspaceActivity({
|
|
|
117
117
|
[feed.data]
|
|
118
118
|
);
|
|
119
119
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
120
|
-
|
|
120
|
+
chunkAMC5PMJ3_cjs.WorkspaceActivityList,
|
|
121
121
|
{
|
|
122
122
|
...listProps,
|
|
123
123
|
items,
|
|
@@ -143,7 +143,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
143
143
|
});
|
|
144
144
|
if (!workspaceId) return null;
|
|
145
145
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
146
|
-
|
|
146
|
+
chunkAMC5PMJ3_cjs.WorkspaceNotificationMenu,
|
|
147
147
|
{
|
|
148
148
|
...menuProps,
|
|
149
149
|
level,
|
|
@@ -162,7 +162,7 @@ function ConnectedThreadFollow({
|
|
|
162
162
|
enabled: status === "authenticated"
|
|
163
163
|
});
|
|
164
164
|
if (!conversationId) return null;
|
|
165
|
-
const Control = as === "menu-item" ?
|
|
165
|
+
const Control = as === "menu-item" ? chunkAMC5PMJ3_cjs.ThreadFollowMenuItem : chunkAMC5PMJ3_cjs.ThreadFollowButton;
|
|
166
166
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
167
167
|
Control,
|
|
168
168
|
{
|
|
@@ -288,7 +288,7 @@ function StreamedArtifact({
|
|
|
288
288
|
}
|
|
289
289
|
var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
290
290
|
function formValues(step, inputs) {
|
|
291
|
-
const fields =
|
|
291
|
+
const fields = chunk3WW32OUU_cjs.stepFields(step);
|
|
292
292
|
if (!fields.length) return void 0;
|
|
293
293
|
if (step.kind === "form")
|
|
294
294
|
return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
|
|
@@ -326,7 +326,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
326
326
|
const { wsId } = chunkXMBYDLZQ_cjs.useWorkspaceDocs();
|
|
327
327
|
const [threadId, setThreadId] = react.useState(options.conversationId);
|
|
328
328
|
const [localInputs, setLocalInputs] = react.useState(
|
|
329
|
-
() =>
|
|
329
|
+
() => chunk3WW32OUU_cjs.initialRunInputs(workflow, options.initialInputs)
|
|
330
330
|
);
|
|
331
331
|
const [edits, setEdits] = react.useState({});
|
|
332
332
|
const [localStates, setLocalStates] = react.useState({});
|
|
@@ -346,12 +346,12 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
346
346
|
);
|
|
347
347
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
348
348
|
const steps = react.useMemo(
|
|
349
|
-
() =>
|
|
349
|
+
() => chunk3WW32OUU_cjs.workflowSteps(workflow).length > 0 ? chunk3WW32OUU_cjs.workflowSteps(workflow) : chunk3WW32OUU_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
350
350
|
[workflow, conversation?.plan?.steps]
|
|
351
351
|
);
|
|
352
352
|
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
353
353
|
const serverStates = react.useMemo(
|
|
354
|
-
() =>
|
|
354
|
+
() => chunk3WW32OUU_cjs.stepStatesFromActivity(activity.data ?? []),
|
|
355
355
|
[activity.data]
|
|
356
356
|
);
|
|
357
357
|
const working = steps.some(
|
|
@@ -394,7 +394,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
394
394
|
async (values, done) => {
|
|
395
395
|
await ensureWorkspaceOpen();
|
|
396
396
|
const created = await createWork.mutateAsync({
|
|
397
|
-
title:
|
|
397
|
+
title: chunk3WW32OUU_cjs.runThreadTitle(workflow, values).slice(0, 60),
|
|
398
398
|
description: workflow.description || null,
|
|
399
399
|
prompt: null,
|
|
400
400
|
skill_ref: null,
|
|
@@ -406,7 +406,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
406
406
|
criteria: [],
|
|
407
407
|
max_passes: 3,
|
|
408
408
|
documents: [],
|
|
409
|
-
steps:
|
|
409
|
+
steps: chunk3WW32OUU_cjs.toPlanSteps(workflow, {
|
|
410
410
|
inputs: values,
|
|
411
411
|
resolveWorkflow: options.resolveWorkflow,
|
|
412
412
|
compose: options.compose
|
|
@@ -493,7 +493,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
493
493
|
const anyRunning = Object.values(states).some((s) => s.status === "running");
|
|
494
494
|
const needsStart = !threadId || idle && !anyRunning;
|
|
495
495
|
const runError = idle ? conversation?.last_error ?? null : null;
|
|
496
|
-
const view =
|
|
496
|
+
const view = chunk3WW32OUU_cjs.useWorkflowView({
|
|
497
497
|
steps,
|
|
498
498
|
states,
|
|
499
499
|
inputs,
|
|
@@ -574,7 +574,7 @@ function WorkflowSignDialog({
|
|
|
574
574
|
const arbi = react$1.useArbi();
|
|
575
575
|
const { user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
576
576
|
const tools = documentTools.useOptionalDocumentTools();
|
|
577
|
-
const { id, version: stepVersion } =
|
|
577
|
+
const { id, version: stepVersion } = chunk3WW32OUU_cjs.splitDocRef(docRef);
|
|
578
578
|
const [version, setVersion] = react.useState(stepVersion);
|
|
579
579
|
const [pdf, setPdf] = react.useState(null);
|
|
580
580
|
const [preparing, setPreparing] = react.useState(false);
|
|
@@ -652,7 +652,7 @@ function WorkflowWordDialog({
|
|
|
652
652
|
onClose,
|
|
653
653
|
labels
|
|
654
654
|
}) {
|
|
655
|
-
const { id } =
|
|
655
|
+
const { id } = chunk3WW32OUU_cjs.splitDocRef(docRef);
|
|
656
656
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
657
657
|
chunkULWRNGGE_cjs.ModalScaffold,
|
|
658
658
|
{
|
|
@@ -675,10 +675,8 @@ function WorkflowReviewGridDialog({
|
|
|
675
675
|
const { workspaceId } = chunkMUMH3Z6K_cjs.useConnection();
|
|
676
676
|
const allTags = react$1.useTags(workspaceId ?? void 0);
|
|
677
677
|
const all = react$1.useDocuments(workspaceId ?? void 0);
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
data: (all.data ?? []).filter((d) => documents.includes(d.external_id))
|
|
681
|
-
};
|
|
678
|
+
const isLoading = allTags.isLoading || all.isLoading || all.isFetching && !all.isFetchedAfterMount;
|
|
679
|
+
const docs = (all.data ?? []).filter((d) => documents.includes(d.external_id));
|
|
682
680
|
const columns = react.useMemo(
|
|
683
681
|
() => tags.map((id) => ({
|
|
684
682
|
id,
|
|
@@ -696,7 +694,7 @@ function WorkflowReviewGridDialog({
|
|
|
696
694
|
showDescription: true,
|
|
697
695
|
size: "xl",
|
|
698
696
|
testId: "workflow-review-grid",
|
|
699
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "overflow-auto", children:
|
|
697
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "overflow-auto", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
700
698
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
701
699
|
" ",
|
|
702
700
|
labels.loadingDocument
|
|
@@ -712,7 +710,7 @@ function WorkflowReviewGridDialog({
|
|
|
712
710
|
c.id
|
|
713
711
|
))
|
|
714
712
|
] }) }),
|
|
715
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children:
|
|
713
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: docs.map((d) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { "data-testid": `workflow-review-grid-row-${d.external_id}`, children: [
|
|
716
714
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "sticky left-0 z-10 border-b border-border bg-background p-2 align-top", children: /* @__PURE__ */ jsxRuntime.jsx(DocumentName, { onClick: onOpenDocument && (() => onOpenDocument(d.external_id)), children: d.file_name ?? d.external_id }) }),
|
|
717
715
|
columns.map((c) => {
|
|
718
716
|
const note = d.doctags?.find((t) => t.tag_ext_id === c.id)?.note;
|
|
@@ -826,7 +824,7 @@ function ConnectedWorkflowRunner({
|
|
|
826
824
|
() => ({
|
|
827
825
|
me: user?.externalId,
|
|
828
826
|
openDocument: onOpenDocument && ((ref) => {
|
|
829
|
-
const { id, version } =
|
|
827
|
+
const { id, version } = chunk3WW32OUU_cjs.splitDocRef(ref);
|
|
830
828
|
onOpenDocument(id, version);
|
|
831
829
|
}),
|
|
832
830
|
openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
|
|
@@ -836,7 +834,7 @@ function ConnectedWorkflowRunner({
|
|
|
836
834
|
const w = state.waiting;
|
|
837
835
|
if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
|
|
838
836
|
}),
|
|
839
|
-
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(
|
|
837
|
+
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunk3WW32OUU_cjs.splitDocRef(ref).id) ?? "" })),
|
|
840
838
|
openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
|
|
841
839
|
}),
|
|
842
840
|
[user?.externalId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
|
|
@@ -972,7 +970,7 @@ function ConnectedWorkflowRunner({
|
|
|
972
970
|
);
|
|
973
971
|
};
|
|
974
972
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
975
|
-
|
|
973
|
+
chunk3WW32OUU_cjs.WorkflowRunner,
|
|
976
974
|
{
|
|
977
975
|
people,
|
|
978
976
|
...runnerProps,
|
|
@@ -1018,10 +1016,10 @@ function ConnectedWorkflowRunner({
|
|
|
1018
1016
|
) }),
|
|
1019
1017
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1020
1018
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1021
|
-
|
|
1019
|
+
chunk3WW32OUU_cjs.WorkflowStepBar,
|
|
1022
1020
|
{
|
|
1023
1021
|
run: view,
|
|
1024
|
-
levels:
|
|
1022
|
+
levels: chunk3WW32OUU_cjs.stepLevels(view.steps),
|
|
1025
1023
|
doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
|
|
1026
1024
|
icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
|
|
1027
1025
|
tid: (suffix) => `${testIdPrefix}-${suffix}`
|
|
@@ -1202,17 +1200,17 @@ function ConnectedTagTable({
|
|
|
1202
1200
|
const fail = (e) => setError(e instanceof Error ? e.message : String(e));
|
|
1203
1201
|
const snapshot = (data) => {
|
|
1204
1202
|
const title = exportTitle ?? KIND_TITLES[kind];
|
|
1205
|
-
const bytes =
|
|
1203
|
+
const bytes = chunkAMC5PMJ3_cjs.tagTableDocx(data, {
|
|
1206
1204
|
title,
|
|
1207
1205
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
1208
1206
|
});
|
|
1209
1207
|
const stamp = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
1210
1208
|
const name = `${title.replace(/[\\/:*?"<>|]+/g, "-")} (${stamp}).docx`;
|
|
1211
|
-
return { blob: new Blob([bytes], { type:
|
|
1209
|
+
return { blob: new Blob([bytes], { type: chunkAMC5PMJ3_cjs.DOCX_MIME_TYPE }), name };
|
|
1212
1210
|
};
|
|
1213
1211
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1214
1212
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1215
|
-
|
|
1213
|
+
chunkAMC5PMJ3_cjs.TagTable,
|
|
1216
1214
|
{
|
|
1217
1215
|
...props,
|
|
1218
1216
|
table,
|