Added exporting of shapes and pages as images (#468)

* Added exporting of shapeses

* added video serialization

* Fix viewport sizes, add chrome-aws-lambda for puppeteer

* Update menu styling

* extract to callback

* Update Loading.tsx

* force update menu

* fix missing fonts

* Added SVG and JSON export

* Fix json exports

* Merge branch 'main' into pr/468, update menus

* Update TldrawApp.ts

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
Faraz Shaikh 2022-01-10 20:36:28 +04:00 committed by GitHub
parent e62755ef10
commit 6103febaaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 494 additions and 226 deletions

View file

@ -6,6 +6,7 @@ import { LiveblocksProvider, RoomProvider } from '@liveblocks/react'
import { useAccountHandlers } from 'hooks/useAccountHandlers'
import { styled } from 'styles'
import { useMultiplayerState } from 'hooks/useMultiplayerState'
import { exportToImage } from 'utils/export'
import { useMultiplayerAssets } from 'hooks/useMultiplayerAssets'
const client = createClient({
@ -58,6 +59,7 @@ function Editor({
showSponsorLink={!isSponsor}
onSignIn={isSponsor ? undefined : onSignIn}
onSignOut={isUser ? onSignOut : undefined}
onExport={exportToImage}
onAssetCreate={onAssetCreate}
onAssetDelete={onAssetDelete}
{...fileSystemEvents}