@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.
Files changed (56) hide show
  1. package/dist/agents/index.cjs +280 -279
  2. package/dist/agents/index.js +4 -3
  3. package/dist/agents/workflows/types.d.ts +6 -0
  4. package/dist/chunk-32HW2Q33.cjs +59 -0
  5. package/dist/chunk-32HW2Q33.cjs.map +1 -0
  6. package/dist/{chunk-5XZU64E2.cjs → chunk-3US5OIDQ.cjs} +68 -33
  7. package/dist/chunk-3US5OIDQ.cjs.map +1 -0
  8. package/dist/{chunk-DPLRHEJZ.js → chunk-5LXQPP2K.js} +4 -33
  9. package/dist/chunk-5LXQPP2K.js.map +1 -0
  10. package/dist/{chunk-NQS7NFGM.js → chunk-5NQIBJPP.js} +4 -4
  11. package/dist/{chunk-NQS7NFGM.js.map → chunk-5NQIBJPP.js.map} +1 -1
  12. package/dist/{chunk-NXWKMKZY.js → chunk-5RQOVALO.js} +3 -3
  13. package/dist/{chunk-NXWKMKZY.js.map → chunk-5RQOVALO.js.map} +1 -1
  14. package/dist/chunk-AUS3KBHJ.js +52 -0
  15. package/dist/chunk-AUS3KBHJ.js.map +1 -0
  16. package/dist/{chunk-TMKJACMP.cjs → chunk-DDYXFALG.cjs} +44 -44
  17. package/dist/{chunk-TMKJACMP.cjs.map → chunk-DDYXFALG.cjs.map} +1 -1
  18. package/dist/chunk-DVUZTGVL.cjs +52 -0
  19. package/dist/chunk-DVUZTGVL.cjs.map +1 -0
  20. package/dist/{chunk-UCAYNE44.cjs → chunk-EHF63UYP.cjs} +5 -5
  21. package/dist/{chunk-UCAYNE44.cjs.map → chunk-EHF63UYP.cjs.map} +1 -1
  22. package/dist/{chunk-YX466FWL.js → chunk-PGDL26TQ.js} +68 -33
  23. package/dist/chunk-PGDL26TQ.js.map +1 -0
  24. package/dist/components/tones.d.ts +5 -0
  25. package/dist/connect/index.cjs +23 -22
  26. package/dist/connect/index.cjs.map +1 -1
  27. package/dist/connect/index.js +3 -2
  28. package/dist/connect/index.js.map +1 -1
  29. package/dist/files/index.cjs +4 -3
  30. package/dist/files/index.cjs.map +1 -1
  31. package/dist/files/index.js +2 -1
  32. package/dist/files/index.js.map +1 -1
  33. package/dist/index.cjs +320 -311
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.ts +1 -0
  36. package/dist/index.js +6 -5
  37. package/dist/index.js.map +1 -1
  38. package/dist/settings/index.cjs +6 -5
  39. package/dist/settings/index.cjs.map +1 -1
  40. package/dist/settings/index.js +2 -1
  41. package/dist/settings/index.js.map +1 -1
  42. package/dist/site/index.cjs +4 -3
  43. package/dist/site/index.js +2 -1
  44. package/dist/workflow-canvas/FieldOptionsEditor.d.ts +25 -0
  45. package/dist/workflow-canvas/StepInspector.d.ts +6 -2
  46. package/dist/workflow-canvas/index.cjs +176 -47
  47. package/dist/workflow-canvas/index.cjs.map +1 -1
  48. package/dist/workflow-canvas/index.d.ts +1 -0
  49. package/dist/workflow-canvas/index.js +133 -6
  50. package/dist/workflow-canvas/index.js.map +1 -1
  51. package/package.json +4 -4
  52. package/dist/chunk-5XZU64E2.cjs.map +0 -1
  53. package/dist/chunk-DPLRHEJZ.js.map +0 -1
  54. package/dist/chunk-VFUWWH52.cjs +0 -83
  55. package/dist/chunk-VFUWWH52.cjs.map +0 -1
  56. package/dist/chunk-YX466FWL.js.map +0 -1
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { UploadDropzone } from './chunk-EVUEIBNU.js';
3
+ import { isTone, TONE_DOT, TONE_SURFACE, TONE_SOLID_BORDER, TONE_BORDER } from './chunk-AUS3KBHJ.js';
3
4
  import { FoldSection } from './chunk-XD2M6LIG.js';
