@locusgraph/loop 0.2.0 → 0.3.0

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 (75) hide show
  1. package/dist/agent/pulse/gradient-label.js +12 -62
  2. package/dist/agent/pulse/marks/bars-mark.js +15 -37
  3. package/dist/agent/pulse/marks/glyph-mark.js +15 -54
  4. package/dist/agent/pulse/marks/locus-mark.js +12 -36
  5. package/dist/agent/pulse/marks/orb-mark.js +9 -19
  6. package/dist/agent/pulse/marks/spinner-mark.js +20 -29
  7. package/dist/agent/pulse/pulse.js +36 -123
  8. package/dist/agent/pulse/use-loop-animation.js +12 -33
  9. package/dist/agent/steps/step-icon.js +26 -96
  10. package/dist/agent/steps/steps.js +47 -210
  11. package/dist/agent/thinking/thinking.js +2 -2
  12. package/dist/agent/tool/json-block.js +11 -31
  13. package/dist/agent/tool/tool-status.js +12 -35
  14. package/dist/approval/inbox/inbox-row.js +76 -301
  15. package/dist/approval/inbox/inbox.js +39 -190
  16. package/dist/approval/inbox/virtual-inbox-list.js +26 -102
  17. package/dist/approval/memory/memory-review.js +36 -170
  18. package/dist/approval/memory/memory-row.js +50 -185
  19. package/dist/approval/plan/plan-review.js +73 -223
  20. package/dist/approval/plan/plan-step-row.js +76 -180
  21. package/dist/approval/plan/question-choices.js +44 -130
  22. package/dist/approval/plan/question.js +38 -154
  23. package/dist/approval/run/run-bar.js +39 -123
  24. package/dist/approval/shared/risk-badge.js +9 -24
  25. package/dist/approval/shared/use-focus-on-mount.js +5 -21
  26. package/dist/approval/spend/raise-cap-form.js +48 -221
  27. package/dist/approval/spend/spend-gate.js +40 -155
  28. package/dist/approval/spend/spend-meter.js +86 -313
  29. package/dist/approval/tool/approval.js +35 -194
  30. package/dist/approval/tool/args/args-editor.js +46 -204
  31. package/dist/approval/tool/args/args-field.js +55 -238
  32. package/dist/approval/tool/deny-form.js +36 -123
  33. package/dist/approval/tool/tool-inputs.js +24 -89
  34. package/dist/chat/chat/use-stick-to-bottom.js +60 -113
  35. package/dist/chat/chat/virtual-chat-items.js +34 -127
  36. package/dist/chat/composer/composer-actions.js +46 -129
  37. package/dist/chat/composer/use-auto-grow.js +8 -23
  38. package/dist/chat/files/files.js +66 -291
  39. package/dist/chat/reply/fenced-code.js +10 -32
  40. package/dist/chat/reply/markdown-components.js +2 -2
  41. package/dist/chat/reply/reply.js +24 -99
  42. package/dist/chat/turn/turn.js +46 -197
  43. package/dist/cost/context.js +65 -282
  44. package/dist/cost/cost-steps.js +42 -195
  45. package/dist/cost/cost.js +108 -497
  46. package/dist/cost/model-picker.js +42 -172
  47. package/dist/cost/shared/context-breakdown.js +65 -281
  48. package/dist/cost/shared/meter-marks.js +34 -92
  49. package/dist/cost/shared/model-option-row.js +35 -158
  50. package/dist/cost/shared/step-cost-row.js +37 -222
  51. package/dist/memory/cite.js +58 -179
  52. package/dist/memory/memorized.js +43 -195
  53. package/dist/memory/recall.js +68 -263
  54. package/dist/memory/shared/disclosure.d.ts +2 -2
  55. package/dist/memory/shared/disclosure.js +1 -1
  56. package/dist/memory/shared/source-mark.js +10 -38
  57. package/dist/memory/sources.js +52 -230
  58. package/dist/shared/decision-summary.js +35 -117
  59. package/dist/shared/panel-empty.js +15 -73
  60. package/dist/shared/panel.js +65 -239
  61. package/dist/shared/status-dot.js +10 -32
  62. package/dist/thread/actions/action-button.js +10 -53
  63. package/dist/thread/actions/branch-switcher.js +21 -95
  64. package/dist/thread/canvas/canvas.js +1 -1
  65. package/dist/thread/canvas/version-switcher.js +31 -126
  66. package/dist/thread/code/code.js +2 -2
  67. package/dist/thread/code/copy-code-button.js +24 -56
  68. package/dist/thread/history/history.js +1 -1
  69. package/dist/thread/history/row/history-row.js +18 -97
  70. package/dist/thread/history/row/thread-item-menu.js +19 -72
  71. package/dist/thread/history/row/thread-title-editor.js +29 -72
  72. package/dist/thread/history/virtual-history-list.js +46 -82
  73. package/dist/thread/starters/starters.js +27 -87
  74. package/dist/thread/use-copied.js +10 -38
  75. package/package.json +3 -3
