@locusgraph/loop 0.3.1 → 0.4.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 (119) hide show
  1. package/dist/agent/index.d.ts +1 -1
  2. package/dist/agent/pulse/gradient-label.js +6 -5
  3. package/dist/agent/pulse/marks/bars-mark.js +1 -1
  4. package/dist/agent/pulse/marks/glyph-mark.js +2 -2
  5. package/dist/agent/pulse/marks/locus-mark.js +1 -1
  6. package/dist/agent/pulse/pulse.js +1 -1
  7. package/dist/agent/pulse/use-loop-animation.d.ts +0 -1
  8. package/dist/agent/pulse/use-loop-animation.js +1 -3
  9. package/dist/agent/steps/step-icon.js +20 -13
  10. package/dist/agent/steps/steps.js +39 -37
  11. package/dist/agent/thinking/thinking.js +65 -62
  12. package/dist/agent/tool/json-block.js +10 -7
  13. package/dist/agent/tool/tool-status.d.ts +2 -0
  14. package/dist/agent/tool/tool-status.js +16 -13
  15. package/dist/agent/tool/tool.d.ts +8 -1
  16. package/dist/agent/tool/tool.js +238 -119
  17. package/dist/approval/inbox/inbox-row.d.ts +3 -3
  18. package/dist/approval/inbox/inbox-row.js +135 -200
  19. package/dist/approval/inbox/inbox.d.ts +3 -3
  20. package/dist/approval/inbox/inbox.js +180 -139
  21. package/dist/approval/inbox/virtual-inbox-list.d.ts +3 -3
  22. package/dist/approval/inbox/virtual-inbox-list.js +20 -21
  23. package/dist/approval/memory/memory-review.js +155 -154
  24. package/dist/approval/memory/memory-row.js +86 -87
  25. package/dist/approval/plan/plan-review.js +110 -129
  26. package/dist/approval/plan/plan-step-row.js +7 -6
  27. package/dist/approval/plan/plan-steps.d.ts +1 -1
  28. package/dist/approval/plan/plan-steps.js +2 -2
  29. package/dist/approval/plan/question-choices.js +10 -7
  30. package/dist/approval/plan/question.js +116 -112
  31. package/dist/approval/run/run-bar.js +43 -40
  32. package/dist/approval/shared/approval-line.d.ts +27 -0
  33. package/dist/approval/shared/approval-line.js +85 -0
  34. package/dist/approval/shared/risk-badge.d.ts +3 -5
  35. package/dist/approval/shared/risk-badge.js +11 -19
  36. package/dist/approval/shared/time.d.ts +0 -1
  37. package/dist/approval/shared/time.js +0 -1
  38. package/dist/approval/shared/use-focus-when-settled.d.ts +2 -0
  39. package/dist/approval/shared/use-focus-when-settled.js +18 -0
  40. package/dist/approval/spend/raise-cap-form.d.ts +2 -2
  41. package/dist/approval/spend/raise-cap-form.js +134 -126
  42. package/dist/approval/spend/spend-gate.js +133 -156
  43. package/dist/approval/spend/spend-math.d.ts +1 -0
  44. package/dist/approval/spend/spend-math.js +5 -2
  45. package/dist/approval/spend/spend-meter.js +5 -5
  46. package/dist/approval/tool/approval.js +114 -214
  47. package/dist/approval/tool/args/args-editor.js +147 -156
  48. package/dist/approval/tool/args/args-field.js +197 -109
  49. package/dist/approval/tool/deny-form.js +59 -66
  50. package/dist/approval/tool/tool-inputs.js +38 -45
  51. package/dist/chat/chat/chat.js +5 -4
  52. package/dist/chat/chat/use-stick-to-bottom.js +1 -3
  53. package/dist/chat/composer/composer-actions.js +4 -1
  54. package/dist/chat/composer/composer.js +4 -3
  55. package/dist/chat/composer/use-auto-grow.js +14 -10
  56. package/dist/chat/files/files.js +12 -10
  57. package/dist/chat/reply/fenced-code.js +1 -1
  58. package/dist/chat/reply/markdown-components.js +9 -116
  59. package/dist/chat/reply/reply.js +2 -2
  60. package/dist/chat/turn/group-parts.d.ts +1 -0
  61. package/dist/chat/turn/group-parts.js +6 -3
  62. package/dist/chat/turn/turn.js +13 -4
  63. package/dist/cost/context.js +3 -3
  64. package/dist/cost/cost-steps.js +31 -30
  65. package/dist/cost/cost.js +39 -39
  66. package/dist/cost/model-picker.js +5 -4
  67. package/dist/cost/shared/context-breakdown.js +10 -11
  68. package/dist/cost/shared/model-option-row.js +4 -3
  69. package/dist/cost/shared/step-cost-row.js +11 -12
  70. package/dist/cost/shared/usage-totals.d.ts +1 -0
  71. package/dist/cost/shared/usage-totals.js +19 -1
  72. package/dist/memory/cite.js +55 -47
  73. package/dist/memory/memorized.js +123 -108
  74. package/dist/memory/recall.js +136 -146
  75. package/dist/memory/shared/host-label.d.ts +1 -1
  76. package/dist/memory/shared/host-label.js +2 -2
  77. package/dist/memory/shared/source-mark.js +1 -1
  78. package/dist/memory/sources.d.ts +2 -1
  79. package/dist/memory/sources.js +135 -100
  80. package/dist/shared/decision-summary.js +2 -1
  81. package/dist/shared/line.d.ts +10 -0
  82. package/dist/shared/line.js +11 -0
  83. package/dist/shared/live-status.d.ts +3 -0
  84. package/dist/shared/live-status.js +11 -0
  85. package/dist/shared/reduced-motion.d.ts +1 -0
  86. package/dist/shared/reduced-motion.js +3 -0
  87. package/dist/thread/actions/action-button.js +1 -1
  88. package/dist/thread/actions/actions.d.ts +3 -1
  89. package/dist/thread/actions/actions.js +100 -81
  90. package/dist/thread/actions/branch-switcher.js +67 -37
  91. package/dist/thread/canvas/canvas-meta.d.ts +9 -0
  92. package/dist/thread/canvas/canvas-meta.js +35 -0
  93. package/dist/thread/canvas/canvas.d.ts +1 -1
  94. package/dist/thread/canvas/canvas.js +64 -74
  95. package/dist/thread/canvas/version-switcher.d.ts +1 -0
  96. package/dist/thread/canvas/version-switcher.js +106 -87
  97. package/dist/thread/code/code.js +4 -6
  98. package/dist/thread/code/copy-code-button.d.ts +2 -1
  99. package/dist/thread/code/copy-code-button.js +56 -25
  100. package/dist/thread/history/history.d.ts +1 -1
  101. package/dist/thread/history/history.js +104 -104
  102. package/dist/thread/history/row/history-row.js +8 -5
  103. package/dist/thread/history/row/thread-item-menu.js +13 -4
  104. package/dist/thread/history/row/thread-title-editor.js +1 -1
  105. package/dist/thread/history/virtual-history-list.js +1 -2
  106. package/dist/thread/index.d.ts +1 -0
  107. package/dist/thread/index.js +1 -0
  108. package/dist/thread/starters/starters.js +5 -4
  109. package/package.json +6 -6
  110. package/dist/agent/shared/status-dot.d.ts +0 -1
  111. package/dist/agent/shared/status-dot.js +0 -1
  112. package/dist/approval/shared/decision-line.d.ts +0 -1
  113. package/dist/approval/shared/decision-line.js +0 -1
  114. package/dist/memory/shared/disclosure.d.ts +0 -6
  115. package/dist/memory/shared/disclosure.js +0 -6
  116. package/dist/shared/panel.d.ts +0 -19
  117. package/dist/shared/panel.js +0 -77
  118. package/dist/shared/status-dot.d.ts +0 -6
  119. package/dist/shared/status-dot.js +0 -20
