@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
package/dist/agents/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen } from '../chunk-
|
|
2
|
+
export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen } from '../chunk-5NQIBJPP.js';
|
|
3
3
|
import '../chunk-4XJZ6AAY.js';
|
|
4
4
|
import '../chunk-P6GHJSLR.js';
|
|
5
|
-
export { ActionStepBody, ApprovalEvidence, AssigneeLine, DEFAULT_ASSIGNEE_WORDING, DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_STEP_BAR_LABELS, DEFAULT_TASK_ACTIVITY_LABELS, DEFAULT_WORKFLOW_RUNNER_LABELS, DEFAULT_WORKFLOW_STEP_PARTS_LABELS, EMPTY_WORKFLOW_SCOPE, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, SchemaForm, SendBackControl, TaskActivityTimeline, WorkflowRunner, activeStepId, assigneeName, buildLaunch, canAssign, composeStepPrompt, composeWorkflowPrompt, defaultInputs, dependsOn, fieldToFrontmatter, fillRunText, fillStepInputs, fromPlanAssignee, fromPlanDocumentRef, fromPlanSteps, initialRunInputs, inputsFromContext, isEmptyWorkflowScope, isIncompleteSignal, isPersonAction, isPersonStep, isRunFinished, isSteppedWorkflow, isWorkflowScope, layoutFromPlanSteps, nextAction, orderSteps, promptFieldName, reviewInstructions, runFields, runFieldsOf, runThreadTitle, sendBackTargets, skillToWorkflow, splitDocRef, stepConfigProblems, stepDependencies, stepFields, stepLevels, stepPhase, stepStatesFromActivity, stepWindow, taskActivityHeadline, toPlanAssignee, toPlanDocumentRef, toPlanSteps, upstreamSteps, useWorkflowView, validateInputs, validateStep, validateWorkflowGraph, workflowAccepts, workflowFromFrontmatter, workflowSteps, workflowsAccepting, workflowsForHost } from '../chunk-
|
|
5
|
+
export { ActionStepBody, ApprovalEvidence, AssigneeLine, DEFAULT_ASSIGNEE_WORDING, DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_STEP_BAR_LABELS, DEFAULT_TASK_ACTIVITY_LABELS, DEFAULT_WORKFLOW_RUNNER_LABELS, DEFAULT_WORKFLOW_STEP_PARTS_LABELS, EMPTY_WORKFLOW_SCOPE, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, SchemaForm, SendBackControl, TaskActivityTimeline, WorkflowRunner, activeStepId, assigneeName, buildLaunch, canAssign, composeStepPrompt, composeWorkflowPrompt, defaultInputs, dependsOn, fieldToFrontmatter, fillRunText, fillStepInputs, fromPlanAssignee, fromPlanDocumentRef, fromPlanSteps, initialRunInputs, inputsFromContext, isEmptyWorkflowScope, isIncompleteSignal, isPersonAction, isPersonStep, isRunFinished, isSteppedWorkflow, isWorkflowScope, layoutFromPlanSteps, nextAction, orderSteps, promptFieldName, reviewInstructions, runFields, runFieldsOf, runThreadTitle, sendBackTargets, skillToWorkflow, splitDocRef, stepConfigProblems, stepDependencies, stepFields, stepLevels, stepPhase, stepStatesFromActivity, stepWindow, taskActivityHeadline, toPlanAssignee, toPlanDocumentRef, toPlanSteps, upstreamSteps, useWorkflowView, validateInputs, validateStep, validateWorkflowGraph, workflowAccepts, workflowFromFrontmatter, workflowSteps, workflowsAccepting, workflowsForHost } from '../chunk-PGDL26TQ.js';
|
|
6
6
|
import '../chunk-6S5FLMWG.js';
|
|
7
7
|
import '../chunk-4WWM3GQ5.js';
|
|
8
8
|
import '../chunk-RFXJYIDV.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-5LXQPP2K.js';
|
|
10
10
|
import '../chunk-EVUEIBNU.js';
|
|
11
|
+
import '../chunk-AUS3KBHJ.js';
|
|
11
12
|
import '../chunk-NUNKSZKU.js';
|
|
12
13
|
import '../chunk-YU2KUMGE.js';
|
|
13
14
|
import '../chunk-DDF5GPIJ.js';
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* `workflowFromFrontmatter`), so the backend can adopt it without a UI change. Blocks hold no
|
|
7
7
|
* domain wording: titles, labels and prompt text are data supplied by the host.
|
|
8
8
|
*/
|
|
9
|
+
import type { Tone } from '../../components/tones';
|
|
9
10
|
export type WorkflowFieldType = 'text' | 'longtext' | 'boolean' | 'select' | 'number' | 'date' | 'scope' | 'documents'
|
|
10
11
|
/** A workspace member (`usr-…` / `agt-…`): what a step's assignee or a signer can name. */
|
|
11
12
|
| 'person';
|
|
@@ -37,6 +38,11 @@ export interface WorkflowFieldOption {
|
|
|
37
38
|
text?: string;
|
|
38
39
|
/** Key into the host's icon map. */
|
|
39
40
|
icon?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Colours the option's choice tile (e.g. a risk rating: low `success`, medium `warning`, high
|
|
43
|
+
* `danger`), chosen or not. The label always shows, so the tone is never the only cue.
|
|
44
|
+
*/
|
|
45
|
+
tone?: Tone;
|
|
40
46
|
}
|
|
41
47
|
export interface WorkflowField {
|
|
42
48
|
/** Key in `inputs`; also the `{{placeholder}}` in the prompt template. */
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// src/components/tones.ts
|
|
5
|
+
var TONES = [
|
|
6
|
+
"neutral",
|
|
7
|
+
"info",
|
|
8
|
+
"success",
|
|
9
|
+
"warning",
|
|
10
|
+
"danger",
|
|
11
|
+
"accent",
|
|
12
|
+
"ai"
|
|
13
|
+
];
|
|
14
|
+
var isTone = (v) => TONES.includes(v);
|
|
15
|
+
var TONE_SURFACE = {
|
|
16
|
+
neutral: "bg-gray-bg text-gray-text",
|
|
17
|
+
info: "bg-blue-bg text-blue-text",
|
|
18
|
+
success: "bg-green-bg text-green-text",
|
|
19
|
+
warning: "bg-yellow-bg text-yellow-text",
|
|
20
|
+
danger: "bg-red-bg text-red-text",
|
|
21
|
+
accent: "bg-purple-bg text-purple-text",
|
|
22
|
+
ai: "bg-ai-soft text-ai-ink"
|
|
23
|
+
};
|
|
24
|
+
var TONE_BORDER = {
|
|
25
|
+
neutral: "border-gray-border",
|
|
26
|
+
info: "border-blue-border",
|
|
27
|
+
success: "border-green-border",
|
|
28
|
+
warning: "border-yellow-border",
|
|
29
|
+
danger: "border-red-border",
|
|
30
|
+
accent: "border-purple-border",
|
|
31
|
+
ai: "border-transparent"
|
|
32
|
+
};
|
|
33
|
+
var TONE_DOT = {
|
|
34
|
+
neutral: "bg-gray-text",
|
|
35
|
+
info: "bg-blue-solid",
|
|
36
|
+
success: "bg-green-solid",
|
|
37
|
+
warning: "bg-yellow-solid",
|
|
38
|
+
danger: "bg-red-solid",
|
|
39
|
+
accent: "bg-purple-solid",
|
|
40
|
+
ai: "bg-ai-ink"
|
|
41
|
+
};
|
|
42
|
+
var TONE_SOLID_BORDER = {
|
|
43
|
+
neutral: "border-gray-text",
|
|
44
|
+
info: "border-blue-solid",
|
|
45
|
+
success: "border-green-solid",
|
|
46
|
+
warning: "border-yellow-solid",
|
|
47
|
+
danger: "border-red-solid",
|
|
48
|
+
accent: "border-purple-solid",
|
|
49
|
+
ai: "border-ai-ink"
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.TONES = TONES;
|
|
53
|
+
exports.TONE_BORDER = TONE_BORDER;
|
|
54
|
+
exports.TONE_DOT = TONE_DOT;
|
|
55
|
+
exports.TONE_SOLID_BORDER = TONE_SOLID_BORDER;
|
|
56
|
+
exports.TONE_SURFACE = TONE_SURFACE;
|
|
57
|
+
exports.isTone = isTone;
|
|
58
|
+
//# sourceMappingURL=chunk-32HW2Q33.cjs.map
|
|
59
|
+
//# sourceMappingURL=chunk-32HW2Q33.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/tones.ts"],"names":[],"mappings":";;;AAWO,IAAM,KAAA,GAAyB;AAAA,EACpC,SAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF;AAEO,IAAM,MAAA,GAAS,CAAC,CAAA,KAA2B,KAAA,CAA6B,SAAS,CAAC;AAGlF,IAAM,YAAA,GAAqC;AAAA,EAChD,OAAA,EAAS,2BAAA;AAAA,EACT,IAAA,EAAM,2BAAA;AAAA,EACN,OAAA,EAAS,6BAAA;AAAA,EACT,OAAA,EAAS,+BAAA;AAAA,EACT,MAAA,EAAQ,yBAAA;AAAA,EACR,MAAA,EAAQ,+BAAA;AAAA,EACR,EAAA,EAAI;AACN;AAGO,IAAM,WAAA,GAAoC;AAAA,EAC/C,OAAA,EAAS,oBAAA;AAAA,EACT,IAAA,EAAM,oBAAA;AAAA,EACN,OAAA,EAAS,qBAAA;AAAA,EACT,OAAA,EAAS,sBAAA;AAAA,EACT,MAAA,EAAQ,mBAAA;AAAA,EACR,MAAA,EAAQ,sBAAA;AAAA,EACR,EAAA,EAAI;AACN;AAGO,IAAM,QAAA,GAAiC;AAAA,EAC5C,OAAA,EAAS,cAAA;AAAA,EACT,IAAA,EAAM,eAAA;AAAA,EACN,OAAA,EAAS,gBAAA;AAAA,EACT,OAAA,EAAS,iBAAA;AAAA,EACT,MAAA,EAAQ,cAAA;AAAA,EACR,MAAA,EAAQ,iBAAA;AAAA,EACR,EAAA,EAAI;AACN;AAGO,IAAM,iBAAA,GAA0C;AAAA,EACrD,OAAA,EAAS,kBAAA;AAAA,EACT,IAAA,EAAM,mBAAA;AAAA,EACN,OAAA,EAAS,oBAAA;AAAA,EACT,OAAA,EAAS,qBAAA;AAAA,EACT,MAAA,EAAQ,kBAAA;AAAA,EACR,MAAA,EAAQ,qBAAA;AAAA,EACR,EAAA,EAAI;AACN","file":"chunk-32HW2Q33.cjs","sourcesContent":["/**\n * The ONE status/tone vocabulary of the blocks. `StatusPill`, `ToneBadge`, `Dot` and the plan,\n * connection and tag chips all read these maps, so a tone looks the same wherever it appears and\n * a new tone is added in one place. Every pair is a token pair checked by\n * `tokens.contrast.test.ts` (`--{hue}-text` on `--{hue}-bg`).\n */\n\n/** Semantic tones, mapped to the token palette (`--{hue}-bg|text|border`, `--ai-*`). */\nexport type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'accent' | 'ai'\n\n/** Every tone, e.g. to check a tone read from a file or offer them in a picker. */\nexport const TONES: readonly Tone[] = [\n 'neutral',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'accent',\n 'ai',\n]\n\nexport const isTone = (v: unknown): v is Tone => (TONES as readonly unknown[]).includes(v)\n\n/** Background + text of a tinted chip. */\nexport const TONE_SURFACE: Record<Tone, string> = {\n neutral: 'bg-gray-bg text-gray-text',\n info: 'bg-blue-bg text-blue-text',\n success: 'bg-green-bg text-green-text',\n warning: 'bg-yellow-bg text-yellow-text',\n danger: 'bg-red-bg text-red-text',\n accent: 'bg-purple-bg text-purple-text',\n ai: 'bg-ai-soft text-ai-ink',\n}\n\n/** Border of a tinted chip (the AI tint has none). */\nexport const TONE_BORDER: Record<Tone, string> = {\n neutral: 'border-gray-border',\n info: 'border-blue-border',\n success: 'border-green-border',\n warning: 'border-yellow-border',\n danger: 'border-red-border',\n accent: 'border-purple-border',\n ai: 'border-transparent',\n}\n\n/** Solid fill of a status dot. */\nexport const TONE_DOT: Record<Tone, string> = {\n neutral: 'bg-gray-text',\n info: 'bg-blue-solid',\n success: 'bg-green-solid',\n warning: 'bg-yellow-solid',\n danger: 'bg-red-solid',\n accent: 'bg-purple-solid',\n ai: 'bg-ai-ink',\n}\n\n/** Strong border of a chosen toned control (its fill is `TONE_SURFACE`). */\nexport const TONE_SOLID_BORDER: Record<Tone, string> = {\n neutral: 'border-gray-text',\n info: 'border-blue-solid',\n success: 'border-green-solid',\n warning: 'border-yellow-solid',\n danger: 'border-red-solid',\n accent: 'border-purple-solid',\n ai: 'border-ai-ink',\n}\n"]}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkDETZZBG2_cjs = require('./chunk-DETZZBG2.cjs');
|
|
5
|
+
var chunk32HW2Q33_cjs = require('./chunk-32HW2Q33.cjs');
|
|
5
6
|
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
6
7
|
var chunkB4SRYJLM_cjs = require('./chunk-B4SRYJLM.cjs');
|
|
7
8
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
8
9
|
var react = require('react');
|
|
10
|
+
var lucideReact = require('lucide-react');
|
|
9
11
|
var ui = require('@arbidocs/react/ui');
|
|
10
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
|
-
var lucideReact = require('lucide-react');
|
|
12
13
|
|
|
13
14
|
// src/agents/workflows/types.ts
|
|
14
15
|
var EMPTY_WORKFLOW_SCOPE = { folders: [], labels: [] };
|
|
@@ -201,7 +202,8 @@ function fieldFromFrontmatter(raw) {
|
|
|
201
202
|
label,
|
|
202
203
|
description: str(ro.description),
|
|
203
204
|
text: str(ro.text),
|
|
204
|
-
icon: str(ro.icon)
|
|
205
|
+
icon: str(ro.icon),
|
|
206
|
+
tone: chunk32HW2Q33_cjs.isTone(ro.tone) ? ro.tone : void 0
|
|
205
207
|
}
|
|
206
208
|
] : [];
|
|
207
209
|
}) : void 0;
|
|
@@ -256,7 +258,8 @@ function fieldToFrontmatter(field) {
|
|
|
256
258
|
label: o.label,
|
|
257
259
|
description: o.description,
|
|
258
260
|
text: o.text,
|
|
259
|
-
icon: o.icon
|
|
261
|
+
icon: o.icon,
|
|
262
|
+
tone: o.tone
|
|
260
263
|
})
|
|
261
264
|
),
|
|
262
265
|
min: field.min,
|
|
@@ -375,40 +378,28 @@ function FieldControl({
|
|
|
375
378
|
case "select": {
|
|
376
379
|
const options = field.options ?? [];
|
|
377
380
|
if (options.length > 0 && options.length <= TILE_MAX) {
|
|
381
|
+
const compact3 = options.every((o) => !o.icon && !o.description);
|
|
378
382
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
379
383
|
"div",
|
|
380
384
|
{
|
|
381
385
|
role: "radiogroup",
|
|
382
386
|
"aria-label": field.label,
|
|
383
|
-
className: "
|
|
387
|
+
className: "flex flex-wrap gap-2",
|
|
384
388
|
"data-testid": testId,
|
|
385
|
-
children: options.map((option) =>
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
className: ui.cn(
|
|
400
|
-
"flex min-h-24 flex-col items-center justify-center gap-1.5 rounded-lg border p-3 text-center transition-colors pointer-coarse:min-h-28 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
401
|
-
selected ? "border-primary bg-primary/10" : "border-border bg-card [&:hover]:border-primary [&:hover]:bg-muted"
|
|
402
|
-
),
|
|
403
|
-
children: [
|
|
404
|
-
option.icon && renderIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: renderIcon(option.icon) }),
|
|
405
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: option.label }),
|
|
406
|
-
option.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: option.description })
|
|
407
|
-
]
|
|
408
|
-
},
|
|
409
|
-
option.value
|
|
410
|
-
);
|
|
411
|
-
})
|
|
389
|
+
children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
390
|
+
ChoiceTile,
|
|
391
|
+
{
|
|
392
|
+
option,
|
|
393
|
+
selected: value === option.value,
|
|
394
|
+
compact: compact3,
|
|
395
|
+
renderIcon,
|
|
396
|
+
testId: chunkMHVNT4J3_cjs.prefixedTestId(testId, option.value, {
|
|
397
|
+
testId: `workflow-field-${field.name}-${option.value}`
|
|
398
|
+
}),
|
|
399
|
+
onSelect: () => onChange(option.value)
|
|
400
|
+
},
|
|
401
|
+
option.value
|
|
402
|
+
))
|
|
412
403
|
}
|
|
413
404
|
);
|
|
414
405
|
}
|
|
@@ -455,6 +446,50 @@ function FieldControl({
|
|
|
455
446
|
);
|
|
456
447
|
}
|
|
457
448
|
}
|
|
449
|
+
function ChoiceTile({
|
|
450
|
+
option,
|
|
451
|
+
selected,
|
|
452
|
+
compact: compact3,
|
|
453
|
+
renderIcon,
|
|
454
|
+
testId,
|
|
455
|
+
onSelect
|
|
456
|
+
}) {
|
|
457
|
+
const tone = option.tone;
|
|
458
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
459
|
+
"button",
|
|
460
|
+
{
|
|
461
|
+
type: "button",
|
|
462
|
+
role: "radio",
|
|
463
|
+
"aria-checked": selected,
|
|
464
|
+
"data-testid": testId,
|
|
465
|
+
"data-tone": tone,
|
|
466
|
+
onClick: onSelect,
|
|
467
|
+
className: ui.cn(
|
|
468
|
+
// Sized to its label (flex-basis auto), growing to share the row, never wider than it.
|
|
469
|
+
"flex max-w-full min-w-[min(4rem,100%)] flex-auto flex-col items-center justify-center gap-1.5 rounded-lg border text-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
470
|
+
compact3 ? "min-h-9 px-3 py-1.5 pointer-coarse:min-h-11" : "min-h-24 p-3 pointer-coarse:min-h-28",
|
|
471
|
+
tone ? selected ? ui.cn(chunk32HW2Q33_cjs.TONE_SURFACE[tone], chunk32HW2Q33_cjs.TONE_SOLID_BORDER[tone]) : ui.cn(chunk32HW2Q33_cjs.TONE_BORDER[tone], "bg-card [&:hover]:bg-muted") : selected ? "border-primary bg-primary/10" : "border-border bg-card [&:hover]:border-primary [&:hover]:bg-muted"
|
|
472
|
+
),
|
|
473
|
+
children: [
|
|
474
|
+
option.icon && renderIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: renderIcon(option.icon) }),
|
|
475
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
476
|
+
"span",
|
|
477
|
+
{
|
|
478
|
+
className: ui.cn(
|
|
479
|
+
"flex max-w-full items-center gap-1.5 text-sm font-medium",
|
|
480
|
+
tone && selected ? void 0 : "text-foreground"
|
|
481
|
+
),
|
|
482
|
+
children: [
|
|
483
|
+
selected ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-3.5 shrink-0", "aria-hidden": true }) : tone && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: ui.cn("size-2 shrink-0 rounded-full", chunk32HW2Q33_cjs.TONE_DOT[tone]) }),
|
|
484
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 break-words", children: option.label })
|
|
485
|
+
]
|
|
486
|
+
}
|
|
487
|
+
),
|
|
488
|
+
option.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-full text-xs break-words text-muted-foreground", children: option.description })
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
);
|
|
492
|
+
}
|
|
458
493
|
function FormField(props) {
|
|
459
494
|
const { field, error, l, idFor } = props;
|
|
460
495
|
const isBoolean = field.type === "boolean";
|
|
@@ -3175,5 +3210,5 @@ exports.workflowFromFrontmatter = workflowFromFrontmatter;
|
|
|
3175
3210
|
exports.workflowSteps = workflowSteps;
|
|
3176
3211
|
exports.workflowsAccepting = workflowsAccepting;
|
|
3177
3212
|
exports.workflowsForHost = workflowsForHost;
|
|
3178
|
-
//# sourceMappingURL=chunk-
|
|
3179
|
-
//# sourceMappingURL=chunk-
|
|
3213
|
+
//# sourceMappingURL=chunk-3US5OIDQ.cjs.map
|
|
3214
|
+
//# sourceMappingURL=chunk-3US5OIDQ.cjs.map
|