Tldraw/packages/editor/src/lib/test/tools
Steve Ruiz 3437ca89d9
[feature] ui events (#1326)
This PR updates the editor events:
- adds types to the events emitted by the app (by `app.emit`)
- removes a few events emitted by the app (e.g. `move-to-page`,
`change-camera`)
- adds `onEvent` prop to the <TldrawUi> / <Tldraw> components
- call the `onEvent` when actions occur or tools are selected
- does some superficial cleanup on editor app APIs

### Release Note

- Fix layout bug in error dialog
- (ui) Add `TLEventMap` for types emitted from editor app
- (editor) Update `crash` event emitted from editor app to include error
- (editor) Update `change-history` event emitted from editor app
- (editor) Remove `change-camera` event from editor app
- (editor) Remove `move-to-page` event from editor app
- (ui) Add `onEvent` prop and events to <Tldraw> / <TldrawUi>
- (editor) Replace `app.openMenus` plain Set with computed value
- (editor) Add `addOpenMenu` method
- (editor) Add `removeOpenMenu` method
- (editor) Add `setFocusMode` method 
- (editor) Add `setToolLocked` method  
- (editor) Add `setSnapMode` method 
- (editor) Add `isSnapMode` method 
- (editor) Update `setGridMode` method return type to editor app
- (editor) Update `setReadOnly` method return type to editor app
- (editor) Update `setPenMode` method return type to editor app
- (editor) Update `selectNone` method return type to editor app
- (editor) Rename `backToContent` to `zoomToContent`
- (editor) Remove `TLReorderOperation` type

---------

Co-authored-by: Orange Mug <orangemug@users.noreply.github.com>
2023-05-11 22:14:58 +00:00
..
__snapshots__ [feature] `check-box` geo shape (#1330) 2023-05-09 13:32:04 +00:00
TLArrowTool.test.ts [feature] ui events (#1326) 2023-05-11 22:14:58 +00:00
TLBookmarkUtil.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
TLDrawTool.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
TLEraserTool.test.ts [feature] `check-box` geo shape (#1330) 2023-05-09 13:32:04 +00:00
TLFrameTool.test.ts [feature] ui events (#1326) 2023-05-11 22:14:58 +00:00
TLGeoTool.test.ts [feature] ui events (#1326) 2023-05-11 22:14:58 +00:00
TLHandTool.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
TLLineTool.test.ts [feature] ui events (#1326) 2023-05-11 22:14:58 +00:00
TLNoteTool.test.ts [feature] ui events (#1326) 2023-05-11 22:14:58 +00:00
TLSelectTool.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
TLTextTool.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
TLZoomTool.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
cropping.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
drawing.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
frames.test.ts [feature] `check-box` geo shape (#1330) 2023-05-09 13:32:04 +00:00
groups.test.ts [feature] `check-box` geo shape (#1330) 2023-05-09 13:32:04 +00:00
panning.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
resizing.test.ts [feature] `check-box` geo shape (#1330) 2023-05-09 13:32:04 +00:00
rotating.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
select.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
styles.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
text.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
translating.test.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00