@@ -1,131 +1,172 @@
1
1
  "use client";
2
2
 
3
3
  import { c as _c } from "react/compiler-runtime";
4
- import { MailAll as InboxIcon } from "@carbon/icons-react";
5
- import { Button, Checkbox, Label } from "@locusgraph/components";
4
+ import { Button, Checkbox, cn, Label } from "@locusgraph/components";
6
5
  import { pluralize } from "@locusgraph/utils";
6
+ import { Tray as InboxIcon } from "@phosphor-icons/react/ssr";
7
7
  import { useId, useState } from "react";
8
- import { ApprovalPanel, LiveStatus, PanelFooter, PanelHeader, PanelTitle } from "../../shared/panel.js";
8
+ import { lineIconClass } from "../../shared/line.js";
9
+ import { LiveStatus } from "../../shared/live-status.js";
9
10
  import { PanelEmpty } from "../../shared/panel-empty.js";
10
11
  import { shouldVirtualize } from "../../shared/virtual/use-list-virtualizer.js";
11
12
  import { InboxRow } from "./inbox-row.js";
12
13
  import { bulkApprovable, selectAllState, selectedIn, toggled } from "./inbox-selection.js";
13
14
  import { VirtualInboxList } from "./virtual-inbox-list.js";
14
15
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
16
+ const oneAtATimeNote = "Destructive requests are approved one at a time.";
15
17
  export function Inbox(t0) {
16
- const $ = _c(53);
18
+ const $ = _c(58);
17
19
  const {
18
20
  items,
19
21
  now: t1,
20
22
  title: t2,
21
- onApprove,
22
- onDeny,
23
+ openId: t3,
24
+ onOpen,
23
25
  onApproveAll,
24
- virtualize: t3,
26
+ virtualize: t4,
25
27
  className
26
28
  } = t0;
27
- let t4;
29
+ let t5;
28
30
  if ($[0] !== t1) {
29
- t4 = t1 === undefined ? Date.now() : t1;
31
+ t5 = t1 === undefined ? Date.now() : t1;
30
32
  $[0] = t1;
31
- $[1] = t4;
33
+ $[1] = t5;
32
34
  } else {
33
- t4 = $[1];
35
+ t5 = $[1];
34
36
  }
35
- const now = t4;
37
+ const now = t5;
36
38
  const title = t2 === undefined ? "Waiting for approval" : t2;
37
- const virtualize = t3 === undefined ? true : t3;
39
+ const openId = t3 === undefined ? null : t3;
40
+ const virtualize = t4 === undefined ? true : t4;
38
41
  const selectAllId = useId();
39
42
  const [selected, setSelected] = useState(_temp);
40
43
  let selectable;
41
44
  let selectedIds;
42
- let t5;
45
+ let t6;
43
46
  if ($[2] !== items || $[3] !== selected) {
44
47
  selectable = bulkApprovable(items);
45
48
  selectedIds = selectedIn(items, selected);
46
- t5 = selectAllState(selectable.length, selectedIds.length);
49
+ t6 = selectAllState(selectable.length, selectedIds.length);
47
50
  $[2] = items;
48
51
  $[3] = selected;
49
52
  $[4] = selectable;
50
53
  $[5] = selectedIds;
51
- $[6] = t5;
54
+ $[6] = t6;
52
55
  } else {
53
56
  selectable = $[4];
54
57
  selectedIds = $[5];
55
- t5 = $[6];
58
+ t6 = $[6];
56
59
  }
57
- const allState = t5;
60
+ const allState = t6;
58
61
  const hasDestructive = selectable.length < items.length;
59
62
  const empty = items.length === 0;
60
- let t6;
63
+ let t7;
61
64
  if ($[7] !== selected) {
62
- t6 = id => selected.has(id);
65
+ t7 = id => selected.has(id);
63
66
  $[7] = selected;
64
- $[8] = t6;
67
+ $[8] = t7;
65
68
  } else {
66
- t6 = $[8];
69
+ t7 = $[8];
67
70
  }
68
- let t7;
71
+ let t8;
69
72
  if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
70
- t7 = (id_0, on) => setSelected(current => toggled(current, id_0, on));
71
- $[9] = t7;
73
+ t8 = (id_0, on) => setSelected(current => toggled(current, id_0, on));
74
+ $[9] = t8;
72
75
  } else {
73
- t7 = $[9];
76
+ t8 = $[9];
77
+ }
78
+ let t9;
79
+ if ($[10] !== openId) {
80
+ t9 = id_1 => id_1 === openId;
81
+ $[10] = openId;
82
+ $[11] = t9;
83
+ } else {
84
+ t9 = $[11];
74
85
  }