@@ -1,4 +1,3 @@
1
- import { c as _c } from "react/compiler-runtime";
2
1
  import { ArrowRight as ArrowRightIcon, ListChecked as ListChecksIcon } from "@carbon/icons-react";
3
2
  import { Button } from "@locusgraph/components";
4
3
  import { pluralize } from "@locusgraph/utils";
@@ -9,174 +8,75 @@ import { useFocusOnMount } from "../shared/use-focus-on-mount.js";
9
8
  import { PlanStepRow, stepControlId } from "./plan-step-row.js";
10
9
  import { applyStepAction, describeStepAction, focusAfterAction } from "./plan-steps.js";
11
10
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
12
- function DecidedSteps(t0) {
13
- const $ = _c(4);
14
- const {
15
- steps
16
- } = t0;
17
- let t1;
18
- if ($[0] !== steps) {
19
- t1 = steps.map(_temp);
20
- $[0] = steps;
21
- $[1] = t1;
22
- } else {
23
- t1 = $[1];
24
- }
25
- let t2;
26
- if ($[2] !== t1) {
27
- t2 = /*#__PURE__*/_jsx("ol", {
28
- className: "flex flex-col gap-1 pl-6.5 text-sm text-muted-foreground",
29
- children: t1
30
- });
31
- $[2] = t1;
32
- $[3] = t2;
33
- } else {
34
- t2 = $[3];
35
- }
36
- return t2;
37
- }
38
- function _temp(step, position) {
39
- return /*#__PURE__*/_jsxs("li", {
40
- className: "flex gap-3",
41
- children: [/*#__PURE__*/_jsx("span", {
42
- className: "w-4 shrink-0 font-mono text-xs leading-5 tabular-nums",
43
- children: position + 1
44
- }), /*#__PURE__*/_jsx("span", {
45
- className: "min-w-0",
46
- children: step.title
47
- })]
48
- }, step.id);
11
+ function DecidedSteps({
12
+ steps
13
+ }) {
14
+ return /*#__PURE__*/_jsx("ol", {
15
+ className: "flex flex-col gap-1 pl-6.5 text-sm text-muted-foreground",
16
+ children: steps.map((step, position) => /*#__PURE__*/_jsxs("li", {
17
+ className: "flex gap-3",
18
+ children: [/*#__PURE__*/_jsx("span", {
19
+ className: "w-4 shrink-0 font-mono text-xs leading-5 tabular-nums",
20
+ children: position + 1
21
+ }), /*#__PURE__*/_jsx("span", {
22
+ className: "min-w-0",
23
+ children: step.title
24
+ })]
25
+ }, step.id))
26
+ });
49
27
  }
50
- export function PlanReview(t0) {
51
- const $ = _c(41);
52
- const {
53
- steps: initialSteps,
54
- title: t1,
55
- description: t2,
56
- actionLabel,
57
- decision,
58
- onApprove,
59
- onCancel,
60
- autoFocus: t3,
61
- className
62
- } = t0;
63
- const title = t1 === undefined ? "Review the plan" : t1;
64
- const description = t2 === undefined ? "The agent will run these steps in order. Edit, reorder or remove steps before it starts." : t2;
65
- const autoFocus = t3 === undefined ? true : t3;
28
+ export function PlanReview({
29
+ steps: initialSteps,
30
+ title = "Review the plan",
31
+ description = "The agent will run these steps in order. Edit, reorder or remove steps before it starts.",
32
+ actionLabel,
33
+ decision,
34
+ onApprove,
35
+ onCancel,
36
+ autoFocus = true,
37
+ className
38
+ }) {
66
39
  const idPrefix = useId();
67
40
  const [steps, setSteps] = useState(initialSteps);
68
41
  const [announcement, setAnnouncement] = useState("");
69
42
  const [pendingFocus, setPendingFocus] = useState(null);
70
43
  const approveRef = useFocusOnMount(autoFocus && !decision);
71
- let t4;
72
- if ($[0] !== steps) {
73
- t4 = steps.some(_temp2);
74
- $[0] = steps;
75
- $[1] = t4;
76
- } else {
77
- t4 = $[1];
78
- }
79
- const hasBlankTitle = t4;
80
- let t5;
81
- let t6;
82
- if ($[2] !== pendingFocus) {
83
- t5 = () => {
84
- if (pendingFocus) {
85
- document.getElementById(pendingFocus.id)?.focus();
86
- }
87
- };
88
- t6 = [pendingFocus];
89
- $[2] = pendingFocus;
90
- $[3] = t5;
91
- $[4] = t6;
92
- } else {
93
- t5 = $[3];
94
- t6 = $[4];
95
- }
96
- useEffect(t5, t6);
97
- let t7;
98
- if ($[5] !== idPrefix || $[6] !== steps) {
99
- t7 = function handleAction(stepId, position, action) {
100
- const next = applyStepAction(steps, stepId, action);
101
- const focus = focusAfterAction(next, stepId, action);
102
- setSteps(next);
103
- setAnnouncement(describeStepAction(position, action));
104
- setPendingFocus(focus ? {
105
- id: stepControlId(idPrefix, focus.stepId, focus.control)
106
- } : null);
107
- };
108
- $[5] = idPrefix;
109
- $[6] = steps;
110
- $[7] = t7;
111
- } else {
112
- t7 = $[7];
113
- }
114
- const handleAction = t7;
115
- let t8;
116
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
117
- t8 = function renameStep(stepId_0, nextTitle) {
118
- setSteps(current => current.map(item => item.id === stepId_0 ? {
119
- ...item,
120
- title: nextTitle
121
- } : item));
122
- };
123
- $[8] = t8;
124
- } else {
125
- t8 = $[8];
126
- }
127
- const renameStep = t8;
128
- const t9 = decision ? true : undefined;
129
- let t10;
130
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
131
- t10 = /*#__PURE__*/_jsx(ListChecksIcon, {
132
- "aria-hidden": true
133
- });
134
- $[9] = t10;
135
- } else {
136
- t10 = $[9];
44
+ const hasBlankTitle = steps.some(step => step.title.trim() === "");
45
+ useEffect(() => {
46
+ if (pendingFocus) document.getElementById(pendingFocus.id)?.focus();
47
+ }, [pendingFocus]);
48
+ function handleAction(stepId, position, action) {
49
+ const next = applyStepAction(steps, stepId, action);
50
+ const focus = focusAfterAction(next, stepId, action);
51
+ setSteps(next);
52
+ setAnnouncement(describeStepAction(position, action));
53
+ setPendingFocus(focus ? {
54
+ id: stepControlId(idPrefix, focus.stepId, focus.control)
55
+ } : null);
137
56
  }
138
- const t11 = decision ? decision.approved ? "Approved" : "Cancelled" : "Waiting for you";
139
- const t12 = decision ? decision.approved ? "done" : "danger" : "waiting";
140
- let t13;
141
- if ($[10] !== steps.length) {
142
- t13 = pluralize(steps.length, "step");
143
- $[10] = steps.length;
144
- $[11] = t13;
145
- } else {
146
- t13 = $[11];
57
+ function renameStep(stepId, nextTitle) {
58
+ setSteps(current => current.map(item => item.id === stepId ? {
59
+ ...item,
60
+ title: nextTitle
61
+ } : item));
147
62
  }
148
- let t14;
149
- if ($[12] !== t11 || $[13] !== t12 || $[14] !== t13) {
150
- t14 = /*#__PURE__*/_jsx(PanelHeader, {
151
- icon: t10,
63
+ return /*#__PURE__*/_jsxs(ApprovalPanel, {
64
+ "data-slot": "plan-review",
65
+ "data-decided": decision ? true : undefined,
66
+ "aria-label": title,
67
+ className: className,
68
+ children: [/*#__PURE__*/_jsx(PanelHeader, {
69
+ icon: /*#__PURE__*/_jsx(ListChecksIcon, {
70
+ "aria-hidden": true
71
+ }),
152
72
  eyebrow: "Plan",
153
- status: t11,
154
- tone: t12,
155
- aside: t13
156
- });
157
- $[12] = t11;
158
- $[13] = t12;
159
- $[14] = t13;
160
- $[15] = t14;
161
- } else {
162
- t14 = $[15];
163
- }
164
- const t15 = decision ? "text-muted-foreground" : undefined;
165
- let t16;
166
- if ($[16] !== t15 || $[17] !== title) {
167
- t16 = /*#__PURE__*/_jsx(PanelTitle, {
168
- className: t15,
73
+ status: decision ? decision.approved ? "Approved" : "Cancelled" : "Waiting for you",
74
+ tone: decision ? decision.approved ? "done" : "danger" : "waiting",
75
+ aside: pluralize(steps.length, "step")
76
+ }), /*#__PURE__*/_jsx(PanelTitle, {
77
+ className: decision ? "text-muted-foreground" : undefined,
169
78
  children: title
170
- });
171
- $[16] = t15;
172
- $[17] = title;
173
- $[18] = t16;
174
- } else {
175
- t16 = $[18];
176
- }
177
- let t17;
178
- if ($[19] !== actionLabel || $[20] !== approveRef || $[21] !== decision || $[22] !== description || $[23] !== handleAction || $[24] !== hasBlankTitle || $[25] !== idPrefix || $[26] !== initialSteps || $[27] !== onApprove || $[28] !== onCancel || $[29] !== steps) {
179
- t17 = decision ? /*#__PURE__*/_jsxs(PanelBody, {
79
+ }), decision ? /*#__PURE__*/_jsxs(PanelBody, {
180
80
  children: [/*#__PURE__*/_jsx(DecisionSummary, {
181
81
  decision: decision,
182
82
  deniedVerb: "Cancelled",
@@ -192,14 +92,14 @@ export function PlanReview(t0) {
192
92
  className: "pb-0",
193
93
  children: /*#__PURE__*/_jsx("ol", {
194
94
  className: "-mx-5 flex flex-col divide-y border-t",
195
- children: steps.map((step_0, position_0) => /*#__PURE__*/_jsx(PlanStepRow, {
95
+ children: steps.map((step, position) => /*#__PURE__*/_jsx(PlanStepRow, {
196
96
  idPrefix: idPrefix,
197
- step: step_0,
198
- position: position_0,
97
+ step: step,
98
+ position: position,
199
99
  count: steps.length,
200
- onRename: nextTitle_0 => renameStep(step_0.id, nextTitle_0),
201
- onAction: action_0 => handleAction(step_0.id, position_0, action_0)
202
- }, step_0.id))
100
+ onRename: nextTitle => renameStep(step.id, nextTitle),
101
+ onAction: action => handleAction(step.id, position, action)
102
+ }, step.id))
203
103
  })
204
104
  }), /*#__PURE__*/_jsxs(PanelFooter, {
205
105
  className: "justify-between",
@@ -222,68 +122,18 @@ export function PlanReview(t0) {
222
122
  type: "button",
223
123
  size: "sm",
224
124
  disabled: hasBlankTitle || steps.length === 0,
225
- onClick: () => onApprove(steps.map(_temp3)),
125
+ onClick: () => onApprove(steps.map(step => ({
126
+ ...step,
127
+ title: step.title.trim()
128
+ }))),
226
129
  children: [actionLabel ?? `Run ${pluralize(steps.length, "step")}`, /*#__PURE__*/_jsx(ArrowRightIcon, {
227
130
  "aria-hidden": true
228
131
  })]
229
132
  })]
230
133
  })]
231
134
  })]
232
- });
233
- $[19] = actionLabel;
234
- $[20] = approveRef;
235
- $[21] = decision;
236
- $[22] = description;
237
- $[23] = handleAction;
238
- $[24] = hasBlankTitle;
239
- $[25] = idPrefix;
240
- $[26] = initialSteps;
241
- $[27] = onApprove;
242
- $[28] = onCancel;
243
- $[29] = steps;
244
- $[30] = t17;
245
- } else {
246
- t17 = $[30];
247
- }
248
- const t18 = decision ? decision.approved ? "Plan approved" : "Plan cancelled" : announcement;
249
- let t19;
250
- if ($[31] !== t18) {
251
- t19 = /*#__PURE__*/_jsx(LiveStatus, {
252
- message: t18
253
- });
254
- $[31] = t18;
255
- $[32] = t19;
256
- } else {
257
- t19 = $[32];
258
- }
259
- let t20;
260
- if ($[33] !== className || $[34] !== t14 || $[35] !== t16 || $[36] !== t17 || $[37] !== t19 || $[38] !== t9 || $[39] !== title) {
261
- t20 = /*#__PURE__*/_jsxs(ApprovalPanel, {
262
- "data-slot": "plan-review",
263
- "data-decided": t9,
264
- "aria-label": title,
265
- className: className,
266
- children: [t14, t16, t17, t19]
267
- });
268
- $[33] = className;
269
- $[34] = t14;
270
- $[35] = t16;
271
- $[36] = t17;
272
- $[37] = t19;
273
- $[38] = t9;
274
- $[39] = title;
275
- $[40] = t20;
276
- } else {
277
- t20 = $[40];
278
- }
279
- return t20;
280
- }
281
- function _temp3(step_1) {
282
- return {
283
- ...step_1,
284
- title: step_1.title.trim()
285
- };
286
- }
287
- function _temp2(step) {
288
- return step.title.trim() === "";
135
+ }), /*#__PURE__*/_jsx(LiveStatus, {
136
+ message: decision ? decision.approved ? "Plan approved" : "Plan cancelled" : announcement
137
+ })]
138
+ });
289
139
  }
