Tldraw/packages/tldraw/src/test/commands
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
..
__snapshots__ Fix SVG exports in Next.js (#3446) 2024-04-11 14:02:05 +00:00
alignShapes.test.tsx
allShapesCommonBounds.test.ts
animateShapes.test.ts
animateToShape.test.ts
animationSpeed.test.ts
blur.test.ts
cancel.test.ts
centerOnPoint.test.ts
clipboard.test.ts
complete.test.ts
createPage.test.ts
createShapes.test.ts Bump jest to fix weird prettier bug (#2716) 2024-02-04 11:19:47 +00:00
deletePage.test.ts
deleteShapes.test.ts
distributeShapes.test.ts
duplicatePage.test.ts
getContent.test.ts
getInitialMetaForShape.test.ts
getSvgString.test.ts React-powered SVG exports (#3117) 2024-03-25 14:16:55 +00:00
groupShapes.test.ts
guide.md
interrupt.test.ts
lockShapes.test.ts Roundup fixes (#2862) 2024-02-19 14:52:43 +00:00
moveShapesToPage.test.ts [Snapping 1/5] Validation & strict types for fractional indexes (#2827) 2024-02-14 17:53:30 +00:00
nudge.test.ts
packShapes.test.ts
pageToScreen.test.ts
pan.test.ts
penmode.test.ts
pinch.test.ts
putContent.test.ts Bump jest to fix weird prettier bug (#2716) 2024-02-04 11:19:47 +00:00
reorderShapes.test.ts
reparentShapesById.test.ts [Snapping 1/5] Validation & strict types for fractional indexes (#2827) 2024-02-14 17:53:30 +00:00
resetZoom.test.ts
resizeShape.test.ts
rotateShapes.test.ts
screenToPage.test.ts
setAppState.test.ts
setBrush.test.ts
setCurrentPage.test.ts [Snapping 1/5] Validation & strict types for fractional indexes (#2827) 2024-02-14 17:53:30 +00:00
setPageState.test.ts
setSelectedIds.test.ts
setSelectedTool.test.ts
setSettings.test.ts
setStyle.test.ts
squash.test.ts
stackShapes.test.ts
stretch.test.tsx
ungroup.test.ts
updateShapes.test.ts Bump jest to fix weird prettier bug (#2716) 2024-02-04 11:19:47 +00:00
updateViewportPageBounds.test.ts Use canvas bounds for viewport bounds (#2798) 2024-02-12 15:03:25 +00:00
zoomIn.test.ts [Fix] Camera coordinate issues (#2719) 2024-02-04 12:03:49 +00:00
zoomOut.test.ts
zoomToBounds.test.ts
zoomToFit.test.ts
zoomToSelection.test.ts