4
5
  import { useElementSize } from './chunk-HOXKR26S.js';
5
6
  import { testIdOr, prefixedTestId } from './chunk-7F6CBP3Z.js';
6
7
  import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
8
+ import { Check, Loader2, Hourglass, AlertTriangle, MinusCircle, UserRound, CornerUpLeft, ShieldCheck, MessageSquare, Clock, PenLine, X, ExternalLink, Mail, Table2, CheckCircle2, ArrowLeft, ArrowRight, RotateCw, GitBranch, ChevronLeft, ChevronRight, FileText, ArrowUpRight, BellRing, Flag, RotateCcw, Play, UserRoundCog, Sparkles, MessageSquareReply, Square, KeyRound, Lock } from 'lucide-react';
7
9
  import { cn, Popover, PopoverTrigger, PopoverContent, Button, Textarea, Card, Label, Input, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Switch } from '@arbidocs/react/ui';
8
10
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
9
- import { Check, Loader2, Hourglass, AlertTriangle, MinusCircle, UserRound, CornerUpLeft, ShieldCheck, MessageSquare, Clock, PenLine, X, ExternalLink, Mail, Table2, CheckCircle2, ArrowLeft, ArrowRight, RotateCw, GitBranch, ChevronLeft, ChevronRight, FileText, ArrowUpRight, BellRing, Flag, RotateCcw, Play, UserRoundCog, Sparkles, MessageSquareReply, Square, KeyRound, Lock } from 'lucide-react';
10
11
 
11
12
  // src/agents/workflows/types.ts
12
13
  var EMPTY_WORKFLOW_SCOPE = { folders: [], labels: [] };
@@ -199,7 +200,8 @@ function fieldFromFrontmatter(raw) {
199
200
  label,
200
201
  description: str(ro.description),
201
202
  text: str(ro.text),
202
- icon: str(ro.icon)
203
+ icon: str(ro.icon),
204
+ tone: isTone(ro.tone) ? ro.tone : void 0
203
205
  }
204
206
  ] : [];
205
207
  }) : void 0;
@@ -254,7 +256,8 @@ function fieldToFrontmatter(field) {
254
256
  label: o.label,
255
257
  description: o.description,
256
258
  text: o.text,
257
- icon: o.icon
259
+ icon: o.icon,
260
+ tone: o.tone
258
261
  })
259
262
  ),
260
263
  min: field.min,
@@ -373,40 +376,28 @@ function FieldControl({
373
376
  case "select": {
374
377
  const options = field.options ?? [];
375
378
  if (options.length > 0 && options.length <= TILE_MAX) {
379
+ const compact3 = options.every((o) => !o.icon && !o.description);
376
380
  return /* @__PURE__ */ jsx(
377
381
  "div",
378
382
  {
379
383
  role: "radiogroup",
380
384
  "aria-label": field.label,
381
- className: "grid grid-cols-2 gap-2 sm:grid-cols-4",
385
+ className: "flex flex-wrap gap-2",
382
386
  "data-testid": testId,
383
- children: options.map((option) => {
384
- const selected = value === option.value;
385
- return /* @__PURE__ */ jsxs(
386
- "button",
387
- {
388
- type: "button",
389
- role: "radio",
390
- "aria-checked": selected,
391
- "data-testid": prefixedTestId(testId, option.value, {
392
- testId: `workflow-field-${field.name}-${option.value}`
393
- }),
394
- onClick: () => {
395
- onChange(option.value);
396
- },
397
- className: cn(
398
- "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",
399
- selected ? "border-primary bg-primary/10" : "border-border bg-card [&:hover]:border-primary [&:hover]:bg-muted"
400
- ),
401
- children: [
402
- option.icon && renderIcon && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: renderIcon(option.icon) }),
403
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: option.label }),
404
- option.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: option.description })
405
- ]
406
- },
407
- option.value
408
- );
409
- })
387
+ children: options.map((option) => /* @__PURE__ */ jsx(
388
+ ChoiceTile,
389
+ {
390
+ option,
391
+ selected: value === option.value,
392
+ compact: compact3,
393
+ renderIcon,
394
+ testId: prefixedTestId(testId, option.value, {
395
+ testId: `workflow-field-${field.name}-${option.value}`
396
+ }),
397
+ onSelect: () => onChange(option.value)
398
+ },
399
+ option.value
400
+ ))
410
401
  }
