@locusgraph/loop 0.3.0 → 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.
- package/dist/agent/pulse/gradient-label.js +64 -12
- package/dist/agent/pulse/marks/bars-mark.js +39 -15
- package/dist/agent/pulse/marks/glyph-mark.js +56 -15
- package/dist/agent/pulse/marks/locus-mark.js +38 -12
- package/dist/agent/pulse/marks/orb-mark.js +21 -9
- package/dist/agent/pulse/use-loop-animation.js +35 -12
- package/dist/approval/inbox/inbox-row.js +303 -76
- package/dist/approval/inbox/inbox.js +192 -39
- package/dist/approval/inbox/virtual-inbox-list.js +104 -26
- package/dist/approval/memory/memory-review.js +172 -36
- package/dist/approval/memory/memory-row.js +187 -50
- package/dist/approval/plan/plan-review.js +225 -73
- package/dist/approval/plan/plan-step-row.js +182 -76
- package/dist/approval/plan/question-choices.js +132 -44
- package/dist/approval/plan/question.js +156 -38
- package/dist/approval/run/run-bar.js +125 -39
- package/dist/approval/shared/use-focus-on-mount.js +23 -5
- package/dist/approval/spend/raise-cap-form.js +223 -48
- package/dist/approval/spend/spend-gate.js +157 -40
- package/dist/approval/tool/approval.js +196 -35
- package/dist/approval/tool/args/args-editor.js +206 -46
- package/dist/approval/tool/args/args-field.js +240 -55
- package/dist/approval/tool/deny-form.js +125 -36
- package/dist/approval/tool/tool-inputs.js +90 -23
- package/dist/chat/chat/use-stick-to-bottom.js +115 -60
- package/dist/chat/chat/virtual-chat-items.js +129 -34
- package/dist/chat/composer/composer-actions.d.ts +1 -2
- package/dist/chat/composer/composer-actions.js +132 -49
- package/dist/chat/composer/composer-status.d.ts +2 -0
- package/dist/chat/composer/composer-status.js +3 -0
- package/dist/chat/composer/composer.d.ts +1 -1
- package/dist/chat/composer/composer.js +2 -1
- package/dist/chat/composer/use-auto-grow.js +25 -8
- package/dist/chat/files/files.js +293 -66
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/cost/model-picker.js +174 -42
- package/dist/memory/cite.js +181 -58
- package/dist/memory/memorized.js +196 -42
- package/dist/memory/recall.js +265 -68
- package/dist/memory/sources.js +232 -52
- package/dist/shared/virtual/use-list-virtualizer.js +2 -0
- package/dist/thread/actions/branch-switcher.js +97 -21
- package/dist/thread/canvas/version-switcher.js +128 -31
- package/dist/thread/code/copy-code-button.js +58 -24
- package/dist/thread/history/row/history-row.js +99 -18
- package/dist/thread/history/row/thread-item-menu.js +74 -19
- package/dist/thread/history/row/thread-title-editor.js +74 -29
- package/dist/thread/history/virtual-history-list.js +84 -46
- package/dist/thread/starters/starters.js +89 -27
- package/dist/thread/use-copied.js +40 -10
- package/package.json +1 -1
|
@@ -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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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:
|
|
74
|
-
tone:
|
|
75
|
-
aside:
|
|
76
|
-
})
|
|
77
|
-
|
|
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
|
-
})
|
|
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((
|
|
197
|
+
children: steps.map((step_0, position_0) => /*#__PURE__*/_jsx(PlanStepRow, {
|
|
96
198
|
idPrefix: idPrefix,
|
|
97
|
-
step:
|
|
98
|
-
position:
|
|
199
|
+
step: step_0,
|
|
200
|
+
position: position_0,
|
|
99
201
|
count: steps.length,
|
|
100
|
-
onRename:
|
|
101
|
-
onAction:
|
|
102
|
-
},
|
|
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(
|
|
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
|
-
})
|
|
136
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
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:
|
|
118
|
+
value: t8,
|
|
64
119
|
placeholder: "Name this step",
|
|
65
120
|
"aria-invalid": blank || undefined,
|
|
66
|
-
onChange:
|
|
67
|
-
className:
|
|
68
|
-
}),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
}
|