{"version":3,"file":"notebook-CaHoyYHK.js","sources":["../../../src/components/notebooks/NotebookPostCard.tsx","../../../src/components/notebooks/NotebookRenderer.tsx","../../../src/pages/notebook/NotebookRoot.tsx","../../../src/pages/notebook/index.tsx"],"sourcesContent":["import { HubPostSummaryData } from '@/types.js';\nimport { Card } from '@a-type/ui';\n\nexport interface NotebookPostCardProps {\n\tpost: HubPostSummaryData;\n}\n\nexport function NotebookPostCard({ post }: NotebookPostCardProps) {\n\treturn (\n\t\t\n\t\t\t{post.coverImageUrl && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{post.title}\n\t\t\t\t\t\n\t\t\t\t\t\t{new Date(post.updatedAt ?? post.createdAt).toDateString()}\n\t\t\t\t\t\n\t\t\t\t\t{post.summary && {post.summary}}\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import { HubNotebookData, HubPostSummaryData } from '@/types.js';\nimport { Box, Card, H1 } from '@a-type/ui';\nimport { tiptapToString } from '@post.biscuits/common';\nimport { RichTextRenderer } from '../richText/RichTextRenderer.jsx';\nimport { NotebookPostCard } from './NotebookPostCard.jsx';\n\nexport interface NotebookRendererProps {\n\tnotebook: HubNotebookData;\n\tposts: HubPostSummaryData[];\n}\n\nexport function NotebookRenderer({ notebook, posts }: NotebookRendererProps) {\n\tconst descriptionIsEmpty =\n\t\t!notebook.description || tiptapToString(notebook.description) === '';\n\treturn (\n\t\t\n\t\t\t{notebook.coverImageUrl && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{notebook.iconUrl && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t

{notebook.name}

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t)}\n\t\t\t\n\t\t\t\t{!!notebook.description && !descriptionIsEmpty && (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\t{posts.map((post) => (\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t©{' '}\n\t\t\t\t\t\t{new Date(notebook.updatedAt ?? notebook.createdAt).getFullYear()}{' '}\n\t\t\t\t\t\t{notebook.authorName}\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\tWebsite powered by{' '}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tBiscuits Post\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t\n\t);\n}\n","import { NotebookRenderer } from '@/components/notebooks/NotebookRenderer.jsx';\nimport { HubNotebookData, HubPostSummaryData } from '../../types.js';\n\nexport interface NotebookRootProps {\n\tnotebook: HubNotebookData;\n\tposts: HubPostSummaryData[];\n}\n\nexport function NotebookRoot(props: NotebookRootProps) {\n\treturn ;\n}\n","import ReactDOM from 'react-dom/client';\nimport 'virtual:uno.css';\nimport { NotebookRoot } from './NotebookRoot.js';\n\n// @ts-expect-error - This is injected by the server\nconst snapshot = window.__SNAPSHOT__;\n\nReactDOM.hydrateRoot(\n\tdocument.getElementById('root')!,\n\t,\n);\n"],"names":["NotebookPostCard","post","Card","jsx","jsxs","NotebookRenderer","notebook","posts","descriptionIsEmpty","tiptapToString","Box","H1","RichTextRenderer","NotebookRoot","props","snapshot","ReactDOM"],"mappings":"6FAOgB,SAAAA,EAAiB,CAAE,KAAAC,GAA+B,CACjE,cACEC,EAAK,CAAA,UAAWD,EAAK,cAAgB,cAAgB,GACpD,SAAA,CAAAA,EAAK,eACLE,EAAA,IAACD,EAAK,MAAL,CACA,SAAAC,EAAA,IAAC,MAAA,CACA,IAAKF,EAAK,cACV,UAAU,4BAAA,CAAA,EAEZ,EAEAE,EAAA,IAAAD,EAAK,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