@arbidocs/blocks 0.4.89 → 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 +283 -282
- package/dist/agents/index.js +7 -6
- package/dist/agents/workflows/types.d.ts +6 -0
- package/dist/{chunk-2CFW2ELM.cjs → chunk-2EI7NCUA.cjs} +2 -8
- package/dist/chunk-2EI7NCUA.cjs.map +1 -0
- package/dist/chunk-32HW2Q33.cjs +59 -0
- package/dist/chunk-32HW2Q33.cjs.map +1 -0
- package/dist/{chunk-MOJ5JQDN.cjs → chunk-3US5OIDQ.cjs} +69 -34
- 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-QLHW7JGN.js → chunk-5NQIBJPP.js} +7 -7
- package/dist/{chunk-QLHW7JGN.js.map → chunk-5NQIBJPP.js.map} +1 -1
- package/dist/{chunk-3D5MDCQ7.js → chunk-5RQOVALO.js} +3 -3
- package/dist/{chunk-3D5MDCQ7.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-CNI5QJ5B.cjs → chunk-DDYXFALG.cjs} +50 -50
- package/dist/{chunk-CNI5QJ5B.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-TF6YMDZL.cjs → chunk-EHF63UYP.cjs} +5 -5
- package/dist/{chunk-TF6YMDZL.cjs.map → chunk-EHF63UYP.cjs.map} +1 -1
- package/dist/{chunk-I44NX2ZB.js → chunk-PGDL26TQ.js} +69 -34
- package/dist/chunk-PGDL26TQ.js.map +1 -0
- package/dist/{chunk-ZX2VPMBJ.js → chunk-YU2KUMGE.js} +2 -8
- package/dist/chunk-YU2KUMGE.js.map +1 -0
- package/dist/components/tones.d.ts +5 -0
- package/dist/connect/index.cjs +26 -25
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +5 -4
- package/dist/connect/index.js.map +1 -1
- package/dist/facts/FactSourceGroup.d.ts +2 -1
- package/dist/facts/index.cjs +6 -6
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.js +3 -3
- package/dist/facts/index.js.map +1 -1
- package/dist/files/cells/LabelMultiSelect.d.ts +11 -3
- package/dist/files/index.cjs +23 -16
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +20 -13
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +371 -358
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +54 -49
- 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/shell/FilterInput.d.ts +1 -3
- package/dist/shell/index.cjs +4 -4
- package/dist/shell/index.js +1 -1
- package/dist/site/index.cjs +4 -3
- package/dist/site/index.js +2 -1
- package/dist/tags/TagDetail.d.ts +10 -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 +179 -50
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.d.ts +1 -0
- package/dist/workflow-canvas/index.js +136 -9
- package/dist/workflow-canvas/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-2CFW2ELM.cjs.map +0 -1
- package/dist/chunk-DPLRHEJZ.js.map +0 -1
- package/dist/chunk-I44NX2ZB.js.map +0 -1
- package/dist/chunk-MOJ5JQDN.cjs.map +0 -1
- package/dist/chunk-VFUWWH52.cjs +0 -83
- package/dist/chunk-VFUWWH52.cjs.map +0 -1
- package/dist/chunk-ZX2VPMBJ.js.map +0 -1
package/dist/agents/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
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
|
-
import '../chunk-DDF5GPIJ.js';
|
|
9
|
-
import '../chunk-XD2M6LIG.js';
|
|
10
8
|
import '../chunk-RFXJYIDV.js';
|
|
11
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-5LXQPP2K.js';
|
|
12
10
|
import '../chunk-EVUEIBNU.js';
|
|
11
|
+
import '../chunk-AUS3KBHJ.js';
|
|
13
12
|
import '../chunk-NUNKSZKU.js';
|
|
14
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-YU2KUMGE.js';
|
|
14
|
+
import '../chunk-DDF5GPIJ.js';
|
|
15
|
+
import '../chunk-XD2M6LIG.js';
|
|
15
16
|
import '../chunk-S7PSMMRG.js';
|
|
16
17
|
import '../chunk-HOXKR26S.js';
|
|
17
18
|
import '../chunk-AA3PT6KR.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. */
|
|
@@ -23,7 +23,6 @@ function FilterInput({
|
|
|
23
23
|
hideFieldPicker = false,
|
|
24
24
|
ariaLabel,
|
|
25
25
|
onChange,
|
|
26
|
-
onSubmit,
|
|
27
26
|
fields,
|
|
28
27
|
onFieldsChange,
|
|
29
28
|
filter,
|
|
@@ -55,11 +54,6 @@ function FilterInput({
|
|
|
55
54
|
"aria-label": ariaLabel,
|
|
56
55
|
value,
|
|
57
56
|
onChange: (e) => onChange(e.target.value),
|
|
58
|
-
onKeyDown: onSubmit ? (e) => {
|
|
59
|
-
if (e.key !== "Enter") return;
|
|
60
|
-
e.preventDefault();
|
|
61
|
-
onSubmit(value);
|
|
62
|
-
} : void 0,
|
|
63
57
|
placeholder: l.placeholder,
|
|
64
58
|
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.input, { testId: "facts-filter-input" }),
|
|
65
59
|
className: ui.cn(
|
|
@@ -135,5 +129,5 @@ function FilterInput({
|
|
|
135
129
|
exports.DEFAULT_FILTER_FIELDS = DEFAULT_FILTER_FIELDS;
|
|
136
130
|
exports.DEFAULT_FILTER_INPUT_LABELS = DEFAULT_FILTER_INPUT_LABELS;
|
|
137
131
|
exports.FilterInput = FilterInput;
|
|
138
|
-
//# sourceMappingURL=chunk-
|
|
139
|
-
//# sourceMappingURL=chunk-
|
|
132
|
+
//# sourceMappingURL=chunk-2EI7NCUA.cjs.map
|
|
133
|
+
//# sourceMappingURL=chunk-2EI7NCUA.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shell/FilterInput.tsx"],"names":["jsx","cn","testIdOr","jsxs","Filter","Input","X","Popover","PopoverTrigger","SlidersHorizontal","PopoverContent","Command","CommandList","CommandGroup","CommandItem","Check"],"mappings":"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","file":"chunk-2EI7NCUA.cjs","sourcesContent":["/** Shared page filter with configurable searchable fields and optional quick-filter control. */\nimport type { ReactNode } from 'react'\nimport { X, Filter, SlidersHorizontal, Check } from 'lucide-react'\nimport {\n Command,\n CommandGroup,\n CommandItem,\n CommandList,\n Input,\n Popover,\n PopoverContent,\n PopoverTrigger,\n cn,\n} from '@arbidocs/react/ui'\nimport { testIdOr } from '../chat/test-id'\n\nexport type FilterField = 'text' | 'labels'\n\nexport const DEFAULT_FILTER_FIELDS: { value: FilterField; label: string }[] = [\n { value: 'text', label: 'Text' },\n { value: 'labels', label: 'Labels' },\n]\n\nexport interface FilterInputLabels<Field extends string = FilterField> {\n placeholder: string\n clear: string\n chooseFields: string\n fieldsHeading: string\n /** Display name per searchable field. */\n fieldNames: Partial<Record<Field, string>>\n}\n\nexport const DEFAULT_FILTER_INPUT_LABELS: FilterInputLabels = {\n placeholder: 'Filter...',\n clear: 'Clear filter',\n chooseFields: 'Choose fields to filter',\n fieldsHeading: 'Filter fields',\n fieldNames: { text: 'Text', labels: 'Labels' },\n}\n\nexport interface FilterInputTestIds<Field extends string = FilterField> {\n root: string\n quick: string\n input: string\n fieldsButton: string\n field: (field: Field) => string\n}\n\nexport interface FilterInputProps<Field extends string = FilterField> {\n fieldOptions?: { value: Field; label: string }[]\n value: string\n /** Lists with one searchable field need no field selector. */\n hideFieldPicker?: boolean\n ariaLabel?: string\n onChange: (q: string) => void\n fields: Field[]\n onFieldsChange: (fields: Field[]) => void\n /**\n * The quick-filter dropdown trigger, embedded inside the input on the left\n * (mirroring the Files search box). When absent, a static funnel icon shows.\n */\n filter?: ReactNode\n /** Width classes for the box (default `w-44`). */\n className?: string\n /** No outline: a soft fill instead of the input border, for a header that is already ruled. */\n borderless?: boolean\n labels?: Partial<FilterInputLabels<Field>>\n testIds?: Partial<FilterInputTestIds<Field>>\n}\n\nexport function FilterInput<Field extends string = FilterField>({\n fieldOptions,\n value,\n hideFieldPicker = false,\n ariaLabel,\n onChange,\n fields,\n onFieldsChange,\n filter,\n className,\n borderless = false,\n labels,\n testIds,\n}: FilterInputProps<Field>) {\n const l = { ...DEFAULT_FILTER_INPUT_LABELS, ...labels }\n const options = fieldOptions ?? (DEFAULT_FILTER_FIELDS as { value: Field; label: string }[])\n const toggleField = (field: Field) =>\n onFieldsChange(fields.includes(field) ? fields.filter((f) => f !== field) : [...fields, field])\n\n return (\n <div\n className={cn('flex min-w-0 items-center', className ?? 'w-44 pointer-coarse:w-56')}\n data-testid={testIdOr(testIds?.root, { testId: 'facts-filter' })}\n >\n <div className=\"relative flex-1 min-w-0\">\n {filter ? (\n <div\n className=\"absolute left-1 top-1/2 z-10 -translate-y-1/2\"\n data-testid={testIdOr(testIds?.quick, { testId: 'facts-filter-quick' })}\n >\n {filter}\n </div>\n ) : (\n <Filter className=\"pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground\" />\n )}\n <Input\n aria-label={ariaLabel}\n value={value}\n onChange={(e) => onChange(e.target.value)}\n placeholder={l.placeholder}\n data-testid={testIdOr(testIds?.input, { testId: 'facts-filter-input' })}\n className={cn(\n 'h-7 pr-12 text-sm shadow-none focus-visible:ring-0 pointer-coarse:h-11 pointer-coarse:pr-12',\n // Touch: the 44px clear button only needs its room while there is text to clear, so\n // an empty field keeps space for its placeholder on a phone.\n value && 'pointer-coarse:pr-24',\n borderless\n ? 'border-transparent bg-muted/50 hover:bg-muted focus-visible:bg-muted'\n : 'border-input bg-background',\n filter ? 'pl-11' : 'pl-7',\n hideFieldPicker && 'pr-7 pointer-coarse:pr-11'\n )}\n />\n {value && (\n <button\n type=\"button\"\n onClick={() => onChange('')}\n aria-label={l.clear}\n className={cn(\n 'absolute top-1/2 z-10 -translate-y-1/2 text-muted-foreground hover:text-foreground pointer-coarse:flex pointer-coarse:size-11 pointer-coarse:items-center pointer-coarse:justify-center',\n hideFieldPicker\n ? 'right-1.5 pointer-coarse:right-0'\n : 'right-7 pointer-coarse:right-11'\n )}\n >\n <X className=\"size-3\" />\n </button>\n )}\n {/* Field picker — inside the input on the right, muted, exactly as the\n Files search box renders it. */}\n {!hideFieldPicker && (\n <Popover>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label={l.chooseFields}\n data-testid={testIdOr(testIds?.fieldsButton, {\n testId: 'facts-filter-fields-button',\n })}\n className=\"absolute right-1.5 top-1/2 z-10 -translate-y-1/2 !h-5 !w-5 !p-0 text-muted-foreground/60 transition-colors hover:text-foreground pointer-coarse:right-0 pointer-coarse:!flex pointer-coarse:!h-11 pointer-coarse:!w-11 pointer-coarse:items-center pointer-coarse:justify-center\"\n >\n <SlidersHorizontal className=\"size-3.5\" />\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-44 p-0\" align=\"end\" sideOffset={4}>\n <Command shouldFilter={false}>\n <CommandList>\n <CommandGroup heading={l.fieldsHeading}>\n {options.map((option) => {\n const isSelected = fields.includes(option.value)\n return (\n <CommandItem\n key={option.value}\n onSelect={() => toggleField(option.value)}\n className=\"cursor-pointer text-sm\"\n data-testid={testIdOr(testIds?.field?.(option.value), {\n testId: `facts-filter-field-${option.value}`,\n })}\n >\n <div\n className={cn(\n 'mr-2 flex size-3.5 items-center justify-center rounded-sm border border-primary',\n isSelected\n ? 'bg-primary text-primary-foreground'\n : 'opacity-50 [&_svg]:invisible'\n )}\n >\n <Check className=\"size-3\" />\n </div>\n {labels?.fieldNames?.[option.value] ?? option.label}\n </CommandItem>\n )\n })}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )}\n </div>\n </div>\n )\n}\n"]}
|
|
@@ -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"]}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
5
4
|
var chunkDETZZBG2_cjs = require('./chunk-DETZZBG2.cjs');
|
|
5
|
+
var chunk32HW2Q33_cjs = require('./chunk-32HW2Q33.cjs');
|
|
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
|