@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,85 +1,270 @@
1
+ "use client";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
1
4
  import { Checkbox, Input, Label, NativeSelect, NativeSelectOption } from "@locusgraph/components";
2
5
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
6
  function describedBy(id, field, error) {
4
7
  const ids = [field.description && `${id}-hint`, error && `${id}-error`].filter(Boolean);
5
8
  return ids.length > 0 ? ids.join(" ") : undefined;
6
9
  }
7
- function FieldControl({
8
- id,
9
- field,
10
- draft,
11
- error,
12
- onChange
13
- }) {
14
- const shared = {
10
+ function FieldControl(t0) {
11
+ const $ = _c(38);
12
+ const {
15
13
  id,
16
- name: field.name,
17
- "aria-invalid": error ? true : undefined,
18
- "aria-describedby": describedBy(id, field, error),
19
- "aria-required": field.required || undefined
20
- };
14
+ field,
15
+ draft,
16
+ error,
17
+ onChange
18
+ } = t0;
19
+ const t1 = field.name;
20
+ const t2 = error ? true : undefined;
21
+ let t3;
22
+ if ($[0] !== error || $[1] !== field || $[2] !== id) {
23
+ t3 = describedBy(id, field, error);
24
+ $[0] = error;
25
+ $[1] = field;
26
+ $[2] = id;
27
+ $[3] = t3;
28
+ } else {
29
+ t3 = $[3];
30
+ }
31
+ const t4 = field.required || undefined;
32
+ let t5;
33
+ if ($[4] !== field.name || $[5] !== id || $[6] !== t2 || $[7] !== t3 || $[8] !== t4) {
34
+ t5 = {
35
+ id,
36
+ name: t1,
37
+ "aria-invalid": t2,
38
+ "aria-describedby": t3,
39
+ "aria-required": t4
40
+ };
41
+ $[4] = field.name;
42
+ $[5] = id;
43
+ $[6] = t2;
44
+ $[7] = t3;
45
+ $[8] = t4;
46
+ $[9] = t5;
47
+ } else {
48
+ t5 = $[9];
49
+ }
50
+ const shared = t5;
21
51
  if (field.type === "boolean") {
22
- return /*#__PURE__*/_jsx(Checkbox, {
23
- ...shared,
24
- checked: draft === true,
25
- onCheckedChange: checked => onChange(checked === true)
26
- });
52
+ const t6 = draft === true;
53
+ let t7;
54
+ if ($[10] !== onChange) {
55
+ t7 = checked => onChange(checked === true);
56
+ $[10] = onChange;
57
+ $[11] = t7;
58
+ } else {
59
+ t7 = $[11];
60
+ }
61
+ let t8;
62
+ if ($[12] !== shared || $[13] !== t6 || $[14] !== t7) {
63
+ t8 = /*#__PURE__*/_jsx(Checkbox, {
64
+ ...shared,
65
+ checked: t6,
66
+ onCheckedChange: t7
67
+ });
68
+ $[12] = shared;
69
+ $[13] = t6;
70
+ $[14] = t7;
71
+ $[15] = t8;
72
+ } else {
73
+ t8 = $[15];
74
+ }
75
+ return t8;
27
76
  }
28
77
  const text = typeof draft === "string" ? draft : "";
29
78
  if (field.type === "select") {
30
- return /*#__PURE__*/_jsxs(NativeSelect, {
31
- ...shared,
32
- value: text,
33
- onChange: event => onChange(event.target.value),
34
- children: [/*#__PURE__*/_jsx(NativeSelectOption, {
79
+ let t6;
80
+ if ($[16] !== onChange) {
81
+ t6 = event => onChange(event.target.value);
82
+ $[16] = onChange;
83
+ $[17] = t6;
84
+ } else {
85
+ t6 = $[17];
86
+ }
87
+ let t7;
88
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
89
+ t7 = /*#__PURE__*/_jsx(NativeSelectOption, {
35
90
  value: "",
36
91
  children: "Choose\u2026"
37
- }), (field.options ?? []).map(option => /*#__PURE__*/_jsx(NativeSelectOption, {
38
- value: option.value,
39
- children: option.label
40
- }, option.value))]
92
+ });
93
+ $[18] = t7;
94
+ } else {
95
+ t7 = $[18];
96
+ }
97
+ let t8;
98
+ if ($[19] !== field.options) {
99
+ t8 = field.options ?? [];
100
+ $[19] = field.options;
101
+ $[20] = t8;
102
+ } else {
103
+ t8 = $[20];
104
+ }
105
+ let t9;
106
+ if ($[21] !== t8) {
107
+ t9 = t8.map(_temp);
108
+ $[21] = t8;
109
+ $[22] = t9;
110
+ } else {
111
+ t9 = $[22];
112
+ }
113
+ let t10;
114
+ if ($[23] !== shared || $[24] !== t6 || $[25] !== t9 || $[26] !== text) {
115
+ t10 = /*#__PURE__*/_jsxs(NativeSelect, {
116
+ ...shared,
117
+ value: text,
118
+ onChange: t6,
119
+ children: [t7, t9]
120
+ });
121
+ $[23] = shared;
122
+ $[24] = t6;
123
+ $[25] = t9;
124
+ $[26] = text;
125
+ $[27] = t10;
126
+ } else {
127
+ t10 = $[27];
128
+ }
129
+ return t10;
130
+ }
131
+ const t6 = field.type === "number" ? "number" : "text";
132
+ const t7 = field.type === "number" ? "decimal" : undefined;
133
+ let t8;
134
+ if ($[28] !== onChange) {
135
+ t8 = event_0 => onChange(event_0.target.value);
136
+ $[28] = onChange;
137
+ $[29] = t8;
138
+ } else {
139
+ t8 = $[29];
140
+ }
141
+ let t9;
142
+ if ($[30] !== field.max || $[31] !== field.min || $[32] !== shared || $[33] !== t6 || $[34] !== t7 || $[35] !== t8 || $[36] !== text) {
143
+ t9 = /*#__PURE__*/_jsx(Input, {
144
+ ...shared,
145
+ type: t6,
146
+ inputMode: t7,
147
+ min: field.min,
148
+ max: field.max,
149
+ value: text,
150
+ onChange: t8
41
151
  });
152
+ $[30] = field.max;
153
+ $[31] = field.min;
154
+ $[32] = shared;
155
+ $[33] = t6;
156
+ $[34] = t7;
157
+ $[35] = t8;
158
+ $[36] = text;
159
+ $[37] = t9;
160
+ } else {
161
+ t9 = $[37];
42
162
  }
43
- return /*#__PURE__*/_jsx(Input, {
44
- ...shared,
45
- type: field.type === "number" ? "number" : "text",
46
- inputMode: field.type === "number" ? "decimal" : undefined,
47
- min: field.min,
48
- max: field.max,
49
- value: text,
50
- onChange: event => onChange(event.target.value)
51
- });
163
+ return t9;
164
+ }
165
+ function _temp(option) {
166
+ return /*#__PURE__*/_jsx(NativeSelectOption, {
167
+ value: option.value,
168
+ children: option.label
169
+ }, option.value);
52
170
  }
53
171
  export function ArgsField(props) {
172
+ const $ = _c(23);
54
173
  const {
55
174
  id,
56
175
  field,
57
176
  error
58
177
  } = props;
59
178
  const inline = field.type === "boolean";
60
- return /*#__PURE__*/_jsxs("div", {
61
- "data-slot": "args-field",
62
- "data-type": field.type,
63
- className: "flex flex-col gap-1.5 [&_[data-slot=native-select-wrapper]]:w-full",
64
- children: [/*#__PURE__*/_jsxs("div", {
65
- className: inline ? "flex flex-row-reverse items-center justify-end gap-2" : "contents",
66
- children: [/*#__PURE__*/_jsxs(Label, {
67
- htmlFor: id,
68
- children: [field.label, field.required && /*#__PURE__*/_jsx("span", {
69
- className: "text-xs font-normal text-muted-foreground",
70
- children: "required"
71
- })]
72
- }), /*#__PURE__*/_jsx(FieldControl, {
73
- ...props
74
- })]
75
- }), field.description && /*#__PURE__*/_jsx("p", {
179
+ const t0 = inline ? "flex flex-row-reverse items-center justify-end gap-2" : "contents";
180
+ let t1;
181
+ if ($[0] !== field.required) {
182
+ t1 = field.required && /*#__PURE__*/_jsx("span", {
183
+ className: "text-xs font-normal text-muted-foreground",
184
+ children: "required"
185
+ });
186
+ $[0] = field.required;
187
+ $[1] = t1;
188
+ } else {
189
+ t1 = $[1];
190
+ }
191
+ let t2;
192
+ if ($[2] !== field.label || $[3] !== id || $[4] !== t1) {
193
+ t2 = /*#__PURE__*/_jsxs(Label, {
194
+ htmlFor: id,
195
+ children: [field.label, t1]
196
+ });
197
+ $[2] = field.label;
198
+ $[3] = id;
199
+ $[4] = t1;
200
+ $[5] = t2;
201
+ } else {
202
+ t2 = $[5];
203
+ }
204
+ let t3;
205
+ if ($[6] !== props) {
206
+ t3 = /*#__PURE__*/_jsx(FieldControl, {
207
+ ...props
208
+ });
209
+ $[6] = props;
210
+ $[7] = t3;
211
+ } else {
212
+ t3 = $[7];
213
+ }
214
+ let t4;
215
+ if ($[8] !== t0 || $[9] !== t2 || $[10] !== t3) {
216
+ t4 = /*#__PURE__*/_jsxs("div", {
217
+ className: t0,
218
+ children: [t2, t3]
219
+ });
220
+ $[8] = t0;
221
+ $[9] = t2;
222
+ $[10] = t3;
223
+ $[11] = t4;
224
+ } else {
225
+ t4 = $[11];
226
+ }
227
+ let t5;
228
+ if ($[12] !== field.description || $[13] !== id) {
229
+ t5 = field.description && /*#__PURE__*/_jsx("p", {
76
230
  id: `${id}-hint`,
77
231
  className: "text-xs text-muted-foreground",
78
232
  children: field.description
79
- }), error && /*#__PURE__*/_jsx("p", {
233
+ });
234
+ $[12] = field.description;
235
+ $[13] = id;
236
+ $[14] = t5;
237
+ } else {
238
+ t5 = $[14];
239
+ }
240
+ let t6;
241
+ if ($[15] !== error || $[16] !== id) {
242
+ t6 = error && /*#__PURE__*/_jsx("p", {
80
243
  id: `${id}-error`,
81
244
  className: "text-xs text-destructive",
82
245
  children: error
83
- })]
84
- });
246
+ });
247
+ $[15] = error;
248
+ $[16] = id;
249
+ $[17] = t6;
250
+ } else {
251
+ t6 = $[17];
252
+ }
253
+ let t7;
254
+ if ($[18] !== field.type || $[19] !== t4 || $[20] !== t5 || $[21] !== t6) {
255
+ t7 = /*#__PURE__*/_jsxs("div", {
256
+ "data-slot": "args-field",
257
+ "data-type": field.type,
258
+ className: "flex flex-col gap-1.5 [&_[data-slot=native-select-wrapper]]:w-full",
259
+ children: [t4, t5, t6]
260
+ });
261
+ $[18] = field.type;
262
+ $[19] = t4;
263
+ $[20] = t5;
264
+ $[21] = t6;
265
+ $[22] = t7;
266
+ } else {
267
+ t7 = $[22];
268
+ }
269
+ return t7;
85
270
  }
@@ -1,48 +1,137 @@
1
+ "use client";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
1
4
  import { Button, Label, Textarea } from "@locusgraph/components";
2
5
  import { useId, useState } from "react";
3
6
  import { PanelBody, PanelFooter } from "../../shared/panel.js";
4
7
  import { useFocusOnMount } from "../shared/use-focus-on-mount.js";
5
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
- export function DenyForm({
7
- onDeny,
8
- onBack
9
- }) {
9
+ export function DenyForm(t0) {
10
+ const $ = _c(24);
11
+ const {
12
+ onDeny,
13
+ onBack
14
+ } = t0;
10
15
  const [reason, setReason] = useState("");
11
16
  const reasonId = useId();
12
17
  const reasonRef = useFocusOnMount(true);
13
- const trimmed = reason.trim();
14
- return /*#__PURE__*/_jsxs("form", {
15
- "data-slot": "deny-form",
16
- onSubmit: event => {
18
+ let t1;
19
+ if ($[0] !== reason) {
20
+ t1 = reason.trim();
21
+ $[0] = reason;
22
+ $[1] = t1;
23
+ } else {
24
+ t1 = $[1];
25
+ }
26
+ const trimmed = t1;
27
+ let t2;
28
+ if ($[2] !== onDeny || $[3] !== trimmed) {
29
+ t2 = event => {
17
30
  event.preventDefault();
18
31
  onDeny(trimmed === "" ? undefined : trimmed);
19
- },
20
- children: [/*#__PURE__*/_jsxs(PanelBody, {
32
+ };
33
+ $[2] = onDeny;
34
+ $[3] = trimmed;
35
+ $[4] = t2;
36
+ } else {
37
+ t2 = $[4];
38
+ }
39
+ let t3;
40
+ if ($[5] !== reasonId) {
41
+ t3 = /*#__PURE__*/_jsx(Label, {
42
+ htmlFor: reasonId,
43
+ className: "text-xs font-normal text-muted-foreground",
44
+ children: "Reason for the agent (optional)"
45
+ });
46
+ $[5] = reasonId;
47
+ $[6] = t3;
48
+ } else {
49
+ t3 = $[6];
50
+ }
51
+ let t4;
52
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
53
+ t4 = event_0 => setReason(event_0.target.value);
54
+ $[7] = t4;
55
+ } else {
56
+ t4 = $[7];
57
+ }
58
+ let t5;
59
+ if ($[8] !== reason || $[9] !== reasonId || $[10] !== reasonRef) {
60
+ t5 = /*#__PURE__*/_jsx(Textarea, {
61
+ id: reasonId,
62
+ ref: reasonRef,
63
+ value: reason,
64
+ placeholder: "Tell the agent what to do instead",
65
+ onChange: t4
66
+ });
67
+ $[8] = reason;
68
+ $[9] = reasonId;
69
+ $[10] = reasonRef;
70
+ $[11] = t5;
71
+ } else {
72
+ t5 = $[11];
73
+ }
74
+ let t6;
75
+ if ($[12] !== t3 || $[13] !== t5) {
76
+ t6 = /*#__PURE__*/_jsxs(PanelBody, {
21
77
  className: "gap-2 pt-0",
22
- children: [/*#__PURE__*/_jsx(Label, {
23
- htmlFor: reasonId,
24
- className: "text-xs font-normal text-muted-foreground",
25
- children: "Reason for the agent (optional)"
26
- }), /*#__PURE__*/_jsx(Textarea, {
27
- id: reasonId,
28
- ref: reasonRef,
29
- value: reason,
30
- placeholder: "Tell the agent what to do instead",
31
- onChange: event => setReason(event.target.value)
32
- })]
33
- }), /*#__PURE__*/_jsxs(PanelFooter, {
34
- children: [/*#__PURE__*/_jsx(Button, {
35
- type: "button",
36
- variant: "ghost",
37
- size: "sm",
38
- onClick: onBack,
39
- children: "Back"
40
- }), /*#__PURE__*/_jsx(Button, {
41
- type: "submit",
42
- variant: "destructive",
43
- size: "sm",
44
- children: "Send denial"
45
- })]
46
- })]
47
- });
78
+ children: [t3, t5]
79
+ });
80
+ $[12] = t3;
81
+ $[13] = t5;
82
+ $[14] = t6;
83
+ } else {
84
+ t6 = $[14];
85
+ }
86
+ let t7;
87
+ if ($[15] !== onBack) {
88
+ t7 = /*#__PURE__*/_jsx(Button, {
89
+ type: "button",
90
+ variant: "ghost",
91
+ size: "sm",
92
+ onClick: onBack,
93
+ children: "Back"
94
+ });
95
+ $[15] = onBack;
96
+ $[16] = t7;
97
+ } else {
98
+ t7 = $[16];
99
+ }
100
+ let t8;
101
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
102
+ t8 = /*#__PURE__*/_jsx(Button, {
103
+ type: "submit",
104
+ variant: "destructive",
105
+ size: "sm",
106
+ children: "Send denial"
107
+ });
108
+ $[17] = t8;
109
+ } else {
110
+ t8 = $[17];
111
+ }
112
+ let t9;
113
+ if ($[18] !== t7) {
114
+ t9 = /*#__PURE__*/_jsxs(PanelFooter, {
115
+ children: [t7, t8]
116
+ });
117
+ $[18] = t7;
118
+ $[19] = t9;
119
+ } else {
120
+ t9 = $[19];
121
+ }
122
+ let t10;
123
+ if ($[20] !== t2 || $[21] !== t6 || $[22] !== t9) {
124
+ t10 = /*#__PURE__*/_jsxs("form", {
125
+ "data-slot": "deny-form",
126
+ onSubmit: t2,
127
+ children: [t6, t9]
128
+ });
129
+ $[20] = t2;
130
+ $[21] = t6;
131
+ $[22] = t9;
132
+ $[23] = t10;
133
+ } else {
134
+ t10 = $[23];
135
+ }
136
+ return t10;
48
137
  }
@@ -1,3 +1,6 @@
1
+ "use client";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
1
4
  import { cn } from "@locusgraph/components";
2
5
  import { useId, useState } from "react";
3
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -36,42 +39,106 @@ export function humanizeKey(key) {
36
39
  function rawJson(input) {
37
40
  return JSON.stringify(input, null, 2) ?? "undefined";
38
41
  }
39
- export function ToolInputs({
40
- input,
41
- muted = false
42
- }) {
42
+ export function ToolInputs(t0) {
43
+ const $ = _c(22);
44
+ const {
45
+ input,
46
+ muted: t1
47
+ } = t0;
48
+ const muted = t1 === undefined ? false : t1;
43
49
  const [showRaw, setShowRaw] = useState(false);
44
50
  const rawId = useId();
45
- const entries = isPlainRecord(input) ? Object.entries(input) : null;
46
- return /*#__PURE__*/_jsxs("div", {
47
- "data-slot": "tool-inputs",
48
- className: "flex flex-col gap-2",
49
- children: [entries && !showRaw && /*#__PURE__*/_jsxs("dl", {
51
+ let entries;
52
+ let t2;
53
+ let t3;
54
+ let t4;
55
+ if ($[0] !== input || $[1] !== muted || $[2] !== showRaw) {
56
+ entries = isPlainRecord(input) ? Object.entries(input) : null;
57
+ t2 = "tool-inputs";
58
+ t3 = "flex flex-col gap-2";
59
+ t4 = entries && !showRaw && /*#__PURE__*/_jsxs("dl", {
50
60
  className: cn("-mx-5 flex flex-col divide-y border-y text-sm", muted && "text-muted-foreground"),
51
- children: [entries.map(([key, value]) => /*#__PURE__*/_jsxs("div", {
52
- className: "grid grid-cols-[minmax(0,8.5rem)_minmax(0,1fr)] items-baseline gap-3 px-5 py-2.5",
53
- children: [/*#__PURE__*/_jsx("dt", {
54
- className: "text-xs text-muted-foreground",
55
- children: humanizeKey(key)
56
- }), /*#__PURE__*/_jsx("dd", {
57
- className: "font-mono text-sm break-words",
58
- children: readableValue(value)
59
- })]
60
- }, key)), entries.length === 0 && /*#__PURE__*/_jsx("div", {
61
+ children: [entries.map(_temp), entries.length === 0 && /*#__PURE__*/_jsx("div", {
61
62
  className: "px-5 py-2.5 text-xs text-muted-foreground",
62
63
  children: "No inputs."
63
64
  })]
64
- }), (showRaw || !entries) && /*#__PURE__*/_jsx("pre", {
65
+ });
66
+ $[0] = input;
67
+ $[1] = muted;
68
+ $[2] = showRaw;
69
+ $[3] = entries;
70
+ $[4] = t2;
71
+ $[5] = t3;
72
+ $[6] = t4;
73
+ } else {
74
+ entries = $[3];
75
+ t2 = $[4];
76
+ t3 = $[5];
77
+ t4 = $[6];
78
+ }
79
+ let t5;
80
+ if ($[7] !== entries || $[8] !== input || $[9] !== rawId || $[10] !== showRaw) {
81
+ t5 = (showRaw || !entries) && /*#__PURE__*/_jsx("pre", {
65
82
  id: rawId,
66
83
  className: "overflow-x-auto bg-muted/40 p-3 font-mono text-xs",
67
84
  children: rawJson(input)
68
- }), entries && /*#__PURE__*/_jsx("button", {
85
+ });
86
+ $[7] = entries;
87
+ $[8] = input;
88
+ $[9] = rawId;
89
+ $[10] = showRaw;
90
+ $[11] = t5;
91
+ } else {
92
+ t5 = $[11];
93
+ }
94
+ let t6;
95
+ if ($[12] !== entries || $[13] !== rawId || $[14] !== showRaw) {
96
+ t6 = entries && /*#__PURE__*/_jsx("button", {
69
97
  type: "button",
70
- className: "eyebrow self-start outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/70 motion-safe:transition-colors",
98
+ className: "locus-eyebrow self-start outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/70 motion-safe:transition-colors",
71
99
  "aria-expanded": showRaw,
72
100
  "aria-controls": showRaw ? rawId : undefined,
73
- onClick: () => setShowRaw(current => !current),
101
+ onClick: () => setShowRaw(_temp2),
74
102
  children: showRaw ? "Show fields" : "Show raw"
103
+ });
104
+ $[12] = entries;
105
+ $[13] = rawId;
106
+ $[14] = showRaw;
107
+ $[15] = t6;
108
+ } else {
109
+ t6 = $[15];
110
+ }
111
+ let t7;
112
+ if ($[16] !== t2 || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== t6) {
113
+ t7 = /*#__PURE__*/_jsxs("div", {
114
+ "data-slot": t2,
115
+ className: t3,
116
+ children: [t4, t5, t6]
117
+ });
118
+ $[16] = t2;
119
+ $[17] = t3;
120
+ $[18] = t4;
121
+ $[19] = t5;
122
+ $[20] = t6;
123
+ $[21] = t7;
124
+ } else {
125
+ t7 = $[21];
126
+ }
127
+ return t7;
128
+ }
129
+ function _temp2(current) {
130
+ return !current;
131
+ }
132
+ function _temp(t0) {
133
+ const [key, value] = t0;
134
+ return /*#__PURE__*/_jsxs("div", {
135
+ className: "grid grid-cols-[minmax(0,8.5rem)_minmax(0,1fr)] items-baseline gap-3 px-5 py-2.5",
136
+ children: [/*#__PURE__*/_jsx("dt", {
137
+ className: "text-xs text-muted-foreground",
138
+ children: humanizeKey(key)
139
+ }), /*#__PURE__*/_jsx("dd", {
140
+ className: "font-mono text-sm break-words",
141
+ children: readableValue(value)
75
142
  })]
76
- });
143
+ }, key);
77
144
  }