@arbidocs/blocks 0.4.76 → 0.4.78

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 (123) hide show
  1. package/dist/agents/index.cjs +346 -258
  2. package/dist/agents/index.js +5 -5
  3. package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
  4. package/dist/agents/tasks/WorkflowThreadStrip.d.ts +15 -4
  5. package/dist/agents/workflows/SchemaForm.d.ts +6 -1
  6. package/dist/agents/workflows/StepBarFrame.d.ts +75 -0
  7. package/dist/agents/workflows/StepParts.d.ts +109 -0
  8. package/dist/agents/workflows/WorkflowRunner.d.ts +15 -2
  9. package/dist/agents/workflows/WorkflowStepBar.d.ts +9 -11
  10. package/dist/agents/workflows/index.d.ts +5 -2
  11. package/dist/agents/workflows/planSteps.d.ts +8 -1
  12. package/dist/agents/workflows/run.d.ts +61 -8
  13. package/dist/agents/workflows/stepWindow.d.ts +59 -0
  14. package/dist/agents/workflows/types.d.ts +133 -4
  15. package/dist/agents/workflows/useWorkflowPreview.d.ts +2 -1
  16. package/dist/agents/workflows/useWorkflowView.d.ts +19 -0
  17. package/dist/chat/ChatPage.d.ts +1 -1
  18. package/dist/chat/WorkflowStepChip.d.ts +24 -0
  19. package/dist/chat/chat-page-types.d.ts +9 -0
  20. package/dist/chat/index.cjs +130 -122
  21. package/dist/chat/index.d.ts +1 -0
  22. package/dist/chat/index.js +2 -2
  23. package/dist/{chunk-TKB7TVMW.js → chunk-5OC5CGYX.js} +168 -100
  24. package/dist/chunk-5OC5CGYX.js.map +1 -0
  25. package/dist/{chunk-ZWA7UUZL.cjs → chunk-7YUFMNFW.cjs} +2 -54
  26. package/dist/chunk-7YUFMNFW.cjs.map +1 -0
  27. package/dist/chunk-A24C6BNA.js +92 -0
  28. package/dist/chunk-A24C6BNA.js.map +1 -0
  29. package/dist/chunk-AINNADMT.cjs +62 -0
  30. package/dist/chunk-AINNADMT.cjs.map +1 -0
  31. package/dist/chunk-CWAZNXC5.js +441 -0
  32. package/dist/chunk-CWAZNXC5.js.map +1 -0
  33. package/dist/{chunk-UIWLDSTF.js → chunk-EWSEQEPL.js} +71 -7
  34. package/dist/chunk-EWSEQEPL.js.map +1 -0
  35. package/dist/chunk-FE4ULGOR.js +151 -0
  36. package/dist/chunk-FE4ULGOR.js.map +1 -0
  37. package/dist/chunk-FT5FFXSJ.js +60 -0
  38. package/dist/chunk-FT5FFXSJ.js.map +1 -0
  39. package/dist/{chunk-WJEKRSPH.js → chunk-ICBAFX5B.js} +3 -3
  40. package/dist/{chunk-WJEKRSPH.js.map → chunk-ICBAFX5B.js.map} +1 -1
  41. package/dist/{chunk-7CVF3DK2.cjs → chunk-IF6VAYIA.cjs} +5 -5
  42. package/dist/{chunk-7CVF3DK2.cjs.map → chunk-IF6VAYIA.cjs.map} +1 -1
  43. package/dist/chunk-MLAHDAN5.cjs +450 -0
  44. package/dist/chunk-MLAHDAN5.cjs.map +1 -0
  45. package/dist/{chunk-IPGKTUF7.cjs → chunk-MP6FK43E.cjs} +71 -5
  46. package/dist/chunk-MP6FK43E.cjs.map +1 -0
  47. package/dist/{chunk-5EBGRG3X.js → chunk-OPA2Y6YZ.js} +3 -54
  48. package/dist/chunk-OPA2Y6YZ.js.map +1 -0
  49. package/dist/{chunk-7FKARMA3.cjs → chunk-SSDISIDW.cjs} +190 -122
  50. package/dist/chunk-SSDISIDW.cjs.map +1 -0
  51. package/dist/chunk-TZR36PPP.cjs +95 -0
  52. package/dist/chunk-TZR36PPP.cjs.map +1 -0
  53. package/dist/chunk-VFIZYSZB.cjs +2783 -0
  54. package/dist/chunk-VFIZYSZB.cjs.map +1 -0
  55. package/dist/chunk-WXRCMIAE.js +2707 -0
  56. package/dist/chunk-WXRCMIAE.js.map +1 -0
  57. package/dist/{chunk-HITAN7JF.cjs → chunk-XMBYDLZQ.cjs} +4 -4
  58. package/dist/{chunk-HITAN7JF.cjs.map → chunk-XMBYDLZQ.cjs.map} +1 -1
  59. package/dist/{chunk-MK6NJQGF.js → chunk-XQDM6T6C.js} +3 -3
  60. package/dist/{chunk-MK6NJQGF.js.map → chunk-XQDM6T6C.js.map} +1 -1
  61. package/dist/chunk-ZVBPRMHJ.cjs +153 -0
  62. package/dist/chunk-ZVBPRMHJ.cjs.map +1 -0
  63. package/dist/connect/docx.cjs +10 -88
  64. package/dist/connect/docx.cjs.map +1 -1
  65. package/dist/connect/docx.js +6 -86
  66. package/dist/connect/docx.js.map +1 -1
  67. package/dist/connect/index.cjs +468 -49
  68. package/dist/connect/index.cjs.map +1 -1
  69. package/dist/connect/index.d.ts +2 -0
  70. package/dist/connect/index.js +454 -37
  71. package/dist/connect/index.js.map +1 -1
  72. package/dist/connection/ConnectedTagMatrix.d.ts +20 -0
  73. package/dist/connection/ConnectedWorkflowRunner.d.ts +28 -2
  74. package/dist/connection/WorkflowRunThread.d.ts +21 -0
  75. package/dist/connection/WorkflowRunnerDialogs.d.ts +37 -0
  76. package/dist/connection/useWorkflowThread.d.ts +12 -0
  77. package/dist/document-tools/index.cjs +7 -143
  78. package/dist/document-tools/index.cjs.map +1 -1
  79. package/dist/document-tools/index.js +5 -144
  80. package/dist/document-tools/index.js.map +1 -1
  81. package/dist/docx/index.cjs +18 -17
  82. package/dist/docx/index.cjs.map +1 -1
  83. package/dist/docx/index.js +3 -2
  84. package/dist/docx/index.js.map +1 -1
  85. package/dist/facts/index.cjs +1 -1
  86. package/dist/facts/index.js +1 -1
  87. package/dist/files/index.cjs +1 -1
  88. package/dist/files/index.js +1 -1
  89. package/dist/home/index.cjs +1 -1
  90. package/dist/home/index.js +1 -1
  91. package/dist/index.cjs +560 -431
  92. package/dist/index.cjs.map +1 -1
  93. package/dist/index.d.ts +1 -0
  94. package/dist/index.js +10 -9
  95. package/dist/index.js.map +1 -1
  96. package/dist/shell/index.cjs +1 -1
  97. package/dist/shell/index.js +1 -1
  98. package/dist/studio/index.cjs +4 -4
  99. package/dist/studio/index.js +3 -3
  100. package/dist/tags/TagMatrix.d.ts +64 -0
  101. package/dist/tags/index.d.ts +3 -0
  102. package/dist/tags/tagMatrixModel.d.ts +39 -0
  103. package/dist/workflow-canvas/StepActionSettings.d.ts +132 -0
  104. package/dist/workflow-canvas/StepInspector.d.ts +25 -2
  105. package/dist/workflow-canvas/WorkflowBuilder.d.ts +11 -3
  106. package/dist/workflow-canvas/WorkflowCanvas.d.ts +27 -2
  107. package/dist/workflow-canvas/edit.d.ts +9 -1
  108. package/dist/workflow-canvas/index.cjs +882 -102
  109. package/dist/workflow-canvas/index.cjs.map +1 -1
  110. package/dist/workflow-canvas/index.js +849 -69
  111. package/dist/workflow-canvas/index.js.map +1 -1
  112. package/package.json +4 -4
  113. package/src/workflow-canvas/canvas.css +9 -0
  114. package/dist/chunk-22P5KNIM.js +0 -1422
  115. package/dist/chunk-22P5KNIM.js.map +0 -1
  116. package/dist/chunk-5EBGRG3X.js.map +0 -1
  117. package/dist/chunk-7FKARMA3.cjs.map +0 -1
  118. package/dist/chunk-IPGKTUF7.cjs.map +0 -1
  119. package/dist/chunk-TKB7TVMW.js.map +0 -1
  120. package/dist/chunk-UIWLDSTF.js.map +0 -1
  121. package/dist/chunk-VYRKO3XU.cjs +0 -1469
  122. package/dist/chunk-VYRKO3XU.cjs.map +0 -1
  123. package/dist/chunk-ZWA7UUZL.cjs.map +0 -1
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The tag matrix as data: a parent label's child labels are the rows, the fields they share (the
3
+ * parent's, then any a row adds) the columns, and each row's linked documents and facts its
4
+ * evidence. Pure helpers for `TagMatrix`: the columns, a row's value, the gaps, and the snapshot
5
+ * as a Markdown document.
6
+ */
7
+ import type { components } from '@arbidocs/client';
8
+ export type TagMatrixData = components['schemas']['TagMatrixResponse'];
9
+ export type TagMatrixRowData = components['schemas']['TagMatrixRow'];
10
+ export type TagMatrixField = components['schemas']['TagField'];
11
+ export type TagMatrixFieldType = TagMatrixField['type'];
12
+ /**
13
+ * The columns: the parent's fields (shared by every row), then fields only some rows define,
14
+ * each once, in the order first seen. Mirrors the SDK's `tagMatrixColumns`.
15
+ */
16
+ export declare function tagMatrixColumns(matrix: TagMatrixData | null | undefined): TagMatrixField[];
17
+ /** A row's value for a column (values are keyed by field id). */
18
+ export declare const cellValue: (row: TagMatrixRowData, column: TagMatrixField) => unknown;
19
+ /** A row with nothing behind it: no linked document and no fact. */
20
+ export declare const isGap: (row: TagMatrixRowData) => boolean;
21
+ /** A value as text (a person by name, a checkbox as yes or no, blank as empty). */
22
+ export declare function cellText(value: unknown, column: Pick<TagMatrixField, 'type'>, nameOf?: (id: string) => string | undefined): string;
23
+ /** A typed input's text back as the value to store (`null` clears it). */
24
+ export declare function parseCell(text: string, type: TagMatrixFieldType): unknown;
25
+ export interface TagMatrixMarkdownOptions {
26
+ title: string;
27
+ /** The evidence column's heading. */
28
+ evidence?: string;
29
+ /** The row column's heading. */
30
+ rowHeading?: string;
31
+ nameOf?: (id: string) => string | undefined;
32
+ /** When the snapshot was taken (ISO); default now. */
33
+ at?: string;
34
+ }
35
+ /**
36
+ * The matrix as a Markdown document: a heading, when it was taken, and one table (a row per
37
+ * label, a column per field, then the evidence counts). What a host files or has signed.
38
+ */
39
+ export declare function tagMatrixMarkdown(matrix: TagMatrixData, options: TagMatrixMarkdownOptions): string;
@@ -0,0 +1,132 @@
1
+ /**
2
+ * The inspector's settings for who a step is for and for the platform actions: the assignee
3
+ * picker and reminder, a document reference picker, and the settings of a signature, an email
4
+ * draft, a tabular review and an agent step that edits a document with tracked changes.
5
+ */
6
+ import type { ReactNode } from 'react';
7
+ import type { WorkflowAgentStep, WorkflowAssignee, WorkflowDocumentRef, WorkflowEmailDraftAction, WorkflowField, WorkflowSignAction, WorkflowStep, WorkflowTabularReviewAction } from '../agents';
8
+ /** A choice the host supplies (a member, a label, a document). */
9
+ export interface StepInspectorOption {
10
+ value: string;
11
+ label: string;
12
+ }
13
+ export interface StepActionSettingsLabels {
14
+ assignee: string;
15
+ assigneeAnyone: string;
16
+ assigneeRunOwner: string;
17
+ assigneeProjectLead: string;
18
+ /** The group of a run's person fields. */
19
+ assigneeFields: string;
20
+ assigneePeople: string;
21
+ remind: string;
22
+ remindHint: string;
23
+ documentFrom: string;
24
+ docFromStep: string;
25
+ docFromInput: string;
26
+ docById: string;
27
+ chooseStep: string;
28
+ chooseInput: string;
29
+ chooseDocument: string;
30
+ /** The id box when the host lists no documents. */
31
+ documentIdPlaceholder: string;
32
+ signDocument: string;
33
+ signers: string;
34
+ addSigner: string;
35
+ signMessage: string;
36
+ expires: string;
37
+ expiresHint: string;
38
+ emailTo: string;
39
+ emailCc: string;
40
+ emailSubject: string;
41
+ emailBody: string;
42
+ /** Under the address fields: separate several with commas. */
43
+ addressesHint: string;
44
+ /** Above the variables an email can use (click one to add it to the body). */
45
+ variablesHint: string;
46
+ attachments: string;
47
+ addAttachment: string;
48
+ reviewColumns: string;
49
+ noTags: string;
50
+ reviewDocuments: string;
51
+ reviewRunUploads: string;
52
+ reviewWorkspace: string;
53
+ reviewChosen: string;
54
+ addDocument: string;
55
+ overwrite: string;
56
+ editDocument: string;
57
+ editDocumentHint: string;
58
+ }
59
+ export declare const DEFAULT_STEP_ACTION_SETTINGS_LABELS: StepActionSettingsLabels;
60
+ export declare const selectClass = "flex h-9 w-full rounded-md border border-input bg-background px-2 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring";
61
+ export declare function Field({ label, children, hint, }: {
62
+ label: string;
63
+ children: ReactNode;
64
+ hint?: string;
65
+ }): import("react").JSX.Element;
66
+ /** What the pickers can offer around the step being edited. */
67
+ export interface StepContext {
68
+ /** The steps this one comes after (what its documents can come from). */
69
+ earlier: WorkflowStep[];
70
+ /** Every field of the run. */
71
+ fields: WorkflowField[];
72
+ people: StepInspectorOption[];
73
+ tags: StepInspectorOption[];
74
+ documents: StepInspectorOption[];
75
+ }
76
+ export declare function AssigneeSelect({ value, onChange, ctx, l, anyone, testId, ariaLabel, }: {
77
+ value: WorkflowAssignee | undefined;
78
+ onChange: (value: WorkflowAssignee | undefined) => void;
79
+ ctx: StepContext;
80
+ l: StepActionSettingsLabels;
81
+ /** The "anyone" choice's wording; absent = no such choice. */
82
+ anyone?: string;
83
+ testId?: string;
84
+ ariaLabel?: string;
85
+ }): import("react").JSX.Element;
86
+ /** Who the step is for, and when they are reminded. */
87
+ export declare function AssigneeSettings({ step, patch, ctx, l, testId, }: {
88
+ step: WorkflowStep;
89
+ patch: (p: Partial<WorkflowStep>) => void;
90
+ ctx: StepContext;
91
+ l: StepActionSettingsLabels;
92
+ testId: string;
93
+ }): import("react").JSX.Element;
94
+ /** Where a document comes from: an earlier step, a run input, or one document. */
95
+ export declare function DocumentRefPicker({ value, onChange, ctx, l, testId, }: {
96
+ value: WorkflowDocumentRef | undefined;
97
+ onChange: (value: WorkflowDocumentRef) => void;
98
+ ctx: StepContext;
99
+ l: StepActionSettingsLabels;
100
+ testId: string;
101
+ }): import("react").JSX.Element;
102
+ export declare function SignSettings({ action, onChange, ctx, l, testId, }: {
103
+ action: WorkflowSignAction;
104
+ onChange: (action: WorkflowSignAction) => void;
105
+ ctx: StepContext;
106
+ l: StepActionSettingsLabels;
107
+ testId: string;
108
+ }): import("react").JSX.Element;
109
+ /** The variables a template over the run can use: its fields and the earlier steps' answers. */
110
+ export declare function templateVariables(ctx: StepContext): string[];
111
+ export declare function EmailDraftSettings({ action, onChange, ctx, l, testId, }: {
112
+ action: WorkflowEmailDraftAction;
113
+ onChange: (action: WorkflowEmailDraftAction) => void;
114
+ ctx: StepContext;
115
+ l: StepActionSettingsLabels;
116
+ testId: string;
117
+ }): import("react").JSX.Element;
118
+ export declare function TabularReviewSettings({ action, onChange, ctx, l, testId, }: {
119
+ action: WorkflowTabularReviewAction;
120
+ onChange: (action: WorkflowTabularReviewAction) => void;
121
+ ctx: StepContext;
122
+ l: StepActionSettingsLabels;
123
+ testId: string;
124
+ }): import("react").JSX.Element;
125
+ /** "Edit this document (tracked changes)" on an agent step (main line only). */
126
+ export declare function EditDocumentSettings({ step, patch, ctx, l, testId, }: {
127
+ step: WorkflowAgentStep;
128
+ patch: (p: Partial<WorkflowAgentStep>) => void;
129
+ ctx: StepContext;
130
+ l: StepActionSettingsLabels;
131
+ testId: string;
132
+ }): import("react").JSX.Element;
@@ -2,8 +2,10 @@
2
2
  * The designer's side panel: the selected step's settings, or the workflow's own when nothing is
