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/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/base/package.json b/app/base/package.json index a4aeeeaa..f8d539cd 100644 --- a/app/base/package.json +++ b/app/base/package.json @@ -54,14 +54,14 @@ }, "devDependencies": { "@playwright/test": "^1.64.1", - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/virtual-file-routes": "^1.162.0", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", "@vitest/coverage-v8": "4.1.11", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" 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..2d3bc293 100644 --- a/app/docs-preview/package.json +++ b/app/docs-preview/package.json @@ -34,8 +34,8 @@ "zod": "^4.6.7" }, "devDependencies": { - "@tailwindcss/typography": "^0.5.19", - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/typography": "^0.5.20", + "@tailwindcss/vite": "^4.3.5", "@tanstack/cms-cli": "workspace:*", "@tanstack/router-plugin": "^1.168.48", "@types/node": "^24.10.1", @@ -43,7 +43,7 @@ "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", "jiti": "^2.7.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" 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.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/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 ? (
- Sources: + + Sources: + {t.sources.map((slug) => ( Thinking…
+
+ Thinking… +
) : null} {error ? (
diff --git a/app/docs-preview/src/routes/docs.$.tsx b/app/docs-preview/src/routes/docs.$.tsx index 7cd84ce7..9f4904b1 100644 --- a/app/docs-preview/src/routes/docs.$.tsx +++ b/app/docs-preview/src/routes/docs.$.tsx @@ -4,7 +4,12 @@ * `nav.json` (config-first order) and the body renders read-only, with its * relative Markdown links rewritten to `/docs/` so cross-links work. */ -import { createFileRoute, Link, notFound, redirect } from '@tanstack/react-router' +import { + createFileRoute, + Link, + notFound, + redirect, +} from '@tanstack/react-router' import { cmsHead } from '@tanstack/cms-core' import { get, resolveRedirect } from '@tanstack/cms-api/start' import type { Doc } from '@tanstack/cms-core' @@ -38,7 +43,12 @@ export const Route = createFileRoute('/docs/$')({ if (match) throw redirect({ href: match.to, statusCode: match.status }) throw notFound() } - return { id: found.id, doc: found.doc, slug: String(found.doc.slug ?? locator), nav } + return { + id: found.id, + doc: found.doc, + slug: String(found.doc.slug ?? locator), + nav, + } }, head: ({ loaderData }) => { const data = loaderData as DocsPage | undefined @@ -91,14 +101,20 @@ function DocsReader() {
diff --git a/app/docs-preview/src/routes/search.tsx b/app/docs-preview/src/routes/search.tsx index 9f867da0..c9d4d35f 100644 --- a/app/docs-preview/src/routes/search.tsx +++ b/app/docs-preview/src/routes/search.tsx @@ -41,7 +41,9 @@ export const Route = createFileRoute('/search')({ slug: String(i.values?.slug ?? i.id), section: String(i.values?.section ?? 'Docs'), description: - typeof i.values?.description === 'string' ? i.values.description : undefined, + typeof i.values?.description === 'string' + ? i.values.description + : undefined, framework: Array.isArray(i.values?.framework) ? (i.values!.framework as Array) : [], @@ -55,7 +57,9 @@ function countBy(hits: Array, pick: (h: Hit) => Array) { const counts = new Map() for (const h of hits) for (const v of pick(h)) counts.set(v, (counts.get(v) ?? 0) + 1) - return [...counts.entries()].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])) + return [...counts.entries()].sort( + (a, b) => b[1] - a[1] || a[0].localeCompare(b[0]), + ) } function FacetGroup({ @@ -120,14 +124,21 @@ function SearchPage() { [hits], ) - function toggle(set: Set, setter: (s: Set) => void, v: string) { + function toggle( + set: Set, + setter: (s: Set) => void, + v: string, + ) { const next = new Set(set) next.has(v) ? next.delete(v) : next.add(v) setter(next) } return ( - +
{ e.preventDefault() diff --git a/app/docs-preview/tests/read-only.test.ts b/app/docs-preview/tests/read-only.test.ts index b01b7f07..8ce323b2 100644 --- a/app/docs-preview/tests/read-only.test.ts +++ b/app/docs-preview/tests/read-only.test.ts @@ -44,8 +44,12 @@ function runIngest() { encoding: 'utf8', }) expect(res.status, res.stderr).toBe(0) - const report = JSON.parse(readFileSync(path.join(out, 'ingest-report.json'), 'utf8')) - const cmsExport = JSON.parse(readFileSync(path.join(out, 'cms-export.json'), 'utf8')) + const report = JSON.parse( + readFileSync(path.join(out, 'ingest-report.json'), 'utf8'), + ) + const cmsExport = JSON.parse( + readFileSync(path.join(out, 'cms-export.json'), 'utf8'), + ) const nav = JSON.parse(readFileSync(path.join(out, 'nav.json'), 'utf8')) return { report, cmsExport, nav } } @@ -76,7 +80,9 @@ describe('preview-mode contract', () => { it('builds the sidebar from config.json order', () => { const { nav } = runIngest() - const start = nav.sections.find((s: { label: string }) => s.label === 'Start') + const start = nav.sections.find( + (s: { label: string }) => s.label === 'Start', + ) expect(start).toBeTruthy() expect(start.pages.map((p: { slug: string }) => p.slug)).toEqual([ 'overview', diff --git a/app/prm/bakeoff/README.md b/app/prm/bakeoff/README.md index 48f2699a..2ee1e367 100644 --- a/app/prm/bakeoff/README.md +++ b/app/prm/bakeoff/README.md @@ -5,15 +5,15 @@ - **Exa avg fact recall:** 100.0% · **Primary-domain hits:** 11/50 - **Tavily avg fact recall:** 67.5% · **Primary-domain hits:** 11/50 -| Subject | Exa | Tavily | Top Exa Source | -|---|---|---|---| -| Sunil Pai | 100% (2 primary) | 100% (2 primary) | `https://sunilpai.dev/about` | -| Kent C. Dodds | 100% (1 primary) | 75% (1 primary) | `https://github.com/kentcdodds` | +| Subject | Exa | Tavily | Top Exa Source | +| --------------- | ---------------- | ---------------- | ----------------------------------- | +| Sunil Pai | 100% (2 primary) | 100% (2 primary) | `https://sunilpai.dev/about` | +| Kent C. Dodds | 100% (1 primary) | 75% (1 primary) | `https://github.com/kentcdodds` | | David Khourshid | 100% (1 primary) | 100% (1 primary) | `https://github.com/davidkhourshid` | -| Victor Savkin | 100% (1 primary) | 67% (1 primary) | `https://github.com/victorsavkin` | -| Tanner Linsley | 100% (1 primary) | 67% (1 primary) | `https://github.com/tannerlinsley` | -| Eugene Sergueev | 100% (1 primary) | 67% (1 primary) | `https://github.com/eugenesergueev` | -| Dominik Kundel | 100% (1 primary) | 50% (1 primary) | `https://github.com/dominikkundel` | -| Maya Shavin | 100% (1 primary) | 50% (1 primary) | `https://github.com/mayashavin` | -| Kiriti Badam | 100% (1 primary) | 50% (1 primary) | `https://github.com/kiritibadam` | -| Sachin Malhotra | 100% (1 primary) | 50% (1 primary) | `https://github.com/sachinmalhotra` | +| Victor Savkin | 100% (1 primary) | 67% (1 primary) | `https://github.com/victorsavkin` | +| Tanner Linsley | 100% (1 primary) | 67% (1 primary) | `https://github.com/tannerlinsley` | +| Eugene Sergueev | 100% (1 primary) | 67% (1 primary) | `https://github.com/eugenesergueev` | +| Dominik Kundel | 100% (1 primary) | 50% (1 primary) | `https://github.com/dominikkundel` | +| Maya Shavin | 100% (1 primary) | 50% (1 primary) | `https://github.com/mayashavin` | +| Kiriti Badam | 100% (1 primary) | 50% (1 primary) | `https://github.com/kiritibadam` | +| Sachin Malhotra | 100% (1 primary) | 50% (1 primary) | `https://github.com/sachinmalhotra` | diff --git a/app/prm/bakeoff/latest.json b/app/prm/bakeoff/latest.json index 377319f5..bdc0dcea 100644 --- a/app/prm/bakeoff/latest.json +++ b/app/prm/bakeoff/latest.json @@ -20,12 +20,7 @@ "allowedUrlRate": 1, "primaryIdentityHits": 2, "factRecallRate": 1, - "matchedFacts": [ - "cloudflare", - "partykit", - "react", - "glamor" - ], + "matchedFacts": ["cloudflare", "partykit", "react", "glamor"], "sampleUrls": [ "https://sunilpai.dev/about", "https://kentcdodds.com/chats/01/20/sunil-pai" @@ -38,12 +33,7 @@ "allowedUrlRate": 1, "primaryIdentityHits": 2, "factRecallRate": 1, - "matchedFacts": [ - "cloudflare", - "partykit", - "react", - "glamor" - ], + "matchedFacts": ["cloudflare", "partykit", "react", "glamor"], "sampleUrls": [ "https://sunilpai.dev/about", "https://kentcdodds.com/chats/01/20/sunil-pai" @@ -59,15 +49,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "epicweb", - "testing", - "kody", - "react" - ], - "sampleUrls": [ - "https://github.com/kentcdodds" - ] + "matchedFacts": ["epicweb", "testing", "kody", "react"], + "sampleUrls": ["https://github.com/kentcdodds"] }, "tavily": { "name": "Kent C. Dodds", @@ -76,14 +59,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 0.75, - "matchedFacts": [ - "epicweb", - "testing", - "kody" - ], - "sampleUrls": [ - "https://github.com/kentcdodds" - ] + "matchedFacts": ["epicweb", "testing", "kody"], + "sampleUrls": ["https://github.com/kentcdodds"] } }, { @@ -95,14 +72,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "stately", - "xstate", - "state" - ], - "sampleUrls": [ - "https://github.com/davidkhourshid" - ] + "matchedFacts": ["stately", "xstate", "state"], + "sampleUrls": ["https://github.com/davidkhourshid"] }, "tavily": { "name": "David Khourshid", @@ -111,14 +82,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "stately", - "xstate", - "state" - ], - "sampleUrls": [ - "https://github.com/davidkhourshid" - ] + "matchedFacts": ["stately", "xstate", "state"], + "sampleUrls": ["https://github.com/davidkhourshid"] } }, { @@ -130,14 +95,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "nx", - "nrwl", - "monorepo" - ], - "sampleUrls": [ - "https://github.com/victorsavkin" - ] + "matchedFacts": ["nx", "nrwl", "monorepo"], + "sampleUrls": ["https://github.com/victorsavkin"] }, "tavily": { "name": "Victor Savkin", @@ -146,13 +105,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 0.6666666666666666, - "matchedFacts": [ - "nx", - "nrwl" - ], - "sampleUrls": [ - "https://github.com/victorsavkin" - ] + "matchedFacts": ["nx", "nrwl"], + "sampleUrls": ["https://github.com/victorsavkin"] } }, { @@ -164,14 +118,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "tanstack", - "query", - "router" - ], - "sampleUrls": [ - "https://github.com/tannerlinsley" - ] + "matchedFacts": ["tanstack", "query", "router"], + "sampleUrls": ["https://github.com/tannerlinsley"] }, "tavily": { "name": "Tanner Linsley", @@ -180,13 +128,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 0.6666666666666666, - "matchedFacts": [ - "tanstack", - "query" - ], - "sampleUrls": [ - "https://github.com/tannerlinsley" - ] + "matchedFacts": ["tanstack", "query"], + "sampleUrls": ["https://github.com/tannerlinsley"] } }, { @@ -198,14 +141,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "flo", - "ai", - "agent" - ], - "sampleUrls": [ - "https://github.com/eugenesergueev" - ] + "matchedFacts": ["flo", "ai", "agent"], + "sampleUrls": ["https://github.com/eugenesergueev"] }, "tavily": { "name": "Eugene Sergueev", @@ -214,13 +151,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 0.6666666666666666, - "matchedFacts": [ - "flo", - "ai" - ], - "sampleUrls": [ - "https://github.com/eugenesergueev" - ] + "matchedFacts": ["flo", "ai"], + "sampleUrls": ["https://github.com/eugenesergueev"] } }, { @@ -232,13 +164,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "developer", - "experience" - ], - "sampleUrls": [ - "https://github.com/dominikkundel" - ] + "matchedFacts": ["developer", "experience"], + "sampleUrls": ["https://github.com/dominikkundel"] }, "tavily": { "name": "Dominik Kundel", @@ -247,12 +174,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 0.5, - "matchedFacts": [ - "developer" - ], - "sampleUrls": [ - "https://github.com/dominikkundel" - ] + "matchedFacts": ["developer"], + "sampleUrls": ["https://github.com/dominikkundel"] } }, { @@ -264,13 +187,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "frontend", - "accessibility" - ], - "sampleUrls": [ - "https://github.com/mayashavin" - ] + "matchedFacts": ["frontend", "accessibility"], + "sampleUrls": ["https://github.com/mayashavin"] }, "tavily": { "name": "Maya Shavin", @@ -279,12 +197,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 0.5, - "matchedFacts": [ - "frontend" - ], - "sampleUrls": [ - "https://github.com/mayashavin" - ] + "matchedFacts": ["frontend"], + "sampleUrls": ["https://github.com/mayashavin"] } }, { @@ -296,13 +210,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "runtime", - "ai" - ], - "sampleUrls": [ - "https://github.com/kiritibadam" - ] + "matchedFacts": ["runtime", "ai"], + "sampleUrls": ["https://github.com/kiritibadam"] }, "tavily": { "name": "Kiriti Badam", @@ -311,12 +220,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 0.5, - "matchedFacts": [ - "runtime" - ], - "sampleUrls": [ - "https://github.com/kiritibadam" - ] + "matchedFacts": ["runtime"], + "sampleUrls": ["https://github.com/kiritibadam"] } }, { @@ -328,13 +233,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 1, - "matchedFacts": [ - "observability", - "telemetry" - ], - "sampleUrls": [ - "https://github.com/sachinmalhotra" - ] + "matchedFacts": ["observability", "telemetry"], + "sampleUrls": ["https://github.com/sachinmalhotra"] }, "tavily": { "name": "Sachin Malhotra", @@ -343,12 +243,8 @@ "allowedUrlRate": 1, "primaryIdentityHits": 1, "factRecallRate": 0.5, - "matchedFacts": [ - "observability" - ], - "sampleUrls": [ - "https://github.com/sachinmalhotra" - ] + "matchedFacts": ["observability"], + "sampleUrls": ["https://github.com/sachinmalhotra"] } } ] diff --git a/app/prm/package.json b/app/prm/package.json index 9981aec5..c94db64e 100644 --- a/app/prm/package.json +++ b/app/prm/package.json @@ -53,7 +53,7 @@ "devDependencies": { "@electric-sql/pglite": "^0.5.15", "@playwright/test": "^1.64.1", - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/cms-cli": "workspace:*", "@tanstack/cms-store-postgres": "workspace:*", "@tanstack/router-plugin": "^1.168.48", @@ -63,7 +63,7 @@ "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", "@vitest/coverage-v8": "4.1.11", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" diff --git a/examples/astro-starlight-after/package.json b/examples/astro-starlight-after/package.json index 9be52ebb..2f5f2290 100644 --- a/examples/astro-starlight-after/package.json +++ b/examples/astro-starlight-after/package.json @@ -29,13 +29,13 @@ "react-dom": "^19.2.3" }, "devDependencies": { - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/router-plugin": "^1.168.48", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" diff --git a/examples/blog-voting/package.json b/examples/blog-voting/package.json index b611b97d..fd9f3152 100644 --- a/examples/blog-voting/package.json +++ b/examples/blog-voting/package.json @@ -30,13 +30,13 @@ "react-dom": "^19.2.3" }, "devDependencies": { - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/router-plugin": "^1.168.48", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" diff --git a/examples/blog/package.json b/examples/blog/package.json index b81a6f90..7e8f9a7f 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -34,14 +34,14 @@ "devDependencies": { "@axe-core/playwright": "^4.14.0", "@playwright/test": "^1.64.1", - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/cms-cli": "workspace:*", "@tanstack/router-plugin": "^1.168.48", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1" } diff --git a/examples/db-federated/package.json b/examples/db-federated/package.json index 06236481..24d41539 100644 --- a/examples/db-federated/package.json +++ b/examples/db-federated/package.json @@ -27,14 +27,14 @@ "react-dom": "^19.2.3" }, "devDependencies": { - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/router-plugin": "^1.168.48", "@tanstack/virtual-file-routes": "^1.162.0", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1" } diff --git a/examples/db-sqlite/package.json b/examples/db-sqlite/package.json index 77726b3c..34b40bb7 100644 --- a/examples/db-sqlite/package.json +++ b/examples/db-sqlite/package.json @@ -27,14 +27,14 @@ "react-dom": "^19.2.3" }, "devDependencies": { - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/router-plugin": "^1.168.48", "@tanstack/virtual-file-routes": "^1.162.0", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1" } diff --git a/examples/emdash-after/package.json b/examples/emdash-after/package.json index ab8aa05f..d96ab284 100644 --- a/examples/emdash-after/package.json +++ b/examples/emdash-after/package.json @@ -29,13 +29,13 @@ "react-dom": "^19.2.3" }, "devDependencies": { - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/router-plugin": "^1.168.48", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" diff --git a/examples/payload-after/package.json b/examples/payload-after/package.json index 1c7ab966..fb7cf3d2 100644 --- a/examples/payload-after/package.json +++ b/examples/payload-after/package.json @@ -29,13 +29,13 @@ "react-dom": "^19.2.3" }, "devDependencies": { - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/router-plugin": "^1.168.48", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" diff --git a/examples/picks/package.json b/examples/picks/package.json index f8b0167a..5fb8e53d 100644 --- a/examples/picks/package.json +++ b/examples/picks/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@electric-sql/pglite": "^0.5.15", "@playwright/test": "^1.64.1", - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/cms-store-postgres": "workspace:*", "@tanstack/router-plugin": "^1.168.48", "@tanstack/virtual-file-routes": "^1.162.0", @@ -40,7 +40,7 @@ "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1" } diff --git a/examples/wordpress-after/package.json b/examples/wordpress-after/package.json index e64f5ad4..bc12ab82 100644 --- a/examples/wordpress-after/package.json +++ b/examples/wordpress-after/package.json @@ -29,13 +29,13 @@ "react-dom": "^19.2.3" }, "devDependencies": { - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/router-plugin": "^1.168.48", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" diff --git a/examples/wp-vs-tanstack/ADMIN-GAP-ANALYSIS.md b/examples/wp-vs-tanstack/ADMIN-GAP-ANALYSIS.md index 66fac234..4f072db6 100644 --- a/examples/wp-vs-tanstack/ADMIN-GAP-ANALYSIS.md +++ b/examples/wp-vs-tanstack/ADMIN-GAP-ANALYSIS.md @@ -1,6 +1,6 @@ # Admin feature gaps — wp-admin vs TanStack CMS (Pass 2) -Pass 1 asked whether TanStack CMS can reproduce a fixed WordPress *design* in +Pass 1 asked whether TanStack CMS can reproduce a fixed WordPress _design_ in userland (it can). Pass 2 asks the authoring question: walk the **admin** of both builds of Summit Home Services and answer two things. @@ -35,7 +35,7 @@ Before the matrix, the one structural difference that colors everything else: th Layout and theme are code (`theme.tokens`, renderers), not an admin screen. Neither is strictly richer; they optimize for different things. Gutenberg optimizes -for *see-what-you-get* page building. TanStack optimizes for a *typed content model* +for _see-what-you-get_ page building. TanStack optimizes for a _typed content model_ that the same blocks render on the site, plus governance (review queue), AI/MCP, and per-field access. That trade shows up all through the matrix below. @@ -45,34 +45,34 @@ Status legend: **EXISTS** (shipped admin screen) · **PARTIAL** (present but thi than WP, or config-only) · **UI-GAP** (the engine exists in core, no stock screen surfaces it) · **MISSING** (no engine, no screen). -| wp-admin capability | TanStack CMS | Backing / note | -| --- | --- | --- | -| Dashboard / landing (At a Glance, Activity, Site Health) | **UI-GAP** | Bare `/cms` 404s; no landing. Counts/activity data exist (revisions, events). | -| Posts/Pages list (search, filter, sort, bulk, columns) | **EXISTS** | `/cms/content`; status tabs, search, configurable Columns, per-collection sections. | -| Content editor | **EXISTS** | `/cms/edit/$collection/$id`; field form + block list, 19 field widgets. | -| Scheduling (publish date) | **EXISTS** (ahead) | Inline `publishAt` **and** `unpublishAt` in the sidebar. | -| Revisions / restore | **EXISTS** (ahead) | Revisions panel with restore; WP revisions are per-post only. | -| Draft + review/approval workflow | **EXISTS** (ahead) | Review queue; WP has no native approval step. | -| Categories / Tags (hierarchical, usage counts) | **PARTIAL** | Relation/select fields; no term manager with counts (`schema.ts`). | -| Media Library (grid, upload, bulk, alt text) | **UI-GAP** | Core has an `asset` collection + media adapters + inline picker (`assets.ts`), but no dedicated gallery/manager screen. This example configures no assets, so there's no media route at all. | -| Comments — public + moderation (spam/approve/trash) | **MISSING** | Core comments are **editorial** (on documents, for reviewers), not public. No spam queue (`ops.ts add_comment`). | -| Menus / navigation builder (drag-order, locations) | **MISSING** | No menu primitive or editor; nav is hardcoded in `siteNav` (userland config). | -| Appearance → Customize (logo, colors, fonts, live preview) | **MISSING** | Theme is code (`theme.tokens`, `theme.fontLinks`); no branding screen. | -| Widgets | **N/A** | Block model; no widget areas. | -| Plugins — install/activate UI | **PARTIAL (by design)** | Plugins are code (`plugins: [...]`), no marketplace/installer UI. | -| Users — list, add, roles | **PARTIAL** | Settings maps identity→role and issues API keys; DB-user CRUD exists in core but isn't surfaced here. | -| Roles & permissions | **EXISTS** (ahead) | 4 roles + custom + collection + **field-level** access (`lib/access.ts`). | -| API keys for agents/integrations | **EXISTS** (ahead) | Per-key role + collection scope (Settings); WP has nothing equivalent. | -| Tools → Import / Export | **PARTIAL** | CLI `tanstack-cms import/export` + `@tanstack/cms-migrate-wp` engine; no admin screen. | -| Tools → Site Health / diagnostics | **MISSING** | No diagnostics panel. | -| Settings — General/Reading/Permalinks/Discussion | **PARTIAL** | Site config is code; Settings screen covers keys/access/activity only. | -| Permalinks / slugs / redirects | **EXISTS** (ahead) | `slug` fields, locators, `redirectsCollection`; a Redirects collection ships here. | -| SEO (title/description/OG/JSON-LD) | **EXISTS** (ahead) | Built in: `seoField`, `cmsHead`, `cmsJsonLd` (`lib/seo.ts`); stock WP needs a plugin. | -| Contact form builder | **MISSING** (UI) | No form designer; forms are a public route writing to a collection. | -| Contact form **entries** inbox | **PARTIAL (ahead here)** | This example stores leads in a **Contact Inquiries** collection; the WP install stores **nothing** (CF7 needs Flamingo). No dedicated inbox screen, but entries are browsable. | -| AI authoring agent | **EXISTS** (ahead) | `/cms/agent` + MCP/WebMCP (hidden here, AI not configured); WP has none. | -| Activity / audit log | **EXISTS** | Settings activity log + review audit trail. | -| User profile / preferences | **MISSING** | Only a theme toggle; no profile screen. | +| wp-admin capability | TanStack CMS | Backing / note | +| ---------------------------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Dashboard / landing (At a Glance, Activity, Site Health) | **UI-GAP** | Bare `/cms` 404s; no landing. Counts/activity data exist (revisions, events). | +| Posts/Pages list (search, filter, sort, bulk, columns) | **EXISTS** | `/cms/content`; status tabs, search, configurable Columns, per-collection sections. | +| Content editor | **EXISTS** | `/cms/edit/$collection/$id`; field form + block list, 19 field widgets. | +| Scheduling (publish date) | **EXISTS** (ahead) | Inline `publishAt` **and** `unpublishAt` in the sidebar. | +| Revisions / restore | **EXISTS** (ahead) | Revisions panel with restore; WP revisions are per-post only. | +| Draft + review/approval workflow | **EXISTS** (ahead) | Review queue; WP has no native approval step. | +| Categories / Tags (hierarchical, usage counts) | **PARTIAL** | Relation/select fields; no term manager with counts (`schema.ts`). | +| Media Library (grid, upload, bulk, alt text) | **UI-GAP** | Core has an `asset` collection + media adapters + inline picker (`assets.ts`), but no dedicated gallery/manager screen. This example configures no assets, so there's no media route at all. | +| Comments — public + moderation (spam/approve/trash) | **MISSING** | Core comments are **editorial** (on documents, for reviewers), not public. No spam queue (`ops.ts add_comment`). | +| Menus / navigation builder (drag-order, locations) | **MISSING** | No menu primitive or editor; nav is hardcoded in `siteNav` (userland config). | +| Appearance → Customize (logo, colors, fonts, live preview) | **MISSING** | Theme is code (`theme.tokens`, `theme.fontLinks`); no branding screen. | +| Widgets | **N/A** | Block model; no widget areas. | +| Plugins — install/activate UI | **PARTIAL (by design)** | Plugins are code (`plugins: [...]`), no marketplace/installer UI. | +| Users — list, add, roles | **PARTIAL** | Settings maps identity→role and issues API keys; DB-user CRUD exists in core but isn't surfaced here. | +| Roles & permissions | **EXISTS** (ahead) | 4 roles + custom + collection + **field-level** access (`lib/access.ts`). | +| API keys for agents/integrations | **EXISTS** (ahead) | Per-key role + collection scope (Settings); WP has nothing equivalent. | +| Tools → Import / Export | **PARTIAL** | CLI `tanstack-cms import/export` + `@tanstack/cms-migrate-wp` engine; no admin screen. | +| Tools → Site Health / diagnostics | **MISSING** | No diagnostics panel. | +| Settings — General/Reading/Permalinks/Discussion | **PARTIAL** | Site config is code; Settings screen covers keys/access/activity only. | +| Permalinks / slugs / redirects | **EXISTS** (ahead) | `slug` fields, locators, `redirectsCollection`; a Redirects collection ships here. | +| SEO (title/description/OG/JSON-LD) | **EXISTS** (ahead) | Built in: `seoField`, `cmsHead`, `cmsJsonLd` (`lib/seo.ts`); stock WP needs a plugin. | +| Contact form builder | **MISSING** (UI) | No form designer; forms are a public route writing to a collection. | +| Contact form **entries** inbox | **PARTIAL (ahead here)** | This example stores leads in a **Contact Inquiries** collection; the WP install stores **nothing** (CF7 needs Flamingo). No dedicated inbox screen, but entries are browsable. | +| AI authoring agent | **EXISTS** (ahead) | `/cms/agent` + MCP/WebMCP (hidden here, AI not configured); WP has none. | +| Activity / audit log | **EXISTS** | Settings activity log + review audit trail. | +| User profile / preferences | **MISSING** | Only a theme toggle; no profile screen. | ## 3. Where TanStack already leads @@ -88,6 +88,7 @@ and automation. ## 4. The gaps, grouped ### A. UI gaps — the engine exists, the stock admin doesn't surface it + 1. **Dashboard / landing.** `/cms` should greet you, not 404. 2. **Media Library browser.** The `asset` collection and media adapters exist; there's no grid-style browse/manage screen with upload and bulk actions. @@ -100,6 +101,7 @@ and automation. config instead of code (optional — many teams are happy leaving this in code). ### B. Genuinely absent — no engine primitive today + 5. **Menus / navigation as editable data.** No menu collection, ordering primitive, or editor. Nav is hardcoded per app. 6. **Public comments + moderation.** Editorial comments only; no public comments, @@ -110,7 +112,8 @@ and automation. 9. **Site Health / diagnostics.** Adapter connectivity, pending migrations, env. 10. **User profile / preferences screen.** -### C. WordPress-flavored compatibility — only relevant when coming *from* WP +### C. WordPress-flavored compatibility — only relevant when coming _from_ WP + 11. **WP import wizard** (admin UI over the existing migrate engine). 12. **CF7/Flamingo-style form builder + entries inbox.** 13. **Shortcode / Gutenberg-block ingestion** (migrate fidelity). @@ -136,25 +139,25 @@ and custom admin screens are built from the public `@tanstack/cms-ui-react/tools So the split is: **core gets the universal admin screens whose engine already exists; a WP-compat library gets the WordPress-shaped features.** -| # | Gap | Where | Why / how | -| --- | --- | --- | --- | -| 1 | Dashboard / landing | **CORE** | Universal; add an index route in `cms-ui-react` over existing counts/events. | -| 2 | Media Library browser | **CORE** | `asset` collection already backs it (`assets.ts`); needs a gallery screen. | -| 3 | Bulk-ops UI | **CORE — ✅ already shipped** | `BulkBar` already wires row selection to `bulkDocuments` (publish/unpublish/delete/restore/purge) in the content list. | -| 4 | Site-settings screen | **CORE (optional)** | A `siteSettings` singleton helper + screen; low priority. | -| 5 | Menus / navigation | **CORE helper + lib UI** | Ship a `navigationCollection()` authoring helper (like `redirectsCollection`); WP menu-location mapping lives in the lib. | -| 6 | Public comments + moderation | **LIBRARY** | Not universal (headless/marketing sites skip it). Plugin: comments collection + moderation `adminRoutes` + spam hook. | -| 7 | Taxonomy manager | **LIBRARY** (core helper optional) | Build on relation collections; counts/hierarchy UI as a plugin screen. | -| 8 | Theme / branding editor | **CORE (optional)** | A theme singleton + screen writing `theme.tokens`; or leave in code. | -| 9 | Site Health / diagnostics | **CORE (optional)** | Reads adapter/env state; low priority. | -| 10 | Profile / preferences | **CORE** | Small screen over the existing session/auth contract. | -| 11 | WP import wizard | **LIBRARY** | Add `adminNav` + `adminRoutes` over `cms-migrate-wp`. | -| 12 | Form builder + entries inbox | **LIBRARY** | Plugin: form-def collection + submissions collection + inbox `adminRoute` + spam `op`. The `forms-lead-capture` skill is the seed. | -| 13 | Shortcode / Gutenberg ingestion | **LIBRARY** | Part of `cms-migrate-wp` (shortcode→block, block-delimiter parse). | -| 14 | Old-WP-URL redirects | **LIBRARY** | Generate into the core `redirectsCollection` from WP permalink structure on import. | -| 15 | WP comment import | **LIBRARY** | Maps into the comments plugin (#6). | - -The core list is short on purpose: it's only the *universal* screens (dashboard, +| # | Gap | Where | Why / how | +| --- | ------------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| 1 | Dashboard / landing | **CORE** | Universal; add an index route in `cms-ui-react` over existing counts/events. | +| 2 | Media Library browser | **CORE** | `asset` collection already backs it (`assets.ts`); needs a gallery screen. | +| 3 | Bulk-ops UI | **CORE — ✅ already shipped** | `BulkBar` already wires row selection to `bulkDocuments` (publish/unpublish/delete/restore/purge) in the content list. | +| 4 | Site-settings screen | **CORE (optional)** | A `siteSettings` singleton helper + screen; low priority. | +| 5 | Menus / navigation | **CORE helper + lib UI** | Ship a `navigationCollection()` authoring helper (like `redirectsCollection`); WP menu-location mapping lives in the lib. | +| 6 | Public comments + moderation | **LIBRARY** | Not universal (headless/marketing sites skip it). Plugin: comments collection + moderation `adminRoutes` + spam hook. | +| 7 | Taxonomy manager | **LIBRARY** (core helper optional) | Build on relation collections; counts/hierarchy UI as a plugin screen. | +| 8 | Theme / branding editor | **CORE (optional)** | A theme singleton + screen writing `theme.tokens`; or leave in code. | +| 9 | Site Health / diagnostics | **CORE (optional)** | Reads adapter/env state; low priority. | +| 10 | Profile / preferences | **CORE** | Small screen over the existing session/auth contract. | +| 11 | WP import wizard | **LIBRARY** | Add `adminNav` + `adminRoutes` over `cms-migrate-wp`. | +| 12 | Form builder + entries inbox | **LIBRARY** | Plugin: form-def collection + submissions collection + inbox `adminRoute` + spam `op`. The `forms-lead-capture` skill is the seed. | +| 13 | Shortcode / Gutenberg ingestion | **LIBRARY** | Part of `cms-migrate-wp` (shortcode→block, block-delimiter parse). | +| 14 | Old-WP-URL redirects | **LIBRARY** | Generate into the core `redirectsCollection` from WP permalink structure on import. | +| 15 | WP comment import | **LIBRARY** | Maps into the comments plugin (#6). | + +The core list is short on purpose: it's only the _universal_ screens (dashboard, media, bulk-ops, profile) where the data layer is already built and the stock admin simply doesn't draw the screen yet. Everything WordPress-specific stays a plugin. @@ -189,6 +192,6 @@ WP-compatibility is a plugin problem, not a core problem. --- -*Method: live read-only walkthrough of both admins (WordPress 7.1.4 + Astra + CF7 at +_Method: live read-only walkthrough of both admins (WordPress 7.1.4 + Astra + CF7 at `:8080`, TanStack CMS at `:3020`), cross-checked against `packages/*`. WordPress was -not modified. See [`COMPARISON.md`](./COMPARISON.md) for Pass 1 (design parity).* +not modified. See [`COMPARISON.md`](./COMPARISON.md) for Pass 1 (design parity)._ diff --git a/examples/wp-vs-tanstack/COMPARISON.md b/examples/wp-vs-tanstack/COMPARISON.md index 3b8dfc02..36162262 100644 --- a/examples/wp-vs-tanstack/COMPARISON.md +++ b/examples/wp-vs-tanstack/COMPARISON.md @@ -14,7 +14,7 @@ is outlined at the end and not yet run. ### The question Earlier versions of this comparison were circular: the two sites were tuned to -the *same* hand-picked palette at the same time, so "they match" proved little. +the _same_ hand-picked palette at the same time, so "they match" proved little. This pass fixes that with a cleaner experiment: 1. **WordPress is the fixed reference.** It's a realistic small-business Astra @@ -33,16 +33,16 @@ This pass fixes that with a cleaner experiment: Measured with the browser's computed styles, both sites at the **same desktop width**, element by element: -| Element | WordPress | TanStack CMS | -| --- | --- | --- | -| Body | 16px / 1.65, Inter, `#475569` | 16px / 1.65, Inter, `#475569` | -| Headings | Poppins, `#0f172a` | Poppins, `#0f172a` | -| Logo | 26px / 600, Poppins, `#1e293b` | 26px / 600, Poppins, `#1e293b` | -| Nav link (active) | 16px / 400, Inter, `#045cb4` | 16px / 400, Inter, `#045cb4` | -| Hero H1 | 54px / 800, Poppins, lh 75.6 | 54px / 800, Poppins, lh 75.6 | -| Hero subheading | 20px, Inter, `#c7d2fe` | 20px, Inter, `#c7d2fe` | -| "What We Do" | 36px / 800, Poppins, `#0f172a` | 36px / 800, Poppins, `#0f172a` | -| Hero buttons | orange fill / blue, radius 4px | orange fill / blue, radius 4px | +| Element | WordPress | TanStack CMS | +| ----------------- | ------------------------------ | ------------------------------ | +| Body | 16px / 1.65, Inter, `#475569` | 16px / 1.65, Inter, `#475569` | +| Headings | Poppins, `#0f172a` | Poppins, `#0f172a` | +| Logo | 26px / 600, Poppins, `#1e293b` | 26px / 600, Poppins, `#1e293b` | +| Nav link (active) | 16px / 400, Inter, `#045cb4` | 16px / 400, Inter, `#045cb4` | +| Hero H1 | 54px / 800, Poppins, lh 75.6 | 54px / 800, Poppins, lh 75.6 | +| Hero subheading | 20px, Inter, `#c7d2fe` | 20px, Inter, `#c7d2fe` | +| "What We Do" | 36px / 800, Poppins, `#0f172a` | 36px / 800, Poppins, `#0f172a` | +| Hero buttons | orange fill / blue, radius 4px | orange fill / blue, radius 4px | Every page is reproduced with the same content and structure: Home, Services, About, Reviews, Contact (CF7 lead form on WP, a native form on TanStack), and a @@ -70,12 +70,12 @@ The two stacks have different responsive systems, so matching one width is not enough; the column counts have to switch at the same widths too. WordPress and Tailwind disagree by default: -| Width | Gutenberg columns | Tailwind `sm:`/`lg:` grid | -| --- | --- | --- | -| ≥1024px | all in one row | all in one row | -| 782–1023px | **all in one row** | **2-up** | -| 640–781px | **one column** | **2-up** | -| <640px | one column | one column | +| Width | Gutenberg columns | Tailwind `sm:`/`lg:` grid | +| ---------- | ------------------ | ------------------------- | +| ≥1024px | all in one row | all in one row | +| 782–1023px | **all in one row** | **2-up** | +| 640–781px | **one column** | **2-up** | +| <640px | one column | one column | A `wp-block-columns` stacks at a single breakpoint (`≤781px` → one column, `≥782px` → N across); there is no 2-up middle state. The renderers mirror that @@ -120,12 +120,12 @@ didn't change, so the shape holds, but re-measure after the redesign for exact numbers (both sites now also load the same two Google web fonts, which narrows the first-load-bytes gap). -| Metric | WordPress | TanStack CMS | Winner | -| --- | --- | --- | --- | -| TTFB (server render) | 71 ms | **20 ms** | TanStack | -| First Contentful Paint | 120 ms | **68 ms** | TanStack | -| DOM nodes | 193 | **98** | TanStack (half) | -| First-load transfer | **~44 KB** | ~160–185 KB (gzip/brotli) | WordPress | +| Metric | WordPress | TanStack CMS | Winner | +| ---------------------- | ---------- | ------------------------- | --------------- | +| TTFB (server render) | 71 ms | **20 ms** | TanStack | +| First Contentful Paint | 120 ms | **68 ms** | TanStack | +| DOM nodes | 193 | **98** | TanStack (half) | +| First-load transfer | **~44 KB** | ~160–185 KB (gzip/brotli) | WordPress | Reading it honestly: TanStack wins time-to-first-byte, first paint, and DOM weight; WordPress ships fewer first-load bytes because this is a deliberately @@ -148,9 +148,16 @@ pnpm --filter wp-vs-tanstack dev Measure computed styles in a page's console, both sites at the same width: ```js -const el = [...document.querySelectorAll('*')].find(e => e.textContent.trim() === 'What We Do') +const el = [...document.querySelectorAll('*')].find( + (e) => e.textContent.trim() === 'What We Do', +) const s = getComputedStyle(el) -;({ font: s.fontFamily, size: s.fontSize, weight: s.fontWeight, color: s.color }) +;({ + font: s.fontFamily, + size: s.fontSize, + weight: s.fontWeight, + color: s.color, +}) ``` #### Prod build note @@ -179,7 +186,7 @@ versus a **WordPress-compatibility library**. See [`ADMIN-GAP-ANALYSIS.md`](./ADMIN-GAP-ANALYSIS.md) for the full feature matrix and the core-vs-library recommendation. Short answer: the TanStack admin is ahead on governance (review queue, revisions, field-level roles, scheduling, AI/MCP), and -the wp-admin features it lacks are either a few *universal* screens whose engines -already exist (dashboard, media library, bulk-ops — core) or *WordPress-shaped* +the wp-admin features it lacks are either a few _universal_ screens whose engines +already exist (dashboard, media library, bulk-ops — core) or _WordPress-shaped_ features (menus, public comments, CF7 entries, importer) that fit a companion plugin without touching `packages/*`. diff --git a/examples/wp-vs-tanstack/package.json b/examples/wp-vs-tanstack/package.json index 3f366c72..90658576 100644 --- a/examples/wp-vs-tanstack/package.json +++ b/examples/wp-vs-tanstack/package.json @@ -23,14 +23,14 @@ "react-dom": "^19.2.3" }, "devDependencies": { - "@tailwindcss/vite": "^4.1.18", + "@tailwindcss/vite": "^4.3.5", "@tanstack/router-plugin": "^1.168.48", "@tanstack/virtual-file-routes": "^1.162.0", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.2.0", - "tailwindcss": "^4.1.18", + "tailwindcss": "^4.3.5", "typescript": "5.9.3", "vite": "^8.2.1", "vitest": "4.1.11" diff --git a/examples/wp-vs-tanstack/src/cms.config.ts b/examples/wp-vs-tanstack/src/cms.config.ts index e862e5c0..6f925919 100644 --- a/examples/wp-vs-tanstack/src/cms.config.ts +++ b/examples/wp-vs-tanstack/src/cms.config.ts @@ -18,8 +18,18 @@ const blockTypes = [ { name: 'badge', label: 'Eyebrow / Badge', type: 'text' }, { name: 'heading', label: 'Heading', type: 'text', required: true }, { name: 'subheading', label: 'Subheading', type: 'textarea' }, - { name: 'minHeight', label: 'Min Height (px)', type: 'number', defaultValue: 320 }, - { name: 'headingSize', label: 'Heading Size (px)', type: 'number', defaultValue: 48 }, + { + name: 'minHeight', + label: 'Min Height (px)', + type: 'number', + defaultValue: 320, + }, + { + name: 'headingSize', + label: 'Heading Size (px)', + type: 'number', + defaultValue: 48, + }, { name: 'primaryLabel', label: 'Primary Button Label', type: 'text' }, { name: 'primaryHref', label: 'Primary Button Link', type: 'text' }, { name: 'secondaryLabel', label: 'Secondary Button Label', type: 'text' }, @@ -97,7 +107,12 @@ const blockTypes = [ fields: [ { name: 'heading', label: 'Heading', type: 'text' }, { name: 'intro', label: 'Intro', type: 'textarea' }, - { name: 'bigTitles', label: 'Large card titles (h3)', type: 'boolean', defaultValue: false }, + { + name: 'bigTitles', + label: 'Large card titles (h3)', + type: 'boolean', + defaultValue: false, + }, { name: 'surface', label: 'Background', @@ -152,8 +167,18 @@ const blockTypes = [ ], defaultValue: 'plain', }, - { name: 'card', label: 'Show as cards', type: 'boolean', defaultValue: true }, - { name: 'titleSize', label: 'Card Title Size (px)', type: 'number', defaultValue: 22 }, + { + name: 'card', + label: 'Show as cards', + type: 'boolean', + defaultValue: true, + }, + { + name: 'titleSize', + label: 'Card Title Size (px)', + type: 'number', + defaultValue: 22, + }, { name: 'items', label: 'Items', @@ -322,8 +347,10 @@ export const cms = defineCms(definition, { 'accent-soft': '#ffedd5', 'header-bg': '#ffffff', radius: '0.75rem', - 'font-body': "'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif", - 'font-heading': "'Poppins', -apple-system, system-ui, 'Segoe UI', sans-serif", + 'font-body': + "'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif", + 'font-heading': + "'Poppins', -apple-system, system-ui, 'Segoe UI', sans-serif", 'page-width': '1240px', 'content-width': '46rem', }, diff --git a/examples/wp-vs-tanstack/src/cms.definition.ts b/examples/wp-vs-tanstack/src/cms.definition.ts index bdb28462..3a42efb8 100644 --- a/examples/wp-vs-tanstack/src/cms.definition.ts +++ b/examples/wp-vs-tanstack/src/cms.definition.ts @@ -43,7 +43,12 @@ export const definition = defineCmsDefinition({ { name: 'title', label: 'Page Title', type: 'text', required: true }, { name: 'slug', label: 'Slug', type: 'slug', from: 'title' }, { name: 'blocks', label: 'Sections', type: 'blocks' }, - { name: 'published', label: 'Published', type: 'boolean', defaultValue: true }, + { + name: 'published', + label: 'Published', + type: 'boolean', + defaultValue: true, + }, seoField(), ], }), @@ -63,7 +68,12 @@ export const definition = defineCmsDefinition({ { name: 'title', label: 'Title', type: 'text', required: true }, { name: 'slug', label: 'Slug', type: 'slug', from: 'title' }, { name: 'excerpt', label: 'Excerpt', type: 'textarea' }, - { name: 'author', label: 'Author', type: 'text', defaultValue: 'Summit Home Services' }, + { + name: 'author', + label: 'Author', + type: 'text', + defaultValue: 'Summit Home Services', + }, { name: 'body', label: 'Body', type: 'markdown' }, { name: 'category', @@ -76,7 +86,12 @@ export const definition = defineCmsDefinition({ ], }, { name: 'publishedAt', label: 'Published Date', type: 'date' }, - { name: 'published', label: 'Published', type: 'boolean', defaultValue: true }, + { + name: 'published', + label: 'Published', + type: 'boolean', + defaultValue: true, + }, ], }), diff --git a/examples/wp-vs-tanstack/src/cms.renderers.tsx b/examples/wp-vs-tanstack/src/cms.renderers.tsx index 874c8e52..d379e7ed 100644 --- a/examples/wp-vs-tanstack/src/cms.renderers.tsx +++ b/examples/wp-vs-tanstack/src/cms.renderers.tsx @@ -157,7 +157,14 @@ export function PageTitleBar({ title }: { title: string }) { {/* WP/Astra prints the page title flush under the header (0px above) with 24px below before the content starts; match that, not a roomier bar. */} -

+

{title}

@@ -175,7 +182,8 @@ function Hero({ block }: BlockRendererProps) { const secondaryLabel = str(b, 'secondaryLabel') // Match the WordPress/Astra cover: a fixed min-height with the content // vertically centered, 48px padding, and a fixed heading size per page. - const minHeight = typeof b.minHeight === 'number' ? (b.minHeight as number) : 320 + const minHeight = + typeof b.minHeight === 'number' ? (b.minHeight as number) : 320 const headingSize = typeof b.headingSize === 'number' ? (b.headingSize as number) : 48 return ( @@ -280,9 +288,14 @@ function StatBar({ block }: BlockRendererProps) {
{list.map((it, i) => ( -

+

{str(it, 'icon') && {str(it, 'icon')}} - {str(it, 'emphasis')}{' '} + + {str(it, 'emphasis')} + {' '} {str(it, 'label')}

))} @@ -296,7 +309,10 @@ function SectionIntro({ block }: BlockRendererProps) { const left = str(b, 'align') === 'left' const soft = str(b, 'surface') === 'soft' return ( -
+
{str(b, 'eyebrow') && (

)} {str(b, 'subheading') && ( -

+

{str(b, 'subheading')}

)} @@ -335,7 +353,10 @@ function ServiceSection({ block }: BlockRendererProps) { // rather than the h4/18px used for sub-service cards. const bigTitles = b.bigTitles === true return ( -
+
{str(b, 'heading') && (

)} {str(b, 'intro') && ( -

{str(b, 'intro')}

+

+ {str(b, 'intro')} +

)}
{cards.map((c, i) => { - const bullets = (Array.isArray(c.bullets) ? c.bullets : []) as Array< - Record - > + const bullets = ( + Array.isArray(c.bullets) ? c.bullets : [] + ) as Array> return (
{str(c, 'title')}

) : (

{str(c, 'title')}

)} {str(c, 'body') && ( -

{str(c, 'body')}

+

+ {str(c, 'body')} +

)} {bullets.length > 0 && (
    @@ -406,7 +439,8 @@ function FeatureGrid({ block }: BlockRendererProps) { ? 'grid-cols-1 min-[782px]:grid-cols-4' : 'grid-cols-1 min-[782px]:grid-cols-3' const ctaLabel = str(b, 'ctaLabel') - const titleSize = typeof b.titleSize === 'number' ? (b.titleSize as number) : 22 + const titleSize = + typeof b.titleSize === 'number' ? (b.titleSize as number) : 22 return (
    @@ -443,7 +477,11 @@ function FeatureGrid({ block }: BlockRendererProps) { >

    {str(it, 'icon') && {str(it, 'icon')}} {str(it, 'title')} @@ -499,7 +537,10 @@ function Testimonials({ block }: BlockRendererProps) {
    “{str(it, 'quote')}”
    -
    +
    {str(it, 'name')} {str(it, 'city') && ( @@ -523,7 +564,10 @@ function CtaBand({ block }: BlockRendererProps) { const label2 = str(b, 'button2Label') const btnBg = navy ? ACCENT : NAVY return ( -
    +

    -
    +
    +
    {str(b, 'heading') && ( -

    +

    {str(b, 'heading')}

    )} @@ -602,10 +654,15 @@ function ContactSplit({ block }: BlockRendererProps) { {str(b, 'formTitle', 'Send Us a Message')}

    {str(b, 'formIntro') && ( -

    {str(b, 'formIntro')}

    +

    + {str(b, 'formIntro')} +

    )} {sent ? ( -

    +

    Thanks! A real local person will get right back to you.

    ) : ( @@ -616,7 +673,10 @@ function ContactSplit({ block }: BlockRendererProps) { setSent(true) }} > -