Skip to content

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 in packages/docs/public/_redirects.
  • Link untranslated locale navigation to canonical English pages rather than adding placeholders.
  • packages/docs/development/roadmap.md tracks product direction, Figma compatibility gaps, raw metadata coverage, and the code map. packages/docs/development/testing.md is the canonical testing architecture. Explanations that would bloat an AGENTS.md belong under packages/docs/development/.
  • Component API data loaders share one vue-component-meta checker through sharedChecker() 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/vue primitives, derive API tables from source and JSDoc with vue-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 in landing/landing.css, with Bricolage Grotesque and Geist Mono self-hosted from @fontsource-variable packages. Its locale index.md pages set navbar: 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 from src/theme/tokens.css, so the landing and the download page can mount the app's own components. A component that needs the browser loads through defineClientComponent with an import.meta.env.SSR guard, as landing/features/AiPanel.vue loads the chat's tool call cards; server-rendered sections never import from landing/stage/, which they reach only through ui/StageFrame.vue.
  • The landing (.vitepress/theme/landing/**) is part of the root tsconfig.json, bun run lint, and bun 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.json overrides).
  • The docs Tailwind entry scans the landing (theme/tailwind.css), so a scoped class named like a utility, such as ring, block, or grid, also gets that utility's styles; name classes after what they are in the scene instead.
  • Every landing scene moves only while ui/useSceneActivity.ts says 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 in landing/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-canvas EditorCanvas there 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.md in each locale, landing/download/) shares the landing's catalog and opens from the landing's download dialog. landing/download/releases.data.ts reads the latest stable release and any newer beta from GitHub when the site builds, with GITHUB_TOKEN or GH_TOKEN when 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 against LandingMessages, with en.ts as the source; change every catalog together. Each locale's index.md and download.md import 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 through landing/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 by landingPosterFingerprint() in the posters frontmatter of pages that set landing: true, and tools/generate/landing-posters captures them from each locale's download page afterwards. Stills are named by landing/posters.ts; a stage reports ready and marks its canvas and panel with data-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.ts preload 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 in tools/checks/docs/tests/, and stills in tools/generate/landing-posters/tests. Keep such code free of vitepress imports so it loads under bun test (landing/content/messages/fill.ts).

Released under the MIT License.