Skip to content

refactor(hooks): migrate use-mouse to ink 7 public API - #63

Merged
reopt-eric merged 1 commit into
mainfrom
refactor/ink-7-migration
May 12, 2026
Merged

refactor(hooks): migrate use-mouse to ink 7 public API#63
reopt-eric merged 1 commit into
mainfrom
refactor/ink-7-migration

Conversation

@reopt-eric

Copy link
Copy Markdown
Contributor

Summary

ink 6.8 → 7.0.2. `useStdin()` returns the public `PublicProps` shape; ink 7 dropped `internal_eventEmitter` from it (the internal_ name signalled this all along). Re-wire `useMouse` to attach the SGR mouse listener directly to `stdin` and manage raw mode via `setRawMode` (ink's own reference-counted toggle).

Why

Unblocks the ink major bump that was failing typecheck. `use-mouse.ts` was the only consumer of the removed private API.

Test plan

  • `pnpm check` (typecheck + lint + format + 437 tests) passes
  • Manual TUI run — mouse scroll/click verified on macOS

Closes #62

🤖 Generated with Claude Code

ink 7 removed internal_eventEmitter from useStdin's public type;
attach mouse SGR listener directly to stdin and manage raw mode
through ink's setRawMode counter.

Closes #62

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@reopt-eric
reopt-eric merged commit 04f7325 into main May 12, 2026
5 checks passed
@reopt-eric
reopt-eric deleted the refactor/ink-7-migration branch May 12, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate use-mouse hook to ink 7 (remove internal_eventEmitter dependency)

1 participant