@teammates/consolonia 0.4.1 → 0.5.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.
@@ -348,6 +348,10 @@ export class ChatView extends Control {
348
348
  /** Scroll the feed by a delta (positive = down, negative = up). */
349
349
  scrollFeed(delta) {
350
350
  this._feedScrollOffset = Math.max(0, this._feedScrollOffset + delta);
351
+ // Clear selection when scrolling (unless actively drag-selecting)
352
+ if (!this._selecting && this._hasSelection()) {
353
+ this.clearSelection();
354
+ }
351
355
  this.invalidate();
352
356
  }
353
357
  // ── Public API: Input ──────────────────────────────────────────
@@ -562,6 +566,8 @@ export class ChatView extends Control {
562
566
  const ratio = relY / this._feedH;
563
567
  this._feedScrollOffset = Math.round(ratio * this._maxScroll);
564
568
  this._feedScrollOffset = Math.max(0, Math.min(this._feedScrollOffset, this._maxScroll));
569
+ if (this._hasSelection())
570
+ this.clearSelection();
565
571
  this.invalidate();
566
572
  }
567
573
  return true;
@@ -573,6 +579,8 @@ export class ChatView extends Control {
573
579
  const clampedPos = Math.max(0, Math.min(newThumbPos, maxThumbPos));
574
580
  const ratio = maxThumbPos > 0 ? clampedPos / maxThumbPos : 0;
575
581
  this._feedScrollOffset = Math.round(ratio * this._maxScroll);
582
+ if (this._hasSelection())
583
+ this.clearSelection();
576
584
  this.invalidate();
577
585
  return true;
578
586
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teammates/consolonia",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Terminal UI rendering engine inspired by Consolonia. Pixel-level compositing with ANSI output.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",