Summary
Add first-class clickable text extmark support so downstream TUIs can implement features like expand/edit/collapse summaries.
Scope
- support click-capable extmark handlers in text buffers
- preserve click target via the original
mousedown offset
- ignore drag-selection for click handler dispatch
- keep
typeId reindexing correct when extmarks are updated
Verification
- added targeted tests for
typeId update behavior and the drag-selection click regression
bun run build:lib passes
bun test src/lib/extmarks.test.ts src/renderables/__tests__/Textarea.selection.test.ts segfaults on local Bun 1.3.10
Screenshots / recordings
The closed state currently has no interactivity; video shows the final status.
