kopia lustrzana https://github.com/Tldraw/Tldraw
3437ca89d9
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> |
||
---|---|---|
.. | ||
__snapshots__ | ||
alignShapes.test.ts | ||
allShapesCommonBounds.test.ts | ||
animateShapes.test.ts | ||
animateToShape.test.ts | ||
blur.test.ts | ||
cancel.test.ts | ||
centerOnPoint.test.ts | ||
clipboard.test.ts | ||
complete.test.ts | ||
createPage.test.ts | ||
createShapes.test.ts | ||
deletePage.test.ts | ||
deleteShapes.test.ts | ||
distributeShapes.test.ts | ||
duplicatePage.test.ts | ||
flipShapes.test.ts | ||
getContent.test.ts | ||
getSvg.test.ts | ||
groupShapes.test.ts | ||
guide.md | ||
interrupt.test.ts | ||
lockShapes.test.ts | ||
misc.test.ts | ||
moveShapesToPage.test.ts | ||
nudge.test.ts | ||
packShapes.test.ts | ||
pageToScreen.test.ts | ||
pan.test.ts | ||
paste.test.ts | ||
pinch.test.ts | ||
putContent.test.ts | ||
renderingShapes.test.ts | ||
reorderShapes.test.ts | ||
reparentShapesById.test.ts | ||
resetZoom.test.ts | ||
resizeShape.test.ts | ||
rotateShapes.test.ts | ||
screenToPage.test.ts | ||
setAppState.test.ts | ||
setBrush.test.ts | ||
setCurrentPage.test.ts | ||
setPageState.test.ts | ||
setSelectedIds.test.ts | ||
setSelectedTool.test.ts | ||
setSettings.test.ts | ||
setStyle.test.ts | ||
stackShapes.test.ts | ||
stretch.test.ts | ||
ungroup.test.ts | ||
updateShapes.test.ts | ||
updateViewportPageBounds.test.ts | ||
zoomIn.test.ts | ||
zoomOut.test.ts | ||
zoomToBounds.test.ts | ||
zoomToFit.test.ts | ||
zoomToSelection.test.ts |