@arbidocs/blocks 0.4.90 → 0.4.91
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 -279
- package/dist/agents/index.js +4 -3
- package/dist/agents/workflows/types.d.ts +6 -0
- package/dist/chunk-32HW2Q33.cjs +59 -0
- package/dist/chunk-32HW2Q33.cjs.map +1 -0
- package/dist/{chunk-5XZU64E2.cjs → chunk-3US5OIDQ.cjs} +68 -33
- package/dist/chunk-3US5OIDQ.cjs.map +1 -0
- package/dist/{chunk-DPLRHEJZ.js → chunk-5LXQPP2K.js} +4 -33
- package/dist/chunk-5LXQPP2K.js.map +1 -0
- package/dist/{chunk-NQS7NFGM.js → chunk-5NQIBJPP.js} +4 -4
- package/dist/{chunk-NQS7NFGM.js.map → chunk-5NQIBJPP.js.map} +1 -1
- package/dist/{chunk-NXWKMKZY.js → chunk-5RQOVALO.js} +3 -3
- package/dist/{chunk-NXWKMKZY.js.map → chunk-5RQOVALO.js.map} +1 -1
- package/dist/chunk-AUS3KBHJ.js +52 -0
- package/dist/chunk-AUS3KBHJ.js.map +1 -0
- package/dist/{chunk-TMKJACMP.cjs → chunk-DDYXFALG.cjs} +44 -44
- package/dist/{chunk-TMKJACMP.cjs.map → chunk-DDYXFALG.cjs.map} +1 -1
- package/dist/chunk-DVUZTGVL.cjs +52 -0
- package/dist/chunk-DVUZTGVL.cjs.map +1 -0
- package/dist/{chunk-UCAYNE44.cjs → chunk-EHF63UYP.cjs} +5 -5
- package/dist/{chunk-UCAYNE44.cjs.map → chunk-EHF63UYP.cjs.map} +1 -1
- package/dist/{chunk-YX466FWL.js → chunk-PGDL26TQ.js} +68 -33
- package/dist/chunk-PGDL26TQ.js.map +1 -0
- package/dist/components/tones.d.ts +5 -0
- package/dist/connect/index.cjs +23 -22
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +3 -2
- package/dist/connect/index.js.map +1 -1
- package/dist/files/index.cjs +4 -3
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +2 -1
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +320 -311
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/settings/index.cjs +6 -5
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +2 -1
- package/dist/settings/index.js.map +1 -1
- package/dist/site/index.cjs +4 -3
- package/dist/site/index.js +2 -1
- package/dist/workflow-canvas/FieldOptionsEditor.d.ts +25 -0
- package/dist/workflow-canvas/StepInspector.d.ts +6 -2
- package/dist/workflow-canvas/index.cjs +176 -47
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.d.ts +1 -0
- package/dist/workflow-canvas/index.js +133 -6
- package/dist/workflow-canvas/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-5XZU64E2.cjs.map +0 -1
- package/dist/chunk-DPLRHEJZ.js.map +0 -1
- package/dist/chunk-VFUWWH52.cjs +0 -83
- package/dist/chunk-VFUWWH52.cjs.map +0 -1
- package/dist/chunk-YX466FWL.js.map +0 -1
|
@@ -6,9 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/** Semantic tones, mapped to the token palette (`--{hue}-bg|text|border`, `--ai-*`). */
|
|
8
8
|
export type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'accent' | 'ai';
|
|
9
|
+
/** Every tone, e.g. to check a tone read from a file or offer them in a picker. */
|
|
10
|
+
export declare const TONES: readonly Tone[];
|
|
11
|
+
export declare const isTone: (v: unknown) => v is Tone;
|
|
9
12
|
/** Background + text of a tinted chip. */
|
|
10
13
|
export declare const TONE_SURFACE: Record<Tone, string>;
|
|
11
14
|
/** Border of a tinted chip (the AI tint has none). */
|
|
12
15
|
export declare const TONE_BORDER: Record<Tone, string>;
|
|
13
16
|
/** Solid fill of a status dot. */
|
|
14
17
|
export declare const TONE_DOT: Record<Tone, string>;
|
|
18
|
+
/** Strong border of a chosen toned control (its fill is `TONE_SURFACE`). */
|
|
19
|
+
export declare const TONE_SOLID_BORDER: Record<Tone, string>;
|
package/dist/connect/index.cjs
CHANGED
|
@@ -8,11 +8,12 @@ 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
|
|
11
|
+
var chunkEHF63UYP_cjs = require('../chunk-EHF63UYP.cjs');
|
|
12
|
+
var chunk3US5OIDQ_cjs = require('../chunk-3US5OIDQ.cjs');
|
|
13
13
|
var chunkN26CXGXC_cjs = require('../chunk-N26CXGXC.cjs');
|
|
14
14
|
var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
15
15
|
require('../chunk-DETZZBG2.cjs');
|
|
16
|
+
require('../chunk-32HW2Q33.cjs');
|
|
16
17
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
17
18
|
require('../chunk-7D737FLE.cjs');
|
|
18
19
|
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
@@ -116,7 +117,7 @@ function ConnectedWorkspaceActivity({
|
|
|
116
117
|
[feed.data]
|
|
117
118
|
);
|
|
118
119
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
-
|
|
120
|
+
chunkEHF63UYP_cjs.WorkspaceActivityList,
|
|
120
121
|
{
|
|
121
122
|
...listProps,
|
|
122
123
|
items,
|
|
@@ -142,7 +143,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
142
143
|
});
|
|
143
144
|
if (!workspaceId) return null;
|
|
144
145
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
145
|
-
|
|
146
|
+
chunkEHF63UYP_cjs.WorkspaceNotificationMenu,
|
|
146
147
|
{
|
|
147
148
|
...menuProps,
|
|
148
149
|
level,
|
|
@@ -161,7 +162,7 @@ function ConnectedThreadFollow({
|
|
|
161
162
|
enabled: status === "authenticated"
|
|
162
163
|
});
|
|
163
164
|
if (!conversationId) return null;
|
|
164
|
-
const Control = as === "menu-item" ?
|
|
165
|
+
const Control = as === "menu-item" ? chunkEHF63UYP_cjs.ThreadFollowMenuItem : chunkEHF63UYP_cjs.ThreadFollowButton;
|
|
165
166
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
166
167
|
Control,
|
|
167
168
|
{
|
|
@@ -287,7 +288,7 @@ function StreamedArtifact({
|
|
|
287
288
|
}
|
|
288
289
|
var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
289
290
|
function formValues(step, inputs) {
|
|
290
|
-
const fields =
|
|
291
|
+
const fields = chunk3US5OIDQ_cjs.stepFields(step);
|
|
291
292
|
if (!fields.length) return void 0;
|
|
292
293
|
if (step.kind === "form")
|
|
293
294
|
return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
|
|
@@ -325,7 +326,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
325
326
|
const { wsId } = chunkXMBYDLZQ_cjs.useWorkspaceDocs();
|
|
326
327
|
const [threadId, setThreadId] = react.useState(options.conversationId);
|
|
327
328
|
const [localInputs, setLocalInputs] = react.useState(
|
|
328
|
-
() =>
|
|
329
|
+
() => chunk3US5OIDQ_cjs.initialRunInputs(workflow, options.initialInputs)
|
|
329
330
|
);
|
|
330
331
|
const [edits, setEdits] = react.useState({});
|
|
331
332
|
const [localStates, setLocalStates] = react.useState({});
|
|
@@ -345,12 +346,12 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
345
346
|
);
|
|
346
347
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
347
348
|
const steps = react.useMemo(
|
|
348
|
-
() =>
|
|
349
|
+
() => chunk3US5OIDQ_cjs.workflowSteps(workflow).length > 0 ? chunk3US5OIDQ_cjs.workflowSteps(workflow) : chunk3US5OIDQ_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
349
350
|
[workflow, conversation?.plan?.steps]
|
|
350
351
|
);
|
|
351
352
|
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
352
353
|
const serverStates = react.useMemo(
|
|
353
|
-
() =>
|
|
354
|
+
() => chunk3US5OIDQ_cjs.stepStatesFromActivity(activity.data ?? []),
|
|
354
355
|
[activity.data]
|
|
355
356
|
);
|
|
356
357
|
const working = steps.some(
|
|
@@ -393,7 +394,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
393
394
|
async (values, done) => {
|
|
394
395
|
await ensureWorkspaceOpen();
|
|
395
396
|
const created = await createWork.mutateAsync({
|
|
396
|
-
title:
|
|
397
|
+
title: chunk3US5OIDQ_cjs.runThreadTitle(workflow, values).slice(0, 60),
|
|
397
398
|
description: workflow.description || null,
|
|
398
399
|
prompt: null,
|
|
399
400
|
skill_ref: null,
|
|
@@ -405,7 +406,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
405
406
|
criteria: [],
|
|
406
407
|
max_passes: 3,
|
|
407
408
|
documents: [],
|
|
408
|
-
steps:
|
|
409
|
+
steps: chunk3US5OIDQ_cjs.toPlanSteps(workflow, {
|
|
409
410
|
inputs: values,
|
|
410
411
|
resolveWorkflow: options.resolveWorkflow,
|
|
411
412
|
compose: options.compose
|
|
@@ -492,7 +493,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
492
493
|
const anyRunning = Object.values(states).some((s) => s.status === "running");
|
|
493
494
|
const needsStart = !threadId || idle && !anyRunning;
|
|
494
495
|
const runError = idle ? conversation?.last_error ?? null : null;
|
|
495
|
-
const view =
|
|
496
|
+
const view = chunk3US5OIDQ_cjs.useWorkflowView({
|
|
496
497
|
steps,
|
|
497
498
|
states,
|
|
498
499
|
inputs,
|
|
@@ -573,7 +574,7 @@ function WorkflowSignDialog({
|
|
|
573
574
|
const arbi = react$1.useArbi();
|
|
574
575
|
const { user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
575
576
|
const tools = documentTools.useOptionalDocumentTools();
|
|
576
|
-
const { id, version: stepVersion } =
|
|
577
|
+
const { id, version: stepVersion } = chunk3US5OIDQ_cjs.splitDocRef(docRef);
|
|
577
578
|
const [version, setVersion] = react.useState(stepVersion);
|
|
578
579
|
const [pdf, setPdf] = react.useState(null);
|
|
579
580
|
const [preparing, setPreparing] = react.useState(false);
|
|
@@ -651,7 +652,7 @@ function WorkflowWordDialog({
|
|
|
651
652
|
onClose,
|
|
652
653
|
labels
|
|
653
654
|
}) {
|
|
654
|
-
const { id } =
|
|
655
|
+
const { id } = chunk3US5OIDQ_cjs.splitDocRef(docRef);
|
|
655
656
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
656
657
|
chunkULWRNGGE_cjs.ModalScaffold,
|
|
657
658
|
{
|
|
@@ -825,7 +826,7 @@ function ConnectedWorkflowRunner({
|
|
|
825
826
|
() => ({
|
|
826
827
|
me: user?.externalId,
|
|
827
828
|
openDocument: onOpenDocument && ((ref) => {
|
|
828
|
-
const { id, version } =
|
|
829
|
+
const { id, version } = chunk3US5OIDQ_cjs.splitDocRef(ref);
|
|
829
830
|
onOpenDocument(id, version);
|
|
830
831
|
}),
|
|
831
832
|
openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
|
|
@@ -835,7 +836,7 @@ function ConnectedWorkflowRunner({
|
|
|
835
836
|
const w = state.waiting;
|
|
836
837
|
if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
|
|
837
838
|
}),
|
|
838
|
-
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(
|
|
839
|
+
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunk3US5OIDQ_cjs.splitDocRef(ref).id) ?? "" })),
|
|
839
840
|
openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
|
|
840
841
|
}),
|
|
841
842
|
[user?.externalId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
|
|
@@ -971,7 +972,7 @@ function ConnectedWorkflowRunner({
|
|
|
971
972
|
);
|
|
972
973
|
};
|
|
973
974
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
974
|
-
|
|
975
|
+
chunk3US5OIDQ_cjs.WorkflowRunner,
|
|
975
976
|
{
|
|
976
977
|
people,
|
|
977
978
|
...runnerProps,
|
|
@@ -1017,10 +1018,10 @@ function ConnectedWorkflowRunner({
|
|
|
1017
1018
|
) }),
|
|
1018
1019
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1019
1020
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1020
|
-
|
|
1021
|
+
chunk3US5OIDQ_cjs.WorkflowStepBar,
|
|
1021
1022
|
{
|
|
1022
1023
|
run: view,
|
|
1023
|
-
levels:
|
|
1024
|
+
levels: chunk3US5OIDQ_cjs.stepLevels(view.steps),
|
|
1024
1025
|
doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
|
|
1025
1026
|
icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
|
|
1026
1027
|
tid: (suffix) => `${testIdPrefix}-${suffix}`
|
|
@@ -1201,17 +1202,17 @@ function ConnectedTagTable({
|
|
|
1201
1202
|
const fail = (e) => setError(e instanceof Error ? e.message : String(e));
|
|
1202
1203
|
const snapshot = (data) => {
|
|
1203
1204
|
const title = exportTitle ?? KIND_TITLES[kind];
|
|
1204
|
-
const bytes =
|
|
1205
|
+
const bytes = chunkEHF63UYP_cjs.tagTableDocx(data, {
|
|
1205
1206
|
title,
|
|
1206
1207
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
1207
1208
|
});
|
|
1208
1209
|
const stamp = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
1209
1210
|
const name = `${title.replace(/[\\/:*?"<>|]+/g, "-")} (${stamp}).docx`;
|
|
1210
|
-
return { blob: new Blob([bytes], { type:
|
|
1211
|
+
return { blob: new Blob([bytes], { type: chunkEHF63UYP_cjs.DOCX_MIME_TYPE }), name };
|
|
1211
1212
|
};
|
|
1212
1213
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1213
1214
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1214
|
-
|
|
1215
|
+
chunkEHF63UYP_cjs.TagTable,
|
|
1215
1216
|
{
|
|
1216
1217
|
...props,
|
|
1217
1218
|
table,
|