2980 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Steve Ruiz
|
58104c1a4c
|
Fix broken files (#3821)
This PR fixes a bug that prevented files (which included an arrow) from opening correctly. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix ### Test Plan 1. Open a file that includes at least one arrow |
||
alex
|
87e3d60c90
|
rework canBind callback (#3797)
This PR reworks the `canBind` callback to work with customizable bindings. It now accepts an object with a the shape, the other shape (optional - it may not exist yet), the direction, and the type of the binding. Devs can use this to create shapes that only participate in certain binding types, can have bindings from but not to them, etc. If you're implementing a binding, you can see if binding two shapes is allowed using `editor.canBindShapes(fromShape, toShape, 'my binding type')` ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `improvement` — Improving existing features ### Release Notes #### Breaking changes The `canBind` flag now accepts an options object instead of just the shape in question. If you're relying on its arguments, you need to change from `canBind(shape) {}` to `canBind({shape}) {}`. |
||
alex
|
2b2778b4f9
|
Fix markdown list rendering on docs site (#3813)
We write our API docs in markdown embedded in tsdocs comments. vscode's hover preview of these docs renders them as expected, but api-extract treats whitespace as insignificant and strips out most newlines, which breaks markdown lists. See https://github.com/microsoft/tsdoc/issues/178 for details. This PR patches tsdoc's emitter so that it preserves newlines. That way, we can write markdown lists and have them picked up as expected by the docs site markdown parser. I don't expect this to introduce other issues with previously ignored line breaks and markdown is only sensitive to linebreaks in certain scenarios (like lists) anyway. (Extracted from bindings docs - #3812) Before: <img width="740" alt="Screenshot 2024-05-22 at 15 00 43" src="https://github.com/tldraw/tldraw/assets/1489520/846f88b1-9480-48a6-9795-6a9f27ca242a"> After: <img width="708" alt="Screenshot 2024-05-22 at 14 51 28" src="https://github.com/tldraw/tldraw/assets/1489520/80c54b8e-4f74-45e7-9cba-0287175e9f97"> ### Change Type - [x] `docs` — Changes to the documentation, examples, or templates. - [x] `bugfix` — Bug fix |
||
alex
|
860f5d168d
|
Update README.md (#3818)
Add corepack note ### Change Type - [x] `docs` — Changes to the documentation, examples, or templates. - [x] `improvement` — Improving existing features |
||
Taha
|
d0033ce353
|
Add unit tests for the camera (#3814)
It made more sense for me to group the tests via input rather than via direction of zoom, so I made a test each for pinching and wheel event zoom. I can change this though if there's some reason for grouping them that way that I'm missing. From what I can tell, resetting the zoom happens via the hand tool, which is already tested, or via the UI, which should be E2E tested. Couldn't figure out how to write a test for that. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [x] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [x] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Release Notes - Adds unit tests for the camera |
||
alex
|
f9ed1bf2c9
|
Force interface instead of type for better docs (#3815)
Typescript's type aliases (`type X = thing`) can refer to basically anything, which makes it hard to write an automatic document formatter for them. Interfaces on the other hand are only object, so they play much nicer with docs. Currently, object-flavoured type aliases don't really get expanded at all on our docs site, which means we have a bunch of docs content that's not shown on the site. This diff introduces a lint rule that forces `interface X {foo: bar}`s instead of `type X = {foo: bar}` where possible, as it results in a much better documentation experience: Before: <img width="437" alt="Screenshot 2024-05-22 at 15 24 13" src="https://github.com/tldraw/tldraw/assets/1489520/32606fd1-6832-4a1e-aa5f-f0534d160c92"> After: <img width="431" alt="Screenshot 2024-05-22 at 15 33 01" src="https://github.com/tldraw/tldraw/assets/1489520/4e0d59ee-c38e-4056-b9fd-6a7f15d28f0f"> ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `docs` — Changes to the documentation, examples, or templates. - [x] `improvement` — Improving existing features |
||
alex
|
abc8521a71
|
fix pattern fill lods (#3801)
Camera options broke pattern lods. This PR adapts the more flexible take of pattern LODs i did for my version of camera controls to the new version. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix |
||
alex
|
db32f0e8e6
|
Remove unneeded worker IS_LOCAL check (#3808)
This was left in by mistake from an earlier version of #3795 ### Change Type - [x] `dotcom` — Changes the tldraw.com web app - [x] `bugfix` — Bug fix |
||
Mime Čuvalo
|
8fa87cc84a
|
touchscreen: improve the side panel, fix deploy env var, create room programmatically (#3806)
### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [x] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
Mime Čuvalo
|
b32082a2b4
|
touchscreen: allow meet.google.com origin (#3805)
need to allow the origin for the new room creation ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
Mime Čuvalo
|
ed33e6ab4d
|
build: disable flaky edit->edit focus test for now (#3803)
will fix up tomorrow to make sure the commit queue stays green ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [x] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [x] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
Mime Čuvalo
|
52eeb61dcd
|
touchscreen: just create a new room (#3802)
further testing on staging to make this work. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
alex
|
af664d55df
|
fix coarse pointer detection (#3795)
Previously, we were using touch and mouse events to detect when we were in coarse/fine pointer mode. The problem with this is that many mobile devices emulate mouse events for backwards compatibility with websites not built for touch - so many touch events result in mouse events too. The solution to this is to use the unified pointer events API, and check the `pointerType` property to determine the device the user is using. This diff also contains some changes to make it so that multiplayer rooms "just work" over the LAN when devloping locally. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix ### Release Notes - Fix a bug where coarse-pointer mode would get incorrectly detected on some touch devices |
||
Lorenzo Lewis
|
38b1f7d0c9
|
Update validation.ts (#3324)
Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [x] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [x] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan N/A - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Update example for Union type --- I believe this type was changed and `literal` is what it should be now. |
||
Steve Ruiz
|
b7933d7e08
|
Tighten up zoom to fit padding (#3798)
This PR reduces the zoom to fit area from 128 pixels on each edge to 50. It does produce some overlap with the toolbar but I do not mind this at all. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `improvement` — Improving existing features ### Test Plan - [x] Unit Tests - [ ] End to end tests ### Release Notes - Reduce padding when zooming to fit. |
||
Mime Čuvalo
|
453c98dd7e
|
toolbar: rework overflow css logic (#3779)
Small side quest: This reworks the overflow toolbar css to rely on `nth-child` instead of putting together a long selector. This also address the minor issue/edge case raised in https://github.com/tldraw/tldraw/pull/3757 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Release Notes - Toolbar: cleanup overflow css rules. --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
Steve Ruiz
|
625d59e468
|
Fix spacebar/mmb panning bug. (#3791)
We had a bug in our inputs logic that would allow a long press timeout to be triggered if a user started pointing before holding spacebar. This PR fixes that bug! Thanks to @ds300 for the spot. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix ### Release Notes - Fix bug with panning |
||
Mime Čuvalo
|
18b03624d5
|
touchscreen: wrong url argh (#3790)
fix url ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
David Sheldrick
|
1452978246
|
[bugfix] Cleanup input state after middle-click-to-pan (#3792)
closes #3013 closes #3733 This fixes a bug wherein the `inputs.isPanning` state was not being unset correctly after a middle-click-to-pan gesture with a mouse. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. |
||
Mime Čuvalo
|
ec128da55b
|
touchscreen: just add a fallback, figure out env later (#3789)
ugh ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
Mime Čuvalo
|
24a70106f5
|
touchscreen: fix env var name (#3788)
oh right, `NEXT_PUBLIC_` prefix, doh ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
Mime Čuvalo
|
3853c5f4d3
|
touchscreen: whoops, fix up script tag (#3786)
followup to https://github.com/tldraw/tldraw/pull/3765 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
David Sheldrick
|
29608838ef
|
Move InFrontOfTheCanvas (#3782)
Our `InFrontOfTheCanvas` UI override component (we don't have a default implementation, it's just an entry point for sdk users to insert their own UI) was being mounted outside of the UI react context subtree, which is an error because it won't have access to important things like translations and asset URLs. #3750 made this bug manifest as a thrown error in our `context-toolbar` example, as reported in #3773. To fix this I just moved the injection site of the `InFrontOfTheCanvas` component to be within the UI context. It ends up in the same place in the DOM. This PR closes #3773 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. |
||
Mime Čuvalo
|
9ffd7f15ee
|
google meet: add hardware whiteboard integration (#3765)
pushing out my changes but this is a draft. we need to do look into this more: - [ ] we might need to reach out to Google support and request to be put on their "start a whiteboard" whitelist/partner list? it's actually pretty unclear how to get on that list. I don't see any permissions/API scopes that is meant to enable that 🤔 - [ ] but maybe this is something that you @steveruizok as Google Workspace admin see on your end? let's look together when you get back. I initially tried doing a bundle (using esbuild (and i tried parcel/rollup too)) but it didn't feel like the right path, and also it didn't work when loading it in the Apps Scripts. So then I went the route of just doing an iframe and I think that feels much better. This means though that we do want our iframe protector to let through this usecase. But also, we could maybe just redirect always to a new room? I'm not sure yet. The build script helps either build the prod or staging version depending on what you want. Once we do find that the staging version works, then we'll go through the process of: - [x] applied for https://developers.google.com/workspace/preview (already did this to get access to new Google Meet APIs just in case) - [x] added to google analytics (already done) - [ ] turn off testing mode for oauth and submit for review - [ ] continue publishing process to Create a store listing for our prod app: https://developers.google.com/workspace/marketplace/how-to-publish ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [x] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [x] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Release Notes - Google Meet: add hardware whiteboard integration |
||
David Sheldrick
|
16ba1eb2c2
|
fix flipping for arrows (#3780)
@SomeHats and me fixed arrow flipping, which was a little bit broken after the bindings things ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. --------- Co-authored-by: Alex <alex@dytry.ch> |
||
David Sheldrick
|
2cf8104f5a
|
[bugfix?] End interactions before switching page (#3771)
Looking at #3762 it seemed to have been caused by calling `setCurrentPage` during a `select.editing_shape` interaction. I wonder whether we should trigger a `cancel` event before switching pages in case this happens? closes #3762 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. |
||
David Sheldrick
|
ed63bcead5
|
add missing spline icons (#3778)
We had somehow removed these ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. |
||
David Sheldrick
|
3a96d040c3
|
delete old todo comment (#3777)
follow up to #3695 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [x] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [x] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. |
||
Mitja Bezenšek
|
4adbc76e2d
|
Prevent pressing escape when editing document name to bubble up to the editor (#3725)
This prevents pressing escape to bubble to up to editor when editing document names. Prevents the current tool to change back to select tool. ### Before Pressing escape when editing the name stops the editing, but also switches from hand tool to select tool. https://github.com/tldraw/tldraw/assets/2523721/445ec4ca-73b9-4db3-a3e8-bd408d868c6f ### After We no longer switch to hand tool when we press escape the first time. The second time it still works though. https://github.com/tldraw/tldraw/assets/2523721/fbab7d97-0d87-47cb-b249-b20655f8bc70 @mimecuvalo happy to wait for your focus management PR to get merged, then update accordingly by using `editor.focus()`. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [x] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Edit document name. 2. Press escape. It should stop editing the document name, but should not switch the active tool to select tool. 3. Pressing escape once again should do it though. Also keyboard shortcuts should also work. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Prevent escaping out of editing the document name to switch the active tool to select tool. |
||
David Sheldrick
|
48512995b4
|
Prevent wobble during viewport following (#3695)
This revives the old 'derived camera' idea to prevent cursor wobbling during viewport following. Before this PR we updated the camera on a tick during viewport following, but the shapes and cursors were not moving on the same tick (we tried that during the perf work and it was all kinds of problematic). Frankly I've forgotten how we ever managed to eliminate wobble here in the first place? Anyway after this PR we derive the camera based on whether or not we are following a user. When you follow a user it makes it so that your viewport contains their viewport. If your viewport is not already very close to their viewport it will animate the initial position, after which it will 'lock' in place and the derived value will be used from then on. This exposed a minor issue in our sync engine: the fact that we send presence updates in separate websocket messages from document updates. We get into situations like this 1. user A follows user B 2. user B deletes the current page they are on 3. user B's page deletion diff gets sent 4. user B's presence update gets sent with a new currentPageId 5. user A receives the page deletion 6. user A still thinks that user B is on the old page and doesn't know how to update the follow state. So to fix this I made it so that we can (and do) send presence updates in the same websocket messages as document updates so the server can handle them atomically. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix ### Test Plan 1. Add a step-by-step description of how to test your PR here. 8. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Fixes a bug that caused the cursor & shapes to wiggle around when following someone else's viewport |
||
Taha
|
e559a7cdbb
|
E2E camera tests (#3747)
This PR adds E2E tests for panning and zooming using touch gestures and zooming using the scrollwheel input. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [x] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [x] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Adds E2E tests for the camera |
||
Steve Ruiz
|
c04b4286ca
|
Bump max shapes to 4000 (#3716)
This PR increases the maximum number of shapes per page from 2000 to 4000. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `improvement` — Improving existing features ### Test Plan 1. Create max shapes 2. Does it work? - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Increase maximum number of shapes per page from 2000 to 4000. |
||
David Sheldrick
|
979e5d7979
|
export DefaultNavigationPanel (#3772)
closes #3756 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. |
||
David Sheldrick
|
abb207b98a
|
Allow DefaultErrorFallback to be used independently (#3769)
Follow up to #3750 – this broke our error pages because they try to use the Canvas component if they are in a tldraw subtree but it was designed to work outside of a tldraw subtree too. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [x] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. |
||
Mime Čuvalo
|
9bf25c10b8
|
docs: smaller snapshot so it doesnt crash (#3768)
+ drive by fix for css cleanup ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [x] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know |
||
Mime Čuvalo
|
b4c1f606e1
|
focus: rework and untangle existing focus management logic in the sdk (#3718)
Focus management is really scattered across the codebase. There's sort of a battle between different code paths to make the focus the correct desired state. It seemed to grow like a knot and once I started pulling on one thread to see if it was still needed you could see underneath that it was accounting for another thing underneath that perhaps wasn't needed. The impetus for this PR came but especially during the text label rework, now that it's much more easy to jump around from textfield to textfield. It became apparent that we were playing whack-a-mole trying to preserve the right focus conditions (especially on iOS, ugh). This tries to remove as many hacks as possible, and bring together in place the focus logic (and in the darkness, bind them). ## Places affected - [x] `useEditableText`: was able to remove a bunch of the focus logic here. In addition, it doesn't look like we need to save the selection range anymore. - lingering footgun that needed to be fixed anyway: if there are two labels in the same shape, because we were just checking `editingShapeId === id`, the two text labels would have just fought each other for control - [x] `useFocusEvents`: nixed and refactored — we listen to the store in `FocusManager` and then take care of autoFocus there - [x] `useSafariFocusOutFix`: nixed. not necessary anymore because we're not trying to refocus when blurring in `useEditableText`. original PR for reference: https://github.com/tldraw/brivate/pull/79 - [x] `defaultSideEffects`: moved logic to `FocusManager` - [x] `PointingShape` focus for `startTranslating`, decided to leave this alone actually. - [x] `TldrawUIButton`: it doesn't look like this focus bug fix is needed anymore, original PR for reference: https://github.com/tldraw/tldraw/pull/2630 - [x] `useDocumentEvents`: left alone its manual focus after the Escape key is hit - [x] `FrameHeading`: double focus/select doesn't seem necessary anymore - [x] `useCanvasEvents`: `onPointerDown` focus logic never happened b/c in `Editor.ts` we `clearedMenus` on pointer down - [x] `onTouchStart`: looks like `document.body.click()` is not necessary anymore ## Future Changes - [ ] a11y: work on having an accessebility focus ring - [ ] Page visibility API: (https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API) events when tab is back in focus vs. background, different kind of focus - [ ] Reexamine places we manually dispatch `pointer_down` events to see if they're necessary. - [ ] Minor: get rid of `useContainer` maybe? Is it really necessary to have this hook? you can just do `useEditor` → `editor.getContainer()`, feels superfluous. ## Methodology Looked for places where we do: - `body.click()` - places we do `container.focus()` - places we do `container.blur()` - places we do `editor.updateInstanceState({ isFocused })` - places we do `autofocus` - searched for `document.activeElement` ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan - [x] run test-focus.spec.ts - [x] check MultipleExample - [x] check EditorFocusExample - [x] check autoFocus - [x] check style panel usage and focus events in general - [x] check text editing focus, lots of different devices, mobile/desktop ### Release Notes - Focus: rework and untangle existing focus management logic in the SDK |
||
David Sheldrick
|
48fa9018f4
|
[bindings] beforeUnbind/afterUnbind to replace beforeDelete/afterDelete (#3761)
Before this PR the interface for doing cleanup when shapes/bindings were deleted was quite footgunny and inexpressive. We were abusing the shape beforeDelete callbacks to implement copy+paste, which doesn't work in situations where cascading deletes are required. This caused bugs in both our pin and sticker examples, where copy+paste was broken. I noticed the same bug in my experiment with text labels, and I think the fact that it took us a while to notice these bugs indicates other users are gonna fall prey to the same bugs unless we help them out. One suggestion to fix this was to add `onAfterDelete(From|To)Shape` callbacks. The cascading deletes could happen in those, while keeping the 'commit changes' kinds of updates in the `before` callbacks and theoretically that would fix the issues with copy+paste. However, expecting people to figure this out on their own is asking a heckuva lot IMO, and it's a heavy bit of nuance to try to convey in the docs. It's hard enough to convey it here. Plus I could imagine for some users it might easily even leave the store in an inconsistent state to allow a bound shape to exist for any length of time after the shape it was bound to was already deleted. It also just makes an already large and muddy API surface area even larger and muddier and if that can be avoided let's avoid it. This PR clears things up by making it so that there's only one callback for when a binding is removed. The callback is given a `reason` for why it is being called The `reason` is one of the following: - The 'from' is being deleted - The 'to' shape is being deleted - The binding is being deleted on it's own. Technically a binding might end up being deleted when both the `from` and `to` shapes are being deleted, but it's very hard to know for certain when that is happening, so I decided to just ignore it for now. I think it would only matter for perf reasons, to avoid doing useless work. So this PR replaces the `onBeforeDelete`, `onAfterDelete`, `onBeforeFromShapeDelete` and `onBeforeToShapeDelete` (and the prospective `onAfterFromShapeDelete` and `onAfterToShapeDelete`) with just two callbacks: - `onBeforeUnbind({binding, reason})` - called before any shapes or the binding have been deleted. - `onAfterUnbind({binding, reason})` - called after the binding and any shapes have been deleted. This still allows all the same behaviour as before, without having to spread the logic between multiple callbacks. It's also just clearer IMO since you only get one callback invocation per unbinding rather than potentially two. It also fixes our copy+paste footgun since we can now implement that by just deleting the bindings rather than invoking the `onBeforeDelete(From|To)Shape` callbacks. I'm not worried about losing the explicit before/after delete callbacks for the binding record or shape records because sdk users still have the ability to detect all those situations with full nuance in obvious ways. The one thing that would even require extra bookkeeping is getting access to a shape record after the shape was deleted, but that's probably not a thing anybody would want to do 🤷🏼 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. |
||
alex
|
5b21ad96ae
|
No defaults for contexts (#3750)
in many places, we use a pattern like `React.createContext({} as Editor)` when defining contexts. This causes a problem: `{}` is not `Editor`, but you can still `useEditor` wherever you like and your code with run with this confusing non-editor value. This diff updates all our `createContext` calls to default to `null`, with an explicit check and error for missing values. Now, if you `useEditor` outside of `<Tldraw />`, you'll get a message telling you that it can only be used within `<Tldraw />`. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `improvement` — Improving existing features ### Release Notes `useEditor` and other context-based hooks will now throw an error when used out-of-context, instead of returning a fake value. |
||
alex
|
ab807afda3
|
Store-level "operation end" event (#3748)
This adds a store-level "operation end" event which fires at the end of atomic operations. It includes some other changes too: - The `SideEffectManager` now lives in & is a property of the store as `StoreSideEffects`. One benefit to this is that instead of overriding methods on the store to register side effects (meaning the store can only ever be used in one place) the store now calls directly into the side effect manager, which is responsible for dealing with any other callbacks - The history manager's "batch complete" event is gone, in favour of this new event. We were using the batch complete event for only one thing, calling `onChildrenChange` - which meant it wasn't getting called for undo/redo events, which aren't part of a batch. `onChildrenChange` is now called after each atomic store operation affecting children. I've also added a rough pin example which shows (kinda messily) how you might use the operation complete handler to traverse a graph of bindings and resolve constraints between them. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `feature` — New feature ### Release Notes #### Breaking changes `editor.registerBatchCompleteHandler` has been replaced with `editor.registerOperationCompleteHandler` |
||
alex
|
5a15c49d63
|
ban using @internal items in examples (#3746)
There's been some confusion in the community as our example use a few `@internal` methods. These things are intended for use inside the tldraw library, but aren't a part of the public API. That means that when those examples are copied out of the tldraw repo, those `@internal` references produce errors. This diff bans the use of items tagged as `@internal` inside our examples app by adding an eslint plugin (adapted from the one we already have that protects against deprecated types) preventing them. ### Change Type - [x] `docs` — Changes to the documentation, examples, or templates. - [x] `bugfix` — Bug fix - [x] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. |
||
Mitja Bezenšek
|
7226afc1ff
|
Fix readonly fetching happening too often. (#3732)
The problem happened because we cleared the `readonlyUrl` from shared state. This was happening every time the url changed (so panning, zooming,...). Now, instead of clearing the `readonlyUrl` we pull out the room prefix and slug from the readonly url. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [x] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Create a shared room. 2. Move the camera around. 3. We should not be constantly fetching the readonly slug. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Fix an issue where readonly slug was being fetched every time the url changed (panning, zooming,...). --------- Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com> |
||
dependabot[bot]
|
3dcd2a851c
|
Bump the npm_and_yarn group across 2 directories with 4 updates (#3731)
Bumps the npm_and_yarn group with 3 updates in the / directory: [next](https://github.com/vercel/next.js), [semver](https://github.com/npm/node-semver) and [zod](https://github.com/colinhacks/zod). Bumps the npm_and_yarn group with 1 update in the /templates/nextjs directory: [next](https://github.com/vercel/next.js). Updates `next` from 14.1.3 to 14.2.3 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/vercel/next.js/releases">next's releases</a>.</em></p> <blockquote> <h2>v14.2.3</h2> <blockquote> <p>[!NOTE]<br /> This release is backporting bug fixes. It does <strong>not</strong> include all pending features/changes on canary.</p> </blockquote> <h3>Core Changes</h3> <ul> <li>Fix: resolve mixed re-exports module as cjs (<a href="https://redirect.github.com/vercel/next.js/issues/64681">#64681</a>)</li> <li>fix: mixing namespace import and named import client components (<a href="https://redirect.github.com/vercel/next.js/issues/64809">#64809</a>)</li> <li>Fix mixed exports in server component with barrel optimization (<a href="https://redirect.github.com/vercel/next.js/issues/64894">#64894</a>)</li> <li>Fix next/image usage in mdx(<a href="https://redirect.github.com/vercel/next.js/issues/64875">#64875</a>)</li> <li>fix(fetch-cache): fix additional typo, add type & data validation (<a href="https://redirect.github.com/vercel/next.js/issues/64799">#64799</a>)</li> <li>prevent erroneous route interception during lazy fetch (<a href="https://redirect.github.com/vercel/next.js/issues/64692">#64692</a>)</li> <li>fix root page revalidation when redirecting in a server action (<a href="https://redirect.github.com/vercel/next.js/issues/64730">#64730</a>)</li> <li>fix: remove traceparent from cachekey should not remove traceparent from original object (<a href="https://redirect.github.com/vercel/next.js/issues/64727">#64727</a>)</li> <li>Clean-up fetch metrics tracking (<a href="https://redirect.github.com/vercel/next.js/issues/64746">#64746</a>)</li> </ul> <h3>Credits</h3> <p>Huge thanks to <a href="https://github.com/huozhi"><code>@huozhi</code></a>, <a href="https://github.com/samcx"><code>@samcx</code></a>, <a href="https://github.com/ztanner"><code>@ztanner</code></a>, <a href="https://github.com/Jeffrey-Zutt"><code>@Jeffrey-Zutt</code></a>, and <a href="https://github.com/ijjk"><code>@ijjk</code></a> for helping!</p> <h2>v14.2.2</h2> <blockquote> <p>[!NOTE]<br /> This release is backporting bug fixes. It does <strong>not</strong> include all pending features/changes on canary.</p> </blockquote> <h3>Core Changes</h3> <ul> <li>Fix Server Action error logs for unhandled POST requests (<a href="https://redirect.github.com/vercel/next.js/issues/64315">#64315</a>)</li> <li>Improve rendering performance (<a href="https://redirect.github.com/vercel/next.js/issues/64408">#64408</a>)</li> <li>Fix the method prop case in Server Actions transform (<a href="https://redirect.github.com/vercel/next.js/issues/64398">#64398</a>)</li> <li>fix(next-lint): update option --report-unused-disable-directives to --report-unused-disable-directives-severity (<a href="https://redirect.github.com/vercel/next.js/issues/64405">#64405</a>)</li> <li>tweak test for Azure (<a href="https://redirect.github.com/vercel/next.js/issues/64424">#64424</a>)</li> <li>router restore should take priority over pending actions (<a href="https://redirect.github.com/vercel/next.js/issues/64449">#64449</a>)</li> <li>Fix client boundary inheritance for barrel optimization (<a href="https://redirect.github.com/vercel/next.js/issues/64467">#64467</a>)</li> <li>improve turborepo caching (<a href="https://redirect.github.com/vercel/next.js/issues/64493">#64493</a>)</li> <li>feat: strip traceparent header from cachekey (<a href="https://redirect.github.com/vercel/next.js/issues/64499">#64499</a>)</li> <li>Fix more Turbopack build tests</li> <li>Update lockfile for compatibility with turbo (<a href="https://redirect.github.com/vercel/next.js/issues/64360">#64360</a>)</li> <li>Fix typo in dynamic-rendering.ts (<a href="https://redirect.github.com/vercel/next.js/issues/64365">#64365</a>)</li> <li>Fix DynamicServerError not being thrown in fetch (<a href="https://redirect.github.com/vercel/next.js/issues/64511">#64511</a>)</li> <li>fix(next): Metadata.openGraph values not resolving basic values when type is set (<a href="https://redirect.github.com/vercel/next.js/issues/63620">#63620</a>)</li> <li>disable production chunking in dev (<a href="https://redirect.github.com/vercel/next.js/issues/64488">#64488</a>)</li> <li>Fix cjs client components tree-shaking (<a href="https://redirect.github.com/vercel/next.js/issues/64558">#64558</a>)</li> <li>fix refresh behavior for discarded actions (<a href="https://redirect.github.com/vercel/next.js/issues/64532">#64532</a>)</li> <li>fix: filter out middleware requests in logging (<a href="https://redirect.github.com/vercel/next.js/issues/64549">#64549</a>)</li> <li>Turbopack: Allow client components to be imported in app routes (<a href="https://redirect.github.com/vercel/next.js/issues/64520">#64520</a>)</li> <li>Fix ASL bundling for dynamic css (<a href="https://redirect.github.com/vercel/next.js/issues/64451">#64451</a>)</li> <li>add pathname normalizer for actions (<a href="https://redirect.github.com/vercel/next.js/issues/64592">#64592</a>)</li> <li>fix incorrect refresh request when basePath is set (<a href="https://redirect.github.com/vercel/next.js/issues/64589">#64589</a>)</li> <li>test: skip turbopack build test (<a href="https://redirect.github.com/vercel/next.js/issues/64356">#64356</a>)</li> <li>hotfix(turbopack): Update with patch for postcss.config.js path resolution on Windows (<a href="https://redirect.github.com/vercel/next.js/issues/64677">#64677</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Mime Čuvalo
|
d2d3e582e5
|
assets: rework mime-type detection to be consistent/centralized; add support for webp/webm, apng, avif (#3730)
As I started working on image LOD stuff and wrapping my head around the codebase, this was bothering me. - there are missing popular types, especially WebP - there are places where we're copy/pasting the same list of types but they can get out-of-date with each other (also, one place described supporting webm but we didn't actually do that) This adds animated apng/avif detection as well (alongside our animated gif detection). Furthermore, it moves the gif logic to be alongside the png logic (they were in separate packages unnecessarily) ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Release Notes - Images: unify list of acceptable types and expand to include webp, webm, apng, avif |
||
Steve Ruiz
|
142c27053b
|
Fix imports in Astro (#3742)
This PR changes our imports so that they work in a few rare cases. https://github.com/tldraw/tldraw/issues/1817 ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix ### Release Notes - Fix bug effecting imports in Astro. |
||
Steve Ruiz
|
da415d95db
|
Update READMEs, add form link (#3741)
This PR updates readmes (including fixing some typos) and adds a link to a Google Form for license inquiries. ### Change Type - [x] `internal` — Does not affect user-facing stuff - [x] `chore` — other boring stuff |
||
alex
|
91903c9761
|
Move arrow helpers from editor to tldraw (#3721)
With the new work on bindings, we no longer need to keep any arrows stuff hard-coded in `editor`, so let's move it to `tldraw` with the rest of the shapes. Couple other changes as part of this: - We had two different types of `WeakMap` backed cache, but we now only have one - There's a new free-standing version of `createComputedCache` that doesn't need access to the editor/store in order to create the cache. instead, it returns a `{get(editor, id)}` object and instantiates the cache on a per-editor basis for each call. - Fixed a bug in `createSelectedComputedCache` where the selector derivation would get re-created on every call to `get` ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `improvement` — Improving existing features ### Release Notes #### Breaking changes - `editor.getArrowInfo(shape)` has been replaced with `getArrowInfo(editor, shape)` - `editor.getArrowsBoundTo(shape)` has been removed. Instead, use `editor.getBindingsToShape(shape, 'arrow')` and follow the `fromId` of each binding to the corresponding arrow shape - These types have moved from `@tldraw/editor` to `tldraw`: - `TLArcInfo` - `TLArrowInfo` - `TLArrowPoint` - `WeakMapCache` has been removed |
||
Trevor Dobbertin
|
7b99c8532b
|
fix link (#3726)
Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [x] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. Just a small link fix for the docs. |
||
David Sheldrick
|
c6ba621c11
|
Incremental bindings index (#3685) | ||
alex
|
da35f2bd75
|
Bindings (#3326)
First draft of the new bindings API. We'll follow this up with some API refinements, tests, documentation, and examples. Bindings are a new record type for establishing relationships between two shapes so they can update at the same time. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `feature` — New feature ### Release Notes #### Breaking changes - The `start` and `end` properties on `TLArrowShape` no longer have `type: point | binding`. Instead, they're always a point, which may be out of date if a binding exists. To check for & retrieve arrow bindings, use `getArrowBindings(editor, shape)` instead. - `getArrowTerminalsInArrowSpace` must be passed a `TLArrowBindings` as a third argument: `getArrowTerminalsInArrowSpace(editor, shape, getArrowBindings(editor, shape))` - The following types have been renamed: - `ShapeProps` -> `RecordProps` - `ShapePropsType` -> `RecordPropsType` - `TLShapePropsMigrations` -> `TLPropsMigrations` - `SchemaShapeInfo` -> `SchemaPropsInfo` --------- Co-authored-by: David Sheldrick <d.j.sheldrick@gmail.com> |
||
dependabot[bot]
|
0a7816e34d
|
Bump the npm_and_yarn group across 2 directories with 4 updates (#3719)
Bumps the npm_and_yarn group with 3 updates in the / directory: [pdfjs-dist](https://github.com/mozilla/pdfjs-dist), [semver](https://github.com/npm/node-semver) and [zod](https://github.com/colinhacks/zod). Bumps the npm_and_yarn group with 2 updates in the /templates/vite directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) and [semver](https://github.com/npm/node-semver). Updates `pdfjs-dist` from 4.0.379 to 4.2.67 <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/mozilla/pdfjs-dist/commits">compare view</a></li> </ul> </details> <br /> Updates `semver` from 7.6.0 to 7.6.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/npm/node-semver/releases">semver's releases</a>.</em></p> <blockquote> <h2>v7.6.1</h2> <h2><a href="https://github.com/npm/node-semver/compare/v7.6.0...v7.6.1">7.6.1</a> (2024-05-04)</h2> <h3>Bug Fixes</h3> <ul> <li><a href=" |