3
3
  * selected. Every edit goes through the pure operations in `./edit`.
4
4
  */
5
- import { type WorkflowDefinition } from '../agents';
5
+ import { type WorkflowDefinition, type WorkflowField } from '../agents';
6
6
  import { type SignalsEditorLabels } from './SignalsEditor';
7
+ import { type StepActionSettingsLabels, type StepInspectorOption } from './StepActionSettings';
8
+ export type { StepInspectorOption } from './StepActionSettings';
7
9
  export interface StepInspectorLabels {
8
10
  workflow: string;
9
11
  title: string;
@@ -36,6 +38,9 @@ export interface StepInspectorLabels {
36
38
  hint: string;
37
39
  instructions: string;
38
40
  instructionsHint: string;
41
+ /** A review's fields: what the approver fills in. */
42
+ reviewFields: string;
43
+ reviewFieldsHint: string;
39
44
  deleteStep: string;
40
45
  }
41
46
  export declare const DEFAULT_STEP_INSPECTOR_LABELS: StepInspectorLabels;
@@ -47,12 +52,30 @@ export interface StepInspectorProps {
47
52
  onSelect?: (stepId: string | null) => void;
48
53
  /** What an agent step can run: skills and single-run workflows. */
49
54
  workflows?: WorkflowDefinition[];
55
+ /** The workspace's members: who a step is for, who signs. */
56
+ people?: StepInspectorOption[];
57
+ /** The workspace's labels: a tabular review's columns. */
58
+ tags?: StepInspectorOption[];
59
+ /** The workspace's documents: what a step names directly. */
60
+ documents?: StepInspectorOption[];
50
61
  labels?: Partial<StepInspectorLabels>;
62
+ /** The assignee and action settings' wording. */
63
+ actionLabels?: Partial<StepActionSettingsLabels>;
51
64
  /** The "When done, signal…" editor's wording. */
52
65
  signalLabels?: Partial<SignalsEditorLabels>;
53
66
  testId?: string;
54
67
  }
55
- export declare function StepInspector({ workflow, stepId, onChange, onSelect, workflows, labels, signalLabels, testId, }: StepInspectorProps): import("react").JSX.Element;
68
+ export declare function StepInspector({ workflow, stepId, onChange, onSelect, workflows, people, tags, documents, labels, actionLabels, signalLabels, testId, }: StepInspectorProps): import("react").JSX.Element;
69
+ /** The fields editor: a form's fields, a review's fields. */
70
+ export declare function FormFields({ fields, taken, onChange, l, hint, testId, }: {
71
+ fields: WorkflowField[];
72
+ /** Codes used by other steps' fields: a field's code never collides with them. */
73
+ taken: string[];
74
+ onChange: (fields: WorkflowField[]) => void;
75
+ l: Pick<StepInspectorLabels, 'fields' | 'fieldLabel' | 'fieldType' | 'required' | 'addField'>;
76
+ hint?: string;
77
+ testId: string;
78
+ }): import("react").JSX.Element;
56
79
  /**
57
80
  * A skill's inputs when it is picked: each one named like a field of the run reads that field
58
81
  * (`{{client}}`); the others start empty. What was typed before is kept.
@@ -6,8 +6,8 @@
6
6
  * thread that runs the steps.
7
7
  */
8
8
  import { type ReactNode } from 'react';
9
- import { type AgentOption, type StepComposeOptions, type WorkflowDefinition, type WorkflowGraphProblem } from '../agents';
10
- import { type StepInspectorLabels } from './StepInspector';
9
+ import { type AgentOption, type StepComposeOptions, type WorkflowDefinition, type WorkflowGraphProblem, type WorkflowStepProblem } from '../agents';
10
+ import { type StepInspectorLabels, type StepInspectorOption } from './StepInspector';
11
11
  import { type TriggerInspectorLabels } from './TriggerInspector';
12
12
  import { type DeclaredSignal, type WorkflowBuilderValue } from './trigger';
13
13
  import { type WorkflowCanvasLabels } from './WorkflowCanvas';
@@ -23,6 +23,8 @@ export interface WorkflowBuilderLabels {
23
23
  /** What the preview's stand-in agent answers; `{prompt}` is replaced. */
24
24
  previewAnswer: string;
25
25
  problems: Record<WorkflowGraphProblem['code'], string>;
26
+ /** What a step still needs (`{step}` is its title). */
27
+ missing: Record<WorkflowStepProblem['missing'], string>;
26
28
  }
27
29
  export declare const DEFAULT_WORKFLOW_BUILDER_LABELS: WorkflowBuilderLabels;
28
30
  export interface WorkflowBuilderProps extends Pick<StepComposeOptions, 'compose'> {
@@ -42,6 +44,12 @@ export interface WorkflowBuilderProps extends Pick<StepComposeOptions, 'compose'
42
44
  value: string;
43
45
  label: string;
44
46
  }>;
47
+ /** The workspace's members: who a step can be for, and who signs. */
48
+ people?: StepInspectorOption[];
49
+ /** The workspace's labels: a tabular review's columns. */
50
+ tags?: StepInspectorOption[];
51
+ /** The workspace's documents: what a step can name directly. */
52
+ documents?: StepInspectorOption[];
45
53
  /**
46
54
  * The signals the firm's workflows declare (`declaredSignals` over the saved workflows): what
47
55
  * "When a step signals" offers. The signals of the workflow being built are added.
@@ -57,4 +65,4 @@ export interface WorkflowBuilderProps extends Pick<StepComposeOptions, 'compose'
57
65
  testId?: string;
58
66
  className?: string;
59
67
  }
60
- export declare function WorkflowBuilder({ value, onChange, workflows, agents, eventKinds, tasks, signals, compose, renderIcon, actions, labels, canvasLabels, inspectorLabels, triggerLabels, testId, className, }: WorkflowBuilderProps): import("react").JSX.Element;
68
+ export declare function WorkflowBuilder({ value, onChange, workflows, agents, eventKinds, tasks, signals, people, tags, documents, compose, renderIcon, actions, labels, canvasLabels, inspectorLabels, triggerLabels, testId, className, }: WorkflowBuilderProps): import("react").JSX.Element;
@@ -5,13 +5,18 @@
5
5
  * Read-only with live `phases` it shows a run's progress on the same graph.
6
6
  */
7
7
  import { type ReactNode } from 'react';
8
- import { type WorkflowDefinition, type WorkflowStepPhase } from '../agents';
8
+ import { type WorkflowDefinition, type WorkflowStep, type WorkflowStepPhase } from '../agents';
9
9
  import { type WorkflowStepKind } from './edit';
10
10
  export interface WorkflowCanvasLabels {
11
11
  form: string;
12
12
  upload: string;
13
13
  agent: string;
14
14
  review: string;
15
+ sign: string;
16
+ email_draft: string;
17
+ tabular_review: string;
18
+ /** An agent step that edits a Word document with tracked changes. */
19
+ redline: string;
15
20
  /** An agent step that runs on a branch and delivers its result to the thread. */
16
21
  branch: string;
17
22
  /** What each kind is for, in the "+" menu. */
@@ -24,6 +29,21 @@ export interface WorkflowCanvasLabels {
24
29
  fields: string;
25
30
  noFields: string;
26
31
  approvedBy: string;
32
+ /** A signature step's summary; `{count}` is the number of signers. */
33
+ signers: string;
34
+ /** A signature step without its document yet. */
35
+ chooseDocument: string;
36
+ /** An email step's summary; `{to}` is its first recipient. */
37
+ emailTo: string;
38
+ /** An email step without a recipient yet. */
39
+ noRecipients: string;
40
+ /** A tabular review's summary; `{count}` is the number of columns (labels). */
41
+ reviewColumns: string;
42
+ noColumns: string;
43
+ /** A step's assignee on its card; `{name}` is replaced. */
44
+ assignee: string;
45
+ /** A step that reminds its person; `{hours}` is replaced. */
46
+ remind: string;
27
47
  emptyTitle: string;
28
48
  emptyHint: string;
29
49
  fitView: string;
@@ -43,6 +63,8 @@ export interface WorkflowCanvasProps {
43
63
  phases?: Record<string, WorkflowStepPhase>;
44
64
  /** Names the workflow an agent step runs (its card's summary). */
45
65
  workflowTitle?: (id: string) => string | undefined;
66
+ /** Who a step is for, in words (its card shows it). */
67
+ assigneeOf?: (step: WorkflowStep) => string | undefined;
46
68
  /**
47
69
  * The workflow's start, drawn as the first node (id `TRIGGER_NODE`): an edge from it into each
48
70
  * step that starts with the run. Drawing one from it into a step makes that step start the run.
@@ -65,5 +87,8 @@ export declare const STEP_KIND_ICONS: {
65
87
  readonly upload: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
66
88
  readonly agent: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
67
89
  readonly review: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
90
+ readonly sign: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
91
+ readonly email_draft: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
92
+ readonly tabular_review: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
68
93
  };
69
- export declare function WorkflowCanvas({ workflow, onChange, selected, onSelect, focus, onAddAfter, phases, workflowTitle, trigger, renderIcon, labels, className, reserveRight, testId, }: WorkflowCanvasProps): import("react").JSX.Element;
94
+ export declare function WorkflowCanvas({ workflow, onChange, selected, onSelect, focus, onAddAfter, phases, workflowTitle, assigneeOf, trigger, renderIcon, labels, className, reserveRight, testId, }: WorkflowCanvasProps): import("react").JSX.Element;
@@ -8,7 +8,15 @@ type Steps = Extract<WorkflowDefinition['run'], {
8
8
  kind: 'steps';
9
9
  }>;
10
10
  export type WorkflowLayout = NonNullable<Steps['layout']>;
11
- export type WorkflowStepKind = WorkflowStep['kind'];
11
+ /**
12
+ * What the builder's add menus offer: each kind of step, with each platform action (an
13
+ * `action` step) as a kind of its own.
14
+ */
15
+ export type WorkflowStepKind = 'form' | 'upload' | 'agent' | 'review' | 'sign' | 'email_draft' | 'tabular_review';
16
+ /** Every kind, in the order the add menus list them. */
17
+ export declare const WORKFLOW_STEP_KINDS: readonly WorkflowStepKind[];
18
+ /** A step's kind as the builder shows it: an action step is its action's type. */
19
+ export declare const stepKindOf: (step: WorkflowStep) => WorkflowStepKind;
12
20
  /** A new, empty stepped workflow. */
13
21
  export declare function newSteppedWorkflow(id: string, title: string): WorkflowDefinition;
14
22
  /** A step id from a title: lowercase words joined by hyphens, unique within the workflow. */