@locusgraph/loop 0.2.0 → 0.2.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 +12 -62
- package/dist/agent/pulse/marks/bars-mark.js +15 -37
- package/dist/agent/pulse/marks/glyph-mark.js +15 -54
- package/dist/agent/pulse/marks/locus-mark.js +12 -36
- package/dist/agent/pulse/marks/orb-mark.js +9 -19
- package/dist/agent/pulse/marks/spinner-mark.js +20 -29
- package/dist/agent/pulse/pulse.js +36 -123
- package/dist/agent/pulse/use-loop-animation.js +12 -33
- package/dist/agent/steps/step-icon.js +26 -96
- package/dist/agent/steps/steps.js +47 -210
- package/dist/agent/tool/json-block.js +11 -31
- package/dist/agent/tool/tool-status.js +12 -35
- package/dist/approval/inbox/inbox-row.js +76 -301
- package/dist/approval/inbox/inbox.js +39 -190
- package/dist/approval/inbox/virtual-inbox-list.js +26 -102
- package/dist/approval/memory/memory-review.js +36 -170
- package/dist/approval/memory/memory-row.js +50 -185
- package/dist/approval/plan/plan-review.js +73 -223
- package/dist/approval/plan/plan-step-row.js +76 -180
- package/dist/approval/plan/question-choices.js +44 -130
- package/dist/approval/plan/question.js +38 -154
- package/dist/approval/run/run-bar.js +39 -123
- package/dist/approval/shared/risk-badge.js +9 -24
- package/dist/approval/shared/use-focus-on-mount.js +5 -21
- package/dist/approval/spend/raise-cap-form.js +48 -221
- package/dist/approval/spend/spend-gate.js +40 -155
- package/dist/approval/spend/spend-meter.js +85 -312
- package/dist/approval/tool/approval.js +35 -194
- package/dist/approval/tool/args/args-editor.js +46 -204
- package/dist/approval/tool/args/args-field.js +55 -238
- package/dist/approval/tool/deny-form.js +36 -123
- package/dist/approval/tool/tool-inputs.js +23 -88
- package/dist/chat/chat/use-stick-to-bottom.js +60 -113
- package/dist/chat/chat/virtual-chat-items.js +34 -127
- package/dist/chat/composer/composer-actions.js +46 -129
- package/dist/chat/composer/use-auto-grow.js +8 -23
- package/dist/chat/files/files.js +66 -291
- package/dist/chat/reply/fenced-code.js +10 -32
- package/dist/chat/reply/reply.js +24 -99
- package/dist/chat/turn/turn.js +46 -197
- package/dist/cost/context.js +65 -282
- package/dist/cost/cost-steps.js +42 -195
- package/dist/cost/cost.js +108 -497
- package/dist/cost/model-picker.js +42 -172
- package/dist/cost/shared/context-breakdown.js +64 -280
- package/dist/cost/shared/meter-marks.js +34 -92
- package/dist/cost/shared/model-option-row.js +35 -158
- package/dist/cost/shared/step-cost-row.js +37 -222
- package/dist/memory/cite.js +58 -179
- package/dist/memory/memorized.js +42 -194
- package/dist/memory/recall.js +68 -263
- package/dist/memory/shared/source-mark.js +10 -38
- package/dist/memory/sources.js +52 -230
- package/dist/shared/decision-summary.js +35 -117
- package/dist/shared/panel-empty.js +15 -73
- package/dist/shared/panel.js +65 -239
- package/dist/shared/status-dot.js +10 -32
- package/dist/thread/actions/action-button.js +10 -53
- package/dist/thread/actions/branch-switcher.js +21 -95
- package/dist/thread/canvas/version-switcher.js +31 -126
- package/dist/thread/code/copy-code-button.js +24 -56
- package/dist/thread/history/row/history-row.js +18 -97
- package/dist/thread/history/row/thread-item-menu.js +19 -72
- package/dist/thread/history/row/thread-title-editor.js +29 -72
- package/dist/thread/history/virtual-history-list.js +46 -82
- package/dist/thread/starters/starters.js +27 -87
- package/dist/thread/use-copied.js +10 -38
- package/package.json +3 -3
package/dist/shared/panel.js
CHANGED
|
@@ -1,251 +1,77 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "@locusgraph/components";
|
|
3
2
|
import { StatusDot } from "./status-dot.js";
|
|
4
3
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
export function ApprovalPanel(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} = t0);
|
|
14
|
-
$[0] = t0;
|
|
15
|
-
$[1] = className;
|
|
16
|
-
$[2] = props;
|
|
17
|
-
} else {
|
|
18
|
-
className = $[1];
|
|
19
|
-
props = $[2];
|
|
20
|
-
}
|
|
21
|
-
let t1;
|
|
22
|
-
if ($[3] !== className) {
|
|
23
|
-
t1 = cn("flex min-w-0 flex-col bg-card text-card-foreground ring-1 ring-border", className);
|
|
24
|
-
$[3] = className;
|
|
25
|
-
$[4] = t1;
|
|
26
|
-
} else {
|
|
27
|
-
t1 = $[4];
|
|
28
|
-
}
|
|
29
|
-
let t2;
|
|
30
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
-
t2 = /*#__PURE__*/_jsx("section", {
|
|
32
|
-
className: t1,
|
|
33
|
-
...props
|
|
34
|
-
});
|
|
35
|
-
$[5] = props;
|
|
36
|
-
$[6] = t1;
|
|
37
|
-
$[7] = t2;
|
|
38
|
-
} else {
|
|
39
|
-
t2 = $[7];
|
|
40
|
-
}
|
|
41
|
-
return t2;
|
|
4
|
+
export function ApprovalPanel({
|
|
5
|
+
className,
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /*#__PURE__*/_jsx("section", {
|
|
9
|
+
className: cn("flex min-w-0 flex-col bg-card text-card-foreground ring-1 ring-border", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
42
12
|
}
|
|
43
|
-
export function PanelHeader(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if ($[0] !== eyebrow) {
|
|
55
|
-
t2 = /*#__PURE__*/_jsx("span", {
|
|
13
|
+
export function PanelHeader({
|
|
14
|
+
icon,
|
|
15
|
+
eyebrow,
|
|
16
|
+
status,
|
|
17
|
+
tone = "idle",
|
|
18
|
+
aside
|
|
19
|
+
}) {
|
|
20
|
+
return /*#__PURE__*/_jsxs("header", {
|
|
21
|
+
"data-slot": "panel-header",
|
|
22
|
+
className: "eyebrow flex items-center gap-2 px-5 pt-4 [&_svg]:size-3.5 [&_svg]:shrink-0",
|
|
23
|
+
children: [icon, /*#__PURE__*/_jsx("span", {
|
|
56
24
|
className: "min-w-0 truncate",
|
|
57
25
|
children: eyebrow
|
|
58
|
-
})
|
|
59
|
-
$[0] = eyebrow;
|
|
60
|
-
$[1] = t2;
|
|
61
|
-
} else {
|
|
62
|
-
t2 = $[1];
|
|
63
|
-
}
|
|
64
|
-
let t3;
|
|
65
|
-
if ($[2] !== aside) {
|
|
66
|
-
t3 = aside && /*#__PURE__*/_jsx("span", {
|
|
67
|
-
className: "mr-2 tabular-nums",
|
|
68
|
-
children: aside
|
|
69
|
-
});
|
|
70
|
-
$[2] = aside;
|
|
71
|
-
$[3] = t3;
|
|
72
|
-
} else {
|
|
73
|
-
t3 = $[3];
|
|
74
|
-
}
|
|
75
|
-
let t4;
|
|
76
|
-
if ($[4] !== status || $[5] !== tone) {
|
|
77
|
-
t4 = status && /*#__PURE__*/_jsxs(_Fragment, {
|
|
78
|
-
children: [/*#__PURE__*/_jsx(StatusDot, {
|
|
79
|
-
tone: tone
|
|
80
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
81
|
-
children: status
|
|
82
|
-
})]
|
|
83
|
-
});
|
|
84
|
-
$[4] = status;
|
|
85
|
-
$[5] = tone;
|
|
86
|
-
$[6] = t4;
|
|
87
|
-
} else {
|
|
88
|
-
t4 = $[6];
|
|
89
|
-
}
|
|
90
|
-
let t5;
|
|
91
|
-
if ($[7] !== t3 || $[8] !== t4) {
|
|
92
|
-
t5 = /*#__PURE__*/_jsxs("span", {
|
|
26
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
93
27
|
className: "ml-auto flex shrink-0 items-center gap-1.5",
|
|
94
|
-
children: [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
className: "eyebrow flex items-center gap-2 px-5 pt-4 [&_svg]:size-3.5 [&_svg]:shrink-0",
|
|
107
|
-
children: [icon, t2, t5]
|
|
108
|
-
});
|
|
109
|
-
$[10] = icon;
|
|
110
|
-
$[11] = t2;
|
|
111
|
-
$[12] = t5;
|
|
112
|
-
$[13] = t6;
|
|
113
|
-
} else {
|
|
114
|
-
t6 = $[13];
|
|
115
|
-
}
|
|
116
|
-
return t6;
|
|
28
|
+
children: [aside && /*#__PURE__*/_jsx("span", {
|
|
29
|
+
className: "mr-2 tabular-nums",
|
|
30
|
+
children: aside
|
|
31
|
+
}), status && /*#__PURE__*/_jsxs(_Fragment, {
|
|
32
|
+
children: [/*#__PURE__*/_jsx(StatusDot, {
|
|
33
|
+
tone: tone
|
|
34
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
35
|
+
children: status
|
|
36
|
+
})]
|
|
37
|
+
})]
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
117
40
|
}
|
|
118
|
-
export function PanelTitle(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
} = t0);
|
|
127
|
-
$[0] = t0;
|
|
128
|
-
$[1] = className;
|
|
129
|
-
$[2] = props;
|
|
130
|
-
} else {
|
|
131
|
-
className = $[1];
|
|
132
|
-
props = $[2];
|
|
133
|
-
}
|
|
134
|
-
let t1;
|
|
135
|
-
if ($[3] !== className) {
|
|
136
|
-
t1 = cn("px-5 pt-2 font-sans text-base leading-snug font-semibold tracking-tight text-balance", className);
|
|
137
|
-
$[3] = className;
|
|
138
|
-
$[4] = t1;
|
|
139
|
-
} else {
|
|
140
|
-
t1 = $[4];
|
|
141
|
-
}
|
|
142
|
-
let t2;
|
|
143
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
144
|
-
t2 = /*#__PURE__*/_jsx("h3", {
|
|
145
|
-
className: t1,
|
|
146
|
-
...props
|
|
147
|
-
});
|
|
148
|
-
$[5] = props;
|
|
149
|
-
$[6] = t1;
|
|
150
|
-
$[7] = t2;
|
|
151
|
-
} else {
|
|
152
|
-
t2 = $[7];
|
|
153
|
-
}
|
|
154
|
-
return t2;
|
|
41
|
+
export function PanelTitle({
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}) {
|
|
45
|
+
return /*#__PURE__*/_jsx("h3", {
|
|
46
|
+
className: cn("px-5 pt-2 font-sans text-base leading-snug font-semibold tracking-tight text-balance", className),
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
155
49
|
}
|
|
156
|
-
export function PanelBody(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
} = t0);
|
|
165
|
-
$[0] = t0;
|
|
166
|
-
$[1] = className;
|
|
167
|
-
$[2] = props;
|
|
168
|
-
} else {
|
|
169
|
-
className = $[1];
|
|
170
|
-
props = $[2];
|
|
171
|
-
}
|
|
172
|
-
let t1;
|
|
173
|
-
if ($[3] !== className) {
|
|
174
|
-
t1 = cn("flex flex-col gap-4 px-5 pt-4 pb-5", className);
|
|
175
|
-
$[3] = className;
|
|
176
|
-
$[4] = t1;
|
|
177
|
-
} else {
|
|
178
|
-
t1 = $[4];
|
|
179
|
-
}
|
|
180
|
-
let t2;
|
|
181
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
182
|
-
t2 = /*#__PURE__*/_jsx("div", {
|
|
183
|
-
className: t1,
|
|
184
|
-
...props
|
|
185
|
-
});
|
|
186
|
-
$[5] = props;
|
|
187
|
-
$[6] = t1;
|
|
188
|
-
$[7] = t2;
|
|
189
|
-
} else {
|
|
190
|
-
t2 = $[7];
|
|
191
|
-
}
|
|
192
|
-
return t2;
|
|
50
|
+
export function PanelBody({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}) {
|
|
54
|
+
return /*#__PURE__*/_jsx("div", {
|
|
55
|
+
className: cn("flex flex-col gap-4 px-5 pt-4 pb-5", className),
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
193
58
|
}
|
|
194
|
-
export function PanelFooter(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
} = t0);
|
|
203
|
-
$[0] = t0;
|
|
204
|
-
$[1] = className;
|
|
205
|
-
$[2] = props;
|
|
206
|
-
} else {
|
|
207
|
-
className = $[1];
|
|
208
|
-
props = $[2];
|
|
209
|
-
}
|
|
210
|
-
let t1;
|
|
211
|
-
if ($[3] !== className) {
|
|
212
|
-
t1 = cn("flex flex-wrap items-center justify-end gap-2 border-t bg-muted/70 px-5 py-3", className);
|
|
213
|
-
$[3] = className;
|
|
214
|
-
$[4] = t1;
|
|
215
|
-
} else {
|
|
216
|
-
t1 = $[4];
|
|
217
|
-
}
|
|
218
|
-
let t2;
|
|
219
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
220
|
-
t2 = /*#__PURE__*/_jsx("div", {
|
|
221
|
-
className: t1,
|
|
222
|
-
...props
|
|
223
|
-
});
|
|
224
|
-
$[5] = props;
|
|
225
|
-
$[6] = t1;
|
|
226
|
-
$[7] = t2;
|
|
227
|
-
} else {
|
|
228
|
-
t2 = $[7];
|
|
229
|
-
}
|
|
230
|
-
return t2;
|
|
59
|
+
export function PanelFooter({
|
|
60
|
+
className,
|
|
61
|
+
...props
|
|
62
|
+
}) {
|
|
63
|
+
return /*#__PURE__*/_jsx("div", {
|
|
64
|
+
className: cn("flex flex-wrap items-center justify-end gap-2 border-t bg-muted/70 px-5 py-3", className),
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
231
67
|
}
|
|
232
|
-
export function LiveStatus(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
"aria-live": "polite",
|
|
242
|
-
className: "sr-only",
|
|
243
|
-
children: message
|
|
244
|
-
});
|
|
245
|
-
$[0] = message;
|
|
246
|
-
$[1] = t1;
|
|
247
|
-
} else {
|
|
248
|
-
t1 = $[1];
|
|
249
|
-
}
|
|
250
|
-
return t1;
|
|
68
|
+
export function LiveStatus({
|
|
69
|
+
message
|
|
70
|
+
}) {
|
|
71
|
+
return /*#__PURE__*/_jsx("p", {
|
|
72
|
+
role: "status",
|
|
73
|
+
"aria-live": "polite",
|
|
74
|
+
className: "sr-only",
|
|
75
|
+
children: message
|
|
76
|
+
});
|
|
251
77
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "@locusgraph/components";
|
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
export const statusDotTones = {
|
|
@@ -8,35 +7,14 @@ export const statusDotTones = {
|
|
|
8
7
|
danger: "bg-destructive",
|
|
9
8
|
idle: "bg-muted-foreground/50"
|
|
10
9
|
};
|
|
11
|
-
export function StatusDot(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
$[0] = className;
|
|
22
|
-
$[1] = t1;
|
|
23
|
-
$[2] = t2;
|
|
24
|
-
} else {
|
|
25
|
-
t2 = $[2];
|
|
26
|
-
}
|
|
27
|
-
let t3;
|
|
28
|
-
if ($[3] !== t2 || $[4] !== tone) {
|
|
29
|
-
t3 = /*#__PURE__*/_jsx("span", {
|
|
30
|
-
"aria-hidden": true,
|
|
31
|
-
"data-slot": "status-dot",
|
|
32
|
-
"data-tone": tone,
|
|
33
|
-
className: t2
|
|
34
|
-
});
|
|
35
|
-
$[3] = t2;
|
|
36
|
-
$[4] = tone;
|
|
37
|
-
$[5] = t3;
|
|
38
|
-
} else {
|
|
39
|
-
t3 = $[5];
|
|
40
|
-
}
|
|
41
|
-
return t3;
|
|
10
|
+
export function StatusDot({
|
|
11
|
+
tone,
|
|
12
|
+
className
|
|
13
|
+
}) {
|
|
14
|
+
return /*#__PURE__*/_jsx("span", {
|
|
15
|
+
"aria-hidden": true,
|
|
16
|
+
"data-slot": "status-dot",
|
|
17
|
+
"data-tone": tone,
|
|
18
|
+
className: cn("size-1.5 shrink-0 rounded-full", statusDotTones[tone], className)
|
|
19
|
+
});
|
|
42
20
|
}
|
|
@@ -1,29 +1,12 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { Button, Tooltip, TooltipContent, TooltipTrigger } from "@locusgraph/components";
|
|
3
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
export function ActionButton(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
({
|
|
11
|
-
label,
|
|
12
|
-
children,
|
|
13
|
-
...props
|
|
14
|
-
} = t0);
|
|
15
|
-
$[0] = t0;
|
|
16
|
-
$[1] = children;
|
|
17
|
-
$[2] = label;
|
|
18
|
-
$[3] = props;
|
|
19
|
-
} else {
|
|
20
|
-
children = $[1];
|
|
21
|
-
label = $[2];
|
|
22
|
-
props = $[3];
|
|
23
|
-
}
|
|
24
|
-
let t1;
|
|
25
|
-
if ($[4] !== children || $[5] !== label || $[6] !== props) {
|
|
26
|
-
t1 = /*#__PURE__*/_jsx(TooltipTrigger, {
|
|
3
|
+
export function ActionButton({
|
|
4
|
+
label,
|
|
5
|
+
children,
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /*#__PURE__*/_jsxs(Tooltip, {
|
|
9
|
+
children: [/*#__PURE__*/_jsx(TooltipTrigger, {
|
|
27
10
|
asChild: true,
|
|
28
11
|
children: /*#__PURE__*/_jsx(Button, {
|
|
29
12
|
type: "button",
|
|
@@ -34,34 +17,8 @@ export function ActionButton(t0) {
|
|
|
34
17
|
...props,
|
|
35
18
|
children: children
|
|
36
19
|
})
|
|
37
|
-
})
|
|
38
|
-
$[4] = children;
|
|
39
|
-
$[5] = label;
|
|
40
|
-
$[6] = props;
|
|
41
|
-
$[7] = t1;
|
|
42
|
-
} else {
|
|
43
|
-
t1 = $[7];
|
|
44
|
-
}
|
|
45
|
-
let t2;
|
|
46
|
-
if ($[8] !== label) {
|
|
47
|
-
t2 = /*#__PURE__*/_jsx(TooltipContent, {
|
|
20
|
+
}), /*#__PURE__*/_jsx(TooltipContent, {
|
|
48
21
|
children: label
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
$[9] = t2;
|
|
52
|
-
} else {
|
|
53
|
-
t2 = $[9];
|
|
54
|
-
}
|
|
55
|
-
let t3;
|
|
56
|
-
if ($[10] !== t1 || $[11] !== t2) {
|
|
57
|
-
t3 = /*#__PURE__*/_jsxs(Tooltip, {
|
|
58
|
-
children: [t1, t2]
|
|
59
|
-
});
|
|
60
|
-
$[10] = t1;
|
|
61
|
-
$[11] = t2;
|
|
62
|
-
$[12] = t3;
|
|
63
|
-
} else {
|
|
64
|
-
t3 = $[12];
|
|
65
|
-
}
|
|
66
|
-
return t3;
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
67
24
|
}
|
|
@@ -1,104 +1,30 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon } from "@carbon/icons-react";
|
|
3
2
|
import { ActionButton } from "./action-button.js";
|
|
4
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
export function BranchSwitcher(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onBranchChange
|
|
10
|
-
} = t0;
|
|
4
|
+
export function BranchSwitcher({
|
|
5
|
+
branch,
|
|
6
|
+
onBranchChange
|
|
7
|
+
}) {
|
|
11
8
|
const position = branch.index + 1;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
$[2] = t2;
|
|
19
|
-
} else {
|
|
20
|
-
t2 = $[2];
|
|
21
|
-
}
|
|
22
|
-
let t3;
|
|
23
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
24
|
-
t3 = /*#__PURE__*/_jsx(ChevronLeftIcon, {});
|
|
25
|
-
$[3] = t3;
|
|
26
|
-
} else {
|
|
27
|
-
t3 = $[3];
|
|
28
|
-
}
|
|
29
|
-
let t4;
|
|
30
|
-
if ($[4] !== t1 || $[5] !== t2) {
|
|
31
|
-
t4 = /*#__PURE__*/_jsx(ActionButton, {
|
|
9
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
10
|
+
"data-slot": "branch-switcher",
|
|
11
|
+
role: "group",
|
|
12
|
+
"aria-label": "Reply versions",
|
|
13
|
+
className: "flex items-center",
|
|
14
|
+
children: [/*#__PURE__*/_jsx(ActionButton, {
|
|
32
15
|
label: "Previous version",
|
|
33
|
-
disabled:
|
|
34
|
-
onClick:
|
|
35
|
-
children:
|
|
36
|
-
})
|
|
37
|
-
$[4] = t1;
|
|
38
|
-
$[5] = t2;
|
|
39
|
-
$[6] = t4;
|
|
40
|
-
} else {
|
|
41
|
-
t4 = $[6];
|
|
42
|
-
}
|
|
43
|
-
const t5 = `${position} / ${branch.count}`;
|
|
44
|
-
let t6;
|
|
45
|
-
if ($[7] !== t5) {
|
|
46
|
-
t6 = /*#__PURE__*/_jsx("span", {
|
|
16
|
+
disabled: branch.index <= 0,
|
|
17
|
+
onClick: () => onBranchChange(branch.index - 1),
|
|
18
|
+
children: /*#__PURE__*/_jsx(ChevronLeftIcon, {})
|
|
19
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
47
20
|
"aria-live": "polite",
|
|
48
21
|
className: "min-w-9 text-center font-mono text-xs text-muted-foreground tabular-nums",
|
|
49
|
-
children:
|
|
50
|
-
})
|
|
51
|
-
$[7] = t5;
|
|
52
|
-
$[8] = t6;
|
|
53
|
-
} else {
|
|
54
|
-
t6 = $[8];
|
|
55
|
-
}
|
|
56
|
-
const t7 = position >= branch.count;
|
|
57
|
-
let t8;
|
|
58
|
-
if ($[9] !== branch.index || $[10] !== onBranchChange) {
|
|
59
|
-
t8 = () => onBranchChange(branch.index + 1);
|
|
60
|
-
$[9] = branch.index;
|
|
61
|
-
$[10] = onBranchChange;
|
|
62
|
-
$[11] = t8;
|
|
63
|
-
} else {
|
|
64
|
-
t8 = $[11];
|
|
65
|
-
}
|
|
66
|
-
let t9;
|
|
67
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
68
|
-
t9 = /*#__PURE__*/_jsx(ChevronRightIcon, {});
|
|
69
|
-
$[12] = t9;
|
|
70
|
-
} else {
|
|
71
|
-
t9 = $[12];
|
|
72
|
-
}
|
|
73
|
-
let t10;
|
|
74
|
-
if ($[13] !== t7 || $[14] !== t8) {
|
|
75
|
-
t10 = /*#__PURE__*/_jsx(ActionButton, {
|
|
22
|
+
children: `${position} / ${branch.count}`
|
|
23
|
+
}), /*#__PURE__*/_jsx(ActionButton, {
|
|
76
24
|
label: "Next version",
|
|
77
|
-
disabled:
|
|
78
|
-
onClick:
|
|
79
|
-
children:
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
$[14] = t8;
|
|
83
|
-
$[15] = t10;
|
|
84
|
-
} else {
|
|
85
|
-
t10 = $[15];
|
|
86
|
-
}
|
|
87
|
-
let t11;
|
|
88
|
-
if ($[16] !== t10 || $[17] !== t4 || $[18] !== t6) {
|
|
89
|
-
t11 = /*#__PURE__*/_jsxs("div", {
|
|
90
|
-
"data-slot": "branch-switcher",
|
|
91
|
-
role: "group",
|
|
92
|
-
"aria-label": "Reply versions",
|
|
93
|
-
className: "flex items-center",
|
|
94
|
-
children: [t4, t6, t10]
|
|
95
|
-
});
|
|
96
|
-
$[16] = t10;
|
|
97
|
-
$[17] = t4;
|
|
98
|
-
$[18] = t6;
|
|
99
|
-
$[19] = t11;
|
|
100
|
-
} else {
|
|
101
|
-
t11 = $[19];
|
|
102
|
-
}
|
|
103
|
-
return t11;
|
|
25
|
+
disabled: position >= branch.count,
|
|
26
|
+
onClick: () => onBranchChange(branch.index + 1),
|
|
27
|
+
children: /*#__PURE__*/_jsx(ChevronRightIcon, {})
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
104
30
|
}
|