Tldraw/packages/tldraw/src/test/commands/__snapshots__
alex a18525ea78
Fix SVG exports in Next.js (#3446)
Next.js bans the use of react-dom/server APIs on the client. React's
docs recommend against using these too:
https://react.dev/reference/react-dom/server/renderToString#removing-rendertostring-from-the-client-code

In this diff, we switch from using `ReactDOMServer.renderToStaticMarkup`
to `ReactDOMClient.createRoot`, fixing SVG exports in next.js apps.
`getSvg` remains deprecated, but we've introduced a new `getSvgElement`
method with a similar API to `getSvgString` - it returns an `{svg,
width, height}` object.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix
2024-04-11 14:02:05 +00:00
..
getSvgString.test.ts.snap Fix SVG exports in Next.js (#3446) 2024-04-11 14:02:05 +00:00
packShapes.test.ts.snap Update the project to Node 20 (#2691) 2024-01-31 16:53:40 +00:00
zoomToFit.test.ts.snap Update the project to Node 20 (#2691) 2024-01-31 16:53:40 +00:00