Commit 2382248
feat: add typed EventMap and DefinedEventMap for Paper and Graph
- Add LiteralUnion<T> and ExcludeIndexSignature<T> utility types
- Add mvc.EventCallbackMap<T> generic utility for partial event maps
- Add Paper.DefinedEventMap (EventMap without index signature) for IDE autocomplete
- Add paper:mouseenter and paper:mouseleave to Paper.EventMap
- Add typed on() overloads to Paper using DefinedEventMap
- Add Graph.EventMap with cell, change:*, layer, and batch events
- Add Graph.DefinedEventMap and typed on() overloads to Graph
- Preserve backwards compatibility: EventMap keeps index signature
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 5ca4008 commit 2382248
2 files changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | 214 | | |
218 | 215 | | |
219 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | | - | |
| 363 | + | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
| |||
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
412 | | - | |
| 413 | + | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
| |||
2222 | 2223 | | |
2223 | 2224 | | |
2224 | 2225 | | |
2225 | | - | |
| 2226 | + | |
2226 | 2227 | | |
2227 | 2228 | | |
2228 | 2229 | | |
| |||
3641 | 3642 | | |
3642 | 3643 | | |
3643 | 3644 | | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
3644 | 3651 | | |
3645 | 3652 | | |
3646 | 3653 | | |
| |||
0 commit comments