@adecore/agents-react 0.73.5 → 0.74.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.
@@ -39,7 +39,7 @@ const NOTHING_FOUND = [];
39
39
  * thousand ticks are a thousand spans and not a thousand popups. An open find marks every tick it hits.
40
40
  */
41
41
  export const Scrubber = memo(function Scrubber(t0) {
42
- const $ = _c(116);
42
+ const $ = _c(127);
43
43
  const {
44
44
  ticks,
45
45
  firstInView,
@@ -97,6 +97,9 @@ export const Scrubber = memo(function Scrubber(t0) {
97
97
  let t15;
98
98
  let t16;
99
99
  let t17;
100
+ let t18;
101
+ let t19;
102
+ let t20;
100
103
  let t6;
101
104
  let t7;
102
105
  let t8;
@@ -113,16 +116,16 @@ export const Scrubber = memo(function Scrubber(t0) {
113
116
  const hoveredTick = hovered === null ? null : ticks[hovered] ?? null;
114
117
  const hoveredSlot = hovered === null ? null : slotOf(layout, hovered);
115
118
  const anchorY = hoveredSlot === null ? null : layout.slots[hoveredSlot].y;
116
- let t18;
119
+ let t21;
117
120
  bb0: {
118
121
  const element = strip;
119
122
  if (anchorY === null || element === null) {
120
- t18 = undefined;
123
+ t21 = undefined;
121
124
  break bb0;
122
125
  }
123
- let t19;
124
- if ($[37] !== anchorY || $[38] !== element) {
125
- t19 = () => {
126
+ let t22;
127
+ if ($[40] !== anchorY || $[41] !== element) {
128
+ t22 = () => {
126
129
  const rect = element.getBoundingClientRect();
127
130
  return DOMRect.fromRect({
128
131
  x: rect.left,
@@ -131,69 +134,70 @@ export const Scrubber = memo(function Scrubber(t0) {
131
134
  height: 0
132
135
  });
133
136
  };
134
- $[37] = anchorY;
135
- $[38] = element;
136
- $[39] = t19;
137
+ $[40] = anchorY;
138
+ $[41] = element;
139
+ $[42] = t22;
137
140
  } else {
138
- t19 = $[39];
141
+ t22 = $[42];
139
142
  }
140
- let t20;
141
- if ($[40] !== element || $[41] !== t19) {
142
- t20 = {
143
+ let t23;
144
+ if ($[43] !== element || $[44] !== t22) {
145
+ t23 = {
143
146
  contextElement: element,
144
- getBoundingClientRect: t19
147
+ getBoundingClientRect: t22
145
148
  };
146
- $[40] = element;
147
- $[41] = t19;
148
- $[42] = t20;
149
+ $[43] = element;
150
+ $[44] = t22;
151
+ $[45] = t23;
149
152
  } else {
150
- t20 = $[42];
153
+ t23 = $[45];
151
154
  }
152
- t18 = t20;
155
+ t21 = t23;
153
156
  }
154
- const anchor = t18;
155
- let t19;
156
- if ($[43] !== layout) {
157
- t19 = e => messageAt(layout, e.clientY - e.currentTarget.getBoundingClientRect().top);
158
- $[43] = layout;
159
- $[44] = t19;
157
+ const anchor = t21;
158
+ const bandHeight = layout.slots.length * layout.pitch;
159
+ let t22;
160
+ if ($[46] !== layout) {
161
+ t22 = e => messageAt(layout, e.clientY - e.currentTarget.getBoundingClientRect().top + layout.top);
162
+ $[46] = layout;
163
+ $[47] = t22;
160
164
  } else {
161
- t19 = $[44];
165
+ t22 = $[47];
162
166
  }
163
- const pointAt = t19;
164
- let t20;
165
- if ($[45] !== chat) {
166
- t20 = tick_1 => tick_1 === null ? [] : Object.values(CARD_ACTIONS).filter(action => action.offers(tick_1, chat));
167
- $[45] = chat;
168
- $[46] = t20;
167
+ const pointAt = t22;
168
+ let t23;
169
+ if ($[48] !== chat) {
170
+ t23 = tick_1 => tick_1 === null ? [] : Object.values(CARD_ACTIONS).filter(action => action.offers(tick_1, chat));
171
+ $[48] = chat;
172
+ $[49] = t23;
169
173
  } else {
170
- t20 = $[46];
174
+ t23 = $[49];
171
175
  }
172
- actionsFor = t20;
176
+ actionsFor = t23;
173
177
  const actions = actionsFor(hoveredTick);
174
- let t21;
175
- if ($[47] !== chat) {
176
- t21 = tick_2 => tick_2 === null || chat === null ? null : tick_2.bookmark?.itemId ?? (tick_2.kind === "person" ? tick_2.id : null);
177
- $[47] = chat;
178
- $[48] = t21;
178
+ let t24;
179
+ if ($[50] !== chat) {
180
+ t24 = tick_2 => tick_2 === null || chat === null ? null : tick_2.bookmark?.itemId ?? (tick_2.kind === "person" ? tick_2.id : null);
181
+ $[50] = chat;
182
+ $[51] = t24;
179
183
  } else {
180
- t21 = $[48];
184
+ t24 = $[51];
181
185
  }
182
- const markableOf = t21;
186
+ const markableOf = t24;
183
187
  menuTick = menuIndex === null ? null : ticks[menuIndex] ?? null;
184
- let t22;
185
- if ($[49] !== markableOf || $[50] !== menuTick) {
186
- t22 = markableOf(menuTick);
187
- $[49] = markableOf;
188
- $[50] = menuTick;
189
- $[51] = t22;
188
+ let t25;
189
+ if ($[52] !== markableOf || $[53] !== menuTick) {
190
+ t25 = markableOf(menuTick);
191
+ $[52] = markableOf;
192
+ $[53] = menuTick;
193
+ $[54] = t25;
190
194
  } else {
191
- t22 = $[51];
195
+ t25 = $[54];
192
196
  }
193
- menuMarkable = t22;
194
- let t23;
195
- if ($[52] !== actionsFor || $[53] !== layout || $[54] !== markableOf || $[55] !== strip || $[56] !== ticks) {
196
- t23 = e_0 => {
197
+ menuMarkable = t25;
198
+ let t26;
199
+ if ($[55] !== actionsFor || $[56] !== layout || $[57] !== markableOf || $[58] !== strip || $[59] !== ticks) {
200
+ t26 = e_0 => {
197
201
  const index = strip === null || cameThroughPortal(e_0) ? null : messageAt(layout, e_0.clientY - strip.getBoundingClientRect().top);
198
202
  const tick_3 = index === null ? null : ticks[index] ?? null;
199
203
  if (tick_3 === null || actionsFor(tick_3).length === 0 && markableOf(tick_3) === null) {
@@ -202,87 +206,99 @@ export const Scrubber = memo(function Scrubber(t0) {
202
206
  }
203
207
  setMenuIndex(index);
204
208
  };
205
- $[52] = actionsFor;
206
- $[53] = layout;
207
- $[54] = markableOf;
208
- $[55] = strip;
209
- $[56] = ticks;
210
- $[57] = t23;
209
+ $[55] = actionsFor;
210
+ $[56] = layout;
211
+ $[57] = markableOf;
212
+ $[58] = strip;
213
+ $[59] = ticks;
214
+ $[60] = t26;
211
215
  } else {
212
- t23 = $[57];
216
+ t26 = $[60];
213
217
  }
214
- const onContextMenu = t23;
218
+ const onContextMenu = t26;
219
+ t19 = setStrip;
220
+ t20 = "relative h-full w-full";
215
221
  T3 = ContextMenu.Root;
216
- t17 = setMenuOpen;
222
+ t18 = setMenuOpen;
217
223
  T2 = ContextMenu.Trigger;
218
- t15 = "h-full w-full";
219
- t16 = onContextMenu;
224
+ t15 = "absolute inset-x-0";
225
+ if ($[61] !== bandHeight || $[62] !== layout) {
226
+ t16 = {
227
+ top: layout.top,
228
+ height: bandHeight
229
+ };
230
+ $[61] = bandHeight;
231
+ $[62] = layout;
232
+ $[63] = t16;
233
+ } else {
234
+ t16 = $[63];
235
+ }
236
+ t17 = onContextMenu;
220
237
  T1 = PreviewCard.Root;
221
238
  t12 = cardOpen && !menuOpen;
222
239
  t13 = setCardOpen;
223
- let t24;
224
- if ($[58] !== t) {
225
- t24 = t("scrubber.strip");
226
- $[58] = t;
227
- $[59] = t24;
240
+ let t27;
241
+ if ($[64] !== t) {
242
+ t27 = t("scrubber.strip");
243
+ $[64] = t;
244
+ $[65] = t27;
228
245
  } else {
229
- t24 = $[59];
246
+ t27 = $[65];
230
247
  }
231
- let t25;
232
- if ($[60] !== hovered || $[61] !== pointAt) {
233
- t25 = e_1 => {
248
+ let t28;
249
+ if ($[66] !== hovered || $[67] !== pointAt) {
250
+ t28 = e_1 => {
234
251
  setPointing(true);
235
252
  const index_0 = pointAt(e_1);
236
253
  if (index_0 !== hovered) {
237
254
  setHovered(index_0);
238
255
  }
239
256
  };
240
- $[60] = hovered;
241
- $[61] = pointAt;
242
- $[62] = t25;
257
+ $[66] = hovered;
258
+ $[67] = pointAt;
259
+ $[68] = t28;
243
260
  } else {
244
- t25 = $[62];
261
+ t28 = $[68];
245
262
  }
246
- let t26;
247
- if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
248
- t26 = () => setPointing(false);
249
- $[63] = t26;
263
+ let t29;
264
+ if ($[69] === Symbol.for("react.memo_cache_sentinel")) {
265
+ t29 = () => setPointing(false);
266
+ $[69] = t29;
250
267
  } else {
251
- t26 = $[63];
268
+ t29 = $[69];
252
269
  }
253
- let t27;
254
- if ($[64] !== onPick || $[65] !== pointAt) {
255
- t27 = e_2 => {
270
+ let t30;
271
+ if ($[70] !== onPick || $[71] !== pointAt) {
272
+ t30 = e_2 => {
256
273
  const index_1 = pointAt(e_2);
257
274
  if (index_1 !== null) {
258
275
  onPick(index_1);
259
276
  }
260
277
  };
261
- $[64] = onPick;
262
- $[65] = pointAt;
263
- $[66] = t27;
278
+ $[70] = onPick;
279
+ $[71] = pointAt;
280
+ $[72] = t30;
264
281
  } else {
265
- t27 = $[66];
282
+ t30 = $[72];
266
283
  }
267
- let t28;
268
- if ($[67] !== t24 || $[68] !== t25 || $[69] !== t27) {
269
- t28 = /*#__PURE__*/_jsx("div", {
270
- ref: setStrip,
284
+ let t31;
285
+ if ($[73] !== t27 || $[74] !== t28 || $[75] !== t30) {
286
+ t31 = /*#__PURE__*/_jsx("div", {
271
287
  role: "navigation",
272
- "aria-label": t24,
288
+ "aria-label": t27,
273
289
  className: "relative h-full w-full cursor-pointer select-none",
274
- onPointerMove: t25,
275
- onPointerLeave: t26,
276
- onClick: t27
290
+ onPointerMove: t28,
291
+ onPointerLeave: t29,
292
+ onClick: t30
277
293
  });
278
- $[67] = t24;
279
- $[68] = t25;
280
- $[69] = t27;
281
- $[70] = t28;
294
+ $[73] = t27;
295
+ $[74] = t28;
296
+ $[75] = t30;
297
+ $[76] = t31;
282
298
  } else {
283
- t28 = $[70];
299
+ t31 = $[76];
284
300
  }
285
- const t29 = layout.slots.map((slot, index_2) => {
301
+ const t32 = layout.slots.map((slot, index_2) => {
286
302
  const distance = pointing && hoveredSlot !== null ? Math.abs(index_2 - hoveredSlot) : null;
287
303
  const bright = slot.marked || slotInView(slot, inView) || distance === 0;
288
304
  return /*#__PURE__*/_jsxs(Fragment, {
@@ -290,7 +306,7 @@ export const Scrubber = memo(function Scrubber(t0) {
290
306
  "aria-hidden": true,
291
307
  className: clsx("absolute left-1 rounded-full transition-[width,opacity] duration-100 ease-out motion-reduce:transition-none", slot.marked ? "bg-accent" : slot.kind === "wake" ? "bg-text-muted" : "bg-text", bright ? "opacity-100" : "opacity-30"),
292
308
  style: {
293
- top: slot.y,
309
+ top: slot.y - layout.top,
294
310
  height: TICK_HEIGHT_PX,
295
311
  width: tickWidth(slot.kind, distance)
296
312
  }
@@ -298,25 +314,25 @@ export const Scrubber = memo(function Scrubber(t0) {
298
314
  "aria-hidden": true,
299
315
  className: clsx("absolute right-0 rounded-full bg-chat-find", index_2 === currentSlot ? "opacity-100" : "opacity-50"),
300
316
  style: {
301
- top: slot.y,
317
+ top: slot.y - layout.top,
302
318
  height: TICK_HEIGHT_PX,
303
319
  width: FOUND_WIDTH_PX
304
320
  }
305
321
  })]
306
322
  }, slot.first);
307
323
  });
308
- if ($[71] !== t28 || $[72] !== t29) {
324
+ if ($[77] !== t31 || $[78] !== t32) {
309
325
  t14 = /*#__PURE__*/_jsx(PreviewCard.Trigger, {
310
326
  delay: 150,
311
327
  closeDelay: 150,
312
- render: t28,
313
- children: t29
328
+ render: t31,
329
+ children: t32
314
330
  });
315
- $[71] = t28;
316
- $[72] = t29;
317
- $[73] = t14;
331
+ $[77] = t31;
332
+ $[78] = t32;
333
+ $[79] = t14;
318
334
  } else {
319
- t14 = $[73];
335
+ t14 = $[79];
320
336
  }
321
337
  T0 = PreviewCard.Popup;
322
338
  t6 = anchor;
@@ -391,10 +407,13 @@ export const Scrubber = memo(function Scrubber(t0) {
391
407
  $[30] = t15;
392
408
  $[31] = t16;
393
409
  $[32] = t17;
394
- $[33] = t6;
395
- $[34] = t7;
396
- $[35] = t8;
397
- $[36] = t9;
410
+ $[33] = t18;
411
+ $[34] = t19;
412
+ $[35] = t20;
413
+ $[36] = t6;
414
+ $[37] = t7;
415
+ $[38] = t8;
416
+ $[39] = t9;
398
417
  } else {
399
418
  T0 = $[18];
400
419
  T1 = $[19];
@@ -411,14 +430,17 @@ export const Scrubber = memo(function Scrubber(t0) {
411
430
  t15 = $[30];
412
431
  t16 = $[31];
413
432
  t17 = $[32];
414
- t6 = $[33];
415
- t7 = $[34];
416
- t8 = $[35];
417
- t9 = $[36];
433
+ t18 = $[33];
434
+ t19 = $[34];
435
+ t20 = $[35];
436
+ t6 = $[36];
437
+ t7 = $[37];
438
+ t8 = $[38];
439
+ t9 = $[39];
418
440
  }
419
- let t18;
420
- if ($[74] !== T0 || $[75] !== t10 || $[76] !== t11 || $[77] !== t6 || $[78] !== t7 || $[79] !== t8 || $[80] !== t9) {
421
- t18 = /*#__PURE__*/_jsx(T0, {
441
+ let t21;
442
+ if ($[80] !== T0 || $[81] !== t10 || $[82] !== t11 || $[83] !== t6 || $[84] !== t7 || $[85] !== t8 || $[86] !== t9) {
443
+ t21 = /*#__PURE__*/_jsx(T0, {
422
444
  anchor: t6,
423
445
  side: t7,
424
446
  align: t8,
@@ -426,117 +448,133 @@ export const Scrubber = memo(function Scrubber(t0) {
426
448
  className: t10,
427
449
  children: t11
428
450
  });
429
- $[74] = T0;
430
- $[75] = t10;
431
- $[76] = t11;
432
- $[77] = t6;
433
- $[78] = t7;
434
- $[79] = t8;
435
- $[80] = t9;
436
- $[81] = t18;
451
+ $[80] = T0;
452
+ $[81] = t10;
453
+ $[82] = t11;
454
+ $[83] = t6;
455
+ $[84] = t7;
456
+ $[85] = t8;
457
+ $[86] = t9;
458
+ $[87] = t21;
437
459
  } else {
438
- t18 = $[81];
460
+ t21 = $[87];
439
461
  }
440
- let t19;
441
- if ($[82] !== T1 || $[83] !== t12 || $[84] !== t13 || $[85] !== t14 || $[86] !== t18) {
442
- t19 = /*#__PURE__*/_jsxs(T1, {
462
+ let t22;
463
+ if ($[88] !== T1 || $[89] !== t12 || $[90] !== t13 || $[91] !== t14 || $[92] !== t21) {
464
+ t22 = /*#__PURE__*/_jsxs(T1, {
443
465
  open: t12,
444
466
  onOpenChange: t13,
445
- children: [t14, t18]
467
+ children: [t14, t21]
446
468
  });
447
- $[82] = T1;
448
- $[83] = t12;
449
- $[84] = t13;
450
- $[85] = t14;
451
- $[86] = t18;
452
- $[87] = t19;
469
+ $[88] = T1;
470
+ $[89] = t12;
471
+ $[90] = t13;
472
+ $[91] = t14;
473
+ $[92] = t21;
474
+ $[93] = t22;
453
475
  } else {
454
- t19 = $[87];
476
+ t22 = $[93];
455
477
  }
456
- let t20;
457
- if ($[88] !== T2 || $[89] !== t15 || $[90] !== t16 || $[91] !== t19) {
458
- t20 = /*#__PURE__*/_jsx(T2, {
478
+ let t23;
479
+ if ($[94] !== T2 || $[95] !== t15 || $[96] !== t16 || $[97] !== t17 || $[98] !== t22) {
480
+ t23 = /*#__PURE__*/_jsx(T2, {
459
481
  className: t15,
460
- onContextMenu: t16,
461
- children: t19
482
+ style: t16,
483
+ onContextMenu: t17,
484
+ children: t22
462
485
  });
463
- $[88] = T2;
464
- $[89] = t15;
465
- $[90] = t16;
466
- $[91] = t19;
467
- $[92] = t20;
486
+ $[94] = T2;
487
+ $[95] = t15;
488
+ $[96] = t16;
489
+ $[97] = t17;
490
+ $[98] = t22;
491
+ $[99] = t23;
468
492
  } else {
469
- t20 = $[92];
493
+ t23 = $[99];
470
494
  }
471
- let t21;
472
- if ($[93] !== actionsFor || $[94] !== chat || $[95] !== menuTick || $[96] !== t) {
473
- t21 = menuTick !== null && actionsFor(menuTick).map(action_1 => /*#__PURE__*/_jsxs(ContextMenu.Item, {
495
+ let t24;
496
+ if ($[100] !== actionsFor || $[101] !== chat || $[102] !== menuTick || $[103] !== t) {
497
+ t24 = menuTick !== null && actionsFor(menuTick).map(action_1 => /*#__PURE__*/_jsxs(ContextMenu.Item, {
474
498
  onClick: () => action_1.run(menuTick, chat),
475
499
  children: [/*#__PURE__*/_jsx(Icon, {
476
500
  icon: action_1.icon,
477
501
  size: 14
478
502
  }), " ", t(action_1.label)]
479
503
  }, action_1.label));
480
- $[93] = actionsFor;
481
- $[94] = chat;
482
- $[95] = menuTick;
483
- $[96] = t;
484
- $[97] = t21;
504
+ $[100] = actionsFor;
505
+ $[101] = chat;
506
+ $[102] = menuTick;
507
+ $[103] = t;
508
+ $[104] = t24;
485
509
  } else {
486
- t21 = $[97];
510
+ t24 = $[104];
487
511
  }
488
- let t22;
489
- if ($[98] !== actionsFor || $[99] !== menuMarkable || $[100] !== menuTick) {
490
- t22 = menuTick !== null && actionsFor(menuTick).length > 0 && menuMarkable !== null && /*#__PURE__*/_jsx(ContextMenu.Separator, {});
491
- $[98] = actionsFor;
492
- $[99] = menuMarkable;
493
- $[100] = menuTick;
494
- $[101] = t22;
512
+ let t25;
513
+ if ($[105] !== actionsFor || $[106] !== menuMarkable || $[107] !== menuTick) {
514
+ t25 = menuTick !== null && actionsFor(menuTick).length > 0 && menuMarkable !== null && /*#__PURE__*/_jsx(ContextMenu.Separator, {});
515
+ $[105] = actionsFor;
516
+ $[106] = menuMarkable;
517
+ $[107] = menuTick;
518
+ $[108] = t25;
495
519
  } else {
496
- t22 = $[101];
520
+ t25 = $[108];
497
521
  }
498
- let t23;
499
- if ($[102] !== chat || $[103] !== menuIndex || $[104] !== menuMarkable || $[105] !== onPick) {
500
- t23 = chat !== null && menuIndex !== null && menuMarkable !== null && /*#__PURE__*/_jsx(BookmarkMenuItems, {
522
+ let t26;
523
+ if ($[109] !== chat || $[110] !== menuIndex || $[111] !== menuMarkable || $[112] !== onPick) {
524
+ t26 = chat !== null && menuIndex !== null && menuMarkable !== null && /*#__PURE__*/_jsx(BookmarkMenuItems, {
501
525
  chatId: chat.chatId,
502
526
  itemId: menuMarkable,
503
527
  onName: () => onPick(menuIndex)
504
528
  });
505
- $[102] = chat;
506
- $[103] = menuIndex;
507
- $[104] = menuMarkable;
508
- $[105] = onPick;
509
- $[106] = t23;
529
+ $[109] = chat;
530
+ $[110] = menuIndex;
531
+ $[111] = menuMarkable;
532
+ $[112] = onPick;
533
+ $[113] = t26;
510
534
  } else {
511
- t23 = $[106];
535
+ t26 = $[113];
512
536
  }
513
- let t24;
514
- if ($[107] !== t21 || $[108] !== t22 || $[109] !== t23) {
515
- t24 = /*#__PURE__*/_jsxs(ContextMenu.Popup, {
516
- children: [t21, t22, t23]
537
+ let t27;
538
+ if ($[114] !== t24 || $[115] !== t25 || $[116] !== t26) {
539
+ t27 = /*#__PURE__*/_jsxs(ContextMenu.Popup, {
540
+ children: [t24, t25, t26]
517
541
  });
518
- $[107] = t21;
519
- $[108] = t22;
520
- $[109] = t23;
521
- $[110] = t24;
542
+ $[114] = t24;
543
+ $[115] = t25;
544
+ $[116] = t26;
545
+ $[117] = t27;
522
546
  } else {
523
- t24 = $[110];
547
+ t27 = $[117];
524
548
  }
525
- let t25;
526
- if ($[111] !== T3 || $[112] !== t17 || $[113] !== t20 || $[114] !== t24) {
527
- t25 = /*#__PURE__*/_jsxs(T3, {
528
- onOpenChange: t17,
529
- children: [t20, t24]
549
+ let t28;
550
+ if ($[118] !== T3 || $[119] !== t18 || $[120] !== t23 || $[121] !== t27) {
551
+ t28 = /*#__PURE__*/_jsxs(T3, {
552
+ onOpenChange: t18,
553
+ children: [t23, t27]
530
554
  });
531
- $[111] = T3;
532
- $[112] = t17;
533
- $[113] = t20;
534
- $[114] = t24;
535
- $[115] = t25;
555
+ $[118] = T3;
556
+ $[119] = t18;
557
+ $[120] = t23;
558
+ $[121] = t27;
559
+ $[122] = t28;
560
+ } else {
561
+ t28 = $[122];
562
+ }
563
+ let t29;
564
+ if ($[123] !== t19 || $[124] !== t20 || $[125] !== t28) {
565
+ t29 = /*#__PURE__*/_jsx("div", {
566
+ ref: t19,
567
+ className: t20,
568
+ children: t28
569
+ });
570
+ $[123] = t19;
571
+ $[124] = t20;
572
+ $[125] = t28;
573
+ $[126] = t29;
536
574
  } else {
537
- t25 = $[115];
575
+ t29 = $[126];
538
576
  }
539
- return t25;
577
+ return t29;
540
578
  });
541
579
  function _temp(tick) {
542
580
  return tick.kind;
@@ -769,7 +769,7 @@ export function TableRenderer(t0) {
769
769
  T0 = ScrollArea;
770
770
  t5 = "both";
771
771
  t6 = "chat-ui-flat max-h-80 w-full rounded-xl bg-ui-tile";
772
- t7 = "chat-ui-flat px-1.5 pb-1.5";
772
+ t7 = "chat-ui-flat overscroll-y-auto px-1.5 pb-1.5";
773
773
  t2 = t("blocks.table.label", {
774
774
  columns: columns.map(_temp4).join(", ")
775
775
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agents-react",
3
- "version": "0.73.5",
3
+ "version": "0.74.0",
4
4
  "description": "React agent chat threads, composers, approvals, provider accounts and usage views.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -72,51 +72,51 @@
72
72
  "test:visuals": "bun --config=integration.bunfig.toml --conditions=source test ./src/chat/visual-viewport.integration.test.ts"
73
73
  },
74
74
  "dependencies": {
75
- "@adecore/agent-contracts": "0.73.5",
76
- "@adecore/editor": "0.73.5",
77
- "@adecore/editor-react": "0.73.5",
78
- "@adecore/intelligent-ui": "0.73.5",
79
- "@adecore/merge": "0.73.5",
80
- "@adecore/utils": "0.73.5",
81
- "@codemirror/commands": "^6.11.1",
75
+ "@adecore/agent-contracts": "0.74.0",
76
+ "@adecore/editor": "0.74.0",
77
+ "@adecore/editor-react": "0.74.0",
78
+ "@adecore/intelligent-ui": "0.74.0",
79
+ "@adecore/merge": "0.74.0",
80
+ "@adecore/utils": "0.74.0",
81
+ "@codemirror/commands": "^6.11.2",
82
82
  "@codemirror/language": "^6.13.1",
83
83
  "@codemirror/state": "^6.7.6",
84
- "@codemirror/view": "^6.43.15",
85
- "@lezer/common": "^1.5.5",
84
+ "@codemirror/view": "^6.44.1",
85
+ "@lezer/common": "^1.5.7",
86
86
  "@lezer/highlight": "^1.2.5",
87
- "@lezer/markdown": "^1.8.1",
88
- "@pierre/diffs": "^1.6.4",
89
- "@tanstack/react-virtual": "^3.14.26",
87
+ "@lezer/markdown": "^1.8.2",
88
+ "@pierre/diffs": "^1.7.2",
89
+ "@tanstack/react-virtual": "^3.14.28",
90
90
  "clsx": "^2.1.1",
91
91
  "heic-to": "1.6.7",
92
- "lucide-react": "^1.73.0",
92
+ "lucide-react": "^1.81.0",
93
93
  "maplibre-gl": "^6.16.0",
94
94
  "pele": "1.13.0",
95
95
  "react-markdown": "^10.1.0",
96
96
  "remark-breaks": "^4.0.0",
97
97
  "remark-gfm": "^4.0.1",
98
98
  "shiki": "^4.6.0",
99
- "simple-icons": "^16.38.0",
99
+ "simple-icons": "^16.38.1",
100
100
  "zod": "^4.6.7",
101
101
  "zustand": "^5.1.0"
102
102
  },
103
103
  "peerDependencies": {
104
- "@adecore/ui": "^0.73.5",
104
+ "@adecore/ui": "^0.74.0",
105
105
  "i18next": "^26.4.2 || ^27.0.0",
106
106
  "react": "^19.3.0",
107
107
  "react-dom": "^19.3.0",
108
108
  "react-i18next": "^17.0.15 || ^18.0.0"
109
109
  },
110
110
  "devDependencies": {
111
- "@adecore/ui": "0.73.5",
112
- "@types/bun": "^1.4.4",
113
- "@types/react": "^19.3.0",
111
+ "@adecore/ui": "0.74.0",
112
+ "@types/bun": "^1.4.5",
113
+ "@types/react": "^19.3.3",
114
114
  "@types/react-dom": "^19.3.0",
115
- "i18next": "^27.1.3",
115
+ "i18next": "^27.2.9",
116
116
  "linkedom": "^0.18.15",
117
117
  "react": "^19.3.1",
118
118
  "react-dom": "^19.3.1",
119
- "react-i18next": "^18.0.2",
119
+ "react-i18next": "^18.0.3",
120
120
  "typescript": "^7.0.2"
121
121
  },
122
122
  "license": "FSL-1.1-MIT",
@@ -132,7 +132,11 @@ export const Scrubber = memo(function Scrubber({
132
132
  };
133
133
  }, [anchorY, strip]);
134
134
 
135
- const pointAt = (e: ReactMouseEvent<HTMLDivElement>): number | null => messageAt(layout, e.clientY - e.currentTarget.getBoundingClientRect().top);
135
+ // Only the band the ticks stand in answers the pointer, so the empty height above and below it stays the thread's.
136
+ const bandHeight = layout.slots.length * layout.pitch;
137
+
138
+ const pointAt = (e: ReactMouseEvent<HTMLDivElement>): number | null =>
139
+ messageAt(layout, e.clientY - e.currentTarget.getBoundingClientRect().top + layout.top);
136
140
 
137
141
  const actionsFor = (tick: ScrubberTick | null): CardAction[] =>
138
142
  tick === null ? [] : Object.values(CARD_ACTIONS).filter((action) => action.offers(tick, chat));
@@ -161,115 +165,119 @@ export const Scrubber = memo(function Scrubber({
161
165
  };
162
166
 
163
167
  return (
164
- <ContextMenu.Root onOpenChange={setMenuOpen}>
165
- <ContextMenu.Trigger className="h-full w-full" onContextMenu={onContextMenu}>
166
- <PreviewCard.Root open={cardOpen && !menuOpen} onOpenChange={setCardOpen}>
167
- <PreviewCard.Trigger
168
- delay={150}
169
- closeDelay={150}
170
- render={
171
- <div
172
- ref={setStrip}
173
- role="navigation"
174
- aria-label={t('scrubber.strip')}
175
- className="relative h-full w-full cursor-pointer select-none"
176
- onPointerMove={(e) => {
177
- setPointing(true);
178
- const index = pointAt(e);
179
-
180
- if (index !== hovered) {
181
- setHovered(index);
182
- }
183
- }}
184
- onPointerLeave={() => setPointing(false)}
185
- onClick={(e) => {
186
- const index = pointAt(e);
187
-
188
- if (index !== null) {
189
- onPick(index);
190
- }
191
- }}
192
- />
193
- }
194
- >
195
- {layout.slots.map((slot, index) => {
196
- const distance = pointing && hoveredSlot !== null ? Math.abs(index - hoveredSlot) : null;
197
- // A bookmark is a place to find again from anywhere, so it never dims with the rest.
198
- const bright = slot.marked || slotInView(slot, inView) || distance === 0;
199
-
200
- return (
201
- <Fragment key={slot.first}>
202
- <span
203
- aria-hidden
204
- className={clsx(
205
- 'absolute left-1 rounded-full transition-[width,opacity] duration-100 ease-out motion-reduce:transition-none',
206
- slot.marked ? 'bg-accent' : slot.kind === 'wake' ? 'bg-text-muted' : 'bg-text',
207
- bright ? 'opacity-100' : 'opacity-30'
208
- )}
209
- style={{ top: slot.y, height: TICK_HEIGHT_PX, width: tickWidth(slot.kind, distance) }}
210
- />
211
- {slot.found && (
168
+ <div ref={setStrip} className="relative h-full w-full">
169
+ <ContextMenu.Root onOpenChange={setMenuOpen}>
170
+ <ContextMenu.Trigger className="absolute inset-x-0" style={{ top: layout.top, height: bandHeight }} onContextMenu={onContextMenu}>
171
+ <PreviewCard.Root open={cardOpen && !menuOpen} onOpenChange={setCardOpen}>
172
+ <PreviewCard.Trigger
173
+ delay={150}
174
+ closeDelay={150}
175
+ render={
176
+ <div
177
+ role="navigation"
178
+ aria-label={t('scrubber.strip')}
179
+ className="relative h-full w-full cursor-pointer select-none"
180
+ onPointerMove={(e) => {
181
+ setPointing(true);
182
+ const index = pointAt(e);
183
+
184
+ if (index !== hovered) {
185
+ setHovered(index);
186
+ }
187
+ }}
188
+ onPointerLeave={() => setPointing(false)}
189
+ onClick={(e) => {
190
+ const index = pointAt(e);
191
+
192
+ if (index !== null) {
193
+ onPick(index);
194
+ }
195
+ }}
196
+ />
197
+ }
198
+ >
199
+ {layout.slots.map((slot, index) => {
200
+ const distance = pointing && hoveredSlot !== null ? Math.abs(index - hoveredSlot) : null;
201
+ // A bookmark is a place to find again from anywhere, so it never dims with the rest.
202
+ const bright = slot.marked || slotInView(slot, inView) || distance === 0;
203
+
204
+ return (
205
+ <Fragment key={slot.first}>
212
206
  <span
213
207
  aria-hidden
214
- className={clsx('absolute right-0 rounded-full bg-chat-find', index === currentSlot ? 'opacity-100' : 'opacity-50')}
215
- style={{ top: slot.y, height: TICK_HEIGHT_PX, width: FOUND_WIDTH_PX }}
208
+ className={clsx(
209
+ 'absolute left-1 rounded-full transition-[width,opacity] duration-100 ease-out motion-reduce:transition-none',
210
+ slot.marked ? 'bg-accent' : slot.kind === 'wake' ? 'bg-text-muted' : 'bg-text',
211
+ bright ? 'opacity-100' : 'opacity-30'
212
+ )}
213
+ style={{ top: slot.y - layout.top, height: TICK_HEIGHT_PX, width: tickWidth(slot.kind, distance) }}
216
214
  />
217
- )}
218
- </Fragment>
219
- );
220
- })}
221
- </PreviewCard.Trigger>
222
- <PreviewCard.Popup anchor={anchor} side="right" align="center" sideOffset={4} className="w-72">
223
- {hoveredTick !== null && (
224
- <>
225
- <div className="px-2.5 pt-1.5 pb-2">
226
- <div className="flex items-baseline justify-between gap-3 text-xs text-text-faint">
227
- {hoveredTick.bookmark === null ? (
228
- <span>{hoveredTick.kind === 'person' ? t('rows.user.heading') : t('scrubber.tasks')}</span>
229
- ) : (
230
- <span className="flex min-w-0 items-center gap-1 self-center text-text-muted">
231
- <Icon icon={Bookmark} size={12} className="shrink-0 text-accent" />
232
- <span className="truncate">{hoveredTick.bookmark.name ?? t('bookmarks.unnamed')}</span>
233
- </span>
215
+ {slot.found && (
216
+ <span
217
+ aria-hidden
218
+ className={clsx(
219
+ 'absolute right-0 rounded-full bg-chat-find',
220
+ index === currentSlot ? 'opacity-100' : 'opacity-50'
221
+ )}
222
+ style={{ top: slot.y - layout.top, height: TICK_HEIGHT_PX, width: FOUND_WIDTH_PX }}
223
+ />
234
224
  )}
235
- <time className="tabular-nums">{timeOf(hoveredTick.createdAt)}</time>
225
+ </Fragment>
226
+ );
227
+ })}
228
+ </PreviewCard.Trigger>
229
+ <PreviewCard.Popup anchor={anchor} side="right" align="center" sideOffset={4} className="w-72">
230
+ {hoveredTick !== null && (
231
+ <>
232
+ <div className="px-2.5 pt-1.5 pb-2">
233
+ <div className="flex items-baseline justify-between gap-3 text-xs text-text-faint">
234
+ {hoveredTick.bookmark === null ? (
235
+ <span>{hoveredTick.kind === 'person' ? t('rows.user.heading') : t('scrubber.tasks')}</span>
236
+ ) : (
237
+ <span className="flex min-w-0 items-center gap-1 self-center text-text-muted">
238
+ <Icon icon={Bookmark} size={12} className="shrink-0 text-accent" />
239
+ <span className="truncate">{hoveredTick.bookmark.name ?? t('bookmarks.unnamed')}</span>
240
+ </span>
241
+ )}
242
+ <time className="tabular-nums">{timeOf(hoveredTick.createdAt)}</time>
243
+ </div>
244
+ <p className="mt-1 line-clamp-4 text-sm break-words whitespace-pre-line text-text">
245
+ {hoveredTick.text.slice(0, PREVIEW_CHARS) || t('pickers.stash.noText')}
246
+ </p>
236
247
  </div>
237
- <p className="mt-1 line-clamp-4 text-sm break-words whitespace-pre-line text-text">
238
- {hoveredTick.text.slice(0, PREVIEW_CHARS) || t('pickers.stash.noText')}
239
- </p>
240
- </div>
241
- {actions.length > 0 && (
242
- <>
243
- <Menu.Separator />
244
- {actions.map((action) => (
245
- <button
246
- key={action.label}
247
- type="button"
248
- className="menu-item w-full hover:bg-surface-hover"
249
- onClick={() => action.run(hoveredTick, chat)}
250
- >
251
- <Icon icon={action.icon} size={14} /> {t(action.label)}
252
- </button>
253
- ))}
254
- </>
255
- )}
256
- </>
257
- )}
258
- </PreviewCard.Popup>
259
- </PreviewCard.Root>
260
- </ContextMenu.Trigger>
261
- <ContextMenu.Popup>
262
- {menuTick !== null &&
263
- actionsFor(menuTick).map((action) => (
264
- <ContextMenu.Item key={action.label} onClick={() => action.run(menuTick, chat)}>
265
- <Icon icon={action.icon} size={14} /> {t(action.label)}
266
- </ContextMenu.Item>
267
- ))}
268
- {menuTick !== null && actionsFor(menuTick).length > 0 && menuMarkable !== null && <ContextMenu.Separator />}
269
- {chat !== null && menuIndex !== null && menuMarkable !== null && (
270
- <BookmarkMenuItems chatId={chat.chatId} itemId={menuMarkable} onName={() => onPick(menuIndex)} />
271
- )}
272
- </ContextMenu.Popup>
273
- </ContextMenu.Root>
248
+ {actions.length > 0 && (
249
+ <>
250
+ <Menu.Separator />
251
+ {actions.map((action) => (
252
+ <button
253
+ key={action.label}
254
+ type="button"
255
+ className="menu-item w-full hover:bg-surface-hover"
256
+ onClick={() => action.run(hoveredTick, chat)}
257
+ >
258
+ <Icon icon={action.icon} size={14} /> {t(action.label)}
259
+ </button>
260
+ ))}
261
+ </>
262
+ )}
263
+ </>
264
+ )}
265
+ </PreviewCard.Popup>
266
+ </PreviewCard.Root>
267
+ </ContextMenu.Trigger>
268
+ <ContextMenu.Popup>
269
+ {menuTick !== null &&
270
+ actionsFor(menuTick).map((action) => (
271
+ <ContextMenu.Item key={action.label} onClick={() => action.run(menuTick, chat)}>
272
+ <Icon icon={action.icon} size={14} /> {t(action.label)}
273
+ </ContextMenu.Item>
274
+ ))}
275
+ {menuTick !== null && actionsFor(menuTick).length > 0 && menuMarkable !== null && <ContextMenu.Separator />}
276
+ {chat !== null && menuIndex !== null && menuMarkable !== null && (
277
+ <BookmarkMenuItems chatId={chat.chatId} itemId={menuMarkable} onName={() => onPick(menuIndex)} />
278
+ )}
279
+ </ContextMenu.Popup>
280
+ </ContextMenu.Root>
281
+ </div>
274
282
  );
275
283
  });
@@ -300,8 +300,13 @@ export function TableRenderer({ node, context }: UiRendererProps<UiProps<'Table'
300
300
 
301
301
  return (
302
302
  <div className="flex flex-col items-start gap-1.5">
303
- {/* Flat on both parts: a section drops the frame's ground and the viewport's padding. */}
304
- <ScrollArea axis="both" className="chat-ui-flat max-h-80 w-full rounded-xl bg-ui-tile" viewportClassName="chat-ui-flat px-1.5 pb-1.5">
303
+ {/* Flat on both parts: a section drops the frame's ground and the viewport's padding.
304
+ A wheel at the table's end goes on to the thread, which a bounce in the table would swallow. */}
305
+ <ScrollArea
306
+ axis="both"
307
+ className="chat-ui-flat max-h-80 w-full rounded-xl bg-ui-tile"
308
+ viewportClassName="chat-ui-flat overscroll-y-auto px-1.5 pb-1.5"
309
+ >
305
310
  <table
306
311
  aria-label={t('blocks.table.label', { columns: columns.map((column) => column.title).join(', ') })}
307
312
  className={clsx(