Docs site
Published VitePress site. bun run docs:dev, bun run docs:build for fast checks, and bun run docs:build:production for deployment output. bun run check:docs runs the integrity checks in tools/checks/docs/ plus check:authoring-reference.
- Keep routes under
/getting-started,/overview/**,/user-guide/**,/programmable/**,/reference/**, and/development/**, plus the top-level/download; do not recreate/guide/**. Preserve moves inpackages/docs/public/_redirects. - Link untranslated locale navigation to canonical English pages rather than adding placeholders.
packages/docs/development/roadmap.mdtracks product direction, Figma compatibility gaps, raw metadata coverage, and the code map.packages/docs/development/testing.mdis the canonical testing architecture. Explanations that would bloat anAGENTS.mdbelong underpackages/docs/development/.- Component API data loaders share one
vue-component-metachecker throughsharedChecker()in.vitepress/sdk/component-meta.ts; VitePress evaluates each loader separately, so a checker per module meant one TypeScript program per page and about 7 GB of heap. - SDK pages embed the demos colocated with
packages/vueprimitives, derive API tables from source and JSDoc withvue-component-meta, and process examples with Twoslash so imports and types stay aligned with the public package API. The docs Tailwind entry scans those demos. - Generated authoring-reference copies under this site are checked, not edited; run
bun run generate:authoring-reference(packages/core/AGENTS.md, Tools). - CI runs documentation integrity and the docs build for docs-only changes, not engine, browser, Storybook, or native suites (
tools/AGENTS.md).
Landing
- The landing page (
.vitepress/theme/landing/) is drawn as frames on a canvas from the design's own tokens inlanding/landing.css, with Bricolage Grotesque and Geist Mono self-hosted from@fontsource-variablepackages. Its localeindex.mdpages setnavbar: false, so its toolbar (sections/SiteToolbar.vue) stands in for the docs navigation and its footer links every locale. - The site takes the app's aliases, icon plugins, and build constants from
appSourceConfig()in@pairdraw/vite-config(vite/) and its design tokens fromsrc/theme/tokens.css, so the landing and the download page can mount the app's own components. A component that needs the browser loads throughdefineClientComponentwith animport.meta.env.SSRguard, aslanding/features/AiPanel.vueloads the chat's tool call cards; server-rendered sections never import fromlanding/stage/, which they reach only throughui/StageFrame.vue. - The landing (
.vitepress/theme/landing/**) is part of the roottsconfig.json,bun run lint, andbun run format, so it is checked with the app; its#docs/*imports resolve there to.vitepress/*, and it alone may import the app through@/(oxlint.jsonoverrides). - The docs Tailwind entry scans the landing (
theme/tailwind.css), so a scoped class named like a utility, such asring,block, orgrid, also gets that utility's styles; name classes after what they are in the scene instead. - Every landing scene moves only while
ui/useSceneActivity.tssays it may: on screen, in a visible tab, and not for visitors who prefer reduced motion, who see each scene's finished state. Animate transforms and opacity, as the hero's selection scales its edges rather than resizing a box; the hero's frames and holds come from the design's storyboard inlanding/hero/storyboard.ts. - The download page's stage is one document pinned with
provideTabEditorStore()and one WebGL canvas that mounts once and is never unmounted. Browsers cap WebGL contexts per page, so do not use the app's two-canvasEditorCanvasthere or mount and unmount stages on scroll (landing/stage/StageCanvas.vue). - Counts shown on the landing page come from source at build time through
landing/content/stats.data.ts; do not hardcode them. - The download page (
download.mdin each locale,landing/download/) shares the landing's catalog and opens from the landing's download dialog.landing/download/releases.data.tsreads the latest stable release and any newer beta from GitHub when the site builds, withGITHUB_TOKENorGH_TOKENwhen set, so both pages stay static; a build that cannot reach GitHub links to the releases there instead. - Landing copy lives in
landing/content/messages/, one catalog per docs locale typed againstLandingMessages, withen.tsas the source; change every catalog together. Each locale'sindex.mdanddownload.mdimport only their own catalog, so the theme never registers the landing and other docs pages download none of it. The download page's stage follows the docs appearance switch and locale throughlanding/stage/useDocsAppearance.ts. - Production builds (
build:production,PAIRDRAW_LANDING_POSTERS=1) show WebP stills of each stage until it is ready: the config names them bylandingPosterFingerprint()in thepostersfrontmatter of pages that setlanding: true, andtools/generate/landing-posterscaptures them from each locale's download page afterwards. Stills are named bylanding/posters.ts; a stage reportsreadyand marks its canvas and panel withdata-poster-part, and capture mode (?poster-capture) must start stages at once and keep them still (no autoplay). Development builds have no stills. - Pages that set
landing: true(the download pages) make.vitepress/landing-head.tspreload CanvasKit and the scenes' fonts for fine pointers; on touch screens a stage starts only when tapped. Stage panels, the toolbar, and the preview controls are async components (landing/stage/definitions.ts), so a stage downloads only what it shows; keep new stage-specific code behind the same kind of import. - Landing logic is tested where its counterpart lives: the download page against the release catalog in
tools/release/release-packages/tests/native/download-page.test.ts, its pure helpers and the hero storyboard intools/checks/docs/tests/, and stills intools/generate/landing-posters/tests. Keep such code free ofvitepressimports so it loads underbun test(landing/content/messages/fill.ts).