Tldraw/packages/editor/src/lib/test/commands
alex f2d8fae6ea
hoist opacity out of props (#1526)
This change hoists opacity out of props and changes it to a number
instead of an enum.

The change to a number is to make tldraw more flexible for library
consumers who might want more expressivity with opacity than our 5
possible values allow. the tldraw editor will now happily respect any
opacity between 0 and 1. The limit to our supported values is enforced
only in the UI. I think this is limited enough that it's a reasonable
tradeoff between in-app simplicity and giving external developers the
flexibility they need.

There's a new `opacityForNextShape` property on the instance. This works
exactly the same way as propsForNextShape does, except... it's just for
opacity. With this, there should be no user-facing changes to how
opacity works in tldraw. There are also new `opacity`/`setOpacity` APIs
in the editor that work with it/selections similar to how props do.

@ds300 do you mind reviewing the migrations here?

### Change Type

- [x] `major` — Breaking Change

### Test Plan

- [x] Unit Tests
- [ ] Webdriver tests

### Release Notes

[internal only for now]
2023-06-06 16:15:12 +00:00
..
__snapshots__ hoist opacity out of props (#1526) 2023-06-06 16:15:12 +00:00
alignShapes.test.tsx rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
allShapesCommonBounds.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
animateShapes.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
animateToShape.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
animationSpeed.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
blur.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
cancel.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
centerOnPoint.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
clipboard.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
complete.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
createPage.test.ts Independent instance state persistence (#1493) 2023-06-05 14:11:07 +00:00
createShapes.test.ts hoist opacity out of props (#1526) 2023-06-06 16:15:12 +00:00
deletePage.test.ts Independent instance state persistence (#1493) 2023-06-05 14:11:07 +00:00
deleteShapes.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
distributeShapes.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
duplicatePage.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
flipShapes.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
getContent.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
getSvg.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
groupShapes.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
guide.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
interrupt.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
lockShapes.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
moveShapesToPage.test.ts Independent instance state persistence (#1493) 2023-06-05 14:11:07 +00:00
nudge.test.ts Independent instance state persistence (#1493) 2023-06-05 14:11:07 +00:00
packShapes.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
pageToScreen.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
pan.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
paste.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
pinch.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
putContent.test.ts rename app folder to editor (#1528) 2023-06-06 16:01:54 +00:00
renderingShapes.test.tsx rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
reorderShapes.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
reparentShapesById.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
resetZoom.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
resizeShape.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
rotateShapes.test.ts rename app folder to editor (#1528) 2023-06-06 16:01:54 +00:00
screenToPage.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
setAppState.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
setBrush.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
setCurrentPage.test.ts Independent instance state persistence (#1493) 2023-06-05 14:11:07 +00:00
setPageState.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
setSelectedIds.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
setSelectedTool.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
setSettings.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
setStyle.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
stackShapes.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00
stretch.test.tsx rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
ungroup.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
updateShapes.test.ts hoist opacity out of props (#1526) 2023-06-06 16:15:12 +00:00
updateViewportPageBounds.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
zoomIn.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
zoomOut.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
zoomToBounds.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
zoomToFit.test.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
zoomToSelection.test.ts tlschema cleanup (#1509) 2023-06-03 20:46:53 +00:00