@locusgraph/loop 0.1.0 → 0.2.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 (115) hide show
  1. package/README.md +2 -0
  2. package/dist/agent/pulse/gradient-label.js +86 -15
  3. package/dist/agent/pulse/marks/bars-mark.js +46 -10
  4. package/dist/agent/pulse/marks/glyph-mark.js +56 -11
  5. package/dist/agent/pulse/marks/locus-mark.js +63 -28
  6. package/dist/agent/pulse/marks/orb-mark.js +31 -8
  7. package/dist/agent/pulse/marks/spinner-mark.js +29 -1
  8. package/dist/agent/pulse/pulse.js +150 -35
  9. package/dist/agent/pulse/use-loop-animation.js +36 -17
  10. package/dist/agent/steps/step-icon.js +110 -24
  11. package/dist/agent/steps/steps.js +235 -25
  12. package/dist/agent/thinking/thinking.js +203 -23
  13. package/dist/agent/thinking/thought-duration.js +7 -9
  14. package/dist/agent/tool/json-block.js +38 -11
  15. package/dist/agent/tool/tool-status.js +51 -18
  16. package/dist/agent/tool/tool.js +184 -6
  17. package/dist/approval/inbox/inbox-row.d.ts +3 -2
  18. package/dist/approval/inbox/inbox-row.js +321 -7
  19. package/dist/approval/inbox/inbox-selection.js +7 -13
  20. package/dist/approval/inbox/inbox.d.ts +2 -1
  21. package/dist/approval/inbox/inbox.js +250 -18
  22. package/dist/approval/inbox/virtual-inbox-list.d.ts +13 -0
  23. package/dist/approval/inbox/virtual-inbox-list.js +129 -0
  24. package/dist/approval/memory/memory-choices.js +27 -22
  25. package/dist/approval/memory/memory-review.js +242 -17
  26. package/dist/approval/memory/memory-row.js +215 -19
  27. package/dist/approval/plan/plan-review.js +279 -28
  28. package/dist/approval/plan/plan-step-row.js +194 -43
  29. package/dist/approval/plan/plan-steps.js +24 -23
  30. package/dist/approval/plan/question-choices.js +158 -39
  31. package/dist/approval/plan/question.d.ts +1 -1
  32. package/dist/approval/plan/question.js +223 -26
  33. package/dist/approval/run/run-bar.js +178 -22
  34. package/dist/approval/shared/decision-line.js +1 -1
  35. package/dist/approval/shared/risk-badge.js +47 -16
  36. package/dist/approval/shared/time.js +5 -8
  37. package/dist/approval/shared/use-focus-on-mount.js +23 -6
  38. package/dist/approval/spend/raise-cap-form.js +235 -17
  39. package/dist/approval/spend/spend-gate.js +239 -21
  40. package/dist/approval/spend/spend-math.js +7 -8
  41. package/dist/approval/spend/spend-meter.js +362 -34
  42. package/dist/approval/tool/approval.js +272 -27
  43. package/dist/approval/tool/args/args-editor.js +262 -26
  44. package/dist/approval/tool/args/args-field.js +259 -19
  45. package/dist/approval/tool/args/args-validation.js +38 -47
  46. package/dist/approval/tool/deny-form.js +130 -10
  47. package/dist/approval/tool/tool-inputs.js +127 -38
  48. package/dist/chat/chat/chat-item-spacing.d.ts +3 -0
  49. package/dist/chat/chat/chat-item-spacing.js +19 -0
  50. package/dist/chat/chat/chat.d.ts +2 -1
  51. package/dist/chat/chat/chat.js +181 -5
  52. package/dist/chat/chat/use-stick-to-bottom.js +123 -47
  53. package/dist/chat/chat/virtual-chat-items.d.ts +8 -0
  54. package/dist/chat/chat/virtual-chat-items.js +153 -0
  55. package/dist/chat/composer/composer-actions.js +151 -16
  56. package/dist/chat/composer/composer.js +330 -32
  57. package/dist/chat/composer/use-auto-grow.js +24 -9
  58. package/dist/chat/files/file-meta.js +19 -19
  59. package/dist/chat/files/files.js +316 -28
  60. package/dist/chat/reply/fenced-code.js +45 -21
  61. package/dist/chat/reply/markdown-components.js +137 -17
  62. package/dist/chat/reply/reply.js +105 -10
  63. package/dist/chat/turn/group-parts.js +43 -29
  64. package/dist/chat/turn/turn.js +238 -30
  65. package/dist/cost/context.js +321 -23
  66. package/dist/cost/cost-steps.js +220 -14
  67. package/dist/cost/cost.js +521 -27
  68. package/dist/cost/model-picker.js +181 -6
  69. package/dist/cost/shared/context-breakdown.js +299 -10
  70. package/dist/cost/shared/meter-marks.js +107 -9
  71. package/dist/cost/shared/model-option-row.js +178 -21
  72. package/dist/cost/shared/step-cost-row.js +248 -20
  73. package/dist/cost/shared/usage-totals.js +22 -18
  74. package/dist/memory/cite.js +182 -11
  75. package/dist/memory/memorized.js +217 -11
  76. package/dist/memory/recall.js +296 -17
  77. package/dist/memory/shared/host-label.js +19 -22
  78. package/dist/memory/shared/source-mark.js +39 -3
  79. package/dist/memory/sources.js +255 -13
  80. package/dist/shared/decision-summary.js +133 -14
  81. package/dist/shared/panel-empty.js +78 -3
  82. package/dist/shared/panel.js +243 -13
  83. package/dist/shared/status-dot.js +38 -8
  84. package/dist/shared/virtual/use-list-virtualizer.d.ts +24 -0
  85. package/dist/shared/virtual/use-list-virtualizer.js +68 -0
  86. package/dist/thread/actions/action-button.js +65 -3
  87. package/dist/thread/actions/actions.js +184 -13
  88. package/dist/thread/actions/branch-switcher.js +102 -5
  89. package/dist/thread/canvas/canvas.js +205 -5
  90. package/dist/thread/canvas/version-switcher.js +149 -8
  91. package/dist/thread/code/code.js +186 -24
  92. package/dist/thread/code/copy-code-button.js +61 -13
  93. package/dist/thread/code/highlight.js +30 -29
  94. package/dist/thread/history/history-rows.d.ts +16 -0
  95. package/dist/thread/history/history-rows.js +23 -0
  96. package/dist/thread/history/history.d.ts +3 -2
  97. package/dist/thread/history/history.js +174 -5
  98. package/dist/thread/history/{history-row.d.ts → row/history-row.d.ts} +3 -2
  99. package/dist/thread/history/row/history-row.js +137 -0
  100. package/dist/thread/history/row/thread-item-menu.js +84 -0
  101. package/dist/thread/history/row/thread-title-editor.js +81 -0
  102. package/dist/thread/history/thread-groups.d.ts +1 -1
  103. package/dist/thread/history/thread-groups.js +40 -34
  104. package/dist/thread/history/virtual-history-list.d.ts +11 -0
  105. package/dist/thread/history/virtual-history-list.js +107 -0
  106. package/dist/thread/index.d.ts +1 -1
  107. package/dist/thread/starters/starters.js +92 -7
  108. package/dist/thread/use-copied.js +45 -15
  109. package/dist/types.js +1 -1
  110. package/package.json +6 -4
  111. package/dist/thread/history/history-row.js +0 -17
  112. package/dist/thread/history/thread-item-menu.js +0 -6
  113. package/dist/thread/history/thread-title-editor.js +0 -25
  114. /package/dist/thread/history/{thread-item-menu.d.ts → row/thread-item-menu.d.ts} +0 -0
  115. /package/dist/thread/history/{thread-title-editor.d.ts → row/thread-title-editor.d.ts} +0 -0
