diff --git a/.claude/skills/wordpress-to-tanstack-cms/SKILL.md b/.claude/skills/wordpress-to-tanstack-cms/SKILL.md
index d9647258..048ab2a1 100644
--- a/.claude/skills/wordpress-to-tanstack-cms/SKILL.md
+++ b/.claude/skills/wordpress-to-tanstack-cms/SKILL.md
@@ -241,7 +241,7 @@ letting "migrated" imply completeness.
## 8. Visual parity: reproducing the theme in userland
-Migrating content reproduces the markup. Reproducing the *look* is separate work,
+Migrating content reproduces the markup. Reproducing the _look_ is separate work,
and it follows one firm rule that comes straight from the goal of a faithful
port: **reproduce the WordPress design in the TanStack app's userland (theme
tokens, block renderers, seed, a little config), and never edit WordPress to make
@@ -290,7 +290,7 @@ breakpoint", default **921px** (`min-[921px]:`), not Tailwind's 768px.
- **Headings use fixed px, not fluid sizes.** Gutenberg writes an inline
`font-size` (for example a 54px hero `
`), and Astra does not scale inline
sizes down, so the heading stays 54px at every width. A fluid
- `clamp(…, 7vw, 54px)` on the ported side renders *smaller* at tablet widths;
+ `clamp(…, 7vw, 54px)` on the ported side renders _smaller_ at tablet widths;
use the same fixed px.
- **Card titles inherit the theme heading weight (about 600); section headings
are explicit (often 800).** A card `
`/`
` with no explicit weight in the
@@ -333,7 +333,7 @@ renders, and keep the arrays editable for the next site.
### Measure, do not eyeball
-Load both sites in one window at the *same* width and diff `getComputedStyle` on
+Load both sites in one window at the _same_ width and diff `getComputedStyle` on
matching elements (font-family, size, weight, line-height, color, padding, and
`grid-template-columns`). A window-width mismatch is the most common false "they
don't match", so equalize width first. Browser-automation windows are often
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 7e873fa4..2afbd814 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -176,12 +176,10 @@ jobs:
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@0e4c94811ee024520b2ea330855f2d38549a7d92 # main
- # Build on the repo's Node, then run the tests on the oldest supported
- # one: `node:sqlite` and the default store are what 22.13 gates.
+ # Build on the repo's Node, then run the package test suites on the oldest
+ # supported Node to gate that @tanstack/cms-core, -api, and -cli work there.
- name: Build
run: pnpm exec nx run-many --targets=build --projects=@tanstack/cms-core,@tanstack/cms-api,@tanstack/cms-client --outputStyle=static
- - name: Create a database on the current Node runtime
- run: node scripts/sqlite-runtime-fixture.mjs write "$RUNNER_TEMP/cms-runtime.db"
- name: Switch to Node 22.13
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
@@ -189,7 +187,6 @@ jobs:
- name: Test core, API, and CLI
run: |
node --version
- node scripts/sqlite-runtime-fixture.mjs verify "$RUNNER_TEMP/cms-runtime.db"
for pkg in core api cli; do
(cd "packages/$pkg" && pnpm exec vitest run)
done
@@ -222,6 +219,11 @@ jobs:
- name: Setup Tools
uses: TanStack/config/.github/setup@0e4c94811ee024520b2ea330855f2d38549a7d92 # main
- name: Build Packages
- run: pnpm run build:all
+ # Build only the publishable packages (the same set pkg-pr-new ships
+ # below), not the whole repo via build:all. A broken app build — e.g.
+ # an app under app/ — must never block package previews. All projects
+ # under packages/* are named @tanstack/cms-* or @tanstack/search-*;
+ # keep this selector in sync with the publish glob.
+ run: pnpm exec nx run-many --targets=build --projects='@tanstack/cms-*,@tanstack/search-*'
- name: Publish Previews
run: pnpx pkg-pr-new publish --pnpm './packages/*'
diff --git a/.github/zizmor.yml b/.github/zizmor.yml
new file mode 100644
index 00000000..5decb9f3
--- /dev/null
+++ b/.github/zizmor.yml
@@ -0,0 +1,15 @@
+# zizmor configuration — https://docs.zizmor.sh/configuration/
+#
+# `ref-version-mismatch` fires on every `TanStack/config/.github/*@ # main`
+# use: the action is SHA-pinned (the secure practice) but its `# main` comment
+# names a branch that has since advanced past the pinned commit, which zizmor
+# reports as a "mismatched version comment". We pin TanStack's shared config at a
+# reviewed main commit on purpose and bump it deliberately, so this comment-hygiene
+# audit does not apply. All other audits stay on.
+rules:
+ ref-version-mismatch:
+ ignore:
+ - pr.yml
+ - coverage.yml
+ - autofix.yml
+ - release.yml
diff --git a/README.md b/README.md
index e20d4e3a..49f4cbe4 100644
--- a/README.md
+++ b/README.md
@@ -217,12 +217,12 @@ TanStack CMS ships a 14-row starter catalog (12 application classes and 2 delive
## Examples
-| Example | What it shows |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| [`blog`](./examples/blog) | The reference app: posts, pages, blocks, AI editing, and the Playwright suite. |
-| [`blog-voting`](./examples/blog-voting) | Extending the CMS with your own collections and routes (votes on posts). |
-| [`db-sqlite`](./examples/db-sqlite), [`db-federated`](./examples/db-federated) | TanStack DB as the data layer: a writable CMS collection, and CMS copy joined with other services in one live query. |
-| [`payload-after`](./examples/payload-after), [`astro-starlight-after`](./examples/astro-starlight-after), [`emdash-after`](./examples/emdash-after), [`wordpress-after`](./examples/wordpress-after) | Sites migrated from Payload, Astro Starlight, EmDash, and WordPress, each next to its `*-before` source. |
+| Example | What it shows |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| [`blog`](./examples/blog) | The reference app: posts, pages, blocks, AI editing, and the Playwright suite. |
+| [`blog-voting`](./examples/blog-voting) | Extending the CMS with your own collections and routes (votes on posts). |
+| [`db-sqlite`](./examples/db-sqlite), [`db-federated`](./examples/db-federated) | TanStack DB as the data layer: a writable CMS collection, and CMS copy joined with other services in one live query. |
+| [`payload-after`](./examples/payload-after), [`astro-starlight-after`](./examples/astro-starlight-after), [`emdash-after`](./examples/emdash-after), [`wordpress-after`](./examples/wordpress-after) | Sites migrated from Payload, Astro Starlight, EmDash, and WordPress, each next to its `*-before` source. |
## Migration skills
diff --git a/app/docs-preview/README.md b/app/docs-preview/README.md
index c55befb8..0a163dbb 100644
--- a/app/docs-preview/README.md
+++ b/app/docs-preview/README.md
@@ -68,16 +68,16 @@ flagged in the report, not mapped to blocks.
## Configuration
-| Env var | Default | Purpose |
-| --- | --- | --- |
-| `DOCS_DIR` | — | The docs directory to ingest (or pass as the CLI arg). |
-| `ANTHROPIC_API_KEY` | — | Enables `/ask`. Else set a key at `/ai-settings`. |
-| `DOCS_PREVIEW_MODEL` | `claude-sonnet-4-6` | The Claude model for `/ask`. |
-| `DOCS_PREVIEW_TITLE` | source dir name | The site title. |
-| `DOCS_PREVIEW_DATA_DIR` | `.data-` | Where the PGlite store lives. |
-| `DOCS_PREVIEW_INGEST_DIR` | `.ingest-` | Where ingest artifacts live. |
-
-**BYOK.** The AI chat takes a key from `ANTHROPIC_API_KEY` *or* one pasted at
+| Env var | Default | Purpose |
+| ------------------------- | ------------------- | ------------------------------------------------------ |
+| `DOCS_DIR` | — | The docs directory to ingest (or pass as the CLI arg). |
+| `ANTHROPIC_API_KEY` | — | Enables `/ask`. Else set a key at `/ai-settings`. |
+| `DOCS_PREVIEW_MODEL` | `claude-sonnet-4-6` | The Claude model for `/ask`. |
+| `DOCS_PREVIEW_TITLE` | source dir name | The site title. |
+| `DOCS_PREVIEW_DATA_DIR` | `.data-` | Where the PGlite store lives. |
+| `DOCS_PREVIEW_INGEST_DIR` | `.ingest-` | Where ingest artifacts live. |
+
+**BYOK.** The AI chat takes a key from `ANTHROPIC_API_KEY` _or_ one pasted at
`/ai-settings` (stored in the data dir, local use only). With no key, `/ask` is
disabled and says so — search and preview still work.
diff --git a/app/docs-preview/package.json b/app/docs-preview/package.json
index 39066ccf..12487278 100644
--- a/app/docs-preview/package.json
+++ b/app/docs-preview/package.json
@@ -22,6 +22,7 @@
"@tanstack/cms-ui-react": "workspace:*",
"@tanstack/react-router": "^1.170.46",
"@tanstack/react-start": "^1.169.4",
+ "@tanstack/react-store": "^0.11.2",
"@tanstack/virtual-file-routes": "^1.162.0",
"highlight.js": "^11.11.1",
"mermaid": "^11.6.0",
diff --git a/app/docs-preview/scripts/ingest-docs.mjs b/app/docs-preview/scripts/ingest-docs.mjs
index cceb1cfa..14ee3e4b 100644
--- a/app/docs-preview/scripts/ingest-docs.mjs
+++ b/app/docs-preview/scripts/ingest-docs.mjs
@@ -39,7 +39,9 @@ const CMS_EXPORT_VERSION = 1
// ---------------------------------------------------------------------------
const docsDir = path.resolve(process.argv[2] || process.env.DOCS_DIR || '')
const outDir = path.resolve(
- process.argv[3] || process.env.DOCS_PREVIEW_OUT || path.join(process.cwd(), '.ingest'),
+ process.argv[3] ||
+ process.env.DOCS_PREVIEW_OUT ||
+ path.join(process.cwd(), '.ingest'),
)
if (!process.argv[2] && !process.env.DOCS_DIR) {
console.error('ingest-docs: pass a docs directory (argv or DOCS_DIR).')
@@ -53,7 +55,13 @@ if (!existsSync(docsDir) || !statSync(docsDir).isDirectory()) {
// ---------------------------------------------------------------------------
// fs helpers
// ---------------------------------------------------------------------------
-const SKIP_DIRS = new Set(['node_modules', '.git', '.vitepress', 'dist', 'build'])
+const SKIP_DIRS = new Set([
+ 'node_modules',
+ '.git',
+ '.vitepress',
+ 'dist',
+ 'build',
+])
/** Every file under `dir`, recursively, as absolute paths. */
function walk(dir, acc = []) {
@@ -88,7 +96,10 @@ function toSlug(relPath) {
/** A stable document id from a slug. */
function toId(slug) {
if (slug === '/') return 'index'
- return slug.replace(/[^a-z0-9]+/gi, '-').replace(/^-+|-+$/g, '').toLowerCase()
+ return slug
+ .replace(/[^a-z0-9]+/gi, '-')
+ .replace(/^-+|-+$/g, '')
+ .toLowerCase()
}
/**
@@ -149,7 +160,8 @@ function readConfigNav() {
const sections = [] // ordered [{ label, slugs: [slug...] }]
const targets = [] // every `to` the config references
const configFile = path.join(docsDir, 'config.json')
- if (!existsSync(configFile)) return { bySlug, sections, targets, present: false }
+ if (!existsSync(configFile))
+ return { bySlug, sections, targets, present: false }
let config
try {
config = JSON.parse(readFileSync(configFile, 'utf8'))
@@ -162,7 +174,10 @@ function readConfigNav() {
const slugs = []
const addChild = (child) => {
if (child.to != null) {
- const slug = `/${String(child.to).replace(/^\/+/, '')}`.replace(/^\/\//, '/')
+ const slug = `/${String(child.to).replace(/^\/+/, '')}`.replace(
+ /^\/\//,
+ '/',
+ )
const norm = slug === '/' ? '/' : slug.replace(/^\//, '')
targets.push(norm)
if (!bySlug.has(norm)) {
@@ -298,7 +313,8 @@ for (const abs of mdFiles) {
id: toId(slug),
slug,
title,
- description: typeof data.description === 'string' ? data.description : undefined,
+ description:
+ typeof data.description === 'string' ? data.description : undefined,
section,
sidebarLabel,
sidebarOrder,
@@ -493,19 +509,32 @@ if (configNav.present) {
const pg = pageBySlug.get(slug)
if (!pg) continue
placed.add(slug)
- navPages.push({ slug, title: pg.title, label: pg.sidebarLabel, framework: pg.framework })
+ navPages.push({
+ slug,
+ title: pg.title,
+ label: pg.sidebarLabel,
+ framework: pg.framework,
+ })
}
if (navPages.length) navSections.push({ label: sec.label, pages: navPages })
}
}
const leftover = pages.filter((p) => !placed.has(p.slug))
const bySection = new Map()
-for (const p of leftover.sort((a, b) => a.sidebarOrder - b.sidebarOrder || a.slug.localeCompare(b.slug))) {
+for (const p of leftover.sort(
+ (a, b) => a.sidebarOrder - b.sidebarOrder || a.slug.localeCompare(b.slug),
+)) {
const list = bySection.get(p.section) ?? []
- list.push({ slug: p.slug, title: p.title, label: p.sidebarLabel, framework: p.framework })
+ list.push({
+ slug: p.slug,
+ title: p.title,
+ label: p.sidebarLabel,
+ framework: p.framework,
+ })
bySection.set(p.section, list)
}
-for (const [label, navPages] of bySection) navSections.push({ label, pages: navPages })
+for (const [label, navPages] of bySection)
+ navSections.push({ label, pages: navPages })
writeFileSync(
path.join(outDir, 'nav.json'),
@@ -518,7 +547,8 @@ for (const i of issues) issuesByKind[i.kind] = (issuesByKind[i.kind] ?? 0) + 1
const issuesBySeverity = { error: 0, warning: 0, info: 0 }
for (const i of issues) issuesBySeverity[i.severity] += 1
const navSourceCounts = {}
-for (const p of pages) navSourceCounts[p.navSource] = (navSourceCounts[p.navSource] ?? 0) + 1
+for (const p of pages)
+ navSourceCounts[p.navSource] = (navSourceCounts[p.navSource] ?? 0) + 1
const report = {
generatedAt: exportedAt,
@@ -548,7 +578,9 @@ writeFileSync(
// ---------------------------------------------------------------------------
console.log(`ingest-docs: ${docsDir}`)
console.log(` pages: ${pages.length} (from ${mdFiles.length} files)`)
-console.log(` sections: ${navSections.length}${configNav.present ? ' (config.json)' : ' (derived)'}`)
+console.log(
+ ` sections: ${navSections.length}${configNav.present ? ' (config.json)' : ' (derived)'}`,
+)
console.log(` links: ${linksChecked} checked`)
console.log(` assets: ${assetsReferenced} referenced`)
console.log(` nav source: ${JSON.stringify(navSourceCounts)}`)
@@ -556,4 +588,6 @@ console.log(
` issues: ${issues.length} — ${issuesBySeverity.error} error, ${issuesBySeverity.warning} warning, ${issuesBySeverity.info} info`,
)
console.log(` ${JSON.stringify(issuesByKind)}`)
-console.log(` → ${path.relative(process.cwd(), outDir)}/{cms-export,nav,ingest-report}.json`)
+console.log(
+ ` → ${path.relative(process.cwd(), outDir)}/{cms-export,nav,ingest-report}.json`,
+)
diff --git a/app/docs-preview/scripts/preview.mjs b/app/docs-preview/scripts/preview.mjs
index 40709fc1..b168e86b 100644
--- a/app/docs-preview/scripts/preview.mjs
+++ b/app/docs-preview/scripts/preview.mjs
@@ -16,7 +16,9 @@ import path from 'node:path'
const docsDir = path.resolve(process.argv[2] || process.env.DOCS_DIR || '')
if (!process.argv[2] && !process.env.DOCS_DIR) {
- console.error('Usage: pnpm preview (or DOCS_DIR= pnpm preview)')
+ console.error(
+ 'Usage: pnpm preview (or DOCS_DIR= pnpm preview)',
+ )
process.exit(1)
}
if (!existsSync(docsDir) || !statSync(docsDir).isDirectory()) {
@@ -43,7 +45,10 @@ const env = {
function run(step, file, args) {
console.log(`\n▸ ${step}`)
- const r = spawnSync(process.execPath, [file, ...args], { stdio: 'inherit', env })
+ const r = spawnSync(process.execPath, [file, ...args], {
+ stdio: 'inherit',
+ env,
+ })
if (r.status !== 0) {
console.error(`\n✗ ${step} failed.`)
process.exit(r.status ?? 1)
@@ -63,9 +68,10 @@ run('Load into the CMS', 'scripts/load-export.mjs', [
console.log(`\n▸ Serving — http://localhost:3017 (Ctrl-C to stop)`)
if (!process.env.ANTHROPIC_API_KEY && !process.env.ANTHROPIC_AUTH_TOKEN) {
- console.log(' (no ANTHROPIC_API_KEY — /ask is off; set one or use /ai-settings)')
+ console.log(
+ ' (no ANTHROPIC_API_KEY — /ask is off; set one or use /ai-settings)',
+ )
}
const serve = spawn('pnpm', ['dev'], { stdio: 'inherit', env })
serve.on('exit', (code) => process.exit(code ?? 0))
-for (const sig of ['SIGINT', 'SIGTERM'])
- process.on(sig, () => serve.kill(sig))
+for (const sig of ['SIGINT', 'SIGTERM']) process.on(sig, () => serve.kill(sig))
diff --git a/app/docs-preview/src/byok.api.ts b/app/docs-preview/src/byok.api.ts
index 30ba7f8e..3511439a 100644
--- a/app/docs-preview/src/byok.api.ts
+++ b/app/docs-preview/src/byok.api.ts
@@ -6,10 +6,12 @@
import { createServerFn } from '@tanstack/react-start'
import { z } from 'zod'
-export const byokStatus = createServerFn({ method: 'GET' }).handler(async () => {
- const m = await import('./byok.server')
- return { source: m.keySource(), model: m.resolveModel() }
-})
+export const byokStatus = createServerFn({ method: 'GET' }).handler(
+ async () => {
+ const m = await import('./byok.server')
+ return { source: m.keySource(), model: m.resolveModel() }
+ },
+)
export const byokSet = createServerFn({ method: 'POST' })
.validator(z.object({ key: z.string().min(1).max(500) }))
@@ -19,8 +21,10 @@ export const byokSet = createServerFn({ method: 'POST' })
return { source: m.keySource(), model: m.resolveModel() }
})
-export const byokClear = createServerFn({ method: 'POST' }).handler(async () => {
- const m = await import('./byok.server')
- m.clearStoredKey()
- return { source: m.keySource(), model: m.resolveModel() }
-})
+export const byokClear = createServerFn({ method: 'POST' }).handler(
+ async () => {
+ const m = await import('./byok.server')
+ m.clearStoredKey()
+ return { source: m.keySource(), model: m.resolveModel() }
+ },
+)
diff --git a/app/docs-preview/src/byok.server.ts b/app/docs-preview/src/byok.server.ts
index 7d2da06d..8f371916 100644
--- a/app/docs-preview/src/byok.server.ts
+++ b/app/docs-preview/src/byok.server.ts
@@ -50,7 +50,10 @@ export function getStoredKey(): string | undefined {
export function setStoredKey(key: string): void {
const dir = resolveDataDir()
mkdirSync(dir, { recursive: true })
- writeFileSync(byokFile(), `${JSON.stringify({ anthropicKey: key.trim() }, null, 2)}\n`)
+ writeFileSync(
+ byokFile(),
+ `${JSON.stringify({ anthropicKey: key.trim() }, null, 2)}\n`,
+ )
}
export function clearStoredKey(): void {
diff --git a/app/docs-preview/src/cms.config.ts b/app/docs-preview/src/cms.config.ts
index f9fa7322..7748f5e5 100644
--- a/app/docs-preview/src/cms.config.ts
+++ b/app/docs-preview/src/cms.config.ts
@@ -8,6 +8,7 @@
* tree never collides with the first.
*/
import { defineBlock, defineCms } from '@tanstack/cms-core'
+import { createServerOnlyFn } from '@tanstack/react-start'
import { definition } from './cms.definition'
import { askAgentConfig } from './agents/ask'
@@ -33,13 +34,15 @@ const corpusTitle =
/**
* AI: Claude for the read-only `/ask` chat, enabled by a key from either the
- * environment or the `/ai-settings` page (see byok.server.ts). Loaded with
- * `import()` on the server only, so the provider SDK stays out of the browser
- * bundle, and returns `null` when no key resolves (AI surfaces hide, search
- * keeps working).
+ * environment or the `/ai-settings` page (see byok.server.ts). The factory is
+ * wrapped in `createServerOnlyFn` so its body — and the `./byok.server` import
+ * it pulls in — is stripped from the browser bundle; a bare `import()` is not
+ * enough (TanStack Start's import-protection plugin statically denies any
+ * client-reachable module that references a `*.server.*` file). Returns `null`
+ * when no key resolves (AI surfaces hide, search keeps working).
*/
const ai = {
- textAdapter: async () => {
+ textAdapter: createServerOnlyFn(async () => {
const { resolveAnthropicKey, resolveModel } = await import('./byok.server')
const key = resolveAnthropicKey()
if (!key) return null
@@ -47,7 +50,7 @@ const ai = {
// createAnthropicChat takes an explicit credential (reads nothing from
// env), so the same path serves both the env key and the pasted key.
return createAnthropicChat(resolveModel() as 'claude-sonnet-4-6', key)
- },
+ }),
agents: {
ask: askAgentConfig,
},
diff --git a/app/docs-preview/src/cms.definition.ts b/app/docs-preview/src/cms.definition.ts
index 3164543d..25077e7b 100644
--- a/app/docs-preview/src/cms.definition.ts
+++ b/app/docs-preview/src/cms.definition.ts
@@ -28,7 +28,10 @@
* to the source tree. There is no editing surface: this app ingests, renders,
* searches, and answers questions about a corpus; it does not change it.
*/
-import { defineCmsDefinition, defineCollection } from '@tanstack/cms-core/definition'
+import {
+ defineCmsDefinition,
+ defineCollection,
+} from '@tanstack/cms-core/definition'
/** The framework variants TanStack docs template with `{$framework}`. */
export const FRAMEWORKS = [
@@ -60,7 +63,8 @@ const collections = [
type: 'slug',
nested: true,
required: true,
- description: 'Docs path, e.g. /guide/data-loading ("/" is the docs home)',
+ description:
+ 'Docs path, e.g. /guide/data-loading ("/" is the docs home)',
},
{ name: 'sidebarLabel', label: 'Sidebar label', type: 'text' },
{ name: 'sidebarOrder', label: 'Sidebar order', type: 'number' },
@@ -81,7 +85,8 @@ const collections = [
name: 'sourcePath',
label: 'Source path',
type: 'text',
- description: 'Original file, relative to the docs dir (read-only provenance)',
+ description:
+ 'Original file, relative to the docs dir (read-only provenance)',
},
{
name: 'navSource',
@@ -91,7 +96,12 @@ const collections = [
description: 'Where this page’s nav placement came from',
},
{ name: 'blocks', label: 'Content', type: 'blocks' },
- { name: 'published', label: 'Published', type: 'boolean', defaultValue: true },
+ {
+ name: 'published',
+ label: 'Published',
+ type: 'boolean',
+ defaultValue: true,
+ },
],
}),
]
diff --git a/app/docs-preview/src/components/docs-sidebar.tsx b/app/docs-preview/src/components/docs-sidebar.tsx
index 764365a4..c5202aa7 100644
--- a/app/docs-preview/src/components/docs-sidebar.tsx
+++ b/app/docs-preview/src/components/docs-sidebar.tsx
@@ -51,7 +51,9 @@ export function DocsSidebar({
}
/** Flatten the nav into reading order, for prev/next. */
-export function flattenNav(nav: NavData | null): Array<{ slug: string; title: string }> {
+export function flattenNav(
+ nav: NavData | null,
+): Array<{ slug: string; title: string }> {
if (!nav) return []
return nav.sections.flatMap((s) =>
s.pages.map((p) => ({ slug: p.slug, title: p.label || p.title })),
diff --git a/app/docs-preview/src/ingest-artifacts.server.ts b/app/docs-preview/src/ingest-artifacts.server.ts
index 58253738..e67c554c 100644
--- a/app/docs-preview/src/ingest-artifacts.server.ts
+++ b/app/docs-preview/src/ingest-artifacts.server.ts
@@ -48,7 +48,9 @@ export interface NavData {
}
export function ingestDir(): string {
- return process.env.DOCS_PREVIEW_INGEST_DIR || path.join(process.cwd(), '.ingest')
+ return (
+ process.env.DOCS_PREVIEW_INGEST_DIR || path.join(process.cwd(), '.ingest')
+ )
}
function readJson(name: string): T | null {
diff --git a/app/docs-preview/src/lib/links.ts b/app/docs-preview/src/lib/links.ts
index d5abbe91..2eab56e3 100644
--- a/app/docs-preview/src/lib/links.ts
+++ b/app/docs-preview/src/lib/links.ts
@@ -9,8 +9,7 @@ const PREFIX = '/docs'
/** Resolve a relative link target against a page's slug into a doc slug. */
export function resolveDocSlug(fromSlug: string, target: string): string {
- const fromDir =
- fromSlug === '/' ? [] : fromSlug.split('/').slice(0, -1)
+ const fromDir = fromSlug === '/' ? [] : fromSlug.split('/').slice(0, -1)
const clean = target.replace(/\.mdx?$/i, '').replace(/\/index$/i, '')
const stack = [...fromDir]
for (const part of clean.split('/')) {
diff --git a/app/docs-preview/src/routeTree.gen.ts b/app/docs-preview/src/routeTree.gen.ts
index 44d7e9d3..3900aede 100644
--- a/app/docs-preview/src/routeTree.gen.ts
+++ b/app/docs-preview/src/routeTree.gen.ts
@@ -15,6 +15,8 @@ import { Route as DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesAgentRouteImpo
import { Route as DotAiSettingsRouteImport } from './routes/ai-settings'
import { Route as DotAskRouteImport } from './routes/ask'
import { Route as DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRouteImport } from './../../../packages/ui-react/src/routes/content'
+import { Route as DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRouteImport } from './../../../packages/ui-react/src/routes/media'
+import { Route as DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRouteImport } from './../../../packages/ui-react/src/routes/profile'
import { Route as DotReportRouteImport } from './routes/report'
import { Route as DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesReviewRouteImport } from './../../../packages/ui-react/src/routes/review'
import { Route as DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesRobotsDottxtRouteImport } from './../../../packages/ui-react/src/routes/robots.txt'
@@ -65,6 +67,18 @@ const DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRoute =
path: '/content',
getParentRoute: () => rootRouteImport,
} as any)
+const DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRoute =
+ DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRouteImport.update({
+ id: '/media',
+ path: '/media',
+ getParentRoute: () => rootRouteImport,
+ } as any)
+const DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRoute =
+ DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRouteImport.update({
+ id: '/profile',
+ path: '/profile',
+ getParentRoute: () => rootRouteImport,
+ } as any)
const DotReportRoute = DotReportRouteImport.update({
id: '/report',
path: '/report',
@@ -180,6 +194,8 @@ export interface FileRoutesByFullPath {
'/ai-settings': typeof DotAiSettingsRoute
'/ask': typeof DotAskRoute
'/content': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRoute
+ '/media': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRoute
+ '/profile': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRoute
'/report': typeof DotReportRoute
'/review': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesReviewRoute
'/robots.txt': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesRobotsDottxtRoute
@@ -204,6 +220,8 @@ export interface FileRoutesByTo {
'/ai-settings': typeof DotAiSettingsRoute
'/ask': typeof DotAskRoute
'/content': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRoute
+ '/media': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRoute
+ '/profile': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRoute
'/report': typeof DotReportRoute
'/review': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesReviewRoute
'/robots.txt': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesRobotsDottxtRoute
@@ -229,6 +247,8 @@ export interface FileRoutesById {
'/ai-settings': typeof DotAiSettingsRoute
'/ask': typeof DotAskRoute
'/content': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRoute
+ '/media': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRoute
+ '/profile': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRoute
'/report': typeof DotReportRoute
'/review': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesReviewRoute
'/robots.txt': typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesRobotsDottxtRoute
@@ -255,6 +275,8 @@ export interface FileRouteTypes {
| '/ai-settings'
| '/ask'
| '/content'
+ | '/media'
+ | '/profile'
| '/report'
| '/review'
| '/robots.txt'
@@ -279,6 +301,8 @@ export interface FileRouteTypes {
| '/ai-settings'
| '/ask'
| '/content'
+ | '/media'
+ | '/profile'
| '/report'
| '/review'
| '/robots.txt'
@@ -303,6 +327,8 @@ export interface FileRouteTypes {
| '/ai-settings'
| '/ask'
| '/content'
+ | '/media'
+ | '/profile'
| '/report'
| '/review'
| '/robots.txt'
@@ -328,6 +354,8 @@ export interface RootRouteChildren {
DotAiSettingsRoute: typeof DotAiSettingsRoute
DotAskRoute: typeof DotAskRoute
DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRoute: typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRoute
+ DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRoute: typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRoute
+ DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRoute: typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRoute
DotReportRoute: typeof DotReportRoute
DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesReviewRoute: typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesReviewRoute
DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesRobotsDottxtRoute: typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesRobotsDottxtRoute
@@ -390,6 +418,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRouteImport
parentRoute: typeof rootRouteImport
}
+ '/media': {
+ id: '/media'
+ path: '/media'
+ fullPath: '/media'
+ preLoaderRoute: typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/profile': {
+ id: '/profile'
+ path: '/profile'
+ fullPath: '/profile'
+ preLoaderRoute: typeof DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/report': {
id: '/report'
path: '/report'
@@ -515,6 +557,10 @@ const rootRouteChildren: RootRouteChildren = {
DotAskRoute: DotAskRoute,
DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRoute:
DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesContentRoute,
+ DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRoute:
+ DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesMediaRoute,
+ DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRoute:
+ DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesProfileRoute,
DotReportRoute: DotReportRoute,
DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesReviewRoute:
DotDotDotDotDotDotDotDotPackagesUiReactSrcRoutesReviewRoute,
diff --git a/app/docs-preview/src/routes/ask.tsx b/app/docs-preview/src/routes/ask.tsx
index 818e2ab0..d6a0e53c 100644
--- a/app/docs-preview/src/routes/ask.tsx
+++ b/app/docs-preview/src/routes/ask.tsx
@@ -133,7 +133,9 @@ function AskPage() {
{t.sources && t.sources.length ? (