@locusgraph/loop 0.2.1 → 0.3.1

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