75
- let T0;
76
86
  let t10;
77
87
  let t11;
78
88
  let t12;
79
89
  let t13;
80
- let t8;
81
- let t9;
82
- if ($[10] !== allState || $[11] !== className || $[12] !== empty || $[13] !== hasDestructive || $[14] !== items || $[15] !== now || $[16] !== onApprove || $[17] !== onApproveAll || $[18] !== onDeny || $[19] !== selectAllId || $[20] !== selectable || $[21] !== selectedIds || $[22] !== t6 || $[23] !== title || $[24] !== virtualize) {
90
+ let t14;
91
+ if ($[12] !== allState || $[13] !== className || $[14] !== empty || $[15] !== hasDestructive || $[16] !== items || $[17] !== now || $[18] !== onApproveAll || $[19] !== onOpen || $[20] !== selectAllId || $[21] !== selectable || $[22] !== selectedIds || $[23] !== t7 || $[24] !== t9 || $[25] !== title || $[26] !== virtualize) {
83
92
  const rowHandlers = {
84
- isSelected: t6,
85
- onSelect: t7,
86
- onApprove,
87
- onDeny
93
+ isSelected: t7,
94
+ onSelect: t8,
95
+ isOpen: t9,
96
+ onOpen
88
97
  };
89
- T0 = ApprovalPanel;
90
- t8 = "inbox";
91
- t9 = title;
92
- t10 = className;
93
- let t14;
94
- if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
95
- t14 = /*#__PURE__*/_jsx(InboxIcon, {
96
- "aria-hidden": true
97
- });
98
- $[32] = t14;
98
+ t10 = "inbox";
99
+ t11 = title;
100
+ if ($[32] !== className) {
101
+ t12 = cn("flex min-w-0 flex-col gap-2", className);
102
+ $[32] = className;
103
+ $[33] = t12;
99
104
  } else {
100
- t14 = $[32];
105
+ t12 = $[33];
101
106
  }
102
- const t15 = empty ? "All clear" : `${items.length} waiting`;
103
- const t16 = empty ? "done" : "waiting";
104
- if ($[33] !== t15 || $[34] !== t16) {
105
- t11 = /*#__PURE__*/_jsx(PanelHeader, {
106
- icon: t14,
107
- eyebrow: "Approvals",
108
- status: t15,
109
- tone: t16
107
+ let t15;
108
+ if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
109
+ t15 = /*#__PURE__*/_jsx("span", {
110
+ "aria-hidden": true,
111
+ className: lineIconClass,
112
+ children: /*#__PURE__*/_jsx(InboxIcon, {
113
+ weight: "bold",
114
+ "aria-hidden": true
115
+ })
110
116
  });
111
- $[33] = t15;
112
- $[34] = t16;
113
- $[35] = t11;
117
+ $[34] = t15;
114
118
  } else {
115
- t11 = $[35];
119
+ t15 = $[34];
116
120
  }
117
- if ($[36] !== title) {
118
- t12 = /*#__PURE__*/_jsx(PanelTitle, {
121
+ let t16;
122
+ if ($[35] !== title) {
123
+ t16 = /*#__PURE__*/_jsx("h3", {
124
+ className: "min-w-0 truncate font-sans font-medium text-foreground",
119
125
  children: title
120
126
  });
121
- $[36] = title;
122
- $[37] = t12;
127
+ $[35] = title;
128
+ $[36] = t16;
123
129
  } else {
124
- t12 = $[37];
130
+ t16 = $[36];
125
131
  }
126
- t13 = empty ? /*#__PURE__*/_jsx(PanelEmpty, {
132
+ const t17 = empty ? "text-good" : "font-medium text-warn";
133
+ let t18;
134
+ if ($[37] !== t17) {
135
+ t18 = cn("ml-auto shrink-0 text-xs", t17);
136
+ $[37] = t17;
137
+ $[38] = t18;
138
+ } else {
139
+ t18 = $[38];
140
+ }
141
+ const t19 = empty ? "All clear" : `${items.length} waiting`;
142
+ let t20;
143
+ if ($[39] !== t18 || $[40] !== t19) {
144
+ t20 = /*#__PURE__*/_jsx("span", {
145
+ "data-slot": "inbox-count",
146
+ className: t18,
147
+ children: t19
148
+ });
149
+ $[39] = t18;
150
+ $[40] = t19;
151
+ $[41] = t20;
152
+ } else {
153
+ t20 = $[41];
154
+ }
155
+ if ($[42] !== t16 || $[43] !== t20) {
156
+ t13 = /*#__PURE__*/_jsxs("header", {
157
+ className: "flex items-center gap-2 px-2 text-sm",
158
+ children: [t15, t16, t20]
159
+ });
160
+ $[42] = t16;
161
+ $[43] = t20;
162
+ $[44] = t13;
163
+ } else {
164
+ t13 = $[44];
165
+ }
166
+ t14 = empty ? /*#__PURE__*/_jsx(PanelEmpty, {
127
167
  "data-slot": "inbox-empty",
128
168
  icon: /*#__PURE__*/_jsx(InboxIcon, {
169
+ weight: "bold",
129
170
  "aria-hidden": true
130
171
  }),
131
172
  title: "Nothing waiting for you",
@@ -136,35 +177,41 @@ export function Inbox(t0) {
136
177
  now: now,
137
178
  ...rowHandlers
138
179
  }) : /*#__PURE__*/_jsx("ul", {
139
- className: "mt-4 flex flex-col divide-y border-t",
180
+ className: "flex flex-col",
140
181
  children: items.map(item => /*#__PURE__*/_jsx(InboxRow, {
141
182
  item: item,
142
183
  now: now,
143
184
  selected: rowHandlers.isSelected(item.id),
144
185
  onSelect: on_0 => rowHandlers.onSelect(item.id, on_0),
145
- onApprove: () => onApprove(item.id),
146
- onDeny: () => onDeny(item.id)
186
+ open: rowHandlers.isOpen(item.id),
187
+ onOpen: () => onOpen(item.id)
147
188
  }, item.id))
148
- }), /*#__PURE__*/_jsxs(PanelFooter, {
149
- className: "justify-between gap-3",
189
+ }), selectable.length === 0 ? /*#__PURE__*/_jsx("p", {
190
+ className: "px-2 pt-2 text-xs text-faint",
191
+ children: oneAtATimeNote
192
+ }) : /*#__PURE__*/_jsxs("div", {
193
+ className: "flex flex-wrap items-center gap-x-6 gap-y-3 px-2 pt-2",
150
194
  children: [/*#__PURE__*/_jsxs("span", {
151
- className: "flex min-w-0 items-center gap-3",
152
- children: [selectable.length > 0 && /*#__PURE__*/_jsx(Checkbox, {
195
+ className: "flex min-w-0 items-start gap-3",
196
+ children: [/*#__PURE__*/_jsx(Checkbox, {
153
197
  id: selectAllId,
198
+ className: "mt-0.5",
154
199
  checked: allState,
200
+ "aria-describedby": hasDestructive ? `${selectAllId}-note` : undefined,
155
201
  onCheckedChange: checked => setSelected(checked === true ? new Set(selectable.map(_temp2)) : new Set())
156
- }), /*#__PURE__*/_jsxs(Label, {
157
- htmlFor: selectAllId,
158
- className: "flex min-w-0 flex-col items-start gap-0 font-normal",
159
- children: [/*#__PURE__*/_jsxs("span", {
160
- className: "text-sm tabular-nums",
202
+ }), /*#__PURE__*/_jsxs("span", {
203
+ className: "flex min-w-0 flex-col items-start",
204
+ children: [/*#__PURE__*/_jsxs(Label, {
205
+ htmlFor: selectAllId,
206
+ className: "text-sm font-normal tabular-nums",
161
207
  children: [/*#__PURE__*/_jsx("span", {
162
208
  className: "sr-only",
163
209
  children: "Select all that can be approved together. "
164
210
  }), selectedIds.length > 0 ? `${selectedIds.length} selected` : "Select all"]
165
211
  }), hasDestructive && /*#__PURE__*/_jsx("span", {
166
- className: "text-xs text-muted-foreground",
167
- children: "Destructive requests are approved one at a time."
212
+ id: `${selectAllId}-note`,
213
+ className: "text-xs text-faint",
214
+ children: oneAtATimeNote
168
215
  })]
169
216
  })]
170
217
  }), /*#__PURE__*/_jsx(Button, {
@@ -179,78 +226,72 @@ export function Inbox(t0) {
179
226
  })]
180
227
  })]
181
228
  });
182
- $[10] = allState;
183
- $[11] = className;
184
- $[12] = empty;
185
- $[13] = hasDestructive;
186
- $[14] = items;
187
- $[15] = now;
188
- $[16] = onApprove;
189
- $[17] = onApproveAll;
190
- $[18] = onDeny;
191
- $[19] = selectAllId;
192
- $[20] = selectable;
193
- $[21] = selectedIds;
194
- $[22] = t6;
195
- $[23] = title;
196
- $[24] = virtualize;
197
- $[25] = T0;
198
- $[26] = t10;
199
- $[27] = t11;
200
- $[28] = t12;
201
- $[29] = t13;
202
- $[30] = t8;
203
- $[31] = t9;
229
+ $[12] = allState;
230
+ $[13] = className;
231
+ $[14] = empty;
232
+ $[15] = hasDestructive;
233
+ $[16] = items;
234
+ $[17] = now;
235
+ $[18] = onApproveAll;
236
+ $[19] = onOpen;
237
+ $[20] = selectAllId;
238
+ $[21] = selectable;
239
+ $[22] = selectedIds;
240
+ $[23] = t7;
241
+ $[24] = t9;
242
+ $[25] = title;
243
+ $[26] = virtualize;
244
+ $[27] = t10;
245
+ $[28] = t11;
246
+ $[29] = t12;
247
+ $[30] = t13;
248
+ $[31] = t14;
204
249
  } else {
205
- T0 = $[25];
206
- t10 = $[26];
207
- t11 = $[27];
208
- t12 = $[28];
209
- t13 = $[29];
210
- t8 = $[30];
211
- t9 = $[31];
212
- }
213
- let t14;
214
- if ($[38] !== empty || $[39] !== items.length || $[40] !== selectedIds) {
215
- t14 = empty ? "No approvals waiting" : `${pluralize(items.length, "approval")} waiting, ${selectedIds.length} selected`;
216
- $[38] = empty;
217
- $[39] = items.length;
218
- $[40] = selectedIds;
219
- $[41] = t14;
220
- } else {
221
- t14 = $[41];
250
+ t10 = $[27];
251
+ t11 = $[28];
252
+ t12 = $[29];
253
+ t13 = $[30];
254
+ t14 = $[31];
222
255
  }
223
256
  let t15;
224
- if ($[42] !== t14) {
225
- t15 = /*#__PURE__*/_jsx(LiveStatus, {
226
- message: t14
227
- });
228
- $[42] = t14;
229
- $[43] = t15;
257
+ if ($[45] !== empty || $[46] !== items.length || $[47] !== selectedIds) {
258
+ t15 = empty ? "No approvals waiting" : `${pluralize(items.length, "approval")} waiting, ${selectedIds.length} selected`;
259
+ $[45] = empty;
260
+ $[46] = items.length;
261
+ $[47] = selectedIds;
262
+ $[48] = t15;
230
263
  } else {
231
- t15 = $[43];
264
+ t15 = $[48];
232
265
  }
233
266
  let t16;
234
- if ($[44] !== T0 || $[45] !== t10 || $[46] !== t11 || $[47] !== t12 || $[48] !== t13 || $[49] !== t15 || $[50] !== t8 || $[51] !== t9) {
235
- t16 = /*#__PURE__*/_jsxs(T0, {
236
- "data-slot": t8,
237
- "aria-label": t9,
238
- className: t10,
239
- children: [t11, t12, t13, t15]
267
+ if ($[49] !== t15) {
268
+ t16 = /*#__PURE__*/_jsx(LiveStatus, {
269
+ message: t15
240
270
  });
241
- $[44] = T0;
242
- $[45] = t10;
243
- $[46] = t11;
244
- $[47] = t12;
245
- $[48] = t13;
246
271
  $[49] = t15;
247
- $[50] = t8;
248
- $[51] = t9;
249
- $[52] = t16;
272
+ $[50] = t16;
273
+ } else {
274
+ t16 = $[50];
275
+ }
276
+ let t17;
277
+ if ($[51] !== t10 || $[52] !== t11 || $[53] !== t12 || $[54] !== t13 || $[55] !== t14 || $[56] !== t16) {
278
+ t17 = /*#__PURE__*/_jsxs("section", {
279
+ "data-slot": t10,
280
+ "aria-label": t11,
281
+ className: t12,
282
+ children: [t13, t14, t16]
283
+ });
284
+ $[51] = t10;
285
+ $[52] = t11;
286
+ $[53] = t12;
287
+ $[54] = t13;
288
+ $[55] = t14;
289
+ $[56] = t16;
290
+ $[57] = t17;
250
291
  } else {
251
- t16 = $[52];
292
+ t17 = $[57];
252
293
  }
253
- return t16;
294
+ return t17;
254
295
  }
255
296
  function _temp2(item_0) {
256
297
  return item_0.id;
@@ -2,12 +2,12 @@ import type { PendingApproval } from "../types.js";
2
2
  export type InboxRowHandlers = {
3
3
  isSelected: (id: string) => boolean;
4
4
  onSelect: (id: string, selected: boolean) => void;
5
- onApprove: (id: string) => void;
6
- onDeny: (id: string) => void;
5
+ isOpen: (id: string) => boolean;
6
+ onOpen: (id: string) => void;
7
7
  };
8
8
  type VirtualInboxListProps = InboxRowHandlers & {
9
9
  items: PendingApproval[];
10
10
  now: number;
11
11
  };
12
- export declare function VirtualInboxList({ items, now, isSelected, onSelect, onApprove, onDeny, }: VirtualInboxListProps): import("react").JSX.Element;
12
+ export declare function VirtualInboxList({ items, now, isSelected, onSelect, isOpen, onOpen, }: VirtualInboxListProps): import("react").JSX.Element;
13
13
  export {};
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
 
3
3
  import { c as _c } from "react/compiler-runtime";
4
- import { cn } from "@locusgraph/components";
5
4
  import { useRef } from "react";
6
5
  import { rowOffsetStyle, useListVirtualizer, virtualRowClassName } from "../../shared/virtual/use-list-virtualizer.js";
7
6
  import { InboxRow } from "./inbox-row.js";
@@ -14,8 +13,8 @@ export function VirtualInboxList(t0) {
14
13
  now,
15
14
  isSelected,
16
15
  onSelect,
17
- onApprove,
18
- onDeny
16
+ isOpen,
17
+ onOpen
19
18
  } = t0;
20
19
  const scrollRef = useRef(null);
21
20
  let t1;
@@ -63,43 +62,43 @@ export function VirtualInboxList(t0) {
63
62
  t4 = $[7];
64
63
  }
65
64
  let t5;
66
- if ($[8] !== isSelected || $[9] !== itemProps || $[10] !== items || $[11] !== now || $[12] !== onApprove || $[13] !== onDeny || $[14] !== onSelect || $[15] !== rows) {
65
+ if ($[8] !== isOpen || $[9] !== isSelected || $[10] !== itemProps || $[11] !== items || $[12] !== now || $[13] !== onOpen || $[14] !== onSelect || $[15] !== rows) {
67
66
  let t6;
68
- if ($[17] !== isSelected || $[18] !== itemProps || $[19] !== items || $[20] !== now || $[21] !== onApprove || $[22] !== onDeny || $[23] !== onSelect) {
67
+ if ($[17] !== isOpen || $[18] !== isSelected || $[19] !== itemProps || $[20] !== items || $[21] !== now || $[22] !== onOpen || $[23] !== onSelect) {
69
68
  t6 = row => {
70
69
  const item = items[row.index];
71
70
  return /*#__PURE__*/_jsx(InboxRow, {
72
71
  ...itemProps(row.index),
73
72
  "aria-posinset": row.index + 1,
74
73
  "aria-setsize": items.length,
75
- className: cn(virtualRowClassName, "border-b"),
74
+ className: virtualRowClassName,
76
75
  style: rowOffsetStyle(row.start),
77
76
  item: item,
78
77
  now: now,
79
78
  selected: isSelected(item.id),
80
79
  onSelect: on => onSelect(item.id, on),
81
- onApprove: () => onApprove(item.id),
82
- onDeny: () => onDeny(item.id)
80
+ open: isOpen(item.id),
81
+ onOpen: () => onOpen(item.id)
83
82
  }, row.key);
84
83
  };
85
- $[17] = isSelected;
86
- $[18] = itemProps;
87
- $[19] = items;
88
- $[20] = now;
89
- $[21] = onApprove;
90
- $[22] = onDeny;
84
+ $[17] = isOpen;
85
+ $[18] = isSelected;
86
+ $[19] = itemProps;
87
+ $[20] = items;
88
+ $[21] = now;
89
+ $[22] = onOpen;
91
90
  $[23] = onSelect;
92
91
  $[24] = t6;
93
92
  } else {
94
93
  t6 = $[24];
95
94
  }
96
95
  t5 = rows.map(t6);
97
- $[8] = isSelected;
98
- $[9] = itemProps;
99
- $[10] = items;
100
- $[11] = now;
101
- $[12] = onApprove;
102
- $[13] = onDeny;
96
+ $[8] = isOpen;
97
+ $[9] = isSelected;
98
+ $[10] = itemProps;
99
+ $[11] = items;
100
+ $[12] = now;
101
+ $[13] = onOpen;
103
102
  $[14] = onSelect;
104
103
  $[15] = rows;
105
104
  $[16] = t5;
@@ -111,7 +110,7 @@ export function VirtualInboxList(t0) {
111
110
  t6 = /*#__PURE__*/_jsx("div", {
112
111
  ref: scrollRef,
113
112
  "data-slot": "inbox-scroll",
114
- className: "mt-4 max-h-[min(36rem,70vh)] overflow-y-auto overscroll-contain border-t",
113
+ className: "max-h-[min(36rem,70vh)] overflow-y-auto overscroll-contain",
115
114
  children: /*#__PURE__*/_jsx("ul", {
116
115
  className: "relative",
117
116
  style: t4,