2024-01-17 10:10:44 +00:00
|
|
|
import { Analytics } from '@vercel/analytics/react'
|
2024-01-15 12:33:15 +00:00
|
|
|
import { Metadata, Viewport } from 'next'
|
|
|
|
import AutoRefresh from '../components/AutoRefresh'
|
|
|
|
import '../styles/globals.css'
|
|
|
|
import '../styles/hljs.css'
|
|
|
|
import '../styles/parameters-table.css'
|
|
|
|
import { Providers } from './providers'
|
|
|
|
|
2024-02-29 16:28:45 +00:00
|
|
|
const TITLE = 'tldraw SDK'
|
2024-01-15 12:33:15 +00:00
|
|
|
const DESCRIPTION =
|
2024-02-29 16:28:45 +00:00
|
|
|
'Infinite canvas SDK from tldraw. Build whiteboards, design tools, and canvas experiences for the web.'
|
2024-01-15 12:33:15 +00:00
|
|
|
const TWITTER_HANDLE = '@tldraw'
|
|
|
|
const TWITTER_CARD = 'social-twitter.png'
|
|
|
|
const FACEBOOK_CARD = 'social-og.png'
|
|
|
|
const THEME_COLOR = '#FFFFFF'
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
2024-02-05 14:52:05 +00:00
|
|
|
metadataBase: new URL('https://tldraw.dev'),
|
2024-01-15 12:33:15 +00:00
|
|
|
title: {
|
|
|
|
default: TITLE,
|
|
|
|
template: `%s • ${TITLE}`,
|
|
|
|
},
|
|
|
|
description: DESCRIPTION,
|
|
|
|
openGraph: {
|
|
|
|
title: TITLE,
|
|
|
|
description: DESCRIPTION,
|
|
|
|
siteName: TITLE,
|
|
|
|
type: 'website',
|
|
|
|
url: 'https://tldraw.dev',
|
|
|
|
images: FACEBOOK_CARD,
|
|
|
|
},
|
|
|
|
twitter: {
|
|
|
|
creator: TWITTER_HANDLE,
|
|
|
|
description: DESCRIPTION,
|
|
|
|
card: 'summary_large_image',
|
|
|
|
images: TWITTER_CARD,
|
|
|
|
},
|
|
|
|
applicationName: TITLE,
|
|
|
|
appleWebApp: {
|
|
|
|
capable: true,
|
|
|
|
title: TITLE,
|
|
|
|
statusBarStyle: 'black',
|
|
|
|
},
|
|
|
|
formatDetection: {
|
|
|
|
telephone: false,
|
|
|
|
},
|
|
|
|
icons: [
|
|
|
|
{ rel: 'shortcut icon', url: '/favicon.svg' },
|
2024-01-25 23:05:49 +00:00
|
|
|
{ rel: 'icon', url: 'favicon-32x32.svg', sizes: '32x32' },
|
|
|
|
{ rel: 'icon', url: 'favicon-16x16.svg', sizes: '16x16' },
|
2024-02-06 13:31:02 +00:00
|
|
|
{ rel: 'apple-touch-icon', url: 'apple-touch-icon.png' },
|
2024-01-25 23:05:49 +00:00
|
|
|
{ rel: 'apple-touch-icon', url: 'apple-touch-icon-152x152.svg', sizes: '152x152' },
|
|
|
|
{ rel: 'apple-touch-icon', url: 'apple-touch-icon-180x180.svg', sizes: '180x180' },
|
|
|
|
{ rel: 'apple-touch-icon', url: 'apple-touch-icon-167x167.svg', sizes: '167x167' },
|
2024-01-15 12:33:15 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
export const viewport: Viewport = {
|
|
|
|
initialScale: 1,
|
|
|
|
maximumScale: 1,
|
|
|
|
width: 'device-width',
|
|
|
|
height: 'device-height',
|
|
|
|
themeColor: THEME_COLOR,
|
|
|
|
}
|
|
|
|
|
|
|
|
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
|
|
|
return (
|
|
|
|
<AutoRefresh>
|
|
|
|
<html suppressHydrationWarning>
|
|
|
|
<body>
|
|
|
|
<Providers>
|
2024-02-29 16:28:45 +00:00
|
|
|
{children}
|
2024-01-17 10:10:44 +00:00
|
|
|
<Analytics />
|
2024-01-15 12:33:15 +00:00
|
|
|
</Providers>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</AutoRefresh>
|
|
|
|
)
|
|
|
|
}
|