@arbidocs/blocks 0.4.135 → 0.4.137
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 +422 -367
- package/dist/agents/index.js +8 -9
- package/dist/agents/skills/index.d.ts +2 -0
- package/dist/agents/skills/skillFiles.d.ts +65 -0
- package/dist/agents/skills/skillImport.d.ts +36 -0
- package/dist/agents/workflows/WorkflowDocumentsField.d.ts +42 -5
- package/dist/agents/workflows/index.d.ts +3 -3
- package/dist/agents/workflows/workflow.d.ts +19 -0
- package/dist/agents/workflows/workspaceScope.d.ts +12 -0
- package/dist/chat/index.cjs +138 -138
- package/dist/chat/index.js +3 -3
- package/dist/chunk-2KUCVSFF.js +51 -0
- package/dist/chunk-2KUCVSFF.js.map +1 -0
- package/dist/{chunk-GDBDHOI4.js → chunk-3RJN2VTL.js} +36 -6
- package/dist/chunk-3RJN2VTL.js.map +1 -0
- package/dist/{chunk-6AALMYPS.cjs → chunk-6F7SZCVL.cjs} +23 -2
- package/dist/chunk-6F7SZCVL.cjs.map +1 -0
- package/dist/{chunk-PUCY3UXN.js → chunk-7M4C6CK7.js} +3 -3
- package/dist/{chunk-PUCY3UXN.js.map → chunk-7M4C6CK7.js.map} +1 -1
- package/dist/{chunk-2PNNCEPH.js → chunk-ATJUVHVB.js} +1545 -8
- package/dist/chunk-ATJUVHVB.js.map +1 -0
- package/dist/{chunk-4S5IDT5F.cjs → chunk-BUNZWOPX.cjs} +5 -5
- package/dist/{chunk-4S5IDT5F.cjs.map → chunk-BUNZWOPX.cjs.map} +1 -1
- package/dist/{chunk-KYDRUFWT.cjs → chunk-C3ZRLULA.cjs} +5 -5
- package/dist/{chunk-KYDRUFWT.cjs.map → chunk-C3ZRLULA.cjs.map} +1 -1
- package/dist/{chunk-SARREDFP.cjs → chunk-CHVCTKF4.cjs} +1620 -47
- package/dist/chunk-CHVCTKF4.cjs.map +1 -0
- package/dist/chunk-CQCC7LE7.js +210 -0
- package/dist/chunk-CQCC7LE7.js.map +1 -0
- package/dist/{chunk-4UMXQPNA.js → chunk-E5OYHJMU.js} +3 -3
- package/dist/{chunk-4UMXQPNA.js.map → chunk-E5OYHJMU.js.map} +1 -1
- package/dist/{chunk-PJJY6CYL.cjs → chunk-EHOPZBAX.cjs} +11 -11
- package/dist/{chunk-PJJY6CYL.cjs.map → chunk-EHOPZBAX.cjs.map} +1 -1
- package/dist/{chunk-4QIIDXLF.cjs → chunk-HDYWXEQU.cjs} +8 -8
- package/dist/{chunk-4QIIDXLF.cjs.map → chunk-HDYWXEQU.cjs.map} +1 -1
- package/dist/{chunk-GZPTWHP5.cjs → chunk-HLB4DIYV.cjs} +5 -5
- package/dist/{chunk-GZPTWHP5.cjs.map → chunk-HLB4DIYV.cjs.map} +1 -1
- package/dist/{chunk-TT6XV6WM.cjs → chunk-JY73DJOS.cjs} +78 -1274
- package/dist/chunk-JY73DJOS.cjs.map +1 -0
- package/dist/{chunk-ARDHLU73.cjs → chunk-KDUGTKVI.cjs} +21 -2
- package/dist/chunk-KDUGTKVI.cjs.map +1 -0
- package/dist/{chunk-UMIY4SQS.js → chunk-KMNZ2RVO.js} +17 -1191
- package/dist/chunk-KMNZ2RVO.js.map +1 -0
- package/dist/{chunk-6S5FLMWG.js → chunk-KSHKTOY2.js} +203 -7
- package/dist/chunk-KSHKTOY2.js.map +1 -0
- package/dist/{chunk-4RLCRFZS.js → chunk-L2PAPOZ5.js} +21 -3
- package/dist/chunk-L2PAPOZ5.js.map +1 -0
- package/dist/{chunk-QYTYW74G.js → chunk-L3T7OJRX.js} +4 -4
- package/dist/{chunk-QYTYW74G.js.map → chunk-L3T7OJRX.js.map} +1 -1
- package/dist/{chunk-ENDP7JER.js → chunk-M33QUNFH.js} +3 -3
- package/dist/{chunk-ENDP7JER.js.map → chunk-M33QUNFH.js.map} +1 -1
- package/dist/chunk-RFIBUWLF.cjs +232 -0
- package/dist/chunk-RFIBUWLF.cjs.map +1 -0
- package/dist/{chunk-N26CXGXC.cjs → chunk-RQ2Y7USX.cjs} +201 -3
- package/dist/chunk-RQ2Y7USX.cjs.map +1 -0
- package/dist/chunk-UUHUQHXR.cjs +56 -0
- package/dist/chunk-UUHUQHXR.cjs.map +1 -0
- package/dist/{chunk-SZX44LCT.js → chunk-VMESMX7N.js} +3 -3
- package/dist/{chunk-SZX44LCT.js.map → chunk-VMESMX7N.js.map} +1 -1
- package/dist/{chunk-QDEODGXE.cjs → chunk-WS5EX7DN.cjs} +37 -6
- package/dist/chunk-WS5EX7DN.cjs.map +1 -0
- package/dist/{chunk-2DFDFOM7.js → chunk-YOMPLCP6.js} +22 -3
- package/dist/chunk-YOMPLCP6.js.map +1 -0
- package/dist/connect/docx.cjs +4 -4
- package/dist/connect/docx.js +3 -3
- package/dist/connect/index.cjs +463 -97
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +5 -2
- package/dist/connect/index.js +387 -49
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedSkillUpload.d.ts +26 -2
- package/dist/connection/ConnectedWorkflowBuilder.d.ts +24 -12
- package/dist/connection/ConnectedWorkflowLauncher.d.ts +35 -0
- package/dist/connection/ConnectedWorkflowsTable.d.ts +62 -0
- package/dist/connection/ConnectionProvider.d.ts +17 -0
- package/dist/connection/workspaceData.d.ts +45 -0
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +1 -1
- package/dist/files/index.js +1 -1
- package/dist/home/index.cjs +20 -21
- package/dist/home/index.cjs.map +1 -1
- package/dist/home/index.js +2 -3
- package/dist/home/index.js.map +1 -1
- package/dist/index.cjs +610 -555
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -15
- package/dist/index.js.map +1 -1
- package/dist/settings/index.cjs +11 -11
- package/dist/settings/index.js +2 -2
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +7 -7
- package/dist/studio/index.js +5 -5
- package/dist/workflow-canvas/index.cjs +122 -96
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.d.ts +1 -1
- package/dist/workflow-canvas/index.js +73 -48
- package/dist/workflow-canvas/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-2DFDFOM7.js.map +0 -1
- package/dist/chunk-2PNNCEPH.js.map +0 -1
- package/dist/chunk-4RLCRFZS.js.map +0 -1
- package/dist/chunk-4XJZ6AAY.js +0 -407
- package/dist/chunk-4XJZ6AAY.js.map +0 -1
- package/dist/chunk-6AALMYPS.cjs.map +0 -1
- package/dist/chunk-6S5FLMWG.js.map +0 -1
- package/dist/chunk-7D737FLE.cjs +0 -43
- package/dist/chunk-7D737FLE.cjs.map +0 -1
- package/dist/chunk-ARDHLU73.cjs.map +0 -1
- package/dist/chunk-GDBDHOI4.js.map +0 -1
- package/dist/chunk-N26CXGXC.cjs.map +0 -1
- package/dist/chunk-QDEODGXE.cjs.map +0 -1
- package/dist/chunk-S5HZBXZA.cjs +0 -430
- package/dist/chunk-S5HZBXZA.cjs.map +0 -1
- package/dist/chunk-SARREDFP.cjs.map +0 -1
- package/dist/chunk-TT6XV6WM.cjs.map +0 -1
- package/dist/chunk-UMIY4SQS.js.map +0 -1
- package/dist/chunk-XD2M6LIG.js +0 -41
- package/dist/chunk-XD2M6LIG.js.map +0 -1
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Add a skill someone gave you: a file from your computer (`.md` or `.zip`) or a link to one. Both
|
|
3
|
+
* go through the one skill upload (`useUploadSkillFiles`); the skill then appears in every skill
|
|
4
|
+
* list once it is processed.
|
|
5
|
+
*/
|
|
6
|
+
export interface ConnectedSkillUploadLabels {
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
fromFile: string;
|
|
10
|
+
chooseFile: string;
|
|
11
|
+
fromLink: string;
|
|
12
|
+
linkPlaceholder: string;
|
|
13
|
+
add: string;
|
|
14
|
+
cancel: string;
|
|
15
|
+
/** The notification once a skill is added. */
|
|
16
|
+
added: (slug: string) => string;
|
|
17
|
+
failed: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS: ConnectedSkillUploadLabels;
|
|
20
|
+
export interface ConnectedSkillUploadProps {
|
|
21
|
+
/** Added (its slug) or cancelled (nothing). Absent: no Cancel, and the form stays. */
|
|
22
|
+
onDone?: (addedSlug?: string) => void;
|
|
23
|
+
labels?: Partial<ConnectedSkillUploadLabels>;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function ConnectedSkillUpload({ onDone, labels, className }: ConnectedSkillUploadProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The workflow builder bound to the connection: it loads a saved workflow (or starts from the
|
|
3
|
-
* host's value), offers the
|
|
4
|
-
* and tasks a workflow can
|
|
5
|
-
*
|
|
3
|
+
* host's value), offers the host's workflows and the user's skills as steps an agent can run, its
|
|
4
|
+
* agents, the people, labels, documents, events and tasks a workflow can use, and saves the
|
|
5
|
+
* workflow (its trigger and its steps) or runs it now. An unattended workflow that keeps standing
|
|
6
|
+
* access gives its agent the workspace once saved. Every run is a work thread that runs the steps.
|
|
7
|
+
* Saved and failed are told through the environment's `notify`. Exported from
|
|
6
8
|
* `@arbidocs/blocks/workflow-canvas` (it brings the graph library).
|
|
7
9
|
*/
|
|
8
10
|
import { type ReactNode } from 'react';
|
|
@@ -14,13 +16,20 @@ export interface ConnectedWorkflowBuilderLabels {
|
|
|
14
16
|
save: string;
|
|
15
17
|
saving: string;
|
|
16
18
|
runNow: string;
|
|
19
|
+
/** The notification once saved. */
|
|
17
20
|
saved: string;
|
|
18
21
|
needTrigger: string;
|
|
19
22
|
running: string;
|
|
20
|
-
/**
|
|
21
|
-
|
|
23
|
+
/** Notified when saving (or the after-save step) fails without a message. */
|
|
24
|
+
saveFailed: string;
|
|
25
|
+
/** Notified when "Run now" fails without a message. */
|
|
26
|
+
runFailed: string;
|
|
27
|
+
/** A task (to start after) without a title. */
|
|
28
|
+
untitledTask: string;
|
|
22
29
|
}
|
|
23
30
|
export declare const DEFAULT_CONNECTED_WORKFLOW_BUILDER_LABELS: ConnectedWorkflowBuilderLabels;
|
|
31
|
+
/** Where a new workflow starts: started by hand, one agent step to fill in. */
|
|
32
|
+
export declare function newWorkflowBuilderValue(): WorkflowBuilderValue;
|
|
24
33
|
/**
|
|
25
34
|
* A workspace event a workflow can start on: a notification type (what the API's `event_kind` check
|
|
26
35
|
* accepts), except those the workflow engine emits itself, which the API refuses as a trigger (422).
|
|
@@ -49,21 +58,24 @@ export declare const DEFAULT_WORKFLOW_EVENT_KINDS: ({
|
|
|
49
58
|
export interface ConnectedWorkflowBuilderProps extends Pick<StepComposeOptions, 'compose'>, Pick<WorkflowBuilderProps, 'renderIcon' | 'labels' | 'canvasLabels' | 'inspectorLabels' | 'triggerLabels' | 'testId' | 'className'> {
|
|
50
59
|
/** A saved workflow to edit (`wfl-…`). */
|
|
51
60
|
workflowId?: string;
|
|
52
|
-
/** Where a new workflow starts (e.g. a built-in journey). */
|
|
53
|
-
initial
|
|
54
|
-
/**
|
|
61
|
+
/** Where a new workflow starts (e.g. a built-in journey). Default: one agent step. */
|
|
62
|
+
initial?: WorkflowBuilderValue;
|
|
63
|
+
/**
|
|
64
|
+
* Host workflows agent steps can run besides the user's skills (e.g. its built-ins with their own
|
|
65
|
+
* forms); an uploaded skill of the same id is used instead (`mergeSkillWorkflows`).
|
|
66
|
+
*/
|
|
55
67
|
workflows?: WorkflowDefinition[];
|
|
56
68
|
eventKinds?: Array<{
|
|
57
69
|
value: string;
|
|
58
70
|
label: string;
|
|
59
71
|
}>;
|
|
60
72
|
/**
|
|
61
|
-
* Saved (created or updated): its id and the value saved.
|
|
62
|
-
*
|
|
63
|
-
*
|
|
73
|
+
* Saved (created or updated, the agent's standing access granted): its id and the value saved.
|
|
74
|
+
* It may return a promise for host setup that must finish first: "Save" waits for it before
|
|
75
|
+
* telling saved, and "Run now" waits for it before running, and does not run if it rejects.
|
|
64
76
|
*/
|
|
65
77
|
onSaved?: (workflowId: string, value: WorkflowBuilderValue) => void | Promise<void>;
|
|
66
|
-
/** A run started: its thread. */
|
|
78
|
+
/** A run started: its thread. Default: open it (the environment's `openConversation`). */
|
|
67
79
|
onRun?: (conversationId: string | undefined) => void;
|
|
68
80
|
/** Extra host buttons. */
|
|
69
81
|
actions?: ReactNode;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workflow launcher bound to the connection: the open workspace's folders, labels and files
|
|
3
|
+
* behind its scope and `documents` fields (files can be added right there), and the user's agents
|
|
4
|
+
* behind "Run as". The host still says what a launch does (`onLaunch`): open a chat, start a task.
|
|
5
|
+
*/
|
|
6
|
+
import { type WorkflowLauncherProps } from '../agents/workflows/WorkflowLauncher';
|
|
7
|
+
import { type WorkflowDocumentsFieldLabels, type WorkflowFieldDocument } from '../agents/workflows/WorkflowDocumentsField';
|
|
8
|
+
import type { WorkflowScopeSource } from '../agents/workflows/WorkflowConfigDialog';
|
|
9
|
+
import type { AgentOption } from '../agents/workflows/AgentSelect';
|
|
10
|
+
import type { WorkflowField, WorkflowScope } from '../agents/workflows/types';
|
|
11
|
+
import { type ConnectedDocument } from './workspaceData';
|
|
12
|
+
/** A workspace document as a `documents` field offers it. */
|
|
13
|
+
export declare function toWorkflowFieldDocument(doc: ConnectedDocument): WorkflowFieldDocument;
|
|
14
|
+
/** The open workspace's folders and labels for a workflow's scope field. */
|
|
15
|
+
export declare function useConnectedWorkflowScopeSource(): WorkflowScopeSource;
|
|
16
|
+
/** The user's agents, for "Run as". */
|
|
17
|
+
export declare function useConnectedAgentOptions(): AgentOption[];
|
|
18
|
+
export interface ConnectedWorkflowDocumentsFieldProps {
|
|
19
|
+
field: WorkflowField;
|
|
20
|
+
value: WorkflowScope;
|
|
21
|
+
onChange: (value: WorkflowScope) => void;
|
|
22
|
+
/** Add files the host's way (its upload dialog). Absent: they are uploaded here. */
|
|
23
|
+
onAddFiles?: (files?: File[]) => void;
|
|
24
|
+
labels?: Partial<WorkflowDocumentsFieldLabels>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A workflow `documents` field over the open workspace's files: pick, add (or drop) files, see the
|
|
28
|
+
* chosen images. A launcher's or a task composer's `renderDocuments`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ConnectedWorkflowDocumentsField({ field, value, onChange, onAddFiles, labels, }: ConnectedWorkflowDocumentsFieldProps): import("react").JSX.Element;
|
|
31
|
+
export interface ConnectedWorkflowLauncherProps extends Omit<WorkflowLauncherProps, 'scopeSource' | 'renderDocuments' | 'agents'> {
|
|
32
|
+
/** Add files from a `documents` field the host's way (its upload dialog). Absent: uploaded here. */
|
|
33
|
+
onAddFiles?: (files?: File[]) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function ConnectedWorkflowLauncher({ onAddFiles, ...props }: ConnectedWorkflowLauncherProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The saved workflows bound to the connection: when each starts, its last run (a link to the thread
|
|
3
|
+
* it created) and next run, who runs it, pause and resume, share, run now, delete (one or many), and
|
|
4
|
+
* the workflow's history. The host opens a workflow (its builder) and its history; threads open
|
|
5
|
+
* through the environment's `openConversation`, failures are told through its `notify`.
|
|
6
|
+
*/
|
|
7
|
+
import { type WorkflowResponse } from '@arbidocs/react';
|
|
8
|
+
import { type WorkflowsTableProps } from '../agents/tasks/WorkflowsTable';
|
|
9
|
+
/** The viewer's role in the open workspace, and the workspace's members. */
|
|
10
|
+
export declare function useConnectedWorkspaceRole(): {
|
|
11
|
+
members: {
|
|
12
|
+
user: {
|
|
13
|
+
external_id: string;
|
|
14
|
+
parent_ext_id?: string | null | undefined;
|
|
15
|
+
email: string;
|
|
16
|
+
given_name: string;
|
|
17
|
+
family_name?: string | null | undefined;
|
|
18
|
+
picture?: string | null | undefined;
|
|
19
|
+
encryption_public_key: string;
|
|
20
|
+
is_sso: boolean;
|
|
21
|
+
is_identity_verified: boolean;
|
|
22
|
+
};
|
|
23
|
+
role: import("@arbidocs/client").components["schemas"]["WorkspaceRole"];
|
|
24
|
+
joined_at: string;
|
|
25
|
+
conversation_count: number;
|
|
26
|
+
document_count: number;
|
|
27
|
+
files_mb: number;
|
|
28
|
+
agent_ext_id?: string | null | undefined;
|
|
29
|
+
is_temporary: boolean;
|
|
30
|
+
}[];
|
|
31
|
+
role: "owner" | "collaborator" | "guest" | undefined;
|
|
32
|
+
/** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */
|
|
33
|
+
canEditShared: boolean;
|
|
34
|
+
/** With an item's creator, the only one who deletes it. */
|
|
35
|
+
isWorkspaceOwner: boolean;
|
|
36
|
+
};
|
|
37
|
+
export interface ConnectedWorkflowsTableLabels {
|
|
38
|
+
/** A change (pause, share, delete) that failed without a message. */
|
|
39
|
+
updateFailed: string;
|
|
40
|
+
deleteTitle: string;
|
|
41
|
+
deleteOne: (name: string) => string;
|
|
42
|
+
deleteMany: (count: number) => string;
|
|
43
|
+
/** A run that failed: its history has the error report. */
|
|
44
|
+
runFailed: string;
|
|
45
|
+
/** A run that created no thread. */
|
|
46
|
+
noThread: string;
|
|
47
|
+
/** A document action that started (it has no thread): what is happening. */
|
|
48
|
+
documentAction: (workflow: WorkflowResponse) => string;
|
|
49
|
+
untitledTask: string;
|
|
50
|
+
}
|
|
51
|
+
export declare const DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS: ConnectedWorkflowsTableLabels;
|
|
52
|
+
type TableProps = WorkflowsTableProps<WorkflowResponse>;
|
|
53
|
+
export interface ConnectedWorkflowsTableProps extends Omit<TableProps, 'workflows' | 'isLoading' | 'busyId' | 'describeTrigger' | 'formatDate' | 'onToggleActive' | 'onToggleShared' | 'onDelete' | 'onDeleteMany' | 'onToggleActiveMany' | 'onRun' | 'onOpenThread' | 'lastRuns' | 'agentNames' | 'taskNames' | 'canEditShared' | 'isWorkspaceOwner'> {
|
|
54
|
+
/** Which saved workflows to list (e.g. those on a schedule). Default: all. */
|
|
55
|
+
filter?: (workflow: WorkflowResponse) => boolean;
|
|
56
|
+
/** When a workflow starts, in the host's words. Default: its trigger type. */
|
|
57
|
+
describeTrigger?: TableProps['describeTrigger'];
|
|
58
|
+
formatDate?: TableProps['formatDate'];
|
|
59
|
+
connectedLabels?: Partial<ConnectedWorkflowsTableLabels>;
|
|
60
|
+
}
|
|
61
|
+
export declare function ConnectedWorkflowsTable({ filter, describeTrigger, formatDate, onViewRuns, connectedLabels, ...tableProps }: ConnectedWorkflowsTableProps): import("react").JSX.Element;
|
|
62
|
+
export {};
|
|
@@ -59,4 +59,21 @@ export declare function ConnectionProvider({ config, children, }: {
|
|
|
59
59
|
}): import("react").JSX.Element;
|
|
60
60
|
export declare function useConnection(): ConnectionValue;
|
|
61
61
|
export declare const isAuthenticated: (s: ConnectionStatus) => s is "demo" | "authenticated";
|
|
62
|
+
/** The open workspace as the connected kits see it, whoever hosts them. */
|
|
63
|
+
export interface ConnectedWorkspace {
|
|
64
|
+
/** The selected workspace (the session state's). */
|
|
65
|
+
workspaceId: string | null;
|
|
66
|
+
/** Signed in to a live backend: workspace-scoped queries may run. */
|
|
67
|
+
live: boolean;
|
|
68
|
+
/** The signed-in user's external id. */
|
|
69
|
+
userId: string | undefined;
|
|
70
|
+
/** Re-assert the workspace on the server session before a workspace-scoped write. */
|
|
71
|
+
ensureWorkspaceOpen: () => Promise<void>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The workspace for a connected kit: the `ConnectionProvider`'s when there is one, else the host's
|
|
75
|
+
* own session (an app that mounts `ArbiProvider` and `ArbiSessionStateProvider` and keeps its
|
|
76
|
+
* workspace open itself). So a kit runs the same in Clarum and in the ARBI app.
|
|
77
|
+
*/
|
|
78
|
+
export declare function useConnectedWorkspace(): ConnectedWorkspace;
|
|
62
79
|
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The open workspace's documents, tags and conversations for the connected kits. By default each kit reads them
|
|
3
|
+
* through the `@arbidocs/react` hooks. A host that already keeps these lists live in its own cache
|
|
4
|
+
* (the ARBI app, with its progressive loader and WebSocket patches) passes them once through
|
|
5
|
+
* `ConnectedWorkspaceDataProvider`, so the kits show the same list and nothing is fetched twice.
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
import { useConversations, useDocuments, useTags } from '@arbidocs/react';
|
|
9
|
+
export type ConnectedDocument = NonNullable<ReturnType<typeof useDocuments>['data']>[number];
|
|
10
|
+
export type ConnectedTag = NonNullable<ReturnType<typeof useTags>['data']>[number];
|
|
11
|
+
export type ConnectedConversation = NonNullable<ReturnType<typeof useConversations>['data']>[number];
|
|
12
|
+
/**
|
|
13
|
+
* A list the host keeps: its rows, whether it has arrived, and how to read it again (absent: the
|
|
14
|
+
* host keeps it current itself, so a kit never re-reads it).
|
|
15
|
+
*/
|
|
16
|
+
export interface ConnectedList<T> {
|
|
17
|
+
data: T[] | undefined;
|
|
18
|
+
isFetched: boolean;
|
|
19
|
+
refetch?: () => unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface ConnectedWorkspaceData {
|
|
22
|
+
documents?: ConnectedList<ConnectedDocument>;
|
|
23
|
+
tags?: ConnectedList<ConnectedTag>;
|
|
24
|
+
conversations?: ConnectedList<ConnectedConversation>;
|
|
25
|
+
}
|
|
26
|
+
export declare function ConnectedWorkspaceDataProvider({ documents, tags, conversations, children, }: ConnectedWorkspaceData & {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
export interface ConnectedListResult<T> {
|
|
30
|
+
data: T[];
|
|
31
|
+
loaded: boolean;
|
|
32
|
+
/** Read the list again after a change made here; absent when the host keeps it current. */
|
|
33
|
+
refetch?: () => unknown;
|
|
34
|
+
}
|
|
35
|
+
/** The open workspace's documents: the host's list when it gives one, else read here. */
|
|
36
|
+
export declare function useConnectedDocuments(): ConnectedListResult<ConnectedDocument>;
|
|
37
|
+
/** The open workspace's tags: the host's list when it gives one, else read here. */
|
|
38
|
+
export declare function useConnectedTags(): ConnectedListResult<ConnectedTag>;
|
|
39
|
+
/**
|
|
40
|
+
* The open workspace's conversations (threads and tasks): the host's list when it gives one, else
|
|
41
|
+
* read here (`live`: re-read while shown, as a run moves on by itself).
|
|
42
|
+
*/
|
|
43
|
+
export declare function useConnectedConversations(options?: {
|
|
44
|
+
live?: boolean;
|
|
45
|
+
}): ConnectedListResult<ConnectedConversation>;
|
package/dist/facts/index.cjs
CHANGED
|
@@ -9,8 +9,8 @@ var chunkRC25WMVB_cjs = require('../chunk-RC25WMVB.cjs');
|
|
|
9
9
|
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
10
10
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
11
11
|
var chunkC2CWWEHO_cjs = require('../chunk-C2CWWEHO.cjs');
|
|
12
|
-
var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
13
12
|
var chunkBIXHB4LV_cjs = require('../chunk-BIXHB4LV.cjs');
|
|
13
|
+
var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
14
14
|
require('../chunk-FX3K6LNZ.cjs');
|
|
15
15
|
var chunkPPCATBOY_cjs = require('../chunk-PPCATBOY.cjs');
|
|
16
16
|
var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
|
package/dist/facts/index.js
CHANGED
|
@@ -9,8 +9,8 @@ import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
|
|
|
9
9
|
import { FilterInput } from '../chunk-YU2KUMGE.js';
|
|
10
10
|
export { DEFAULT_FILTER_INPUT_LABELS as DEFAULT_FACTS_FILTER_INPUT_LABELS, DEFAULT_FILTER_FIELDS as FACTS_SEARCH_FIELD_OPTIONS, FilterInput as FactsFilterInput } from '../chunk-YU2KUMGE.js';
|
|
11
11
|
import { GridView } from '../chunk-N5YEF3LC.js';
|
|
12
|
-
import { TabHeader } from '../chunk-4WWM3GQ5.js';
|
|
13
12
|
import { detectTimeZone, listTimeZones } from '../chunk-GTCC2VAR.js';
|
|
13
|
+
import { TabHeader } from '../chunk-4WWM3GQ5.js';
|
|
14
14
|
import '../chunk-SLSBJRWW.js';
|
|
15
15
|
import { observeResize } from '../chunk-NPLYHR2E.js';
|
|
16
16
|
import { testIdOr } from '../chunk-7F6CBP3Z.js';
|
package/dist/files/index.cjs
CHANGED
|
@@ -9,10 +9,10 @@ var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
|
|
|
9
9
|
var chunk3AFWGEDJ_cjs = require('../chunk-3AFWGEDJ.cjs');
|
|
10
10
|
var chunkDVUZTGVL_cjs = require('../chunk-DVUZTGVL.cjs');
|
|
11
11
|
var chunkDETZZBG2_cjs = require('../chunk-DETZZBG2.cjs');
|
|
12
|
+
var chunkR26BK7YL_cjs = require('../chunk-R26BK7YL.cjs');
|
|
12
13
|
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
13
14
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
14
15
|
var chunkC2CWWEHO_cjs = require('../chunk-C2CWWEHO.cjs');
|
|
15
|
-
var chunkR26BK7YL_cjs = require('../chunk-R26BK7YL.cjs');
|
|
16
16
|
var chunk32HW2Q33_cjs = require('../chunk-32HW2Q33.cjs');
|
|
17
17
|
require('../chunk-FX3K6LNZ.cjs');
|
|
18
18
|
require('../chunk-PPCATBOY.cjs');
|
package/dist/files/index.js
CHANGED
|
@@ -8,12 +8,12 @@ import { CellHoverIcon } from '../chunk-RFXJYIDV.js';
|
|
|
8
8
|
export { CellHoverIcon, HoverIconCell } from '../chunk-RFXJYIDV.js';
|
|
9
9
|
import { ToneBadge } from '../chunk-5LXQPP2K.js';
|
|
10
10
|
export { UploadDropzone } from '../chunk-EVUEIBNU.js';
|
|
11
|
+
import { ActionLink } from '../chunk-444XKG46.js';
|
|
11
12
|
import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
|
|
12
13
|
export { DEFAULT_SELECTION_BAR_LABELS, SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
|
|
13
14
|
import { FilterInput } from '../chunk-YU2KUMGE.js';
|
|
14
15
|
import { GridView } from '../chunk-N5YEF3LC.js';
|
|
15
16
|
export { GridView } from '../chunk-N5YEF3LC.js';
|
|
16
|
-
import { ActionLink } from '../chunk-444XKG46.js';
|
|
17
17
|
import { TONE_SURFACE } from '../chunk-AUS3KBHJ.js';
|
|
18
18
|
import '../chunk-SLSBJRWW.js';
|
|
19
19
|
import '../chunk-NPLYHR2E.js';
|
package/dist/home/index.cjs
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkXZIYRKLW_cjs = require('../chunk-XZIYRKLW.cjs');
|
|
5
5
|
var chunkPCB2BPN3_cjs = require('../chunk-PCB2BPN3.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkWS5EX7DN_cjs = require('../chunk-WS5EX7DN.cjs');
|
|
7
7
|
var chunkR26BK7YL_cjs = require('../chunk-R26BK7YL.cjs');
|
|
8
|
-
var chunk7D737FLE_cjs = require('../chunk-7D737FLE.cjs');
|
|
9
8
|
require('../chunk-PPCATBOY.cjs');
|
|
10
9
|
var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
|
|
11
10
|
require('../chunk-C4WSHRR6.cjs');
|
|
@@ -115,7 +114,7 @@ function RecentList({
|
|
|
115
114
|
"data-testid": testId,
|
|
116
115
|
children: [
|
|
117
116
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
118
|
-
|
|
117
|
+
chunkWS5EX7DN_cjs.SectionHeader,
|
|
119
118
|
{
|
|
120
119
|
icon,
|
|
121
120
|
title,
|
|
@@ -127,7 +126,7 @@ function RecentList({
|
|
|
127
126
|
}
|
|
128
127
|
),
|
|
129
128
|
rows.length === 0 ? empty?.onSelect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
130
|
-
|
|
129
|
+
chunkWS5EX7DN_cjs.EmptyStrip,
|
|
131
130
|
{
|
|
132
131
|
icon: empty.icon,
|
|
133
132
|
label: empty.label,
|
|
@@ -197,7 +196,7 @@ function FactsStrip({
|
|
|
197
196
|
"data-testid": testId,
|
|
198
197
|
children: [
|
|
199
198
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
200
|
-
|
|
199
|
+
chunkWS5EX7DN_cjs.SectionHeader,
|
|
201
200
|
{
|
|
202
201
|
icon,
|
|
203
202
|
title,
|
|
@@ -208,7 +207,7 @@ function FactsStrip({
|
|
|
208
207
|
}
|
|
209
208
|
),
|
|
210
209
|
filled.length === 0 ? empty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
211
|
-
|
|
210
|
+
chunkWS5EX7DN_cjs.EmptyStrip,
|
|
212
211
|
{
|
|
213
212
|
icon: empty.icon,
|
|
214
213
|
label: empty.label,
|
|
@@ -416,7 +415,7 @@ function ActionMenuDialog({
|
|
|
416
415
|
className: "sm:max-w-lg",
|
|
417
416
|
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "action-menu-dialog" }),
|
|
418
417
|
children: [
|
|
419
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
418
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWS5EX7DN_cjs.QuickActionDialogHeader, { icon, title, description }),
|
|
420
419
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-3 pt-1", role: "menu", "aria-label": title, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
421
420
|
"button",
|
|
422
421
|
{
|
|
@@ -798,47 +797,47 @@ Object.defineProperty(exports, "KeyValueRow", {
|
|
|
798
797
|
});
|
|
799
798
|
Object.defineProperty(exports, "AddFilesFirst", {
|
|
800
799
|
enumerable: true,
|
|
801
|
-
get: function () { return
|
|
800
|
+
get: function () { return chunkWS5EX7DN_cjs.AddFilesFirst; }
|
|
802
801
|
});
|
|
803
802
|
Object.defineProperty(exports, "DEFAULT_ADD_FILES_FIRST_LABELS", {
|
|
804
803
|
enumerable: true,
|
|
805
|
-
get: function () { return
|
|
804
|
+
get: function () { return chunkWS5EX7DN_cjs.DEFAULT_ADD_FILES_FIRST_LABELS; }
|
|
806
805
|
});
|
|
807
806
|
Object.defineProperty(exports, "DEFAULT_SCOPE_PICKER_LABELS", {
|
|
808
807
|
enumerable: true,
|
|
809
|
-
get: function () { return
|
|
808
|
+
get: function () { return chunkWS5EX7DN_cjs.DEFAULT_SCOPE_PICKER_LABELS; }
|
|
810
809
|
});
|
|
811
810
|
Object.defineProperty(exports, "EmptyStrip", {
|
|
812
811
|
enumerable: true,
|
|
813
|
-
get: function () { return
|
|
812
|
+
get: function () { return chunkWS5EX7DN_cjs.EmptyStrip; }
|
|
813
|
+
});
|
|
814
|
+
Object.defineProperty(exports, "FoldSection", {
|
|
815
|
+
enumerable: true,
|
|
816
|
+
get: function () { return chunkWS5EX7DN_cjs.FoldSection; }
|
|
814
817
|
});
|
|
815
818
|
Object.defineProperty(exports, "QuickActionDialogHeader", {
|
|
816
819
|
enumerable: true,
|
|
817
|
-
get: function () { return
|
|
820
|
+
get: function () { return chunkWS5EX7DN_cjs.QuickActionDialogHeader; }
|
|
818
821
|
});
|
|
819
822
|
Object.defineProperty(exports, "ScopePicker", {
|
|
820
823
|
enumerable: true,
|
|
821
|
-
get: function () { return
|
|
824
|
+
get: function () { return chunkWS5EX7DN_cjs.ScopePicker; }
|
|
822
825
|
});
|
|
823
826
|
Object.defineProperty(exports, "SectionHeader", {
|
|
824
827
|
enumerable: true,
|
|
825
|
-
get: function () { return
|
|
828
|
+
get: function () { return chunkWS5EX7DN_cjs.SectionHeader; }
|
|
826
829
|
});
|
|
827
830
|
Object.defineProperty(exports, "SectionLabel", {
|
|
828
831
|
enumerable: true,
|
|
829
|
-
get: function () { return
|
|
832
|
+
get: function () { return chunkWS5EX7DN_cjs.SectionLabel; }
|
|
830
833
|
});
|
|
831
834
|
Object.defineProperty(exports, "StartTiles", {
|
|
832
835
|
enumerable: true,
|
|
833
|
-
get: function () { return
|
|
836
|
+
get: function () { return chunkWS5EX7DN_cjs.StartTiles; }
|
|
834
837
|
});
|
|
835
838
|
Object.defineProperty(exports, "useScopeSelection", {
|
|
836
839
|
enumerable: true,
|
|
837
|
-
get: function () { return
|
|
838
|
-
});
|
|
839
|
-
Object.defineProperty(exports, "FoldSection", {
|
|
840
|
-
enumerable: true,
|
|
841
|
-
get: function () { return chunk7D737FLE_cjs.FoldSection; }
|
|
840
|
+
get: function () { return chunkWS5EX7DN_cjs.useScopeSelection; }
|
|
842
841
|
});
|
|
843
842
|
exports.ActionMenuDialog = ActionMenuDialog;
|
|
844
843
|
exports.BulkDeleteButton = BulkDeleteButton;
|