e0a5f57793
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as a monorepo subdirectory under desktop/. Source only — node_modules, dist, Cargo target and the upstream .git history are excluded. desktop/ keeps its own independent Cargo workspace (desktop/src-tauri with crates/*); it is not part of the backend boosapi crate, so a `cargo check` at the metapi root still compiles only the backend. Build the desktop app from desktop/src-tauri per desktop/README.md. Note: app icons are still placeholder assets pending the final BoosAPI logo. The updater signing keys live outside the repo and are not included.
2.3 KiB
2.3 KiB
React Next SSR
markstream-react now exposes two explicit SSR entrypoints for Next.js:
markstream-react/next: the official Next entry. Import it from App Router server components or Pages Router SSR pages when you want real server HTML first and client enhancement after hydration.markstream-react/server: a pure server entry. Use it when you want a stable server-only render path with no client component boundary.
Import styles once from your app shell:
// app/layout.tsx or pages/_app.tsx
import 'markstream-react/index.css'
import 'katex/dist/katex.min.css'
App Router with markstream-react/next
import MarkdownRender from 'markstream-react/next'
const markdown = `# Hello Next.js
This route ships real SSR HTML first.`
export default function Page() {
return <MarkdownRender content={markdown} final />
}
Pure Server Rendering with markstream-react/server
import MarkdownRender from 'markstream-react/server'
const markdown = `# Server entry
This path stays fully server-rendered.`
export default function Page() {
return <MarkdownRender content={markdown} final />
}
Custom Components and Custom Tags
If you register overrides from a server file, prefer the server helpers so you avoid importing the root package side effects:
import MarkdownRender, { setCustomComponents } from 'markstream-react/server'
setCustomComponents('next-ssr-demo', {
thinking: ({ children }: any) => <aside data-ssr-status="thinking-tag">{children}</aside>,
})
Then render with customId="next-ssr-demo" and customHtmlTags={['thinking']}.
Current SSR acceptance also covers:
customIdscoping isolation- custom node children rendered into the initial HTML
customHtmlTagsattributes preserved in the initial HTML
TypeScript
markstream-react/next and markstream-react/server both publish standalone declaration files. You can import shared prop types directly from the entrypoint you use:
import type {
HtmlPreviewFrameProps,
MarkdownCodeBlockNodeProps,
NodeRendererProps,
TooltipProps,
} from 'markstream-react/next'
Current Verification Commands
pnpm exec vitest run test/markstream-react-next-ssr.test.tsx
pnpm --filter markstream-react build
pnpm run test:e2e:next-ssr