@@ -1,19 +1,190 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cn, HoverCard, HoverCardContent, HoverCardTrigger } from "@locusgraph/components";
3
3
  import { hostLabel } from "./shared/host-label.js";
4
4
  import { SourceMark } from "./shared/source-mark.js";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
6
  const pillClass = "inline-flex h-4 min-w-4 items-center justify-center bg-muted px-1 font-mono text-[11px] leading-none font-medium text-foreground/80 tabular-nums no-underline ring-1 ring-border transition-colors duration-150 outline-none hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/70 motion-reduce:transition-none";
6
7
  export function citationLabel(citation) {
7
- return `Source ${citation.index}: ${citation.title}`;
8
+ return `Source ${citation.index}: ${citation.title}`;
8
9
  }
9
- export function Cite({ citation, onOpen, className }) {
10
- const host = hostLabel(citation.url);
11
- const label = citationLabel(citation);
12
- const open = (event) => {
13
- if (!onOpen)
14
- return;
15
- event.preventDefault();
16
- onOpen(citation);
10
+ export function Cite(t0) {
11
+ const $ = _c(36);
12
+ const {
13
+ citation,
14
+ onOpen,
15
+ className
16
+ } = t0;
17
+ let t1;
18
+ if ($[0] !== citation.url) {
19
+ t1 = hostLabel(citation.url);
20
+ $[0] = citation.url;
21
+ $[1] = t1;
22
+ } else {
23
+ t1 = $[1];
24
+ }
25
+ const host = t1;
26
+ let t2;
27
+ if ($[2] !== citation) {
28
+ t2 = citationLabel(citation);
29
+ $[2] = citation;
30
+ $[3] = t2;
31
+ } else {
32
+ t2 = $[3];
33
+ }
34
+ const label = t2;
35
+ let t3;
36
+ if ($[4] !== citation || $[5] !== onOpen) {
37
+ t3 = event => {
38
+ if (!onOpen) {
39
+ return;
40
+ }
41
+ event.preventDefault();
42
+ onOpen(citation);
17
43
  };
18
- return (_jsx("sup", { "data-slot": "cite", "data-index": citation.index, className: cn("relative -top-1 ml-0.5 align-baseline leading-none", className), children: _jsxs(HoverCard, { openDelay: 150, closeDelay: 100, children: [_jsx(HoverCardTrigger, { asChild: true, children: citation.url ? (_jsx("a", { href: citation.url, target: "_blank", rel: "noreferrer", "aria-label": label, onClick: open, className: pillClass, children: citation.index })) : (_jsx("button", { type: "button", "aria-label": label, onClick: open, className: pillClass, children: citation.index })) }), _jsxs(HoverCardContent, { "data-slot": "cite-card", side: "bottom", align: "start", sideOffset: 6, className: "flex w-72 flex-col gap-2 rounded-none border-0 p-4 ring-1 ring-border", children: [_jsxs("span", { className: "eyebrow flex min-w-0 items-center gap-2", children: [_jsx(SourceMark, { citation: citation }), _jsx("span", { className: "truncate", children: host ?? "Source" })] }), _jsx("span", { className: "text-sm leading-snug font-medium", children: citation.title }), citation.snippet && (_jsx("p", { className: "line-clamp-4 text-xs leading-relaxed text-muted-foreground", children: citation.snippet }))] })] }) }));
44
+ $[4] = citation;
45
+ $[5] = onOpen;
46
+ $[6] = t3;
47
+ } else {
48
+ t3 = $[6];
49
+ }
50
+ const open = t3;
51
+ const t4 = citation.index;
52
+ let t5;
53
+ if ($[7] !== className) {
54
+ t5 = cn("relative -top-1 ml-0.5 align-baseline leading-none", className);
55
+ $[7] = className;
56
+ $[8] = t5;
57
+ } else {
58
+ t5 = $[8];
59
+ }
60
+ let t6;
61
+ if ($[9] !== citation.index || $[10] !== citation.url || $[11] !== label || $[12] !== open) {
62
+ t6 = /*#__PURE__*/_jsx(HoverCardTrigger, {
63
+ asChild: true,
64
+ children: citation.url ? /*#__PURE__*/_jsx("a", {
65
+ href: citation.url,
66
+ target: "_blank",
67
+ rel: "noreferrer",
68
+ "aria-label": label,
69
+ onClick: open,
70
+ className: pillClass,
71
+ children: citation.index
72
+ }) : /*#__PURE__*/_jsx("button", {
73
+ type: "button",
74
+ "aria-label": label,
75
+ onClick: open,
76
+ className: pillClass,
77
+ children: citation.index
78
+ })
79
+ });
80
+ $[9] = citation.index;
81
+ $[10] = citation.url;
82
+ $[11] = label;
83
+ $[12] = open;
84
+ $[13] = t6;
85
+ } else {
86
+ t6 = $[13];
87
+ }
88
+ let t7;
89
+ if ($[14] !== citation) {
90
+ t7 = /*#__PURE__*/_jsx(SourceMark, {
91
+ citation: citation
92
+ });
93
+ $[14] = citation;
94
+ $[15] = t7;
95
+ } else {
96
+ t7 = $[15];
97
+ }
98
+ const t8 = host ?? "Source";
99
+ let t9;
100
+ if ($[16] !== t8) {
101
+ t9 = /*#__PURE__*/_jsx("span", {
102
+ className: "truncate",
103
+ children: t8
104
+ });
105
+ $[16] = t8;
106
+ $[17] = t9;
107
+ } else {
108
+ t9 = $[17];
109
+ }
110
+ let t10;
111
+ if ($[18] !== t7 || $[19] !== t9) {
112
+ t10 = /*#__PURE__*/_jsxs("span", {
113
+ className: "eyebrow flex min-w-0 items-center gap-2",
114
+ children: [t7, t9]
115
+ });
116
+ $[18] = t7;
117
+ $[19] = t9;
118
+ $[20] = t10;
119
+ } else {
120
+ t10 = $[20];
121
+ }
122
+ let t11;
123
+ if ($[21] !== citation.title) {
124
+ t11 = /*#__PURE__*/_jsx("span", {
125
+ className: "text-sm leading-snug font-medium",
126
+ children: citation.title
127
+ });
128
+ $[21] = citation.title;
129
+ $[22] = t11;
130
+ } else {
131
+ t11 = $[22];
132
+ }
133
+ let t12;
134
+ if ($[23] !== citation.snippet) {
135
+ t12 = citation.snippet && /*#__PURE__*/_jsx("p", {
136
+ className: "line-clamp-4 text-xs leading-relaxed text-muted-foreground",
137
+ children: citation.snippet
138
+ });
139
+ $[23] = citation.snippet;
140
+ $[24] = t12;
141
+ } else {
142
+ t12 = $[24];
143
+ }
144
+ let t13;
145
+ if ($[25] !== t10 || $[26] !== t11 || $[27] !== t12) {
146
+ t13 = /*#__PURE__*/_jsxs(HoverCardContent, {
147
+ "data-slot": "cite-card",
148
+ side: "bottom",
149
+ align: "start",
150
+ sideOffset: 6,
151
+ className: "flex w-72 flex-col gap-2 rounded-none border-0 p-4 ring-1 ring-border",
152
+ children: [t10, t11, t12]
153
+ });
154
+ $[25] = t10;
155
+ $[26] = t11;
156
+ $[27] = t12;
157
+ $[28] = t13;
158
+ } else {
159
+ t13 = $[28];
160
+ }
161
+ let t14;
162
+ if ($[29] !== t13 || $[30] !== t6) {
163
+ t14 = /*#__PURE__*/_jsxs(HoverCard, {
164
+ openDelay: 150,
165
+ closeDelay: 100,
166
+ children: [t6, t13]
167
+ });
168
+ $[29] = t13;
169
+ $[30] = t6;
170
+ $[31] = t14;
171
+ } else {
172
+ t14 = $[31];
173
+ }
174
+ let t15;
175
+ if ($[32] !== citation.index || $[33] !== t14 || $[34] !== t5) {
176
+ t15 = /*#__PURE__*/_jsx("sup", {
177
+ "data-slot": "cite",
178
+ "data-index": t4,
179
+ className: t5,
180
+ children: t14
181
+ });
182
+ $[32] = citation.index;
183
+ $[33] = t14;
184
+ $[34] = t5;
185
+ $[35] = t15;
186
+ } else {
187
+ t15 = $[35];
188
+ }
189
+ return t15;
19
190
  }
@@ -1,19 +1,225 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { BookmarkAdd as BookmarkPlusIcon, Checkmark as CheckIcon, Undo as Undo2Icon, } from "@carbon/icons-react";
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { BookmarkAdd as BookmarkPlusIcon, Checkmark as CheckIcon, Undo as Undo2Icon } from "@carbon/icons-react";
3
3
  import { Button, cn } from "@locusgraph/components";
4
4
  import { pluralize } from "@locusgraph/utils";
5
5
  import { StatusDot } from "../shared/status-dot.js";
6
6
  import { eyebrowClass, ruledListClass } from "./shared/disclosure.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
8
  export function memorizedSummary(items) {
8
- const saved = items.filter((item) => item.status === "saved").length;
9
- return `Saved ${pluralize(saved, "memory", "memories")}`;
9
+ const saved = items.filter(item => item.status === "saved").length;
10
+ return `Saved ${pluralize(saved, "memory", "memories")}`;
10
11
  }
11
- export function Memorized({ items, onUndo, className }) {
12
- if (items.length === 0)
13
- return null;
14
- return (_jsxs("section", { "data-slot": "memorized", "aria-label": "Saved to memory", className: cn("flex min-w-0 flex-col gap-2", className), children: [_jsxs("header", { "aria-live": "polite", className: cn("flex items-center gap-2 py-1", eyebrowClass), children: [_jsx(BookmarkPlusIcon, { "aria-hidden": true }), memorizedSummary(items)] }), _jsx("ul", { className: ruledListClass, children: items.map((item) => (_jsx(MemorizedRow, { item: item, onUndo: onUndo }, item.id))) })] }));
12
+ export function Memorized(t0) {
13
+ const $ = _c(19);
14
+ const {
15
+ items,
16
+ onUndo,
17
+ className
18
+ } = t0;
19
+ if (items.length === 0) {
20
+ return null;
21
+ }
22
+ let t1;
23
+ if ($[0] !== className) {
24
+ t1 = cn("flex min-w-0 flex-col gap-2", className);
25
+ $[0] = className;
26
+ $[1] = t1;
27
+ } else {
28
+ t1 = $[1];
29
+ }
30
+ let t2;
31
+ let t3;
32
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
33
+ t2 = cn("flex items-center gap-2 py-1", eyebrowClass);
34
+ t3 = /*#__PURE__*/_jsx(BookmarkPlusIcon, {
35
+ "aria-hidden": true
36
+ });
37
+ $[2] = t2;
38
+ $[3] = t3;
39
+ } else {
40
+ t2 = $[2];
41
+ t3 = $[3];
42
+ }
43
+ let t4;
44
+ if ($[4] !== items) {
45
+ t4 = memorizedSummary(items);
46
+ $[4] = items;
47
+ $[5] = t4;
48
+ } else {
49
+ t4 = $[5];
50
+ }
51
+ let t5;
52
+ if ($[6] !== t4) {
53
+ t5 = /*#__PURE__*/_jsxs("header", {
54
+ "aria-live": "polite",
55
+ className: t2,
56
+ children: [t3, t4]
57
+ });
58
+ $[6] = t4;
59
+ $[7] = t5;
60
+ } else {
61
+ t5 = $[7];
62
+ }
63
+ let t6;
64
+ if ($[8] !== items || $[9] !== onUndo) {
65
+ let t7;
66
+ if ($[11] !== onUndo) {
67
+ t7 = item => /*#__PURE__*/_jsx(MemorizedRow, {
68
+ item: item,
69
+ onUndo: onUndo
70
+ }, item.id);
71
+ $[11] = onUndo;
72
+ $[12] = t7;
73
+ } else {
74
+ t7 = $[12];
75
+ }
76
+ t6 = items.map(t7);
77
+ $[8] = items;
78
+ $[9] = onUndo;
79
+ $[10] = t6;
80
+ } else {
81
+ t6 = $[10];
82
+ }
83
+ let t7;
84
+ if ($[13] !== t6) {
85
+ t7 = /*#__PURE__*/_jsx("ul", {
86
+ className: ruledListClass,
87
+ children: t6
88
+ });
89
+ $[13] = t6;
90
+ $[14] = t7;
91
+ } else {
92
+ t7 = $[14];
93
+ }
94
+ let t8;
95
+ if ($[15] !== t1 || $[16] !== t5 || $[17] !== t7) {
96
+ t8 = /*#__PURE__*/_jsxs("section", {
97
+ "data-slot": "memorized",
98
+ "aria-label": "Saved to memory",
99
+ className: t1,
100
+ children: [t5, t7]
101
+ });
102
+ $[15] = t1;
103
+ $[16] = t5;
104
+ $[17] = t7;
105
+ $[18] = t8;
106
+ } else {
107
+ t8 = $[18];
108
+ }
109
+ return t8;
15
110
  }
16
- function MemorizedRow({ item, onUndo }) {
17
- const undone = item.status === "undone";
18
- return (_jsxs("li", { "data-slot": "memorized-item", "data-status": item.status, className: "flex min-h-11 items-center gap-3 px-3 py-2.5", children: [_jsx(CheckIcon, { "aria-hidden": true, className: cn("size-3.5 shrink-0", undone ? "text-muted-foreground/40" : "text-good") }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("span", { className: cn("text-sm font-medium", undone && "font-normal text-muted-foreground line-through decoration-muted-foreground"), children: item.text }), item.kind && _jsx("span", { className: "font-mono text-xs text-muted-foreground", children: item.kind })] }), undone ? (_jsxs("span", { className: "eyebrow flex shrink-0 items-center gap-1.5", children: [_jsx(StatusDot, { tone: "idle" }), "Undone"] })) : (onUndo && (_jsxs(Button, { variant: "ghost", size: "xs", className: "-mr-2 text-muted-foreground hover:text-foreground", "aria-label": `Undo saving ${item.text}`, onClick: () => onUndo(item.id), children: [_jsx(Undo2Icon, { "aria-hidden": true }), "Undo"] })))] }));
111
+ function MemorizedRow(t0) {
112
+ const $ = _c(24);
113
+ const {
114
+ item,
115
+ onUndo
116
+ } = t0;
117
+ const undone = item.status === "undone";
118
+ const t1 = item.status;
119
+ const t2 = undone ? "text-muted-foreground/40" : "text-good";
120
+ let t3;
121
+ if ($[0] !== t2) {
122
+ t3 = cn("size-3.5 shrink-0", t2);
123
+ $[0] = t2;
124
+ $[1] = t3;
125
+ } else {
126
+ t3 = $[1];
127
+ }
128
+ let t4;
129
+ if ($[2] !== t3) {
130
+ t4 = /*#__PURE__*/_jsx(CheckIcon, {
131
+ "aria-hidden": true,
132
+ className: t3
133
+ });
134
+ $[2] = t3;
135
+ $[3] = t4;
136
+ } else {
137
+ t4 = $[3];
138
+ }
139
+ const t5 = undone && "font-normal text-muted-foreground line-through decoration-muted-foreground";
140
+ let t6;
141
+ if ($[4] !== t5) {
142
+ t6 = cn("text-sm font-medium", t5);
143
+ $[4] = t5;
144
+ $[5] = t6;
145
+ } else {
146
+ t6 = $[5];
147
+ }
148
+ let t7;
149
+ if ($[6] !== item.text || $[7] !== t6) {
150
+ t7 = /*#__PURE__*/_jsx("span", {
151
+ className: t6,
152
+ children: item.text
153
+ });
154
+ $[6] = item.text;
155
+ $[7] = t6;
156
+ $[8] = t7;
157
+ } else {
158
+ t7 = $[8];
159
+ }
160
+ let t8;
161
+ if ($[9] !== item.kind) {
162
+ t8 = item.kind && /*#__PURE__*/_jsx("span", {
163
+ className: "font-mono text-xs text-muted-foreground",
164
+ children: item.kind
165
+ });
166
+ $[9] = item.kind;
167
+ $[10] = t8;
168
+ } else {
169
+ t8 = $[10];
170
+ }
171
+ let t9;
172
+ if ($[11] !== t7 || $[12] !== t8) {
173
+ t9 = /*#__PURE__*/_jsxs("span", {
174
+ className: "flex min-w-0 flex-1 flex-col gap-0.5",
175
+ children: [t7, t8]
176
+ });
177
+ $[11] = t7;
178
+ $[12] = t8;
179
+ $[13] = t9;
180
+ } else {
181
+ t9 = $[13];
182
+ }
183
+ let t10;
184
+ if ($[14] !== item.id || $[15] !== item.text || $[16] !== onUndo || $[17] !== undone) {
185
+ t10 = undone ? /*#__PURE__*/_jsxs("span", {
186
+ className: "eyebrow flex shrink-0 items-center gap-1.5",
187
+ children: [/*#__PURE__*/_jsx(StatusDot, {
188
+ tone: "idle"
189
+ }), "Undone"]
190
+ }) : onUndo && /*#__PURE__*/_jsxs(Button, {
191
+ variant: "ghost",
192
+ size: "xs",
193
+ className: "-mr-2 text-muted-foreground hover:text-foreground",
194
+ "aria-label": `Undo saving ${item.text}`,
195
+ onClick: () => onUndo(item.id),
196
+ children: [/*#__PURE__*/_jsx(Undo2Icon, {
197
+ "aria-hidden": true
198
+ }), "Undo"]
199
+ });
200
+ $[14] = item.id;
201
+ $[15] = item.text;
202
+ $[16] = onUndo;
203
+ $[17] = undone;
204
+ $[18] = t10;
205
+ } else {
206
+ t10 = $[18];
207
+ }
208
+ let t11;
209
+ if ($[19] !== item.status || $[20] !== t10 || $[21] !== t4 || $[22] !== t9) {
210
+ t11 = /*#__PURE__*/_jsxs("li", {
211
+ "data-slot": "memorized-item",
212
+ "data-status": t1,
213
+ className: "flex min-h-11 items-center gap-3 px-3 py-2.5",
214
+ children: [t4, t9, t10]
215
+ });
216
+ $[19] = item.status;
217
+ $[20] = t10;
218
+ $[21] = t4;
219
+ $[22] = t9;
220
+ $[23] = t11;
221
+ } else {
222
+ t11 = $[23];
223
+ }
224
+ return t11;
19
225
  }