411
402
  );
412
403
  }
@@ -453,6 +444,50 @@ function FieldControl({
453
444
  );
454
445
  }
455
446
  }
447
+ function ChoiceTile({
448
+ option,
449
+ selected,
450
+ compact: compact3,
451
+ renderIcon,
452
+ testId,
453
+ onSelect
454
+ }) {
455
+ const tone = option.tone;
456
+ return /* @__PURE__ */ jsxs(
457
+ "button",
458
+ {
459
+ type: "button",
460
+ role: "radio",
461
+ "aria-checked": selected,
462
+ "data-testid": testId,
463
+ "data-tone": tone,
464
+ onClick: onSelect,
465
+ className: cn(
466
+ // Sized to its label (flex-basis auto), growing to share the row, never wider than it.
467
+ "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",
468
+ compact3 ? "min-h-9 px-3 py-1.5 pointer-coarse:min-h-11" : "min-h-24 p-3 pointer-coarse:min-h-28",
469
+ tone ? selected ? cn(TONE_SURFACE[tone], TONE_SOLID_BORDER[tone]) : cn(TONE_BORDER[tone], "bg-card [&:hover]:bg-muted") : selected ? "border-primary bg-primary/10" : "border-border bg-card [&:hover]:border-primary [&:hover]:bg-muted"
470
+ ),
471
+ children: [
472
+ option.icon && renderIcon && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: renderIcon(option.icon) }),
473
+ /* @__PURE__ */ jsxs(
474
+ "span",
475
+ {
476
+ className: cn(
477
+ "flex max-w-full items-center gap-1.5 text-sm font-medium",
478
+ tone && selected ? void 0 : "text-foreground"
479
+ ),
480
+ children: [
481
+ selected ? /* @__PURE__ */ jsx(Check, { className: "size-3.5 shrink-0", "aria-hidden": true }) : tone && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("size-2 shrink-0 rounded-full", TONE_DOT[tone]) }),
482
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 break-words", children: option.label })
483
+ ]
484
+ }
485
+ ),
486
+ option.description && /* @__PURE__ */ jsx("span", { className: "max-w-full text-xs break-words text-muted-foreground", children: option.description })
487
+ ]
488
+ }
489
+ );
490
+ }
456
491
  function FormField(props) {
457
492
  const { field, error, l, idFor } = props;
458
493
  const isBoolean = field.type === "boolean";
@@ -3091,5 +3126,5 @@ function TaskActivityTimeline({
3091
3126
  }
3092
3127
 
3093
3128
  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, PhaseMark, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, STEP_EXTRA, STEP_LABEL, STEP_LABEL_CURRENT, STEP_LABEL_MAX, STEP_PILL, SchemaForm, SendBackControl, StepBarFrame, TaskActivityTimeline, WorkflowRunner, WorkflowStepBar, activeStepId, assigneeName, buildLaunch, canAssign, composeStepPrompt, composeWorkflowPrompt, defaultInputs, dependsOn, eventWaitingDocuments, 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, stepPillTone, stepStatesFromActivity, stepWindow, taskActivityHeadline, toPlanAssignee, toPlanDocumentRef, toPlanSteps, upstreamSteps, useWorkflowView, validateInputs, validateStep, validateWorkflowGraph, waitingDocuments, waitingForDocumentsText, workflowAccepts, workflowFromFrontmatter, workflowSteps, workflowsAccepting, workflowsForHost };
3094
- //# sourceMappingURL=chunk-YX466FWL.js.map
3095
- //# sourceMappingURL=chunk-YX466FWL.js.map
3129
+ //# sourceMappingURL=chunk-PGDL26TQ.js.map
3130
+ //# sourceMappingURL=chunk-PGDL26TQ.js.map