import { Document, Page, Path, Svg, Text, View } from '@react-pdf/renderer' import dayjs from 'dayjs' import type { Snapshot } from 'valtio' import { type QueryResult } from '../types' import { NotebookPdfMarkdown } from './NotebookPdfMarkdown' import { NotebookPdfQueryCell } from './NotebookPdfQueryCell' import { pdfStyles } from './theme' import { isQueryCell, type Cell } from '@/data/content/notebooks/notebook-schema' interface NotebookPdfDocumentProps { name: string projectName?: string cells: readonly Snapshot[] results: ReadonlyMap } function SupabaseLogoMark() { return ( ) } export function NotebookPdfDocument({ name, projectName, cells, results, }: NotebookPdfDocumentProps) { const exportedDate = dayjs().format('MMM D, YYYY') return ( supabase EXPLORER NOTEBOOK {name} Exported {exportedDate} {projectName !== undefined && ( Project: {projectName} )} {cells.map((cell) => isQueryCell(cell) ? ( ) : ( ) )} ) }