@@ -1,4 +1,3 @@
1
- import { c as _c } from "react/compiler-runtime";
2
1
  import { ArrowDown as ArrowDownIcon, ArrowUp as ArrowUpIcon, Edit as PencilIcon, TrashCan as Trash2Icon } from "@carbon/icons-react";
3
2
  import { Button, cn } from "@locusgraph/components";
4
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -12,190 +11,87 @@ function selectInputById(id) {
12
11
  element.select();
13
12
  }
14
13
  }
15
- export function PlanStepRow(t0) {
16
- const $ = _c(34);
17
- const {
18
- idPrefix,
19
- step,
20
- position,
21
- count,
22
- onRename,
23
- onAction
24
- } = t0;
14
+ export function PlanStepRow({
15
+ idPrefix,
16
+ step,
17
+ position,
18
+ count,
19
+ onRename,
20
+ onAction
21
+ }) {
25
22
  const number = position + 1;
26
- let t1;
27
- let t2;
28
- let t3;
29
- let t4;
30
- let t5;
31
- let t6;
32
- if ($[0] !== count || $[1] !== idPrefix || $[2] !== number || $[3] !== onAction || $[4] !== onRename || $[5] !== position || $[6] !== step.detail || $[7] !== step.id || $[8] !== step.title) {
33
- const titleId = stepControlId(idPrefix, step.id, "title");
34
- let t7;
35
- if ($[15] !== step.title) {
36
- t7 = step.title.trim();
37
- $[15] = step.title;
38
- $[16] = t7;
39
- } else {
40
- t7 = $[16];
41
- }
42
- const blank = t7 === "";
43
- const controls = [{
44
- id: `${idPrefix}-${step.id}-edit`,
45
- label: `Edit step ${number}`,
46
- icon: PencilIcon,
47
- disabled: false,
48
- onClick: () => selectInputById(titleId)
49
- }, {
50
- id: stepControlId(idPrefix, step.id, "up"),
51
- label: `Move step ${number} up`,
52
- icon: ArrowUpIcon,
53
- disabled: position === 0,
54
- onClick: () => onAction("up")
55
- }, {
56
- id: stepControlId(idPrefix, step.id, "down"),
57
- label: `Move step ${number} down`,
58
- icon: ArrowDownIcon,
59
- disabled: position === count - 1,
60
- onClick: () => onAction("down")
61
- }, {
62
- id: stepControlId(idPrefix, step.id, "remove"),
63
- label: `Remove step ${number}`,
64
- icon: Trash2Icon,
65
- disabled: count === 1,
66
- onClick: () => onAction("remove"),
67
- danger: true
68
- }];
69
- t3 = "plan-step";
70
- t4 = "group flex items-start gap-3 px-5 py-2.5 focus-within:bg-accent/50 hover:bg-accent/50 motion-safe:transition-colors";
71
- if ($[17] !== number) {
72
- t5 = /*#__PURE__*/_jsx("span", {
73
- "aria-hidden": true,
74
- className: "mt-0.5 flex size-5 shrink-0 items-center justify-center font-mono text-[11px] text-muted-foreground tabular-nums ring-1 ring-input",
75
- children: number
76
- });
77
- $[17] = number;
78
- $[18] = t5;
79
- } else {
80
- t5 = $[18];
81
- }
82
- const t8 = step.title;
83
- let t9;
84
- if ($[19] !== onRename) {
85
- t9 = event => onRename(event.target.value);
86
- $[19] = onRename;
87
- $[20] = t9;
88
- } else {
89
- t9 = $[20];
90
- }
91
- const t10 = blank && "ring-1 ring-destructive/70";
92
- let t11;
93
- if ($[21] !== t10) {
94
- t11 = cn("-mx-1.5 h-6 min-w-0 bg-transparent px-1.5 text-sm font-medium outline-none placeholder:font-normal placeholder:text-muted-foreground focus-visible:bg-background focus-visible:ring-1 focus-visible:ring-ring", t10);
95
- $[21] = t10;
96
- $[22] = t11;
97
- } else {
98
- t11 = $[22];
99
- }
100
- let t12;
101
- if ($[23] !== step.detail) {
102
- t12 = step.detail && /*#__PURE__*/_jsx("p", {
103
- className: "text-xs text-muted-foreground",
104
- children: step.detail
105
- });
106
- $[23] = step.detail;
107
- $[24] = t12;
108
- } else {
109
- t12 = $[24];
110
- }
111
- t6 = /*#__PURE__*/_jsxs("div", {
23
+ const titleId = stepControlId(idPrefix, step.id, "title");
24
+ const blank = step.title.trim() === "";
25
+ const controls = [{
26
+ id: `${idPrefix}-${step.id}-edit`,
27
+ label: `Edit step ${number}`,
28
+ icon: PencilIcon,
29
+ disabled: false,
30
+ onClick: () => selectInputById(titleId)
31
+ }, {
32
+ id: stepControlId(idPrefix, step.id, "up"),
33
+ label: `Move step ${number} up`,
34
+ icon: ArrowUpIcon,
35
+ disabled: position === 0,
36
+ onClick: () => onAction("up")
37
+ }, {
38
+ id: stepControlId(idPrefix, step.id, "down"),
39
+ label: `Move step ${number} down`,
40
+ icon: ArrowDownIcon,
41
+ disabled: position === count - 1,
42
+ onClick: () => onAction("down")
43
+ }, {
44
+ id: stepControlId(idPrefix, step.id, "remove"),
45
+ label: `Remove step ${number}`,
46
+ icon: Trash2Icon,
47
+ disabled: count === 1,
48
+ onClick: () => onAction("remove"),
49
+ danger: true
50
+ }];
51
+ return /*#__PURE__*/_jsxs("li", {
52
+ "data-slot": "plan-step",
53
+ className: "group flex items-start gap-3 px-5 py-2.5 focus-within:bg-accent/50 hover:bg-accent/50 motion-safe:transition-colors",
54
+ children: [/*#__PURE__*/_jsx("span", {
55
+ "aria-hidden": true,
56
+ className: "mt-0.5 flex size-5 shrink-0 items-center justify-center font-mono text-[11px] text-muted-foreground tabular-nums ring-1 ring-input",
57
+ children: number
58
+ }), /*#__PURE__*/_jsxs("div", {
112
59
  className: "flex min-w-0 flex-1 flex-col gap-0.5",
113
60
  children: [/*#__PURE__*/_jsx("input", {
114
61
  id: titleId,
115
62
  "aria-label": `Step ${number} title`,
116
- value: t8,
63
+ value: step.title,
117
64
  placeholder: "Name this step",
118
65
  "aria-invalid": blank || undefined,
119
- onChange: t9,
120
- className: t11
121
- }), t12]
122
- });
123
- t1 = "flex shrink-0 gap-0.5 sm:opacity-0 sm:group-focus-within:opacity-100 sm:group-hover:opacity-100 sm:motion-safe:transition-opacity";
124
- t2 = controls.map(_temp);
125
- $[0] = count;
126
- $[1] = idPrefix;
127
- $[2] = number;
128
- $[3] = onAction;
129
- $[4] = onRename;
130
- $[5] = position;
131
- $[6] = step.detail;
132
- $[7] = step.id;
133
- $[8] = step.title;
134
- $[9] = t1;
135
- $[10] = t2;
136
- $[11] = t3;
137
- $[12] = t4;
138
- $[13] = t5;
139
- $[14] = t6;
140
- } else {
141
- t1 = $[9];
142
- t2 = $[10];
143
- t3 = $[11];
144
- t4 = $[12];
145
- t5 = $[13];
146
- t6 = $[14];
147
- }
148
- let t7;
149
- if ($[25] !== t1 || $[26] !== t2) {
150
- t7 = /*#__PURE__*/_jsx("div", {
151
- className: t1,
152
- children: t2
153
- });
154
- $[25] = t1;
155
- $[26] = t2;
156
- $[27] = t7;
157
- } else {
158
- t7 = $[27];
159
- }
160
- let t8;
161
- if ($[28] !== t3 || $[29] !== t4 || $[30] !== t5 || $[31] !== t6 || $[32] !== t7) {
162
- t8 = /*#__PURE__*/_jsxs("li", {
163
- "data-slot": t3,
164
- className: t4,
165
- children: [t5, t6, t7]
166
- });
167
- $[28] = t3;
168
- $[29] = t4;
169
- $[30] = t5;
170
- $[31] = t6;
171
- $[32] = t7;
172
- $[33] = t8;
173
- } else {
174
- t8 = $[33];
175
- }
176
- return t8;
177
- }
178
- function _temp(t0) {
179
- const {
180
- id,
181
- label,
182
- icon: Icon,
183
- disabled,
184
- onClick,
185
- danger
186
- } = t0;
187
- return /*#__PURE__*/_jsx(Button, {
188
- id: id,
189
- type: "button",
190
- variant: "ghost",
191
- size: "icon-xs",
192
- "aria-label": label,
193
- title: label,
194
- disabled: disabled,
195
- onClick: onClick,
196
- className: cn("text-muted-foreground hover:text-foreground", danger && "hover:text-destructive"),
197
- children: /*#__PURE__*/_jsx(Icon, {
198
- "aria-hidden": true
199
- })
200
- }, id);
66
+ onChange: event => onRename(event.target.value),
67
+ className: cn("-mx-1.5 h-6 min-w-0 bg-transparent px-1.5 text-sm font-medium outline-none placeholder:font-normal placeholder:text-muted-foreground focus-visible:bg-background focus-visible:ring-1 focus-visible:ring-ring", blank && "ring-1 ring-destructive/70")
68
+ }), step.detail && /*#__PURE__*/_jsx("p", {
69
+ className: "text-xs text-muted-foreground",
70
+ children: step.detail
71
+ })]
72
+ }), /*#__PURE__*/_jsx("div", {
73
+ className: "flex shrink-0 gap-0.5 sm:opacity-0 sm:group-focus-within:opacity-100 sm:group-hover:opacity-100 sm:motion-safe:transition-opacity",
74
+ children: controls.map(({
75
+ id,
76
+ label,
77
+ icon: Icon,
78
+ disabled,
79
+ onClick,
80
+ danger
81
+ }) => /*#__PURE__*/_jsx(Button, {
82
+ id: id,
83
+ type: "button",
84
+ variant: "ghost",
85
+ size: "icon-xs",
86
+ "aria-label": label,
87
+ title: label,
88
+ disabled: disabled,
89
+ onClick: onClick,
90
+ className: cn("text-muted-foreground hover:text-foreground", danger && "hover:text-destructive"),
91
+ children: /*#__PURE__*/_jsx(Icon, {
92
+ "aria-hidden": true
93
+ })
94
+ }, id))
95
+ })]
96
+ });
201
97
  }