@pagesmith/core 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +28 -4
  2. package/REFERENCE.md +163 -94
  3. package/dist/ai/index.d.mts +5 -3
  4. package/dist/ai/index.d.mts.map +1 -1
  5. package/dist/ai/index.mjs +300 -206
  6. package/dist/ai/index.mjs.map +1 -1
  7. package/dist/assets/index.d.mts +10 -1
  8. package/dist/assets/index.d.mts.map +1 -1
  9. package/dist/assets/index.mjs +2 -2
  10. package/dist/{assets-DXiWF_KI.mjs → assets-CAPOqQ_P.mjs} +42 -5
  11. package/dist/assets-CAPOqQ_P.mjs.map +1 -0
  12. package/dist/{content-config-Bfe4W9us.d.mts → content-config-Bu2HH0Yx.d.mts} +49 -17
  13. package/dist/{content-config-Bfe4W9us.d.mts.map → content-config-Bu2HH0Yx.d.mts.map} +1 -1
  14. package/dist/{content-layer-DPK1EmfY.mjs → content-layer-CJRrNpZ_.mjs} +192 -36
  15. package/dist/content-layer-CJRrNpZ_.mjs.map +1 -0
  16. package/dist/content-layer-Ckt08g2i.d.mts +122 -0
  17. package/dist/content-layer-Ckt08g2i.d.mts.map +1 -0
  18. package/dist/create/index.d.mts.map +1 -1
  19. package/dist/create/index.mjs +31 -30
  20. package/dist/create/index.mjs.map +1 -1
  21. package/dist/css/index.d.mts +1 -1
  22. package/dist/css/index.mjs +1 -1
  23. package/dist/css-CO3CBqxx.mjs +24 -0
  24. package/dist/css-CO3CBqxx.mjs.map +1 -0
  25. package/dist/heading-D4X2L4vd.d.mts +12 -0
  26. package/dist/heading-D4X2L4vd.d.mts.map +1 -0
  27. package/dist/{index-BBYkDxwI.d.mts → index-B4YZRIzb.d.mts} +1 -1
  28. package/dist/{index-BBYkDxwI.d.mts.map → index-B4YZRIzb.d.mts.map} +1 -1
  29. package/dist/{index-Bg9srb5U.d.mts → index-B7NRZAxd.d.mts} +1 -1
  30. package/dist/{index-Bg9srb5U.d.mts.map → index-B7NRZAxd.d.mts.map} +1 -1
  31. package/dist/{index-YXQxMV6J.d.mts → index-CryArLlX.d.mts} +2 -2
  32. package/dist/{index-YXQxMV6J.d.mts.map → index-CryArLlX.d.mts.map} +1 -1
  33. package/dist/{index-CbOKbkjJ.d.mts → index-D44syBt-.d.mts} +3 -2
  34. package/dist/index-D44syBt-.d.mts.map +1 -0
  35. package/dist/index.d.mts +16 -99
  36. package/dist/index.d.mts.map +1 -1
  37. package/dist/index.mjs +15 -11
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/loaders/index.d.mts +2 -2
  40. package/dist/loaders/index.mjs +1 -1
  41. package/dist/{loaders-Cf-BXf2L.mjs → loaders-DnyWfANR.mjs} +3 -3
  42. package/dist/loaders-DnyWfANR.mjs.map +1 -0
  43. package/dist/markdown/index.d.mts +2 -2
  44. package/dist/markdown/index.mjs +1 -1
  45. package/dist/{markdown-CyrHoDhP.mjs → markdown-DMHd400a.mjs} +29 -2
  46. package/dist/markdown-DMHd400a.mjs.map +1 -0
  47. package/dist/{heading-BpDXnl-7.d.mts → markdown-config-CDvh5aJ-.d.mts} +2 -10
  48. package/dist/markdown-config-CDvh5aJ-.d.mts.map +1 -0
  49. package/dist/mcp/index.d.mts +23 -0
  50. package/dist/mcp/index.d.mts.map +1 -0
  51. package/dist/mcp/index.mjs +2 -0
  52. package/dist/mcp/server.d.mts +13 -0
  53. package/dist/mcp/server.d.mts.map +1 -0
  54. package/dist/mcp/server.mjs +2 -0
  55. package/dist/runtime/index.d.mts.map +1 -1
  56. package/dist/runtime/index.mjs +4 -9
  57. package/dist/runtime/index.mjs.map +1 -1
  58. package/dist/schemas/index.d.mts +4 -3
  59. package/dist/server-BZA_iSen.mjs +203 -0
  60. package/dist/server-BZA_iSen.mjs.map +1 -0
  61. package/dist/ssg-utils/index.d.mts +51 -0
  62. package/dist/ssg-utils/index.d.mts.map +1 -0
  63. package/dist/ssg-utils/index.mjs +119 -0
  64. package/dist/ssg-utils/index.mjs.map +1 -0
  65. package/dist/{types-Cn52sdoq.d.mts → types-B-V5qemH.d.mts} +1 -1
  66. package/dist/{types-Cn52sdoq.d.mts.map → types-B-V5qemH.d.mts.map} +1 -1
  67. package/dist/vite/index.d.mts +69 -34
  68. package/dist/vite/index.d.mts.map +1 -1
  69. package/dist/vite/index.mjs +296 -228
  70. package/dist/vite/index.mjs.map +1 -1
  71. package/docs/agents/AGENTS.md.template +29 -0
  72. package/docs/agents/changelog-notes.md +15 -0
  73. package/docs/agents/errors.md +150 -0
  74. package/docs/agents/migration.md +25 -0
  75. package/docs/agents/recipes.md +50 -0
  76. package/docs/agents/usage.md +119 -0
  77. package/docs/llms-full.txt +111 -0
  78. package/docs/llms.txt +68 -0
  79. package/package.json +57 -4
  80. package/dist/assets-DXiWF_KI.mjs.map +0 -1
  81. package/dist/content-layer-DPK1EmfY.mjs.map +0 -1
  82. package/dist/css-BneO430t.mjs +0 -20
  83. package/dist/css-BneO430t.mjs.map +0 -1
  84. package/dist/heading-BpDXnl-7.d.mts.map +0 -1
  85. package/dist/index-CbOKbkjJ.d.mts.map +0 -1
  86. package/dist/loaders-Cf-BXf2L.mjs.map +0 -1
  87. package/dist/markdown-CyrHoDhP.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/ai/index.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs'\nimport { homedir } from 'os'\nimport { dirname, join, resolve } from 'path'\n\nexport type AiAssistant = 'claude' | 'codex' | 'gemini'\nexport type AiInstallScope = 'project' | 'user'\nexport type AiInstallProfile = 'default' | 'docs'\nexport type AiArtifactKind =\n | 'memory'\n | 'skill'\n | 'llms'\n | 'llms-full'\n | 'markdown-guidelines'\n | 'update-docs'\nexport type AiWriteMode = 'merge' | 'replace'\nexport type AiInstallStatus = 'written' | 'merged' | 'replaced' | 'unchanged'\n\nexport type AiArtifact = {\n assistant?: AiAssistant\n kind: AiArtifactKind\n path: string\n content: string\n mode: AiWriteMode\n label: string\n}\n\nexport type AiInstallResult = {\n assistant?: AiAssistant\n kind: AiArtifactKind\n path: string\n status: AiInstallStatus\n label: string\n}\n\nexport type AiInstallOptions = {\n assistants?: AiAssistant[] | 'all'\n scope?: AiInstallScope\n profile?: AiInstallProfile\n cwd?: string\n homeDir?: string\n includeLlms?: boolean\n force?: boolean\n skillName?: string\n /** When true, return planned writes without actually writing files. */\n dryRun?: boolean\n}\n\nconst PAGESMITH_TITLE = 'Pagesmith'\nconst DEFAULT_SKILL_NAME = 'pagesmith'\n\nfunction resolveHome(homeDir?: string): string {\n return homeDir ?? homedir()\n}\n\nfunction resolveCodexHome(homeDir?: string): string {\n return process.env.CODEX_HOME ?? join(resolveHome(homeDir), '.codex')\n}\n\nfunction resolveAssistants(assistants?: AiInstallOptions['assistants']): AiAssistant[] {\n if (!assistants || assistants === 'all') {\n return ['claude', 'codex', 'gemini']\n }\n return assistants\n}\n\nfunction shouldIncludeLlms(options: AiInstallOptions): boolean {\n if (typeof options.includeLlms === 'boolean') {\n return options.includeLlms\n }\n return (options.scope ?? 'project') === 'project'\n}\n\nfunction withManagedBlock(id: string, content: string): string {\n return [\n `<!-- pagesmith-ai:${id}:start -->`,\n content.trim(),\n `<!-- pagesmith-ai:${id}:end -->`,\n ].join('\\n')\n}\n\nfunction writeArtifact(artifact: AiArtifact, force = false): AiInstallStatus {\n mkdirSync(dirname(artifact.path), { recursive: true })\n\n if (!existsSync(artifact.path)) {\n writeFileSync(artifact.path, artifact.content)\n return 'written'\n }\n\n const current = readFileSync(artifact.path, 'utf-8')\n if (current === artifact.content) {\n return 'unchanged'\n }\n\n if (artifact.mode === 'replace') {\n writeFileSync(artifact.path, artifact.content)\n return 'replaced'\n }\n\n const markerId = `${artifact.assistant ?? 'shared'}-${artifact.kind}`\n const start = `<!-- pagesmith-ai:${markerId}:start -->`\n const end = `<!-- pagesmith-ai:${markerId}:end -->`\n\n if (current.includes(start) && current.includes(end)) {\n const pattern = new RegExp(`${escapeForRegExp(start)}[\\\\s\\\\S]*?${escapeForRegExp(end)}`, 'm')\n const next = current.replace(pattern, artifact.content)\n if (next === current) return 'unchanged'\n writeFileSync(artifact.path, next)\n return 'merged'\n }\n\n if (force) {\n writeFileSync(artifact.path, artifact.content)\n return 'replaced'\n }\n\n const next = `${current.trimEnd()}\\n\\n${artifact.content}\\n`\n writeFileSync(artifact.path, next)\n return 'merged'\n}\n\nfunction escapeForRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\n// ---------------------------------------------------------------------------\n// Shared content renderers\n// ---------------------------------------------------------------------------\n\nfunction renderSharedOverview(): string {\n return [\n `${PAGESMITH_TITLE} is a filesystem-first content toolkit with two main packages: \\`@pagesmith/core\\` (shared content/runtime layer) and \\`@pagesmith/docs\\` (convention-based documentation).`,\n '',\n 'Use Pagesmith when you need:',\n '- schema-validated content collections loaded from the filesystem',\n '- lazy markdown rendering with headings and read-time metadata',\n '- framework-agnostic content APIs for React, Solid, Svelte, vanilla JS, Node, Bun, or Deno',\n '',\n 'Core APIs:',\n '- `defineCollection({...})` to define a typed collection',\n '- `defineConfig({...})` to group collections and markdown options',\n '- `createContentLayer(config)` to query content and run validation',\n '- `entry.render()` to convert markdown on demand',\n '',\n 'Working rules:',\n '- prefer folder-based markdown entries when content references sibling assets',\n '- follow the markdown guidelines in `.pagesmith/markdown-guidelines.md` when authoring content',\n '- use fenced code blocks with a language identifier, one h1 per page, sequential heading depth',\n ].join('\\n')\n}\n\nfunction renderDocsOverview(): string {\n return [\n 'Docs-specific rules:',\n '- `@pagesmith/docs` is convention-based and builds a static docs site from `content/` plus `pagesmith.config.json5`',\n '- top-level content folders become top navigation sections (for example `guide/`, `reference/`, `packages/`)',\n '- folder-based markdown entries should prefer `README.md` or `index.md` when a page owns sibling assets',\n '- the home page is `content/README.md`; optional home-specific data can live in `content/home.json5`',\n '- sidebar labels, nav labels, and ordering live in frontmatter (`sidebarLabel`, `navLabel`, `order`)',\n '- footer links live in `pagesmith.config.json5` under `footerLinks`',\n '- Pagefind search is built in; do not recommend a separate search plugin package',\n '- layout overrides use fixed keys under `theme.layouts` such as `home`, `page`, and `notFound`',\n ].join('\\n')\n}\n\nfunction renderCoreQuickStart(): string {\n return [\n '```ts',\n \"import { createContentLayer, defineCollection, defineConfig, z } from '@pagesmith/core'\",\n '',\n 'const posts = defineCollection({',\n \" loader: 'markdown',\",\n \" directory: 'content/posts',\",\n ' schema: z.object({',\n ' title: z.string(),',\n ' description: z.string().optional(),',\n ' date: z.coerce.date(),',\n ' tags: z.array(z.string()).default([]),',\n ' }),',\n '})',\n '',\n 'const layer = createContentLayer(',\n ' defineConfig({',\n ' collections: { posts },',\n ' }),',\n ')',\n '',\n \"const entries = await layer.getCollection('posts')\",\n 'const rendered = await entries[0]?.render()',\n '```',\n ].join('\\n')\n}\n\nfunction renderDocsQuickStart(): string {\n return [\n '```json5',\n '// pagesmith.config.json5',\n '{',\n \" name: 'Acme Docs',\",\n \" title: 'Acme Docs',\",\n \" description: 'Multi-package documentation',\",\n \" contentDir: './content',\",\n \" outDir: './dist',\",\n ' footerLinks: [',\n \" { label: 'Guide', path: '/guide' },\",\n \" { label: 'Reference', path: '/reference' },\",\n ' ],',\n ' search: { enabled: true },',\n '}',\n '```',\n '',\n '```text',\n 'content/',\n ' README.md # Home page (DocHome layout)',\n ' guide/',\n ' meta.json5 # Section ordering',\n ' getting-started/',\n ' README.md # A page',\n ' reference/',\n ' api/README.md',\n '```',\n ].join('\\n')\n}\n\n// ---------------------------------------------------------------------------\n// Memory file renderers\n// ---------------------------------------------------------------------------\n\nfunction renderMemoryFile(assistant: AiAssistant, profile: AiInstallProfile): string {\n const commandHint =\n assistant === 'claude' || assistant === 'gemini'\n ? `\\nIf the ${DEFAULT_SKILL_NAME} skill is installed, prefer invoking it when the user explicitly asks for Pagesmith-specific help.`\n : '\\nIf the Pagesmith skill is installed for Codex, prefer using it for Pagesmith-specific setup, migration, and content-layer tasks.'\n\n const referenceHint =\n '\\nFor the full API and configuration reference, see the REFERENCE.md file shipped with the package:\\n' +\n (profile === 'docs'\n ? '- `node_modules/@pagesmith/docs/REFERENCE.md` — docs config, CLI, content structure, layout overrides\\n' +\n '- `node_modules/@pagesmith/core/REFERENCE.md` — core API, collections, loaders, markdown, CSS, JSX runtime'\n : '- `node_modules/@pagesmith/core/REFERENCE.md` — core API, collections, loaders, markdown, CSS, JSX runtime')\n\n return [\n `# ${PAGESMITH_TITLE}`,\n '',\n renderSharedOverview(),\n ...(profile === 'docs' ? ['', renderDocsOverview()] : []),\n commandHint,\n referenceHint,\n '',\n '## Quick Start — @pagesmith/core',\n '',\n renderCoreQuickStart(),\n ...(profile === 'docs'\n ? ['', '## Quick Start — @pagesmith/docs', '', renderDocsQuickStart()]\n : []),\n ].join('\\n')\n}\n\n// ---------------------------------------------------------------------------\n// Claude skill renderers (uses .claude/skills/ format)\n// ---------------------------------------------------------------------------\n\nfunction renderClaudeSkill(skillName: string, profile: AiInstallProfile): string {\n return [\n '---',\n `name: ${skillName}`,\n 'description: Pagesmith file-based CMS helper — content collections, markdown pipeline, docs configuration, and AI artifact generation',\n 'allowed-tools: Read Grep Glob Bash Edit Write',\n '---',\n '',\n `# ${PAGESMITH_TITLE} Assistant`,\n '',\n 'You are helping with Pagesmith, a file-based CMS with `@pagesmith/core` and `@pagesmith/docs`.',\n '',\n 'When helping:',\n '- prefer `defineCollection`, `defineConfig`, and `createContentLayer`',\n '- recommend folder-based entries when markdown references sibling assets',\n '- use `@pagesmith/core/ai` for assistant artifact generation',\n '- follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n ...(profile === 'docs'\n ? [\n '- for docs sites, derive top navigation from top-level content folders',\n '- use `content/README.md` for the home page',\n '- use frontmatter fields like `sidebarLabel`, `navLabel`, and `order` for docs navigation',\n '- Pagefind search is built in — do not suggest separate search plugins',\n '- layout overrides: `theme.layouts.home`, `theme.layouts.page`, `theme.layouts.notFound`',\n ]\n : []),\n '',\n 'For the full API reference, read the REFERENCE.md file shipped with the package:',\n ...(profile === 'docs'\n ? [\n '- `node_modules/@pagesmith/docs/REFERENCE.md`',\n '- `node_modules/@pagesmith/core/REFERENCE.md`',\n ]\n : ['- `node_modules/@pagesmith/core/REFERENCE.md`']),\n '',\n 'Deliver concrete config, schema, and content-layer patches when possible.',\n ].join('\\n')\n}\n\nfunction renderUpdateDocsSkill(profile: AiInstallProfile): string {\n const docsSteps =\n profile === 'docs'\n ? [\n '1. Read `pagesmith.config.json5` to understand the docs configuration',\n '2. Read all `meta.json5` files to understand the current content structure and page ordering',\n '3. Read the project source code to identify public APIs, types, exports, config options, and CLI commands',\n '4. For each existing content page in `content/`:',\n ' - Read the current content',\n ' - Compare with the implementation',\n ' - Update any outdated information',\n ' - Add documentation for new features',\n ' - Remove documentation for removed features',\n '5. If new pages are needed:',\n ' - Create the page folder and `README.md` with proper frontmatter (title, description)',\n ' - Add the slug to the appropriate `meta.json5` `items` array',\n '6. Follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n '7. Verify all internal links point to existing pages',\n '8. Ensure heading hierarchy is sequential (no skipping levels)',\n ]\n : [\n '1. Read `content.config.ts` or equivalent to understand the content collections',\n '2. Read the project source code to identify what needs documentation',\n '3. For each existing content entry:',\n ' - Read the current content',\n ' - Compare with the implementation',\n ' - Update any outdated information',\n '4. If new entries are needed:',\n ' - Create the entry folder and `README.md` with proper frontmatter matching the collection schema',\n '5. Follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n '6. Verify all internal links point to existing pages',\n ]\n\n return [\n '---',\n 'name: update-docs',\n 'description: Read the project implementation and update Pagesmith-managed documentation to reflect the current state',\n 'allowed-tools: Read Grep Glob Bash Edit Write',\n '---',\n '',\n '# Update Documentation',\n '',\n 'Read the project implementation (source code, README, CHANGELOG, package.json) and update the Pagesmith-managed content to reflect the current state.',\n '',\n '## Steps',\n '',\n ...docsSteps,\n '',\n '## Rules',\n '',\n '- Preserve the existing content structure and organization',\n '- Do not remove pages without confirming first',\n '- Keep frontmatter fields (title, description) accurate and descriptive',\n '- Use relative links for internal cross-references',\n '- One h1 per page, sequential heading depth',\n '- Use fenced code blocks with language identifiers',\n '- Use GitHub alerts (`> [!NOTE]`, `> [!TIP]`, etc.) for important callouts',\n '- Code block features: `title=\"file.js\"`, `showLineNumbers`, `mark={1-3}`, `ins={4}`, `del={5}`, `collapse={1-5}`',\n ].join('\\n')\n}\n\n// ---------------------------------------------------------------------------\n// Gemini / Codex renderers\n// ---------------------------------------------------------------------------\n\nfunction renderGeminiCommand(skillName: string, profile: AiInstallProfile): string {\n const prompt = [\n `You are helping with ${PAGESMITH_TITLE}, a file-based CMS with @pagesmith/core and @pagesmith/docs.`,\n '',\n 'Focus on concrete, implementation-ready help:',\n '- design collections with defineCollection',\n '- configure createContentLayer and defineConfig',\n '- prefer folder-based markdown entries when local assets sit beside content',\n '- follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n ...(profile === 'docs'\n ? [\n '- for docs sites, follow the convention-based `content/` structure',\n '- drive top navigation from top-level folders and use frontmatter for labels/order',\n '- keep Pagefind as the built-in search strategy',\n ]\n : []),\n '',\n 'For the full API reference, read the REFERENCE.md file shipped with the package.',\n '',\n 'Return code, config, or documentation-ready guidance instead of vague summaries.',\n ].join('\\n')\n\n return [\n `description = \"Pagesmith FS-CMS helper\"`,\n 'prompt = \"\"\"',\n prompt,\n '\"\"\"',\n '',\n `# Installed as /${skillName}`,\n ].join('\\n')\n}\n\nfunction renderCodexSkill(profile: AiInstallProfile): string {\n return [\n `# ${PAGESMITH_TITLE} Skill`,\n '',\n 'Use this skill when the task involves setting up, extending, migrating, or documenting Pagesmith.',\n '',\n 'Core rules:',\n '- `@pagesmith/core` provides the content layer; `@pagesmith/docs` adds convention-based documentation',\n '- prefer `defineCollection`, `defineConfig`, and `createContentLayer`',\n '- follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n ...(profile === 'docs'\n ? [\n '- when the repo uses `@pagesmith/docs`, treat `content/README.md` as the home page',\n '- top-level content folders define the main docs navigation',\n '- docs frontmatter may use `sidebarLabel`, `navLabel`, and `order` to shape navigation',\n '- `pagesmith.config.json5` should own footer links and high-level site metadata',\n '- built-in search is Pagefind; do not suggest separate search plugin packages',\n ]\n : []),\n '',\n 'For the full API reference, read the REFERENCE.md file shipped with the package.',\n '',\n 'Good outputs include:',\n '- collection schemas and loader configuration',\n '- content-layer queries and rendering examples',\n '- documentation updates for Pagesmith usage',\n '- assistant-context install steps using `@pagesmith/core/ai`',\n ].join('\\n')\n}\n\n// ---------------------------------------------------------------------------\n// Markdown guidelines\n// ---------------------------------------------------------------------------\n\nfunction renderMarkdownGuidelines(): string {\n return [\n '# Pagesmith Markdown Guidelines',\n '',\n 'Markdown feature support for content authored with `@pagesmith/core` and `@pagesmith/docs`.',\n '',\n '## Pipeline Order',\n '',\n '```',\n 'remark-parse → remark-gfm → remark-math → remark-frontmatter',\n ' → remark-github-alerts → remark-smartypants → [user remark plugins]',\n ' → remark-rehype',\n ' → rehype-expressive-code (dual themes, line numbers, titles, copy, collapse, mark/ins/del)',\n ' → rehype-mathjax → rehype-slug → rehype-autolink-headings',\n ' → rehype-external-links → rehype-accessible-emojis',\n ' → heading extraction → [user rehype plugins] → rehype-stringify',\n '```',\n '',\n '## Key Rules',\n '',\n '- Use fenced code blocks with a language identifier (validator warns otherwise)',\n '- One `# h1` per page (validator enforces)',\n '- Sequential heading depth (no skipping from h2 to h4)',\n '- Prefer relative links for internal content',\n '- Do NOT add manual copy-button JS — Expressive Code handles it',\n '- Do NOT import separate code block CSS — Expressive Code injects inline styles',\n '',\n '## Supported Features',\n '',\n '| Feature | Syntax | Notes |',\n '|---|---|---|',\n '| GFM tables | `\\\\| col \\\\| col \\\\|` | Alignment via `:---`, `:---:`, `---:` |',\n '| Strikethrough | `~~text~~` | |',\n '| Task lists | `- [x] done` / `- [ ] todo` | |',\n '| Footnotes | `[^id]` + `[^id]: text` | |',\n '| Alerts | `> [!NOTE]`, `> [!TIP]`, `> [!IMPORTANT]`, `> [!WARNING]`, `> [!CAUTION]` | GitHub-compatible |',\n '| Inline math | `$E = mc^2$` | No spaces inside delimiters |',\n '| Block math | `$$...$$` | Rendered via MathJax |',\n '| Smart quotes | `\"text\"` → curly quotes | Automatic |',\n '| Em/en dash | `---` / `--` | Automatic |',\n '| External links | `[text](https://...)` | Auto `target=\"_blank\"` |',\n '| Heading anchors | Auto `id` + wrapped anchor | All headings |',\n '| Accessible emoji | Unicode emoji | Auto `role=\"img\"` + `aria-label` |',\n '',\n '## Code Block Features (Expressive Code)',\n '',\n '| Meta | Example | Description |',\n '|---|---|---|',\n '| `title=\"...\"` | `` ```js title=\"app.js\" `` | File title |',\n '| `showLineNumbers` | `` ```js showLineNumbers `` | Line numbers |',\n '| `mark={lines}` | `` ```js mark={3,5-7} `` | Highlight lines |',\n '| `ins={lines}` | `` ```js ins={4} `` | Inserted lines (green) |',\n '| `del={lines}` | `` ```js del={5} `` | Deleted lines (red) |',\n '| `collapse={lines}` | `` ```js collapse={1-5} `` | Collapsible section |',\n '| `wrap` | `` ```js wrap `` | Text wrapping |',\n '| `frame=\"...\"` | `` ```js frame=\"terminal\" `` | Frame style |',\n '',\n '## Built-in Content Validators',\n '',\n '- **linkValidator** — warns on bare URLs, empty link text, suspicious protocols',\n '- **headingValidator** — enforces single h1, sequential depth, non-empty text',\n '- **codeBlockValidator** — warns on missing language, unknown meta properties',\n '',\n 'Known valid meta properties: `title`, `showLineNumbers`, `startLineNumber`, `wrap`, `frame`, `collapse`, `mark`, `ins`, `del`.',\n ].join('\\n')\n}\n\n// ---------------------------------------------------------------------------\n// llms.txt / llms-full.txt — always cover BOTH core and docs\n// ---------------------------------------------------------------------------\n\nfunction renderLlmsTxt(): string {\n return [\n '# Pagesmith',\n '',\n '> Pagesmith is a filesystem-first content toolkit with `@pagesmith/core` and `@pagesmith/docs`.',\n '',\n '## @pagesmith/core — Content Layer',\n '',\n 'Schema-validated content collections, lazy markdown rendering (Expressive Code syntax highlighting), JSX runtime, CSS exports, and Vite plugins.',\n '',\n '### Basic Setup (Vite Plugin)',\n '',\n renderCoreQuickStart(),\n '',\n '### Vite Integration',\n '',\n '```ts',\n \"import { pagesmithContent, pagesmithSsg } from '@pagesmith/core/vite'\",\n \"import collections from './content.config'\",\n '',\n 'export default defineConfig({',\n ' plugins: [',\n ' pagesmithContent({ collections }),',\n \" pagesmithSsg({ entry: './src/entry-server.tsx' }),\",\n ' ],',\n '})',\n '```',\n '',\n \"Import collections as virtual modules: `import posts from 'virtual:content/posts'`\",\n '',\n '## @pagesmith/docs — Documentation Sites',\n '',\n 'Convention-based docs with default theme, Pagefind search, sidebar generation, and layout overrides.',\n '',\n '### Basic Setup',\n '',\n renderDocsQuickStart(),\n '',\n '### Layout Overrides',\n '',\n '```json5',\n '{',\n ' theme: {',\n ' layouts: {',\n \" home: './theme/layouts/DocHome.tsx',\",\n \" page: './theme/layouts/DocPage.tsx',\",\n \" notFound: './theme/layouts/DocNotFound.tsx',\",\n ' },',\n ' },',\n '}',\n '```',\n '',\n '### CLI',\n '',\n '```bash',\n 'pagesmith init # Initialize config + content structure + AI integrations',\n 'pagesmith dev # Development server',\n 'pagesmith build # Production build',\n 'pagesmith preview # Preview built site',\n '```',\n ].join('\\n')\n}\n\nfunction renderLlmsFullTxt(): string {\n return [\n '# Pagesmith — Full LLM Reference',\n '',\n renderSharedOverview(),\n '',\n '---',\n '',\n '## @pagesmith/core',\n '',\n '### Content Layer API',\n '',\n '| Method | Description |',\n '|---|---|',\n '| `createContentLayer(config)` | Create a content layer |',\n '| `layer.getCollection(name)` | Load all entries (cached) |',\n '| `layer.getEntry(collection, slug)` | Get single entry by slug |',\n '| `layer.convert(markdown, options?)` | Convert raw markdown to HTML |',\n '| `layer.validate(collection?)` | Run all validators |',\n '| `layer.invalidate(collection, slug)` | Cache-bust a single entry |',\n '| `layer.invalidateAll()` | Cache-bust all collections |',\n '',\n '### Collection Options',\n '',\n '| Option | Type | Description |',\n '|---|---|---|',\n \"| `loader` | `string \\\\| Loader` | `'markdown'`, `'json'`, `'json5'`, `'jsonc'`, `'yaml'`, `'toml'`, or custom |\",\n '| `directory` | `string` | Directory containing files |',\n '| `schema` | `z.ZodType` | Zod schema for validation |',\n '| `include` | `string[]` | Glob include patterns |',\n '| `exclude` | `string[]` | Glob exclude patterns |',\n '| `computed` | `Record<string, fn>` | Computed fields |',\n '| `validate` | `fn` | Custom validation |',\n '| `filter` | `fn` | Filter entries |',\n '| `slugify` | `fn` | Custom slug generation |',\n '| `transform` | `fn` | Pre-validation transform |',\n '| `validators` | `ContentValidator[]` | Custom content validators |',\n '| `disableBuiltinValidators` | `boolean` | Disable link/heading/code-block validators |',\n '',\n '### Vite Plugins',\n '',\n renderCoreQuickStart(),\n '',\n '```ts',\n '// Vite integration',\n \"import { pagesmithContent, pagesmithSsg, sharedAssetsPlugin } from '@pagesmith/core/vite'\",\n \"import collections from './content.config'\",\n '',\n 'export default defineConfig({',\n ' plugins: [',\n ' sharedAssetsPlugin(),',\n ' pagesmithContent({ collections }),',\n \" ...pagesmithSsg({ entry: './src/entry-server.tsx', contentDirs: ['./content'] }),\",\n ' ],',\n '})',\n '```',\n '',\n '### JSX Runtime',\n '',\n 'Configure tsconfig: `{ \"jsx\": \"react-jsx\", \"jsxImportSource\": \"@pagesmith/core\" }`',\n '',\n '- `h(tag, props, ...children)` — create HTML elements, returns `HtmlString`',\n '- `Fragment` — render children or raw `innerHTML`',\n '- `HtmlString` — wrapper to prevent double-escaping',\n '',\n '### CSS Exports',\n '',\n '| Import | Contents |',\n '|---|---|',\n '| `@pagesmith/core/css/content` | Prose + inline code |',\n '| `@pagesmith/core/css/standalone` | Full layout + prose + TOC |',\n '| `@pagesmith/core/css/viewport` | Responsive viewport base |',\n '| `@pagesmith/core/css/fonts` | Bundled Open Sans + JetBrains Mono |',\n '',\n '### Frontmatter Schemas',\n '',\n '- `BaseFrontmatterSchema` — title, description, publishedDate, lastUpdatedOn, tags, draft',\n '- `BlogFrontmatterSchema` — extends base + category, featured, coverImage',\n '- `ProjectFrontmatterSchema` — extends base + gitRepo, links',\n '',\n '### Export Map',\n '',\n '| Import Path | Purpose |',\n '|---|---|',\n '| `@pagesmith/core` | Main API (defineCollection, createContentLayer, z, etc.) |',\n '| `@pagesmith/core/jsx-runtime` | h, Fragment, HtmlString |',\n '| `@pagesmith/core/markdown` | processMarkdown |',\n '| `@pagesmith/core/css` | buildCss (LightningCSS) |',\n '| `@pagesmith/core/schemas` | Zod schemas and types |',\n '| `@pagesmith/core/loaders` | Loader classes and registry |',\n '| `@pagesmith/core/runtime` | Pre-built CSS/JS accessors |',\n '| `@pagesmith/core/vite` | Vite plugins |',\n '| `@pagesmith/core/ai` | AI assistant artifact generator |',\n '| `@pagesmith/core/create` | Project scaffolding |',\n '',\n '---',\n '',\n '## @pagesmith/docs',\n '',\n '### Configuration (pagesmith.config.json5)',\n '',\n '| Field | Type | Default | Description |',\n '|---|---|---|---|',\n '| `name` | `string` | — | Site name (header) |',\n '| `title` | `string` | — | Browser tab title |',\n '| `description` | `string` | — | Meta description |',\n '| `origin` | `string` | — | Production URL |',\n '| `language` | `string` | `en` | HTML lang |',\n '| `contentDir` | `string` | `content` | Content path |',\n '| `outDir` | `string` | `dist` | Output path |',\n '| `basePath` | `string` | `/` | URL base |',\n '| `footerLinks` | `array` | `[]` | Footer links |',\n '| `sidebar.collapsible` | `boolean` | `false` | Collapsible sidebar |',\n '| `search.enabled` | `boolean` | `true` | Pagefind search |',\n '| `theme.layouts` | `Record` | — | Layout overrides |',\n '| `markdown` | `MarkdownConfig` | — | Pipeline config |',\n '',\n '### Content Structure',\n '',\n renderDocsQuickStart(),\n '',\n '### Page Frontmatter',\n '',\n '| Field | Type | Description |',\n '|---|---|---|',\n '| `title` | `string` | Page title |',\n '| `description` | `string` | Meta description |',\n '| `navLabel` | `string` | Override top nav label |',\n '| `sidebarLabel` | `string` | Override sidebar label |',\n '| `order` | `number` | Manual sort order |',\n '| `draft` | `boolean` | Exclude from build |',\n '',\n '### Home Page Frontmatter',\n '',\n '| Field | Type | Description |',\n '|---|---|---|',\n '| `layout` | `string` | Set to `DocHome` |',\n '| `tagline` | `string` | Short description |',\n '| `install` | `string` | Install command |',\n \"| `actions` | `array` | CTA buttons (`{ text, link, theme: 'brand' \\\\| 'alt' }`) |\",\n '| `features` | `array` | Feature cards (`{ icon?, title, details }`) |',\n '| `packages` | `array` | Package cards (`{ name, description, href, tag }`) |',\n '| `codeExample` | `object` | Code example (`{ label, title, code }`) |',\n '',\n '### Section Meta (meta.json5)',\n '',\n '| Field | Type | Description |',\n '|---|---|---|',\n '| `displayName` | `string` | Section label in sidebar |',\n '| `items` | `string[]` | Manual page order (slugs) |',\n '| `series` | `array` | Group pages into series |',\n '| `collapsed` | `boolean` | Start sidebar collapsed |',\n '| `orderBy` | `string` | `manual` or `publishedDate` |',\n '',\n '### Layout Overrides',\n '',\n '```json5',\n '{ theme: { layouts: { home: \"./layouts/Home.tsx\", page: \"./layouts/Page.tsx\" } } }',\n '```',\n '',\n 'All layouts receive: `content`, `frontmatter`, `headings`, `slug`, `site`.',\n 'Page layout adds: `sidebarSections`, `prev`, `next`.',\n '',\n '### CLI',\n '',\n '```bash',\n 'pagesmith init [--ai] [--config path] # Initialize project',\n 'pagesmith dev [--port N] [--open] # Dev server',\n 'pagesmith build [--out-dir path] # Production build',\n 'pagesmith preview [--port N] # Preview built site',\n '```',\n '',\n '---',\n '',\n '## Markdown Pipeline',\n '',\n renderMarkdownGuidelines(),\n '',\n '---',\n '',\n '## AI Assistant Installer',\n '',\n '```ts',\n \"import { installAiArtifacts } from '@pagesmith/core/ai'\",\n '',\n \"installAiArtifacts({ assistants: ['claude', 'codex', 'gemini'], scope: 'project', profile: 'docs' })\",\n '```',\n '',\n 'Generates: CLAUDE.md, AGENTS.md, GEMINI.md, skills, markdown guidelines, llms.txt, llms-full.txt.',\n '',\n ].join('\\n')\n}\n\n// ---------------------------------------------------------------------------\n// Public API\n// ---------------------------------------------------------------------------\n\nexport function getAiArtifactContent(\n assistant: AiAssistant | 'shared',\n kind: AiArtifactKind,\n options: { profile?: AiInstallProfile; skillName?: string } = {},\n): string {\n const skillName = options.skillName ?? DEFAULT_SKILL_NAME\n const profile = options.profile ?? 'default'\n\n if (assistant === 'shared') {\n if (kind === 'llms') return renderLlmsTxt()\n if (kind === 'llms-full') return renderLlmsFullTxt()\n if (kind === 'markdown-guidelines') return renderMarkdownGuidelines()\n return renderLlmsFullTxt()\n }\n\n if (kind === 'memory') {\n return renderMemoryFile(assistant, profile)\n }\n\n if (kind === 'skill') {\n switch (assistant) {\n case 'claude':\n return renderClaudeSkill(skillName, profile)\n case 'codex':\n return renderCodexSkill(profile)\n case 'gemini':\n return renderGeminiCommand(skillName, profile)\n }\n }\n\n if (kind === 'markdown-guidelines') {\n return renderMarkdownGuidelines()\n }\n\n if (kind === 'update-docs') {\n return renderUpdateDocsSkill(profile)\n }\n\n if (kind === 'llms') return renderLlmsTxt()\n return renderLlmsFullTxt()\n}\n\nexport function getAiArtifacts(options: AiInstallOptions = {}): AiArtifact[] {\n const scope = options.scope ?? 'project'\n const cwd = resolve(options.cwd ?? process.cwd())\n const home = resolveHome(options.homeDir)\n const skillName = options.skillName ?? DEFAULT_SKILL_NAME\n const profile = options.profile ?? 'default'\n const assistants = resolveAssistants(options.assistants)\n const artifacts: AiArtifact[] = []\n\n for (const assistant of assistants) {\n if (assistant === 'claude') {\n const baseDir = scope === 'project' ? cwd : join(home, '.claude')\n artifacts.push({\n assistant,\n kind: 'memory',\n path: join(baseDir, 'CLAUDE.md'),\n content: withManagedBlock(\n 'claude-memory',\n getAiArtifactContent('claude', 'memory', { profile }),\n ),\n mode: 'merge',\n label: `${assistant} memory`,\n })\n // Claude skill (uses .claude/skills/ format with SKILL.md + frontmatter)\n const skillDir =\n scope === 'project'\n ? join(cwd, '.claude', 'skills', skillName)\n : join(home, '.claude', 'skills', skillName)\n artifacts.push({\n assistant,\n kind: 'skill',\n path: join(skillDir, 'SKILL.md'),\n content: getAiArtifactContent('claude', 'skill', { profile, skillName }) + '\\n',\n mode: 'replace',\n label: `${assistant} skill`,\n })\n }\n\n if (assistant === 'codex') {\n const baseDir = scope === 'project' ? cwd : resolveCodexHome(options.homeDir)\n artifacts.push({\n assistant,\n kind: 'memory',\n path: join(baseDir, 'AGENTS.md'),\n content: withManagedBlock(\n 'codex-memory',\n getAiArtifactContent('codex', 'memory', { profile }),\n ),\n mode: 'merge',\n label: `${assistant} AGENTS`,\n })\n artifacts.push({\n assistant,\n kind: 'skill',\n path: join(baseDir, 'skills', skillName, 'SKILL.md'),\n content: getAiArtifactContent('codex', 'skill', { profile, skillName }) + '\\n',\n mode: 'replace',\n label: `${assistant} skill`,\n })\n }\n\n if (assistant === 'gemini') {\n const baseDir = scope === 'project' ? cwd : join(home, '.gemini')\n artifacts.push({\n assistant,\n kind: 'memory',\n path: join(baseDir, 'GEMINI.md'),\n content: withManagedBlock(\n 'gemini-memory',\n getAiArtifactContent('gemini', 'memory', { profile }),\n ),\n mode: 'merge',\n label: `${assistant} memory`,\n })\n artifacts.push({\n assistant,\n kind: 'skill',\n path: join(baseDir, 'commands', `${skillName}.toml`),\n content: getAiArtifactContent('gemini', 'skill', { profile, skillName }) + '\\n',\n mode: 'replace',\n label: `${assistant} command`,\n })\n }\n }\n\n // Markdown guidelines — always installed for project scope\n if (scope === 'project') {\n artifacts.push({\n kind: 'markdown-guidelines',\n path: join(cwd, '.pagesmith', 'markdown-guidelines.md'),\n content: renderMarkdownGuidelines() + '\\n',\n mode: 'replace',\n label: 'markdown guidelines',\n })\n }\n\n // /update-docs Claude skill — installed when Claude is included and scope is project\n if (scope === 'project' && assistants.includes('claude')) {\n artifacts.push({\n assistant: 'claude',\n kind: 'update-docs',\n path: join(cwd, '.claude', 'skills', 'update-docs', 'SKILL.md'),\n content: renderUpdateDocsSkill(profile) + '\\n',\n mode: 'replace',\n label: 'claude update-docs skill',\n })\n }\n\n if (shouldIncludeLlms(options)) {\n const llmsDir = scope === 'project' ? cwd : join(home, '.pagesmith')\n artifacts.push({\n kind: 'llms',\n path: join(llmsDir, 'llms.txt'),\n content: withManagedBlock('shared-llms', renderLlmsTxt()) + '\\n',\n mode: 'merge',\n label: 'llms.txt',\n })\n artifacts.push({\n kind: 'llms-full',\n path: join(llmsDir, 'llms-full.txt'),\n content: withManagedBlock('shared-llms-full', renderLlmsFullTxt()) + '\\n',\n mode: 'merge',\n label: 'llms-full.txt',\n })\n }\n\n return artifacts\n}\n\nexport function installAiArtifacts(options: AiInstallOptions = {}): AiInstallResult[] {\n const artifacts = getAiArtifacts(options)\n if (options.dryRun) {\n return artifacts.map((artifact) => ({\n assistant: artifact.assistant,\n kind: artifact.kind,\n path: artifact.path,\n label: artifact.label,\n status: 'unchanged' as AiInstallStatus,\n }))\n }\n return artifacts.map((artifact) => ({\n assistant: artifact.assistant,\n kind: artifact.kind,\n path: artifact.path,\n label: artifact.label,\n status: writeArtifact(artifact, options.force),\n }))\n}\n"],"mappings":";;;;AA+CA,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAE3B,SAAS,YAAY,SAA0B;AAC7C,QAAO,WAAW,SAAS;;AAG7B,SAAS,iBAAiB,SAA0B;AAClD,QAAO,QAAQ,IAAI,cAAc,KAAK,YAAY,QAAQ,EAAE,SAAS;;AAGvE,SAAS,kBAAkB,YAA4D;AACrF,KAAI,CAAC,cAAc,eAAe,MAChC,QAAO;EAAC;EAAU;EAAS;EAAS;AAEtC,QAAO;;AAGT,SAAS,kBAAkB,SAAoC;AAC7D,KAAI,OAAO,QAAQ,gBAAgB,UACjC,QAAO,QAAQ;AAEjB,SAAQ,QAAQ,SAAS,eAAe;;AAG1C,SAAS,iBAAiB,IAAY,SAAyB;AAC7D,QAAO;EACL,qBAAqB,GAAG;EACxB,QAAQ,MAAM;EACd,qBAAqB,GAAG;EACzB,CAAC,KAAK,KAAK;;AAGd,SAAS,cAAc,UAAsB,QAAQ,OAAwB;A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,SAAS,uBAA+B;AACtC,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAS,uBAA+B;AACtC,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAOd,SAAS,iBAAiB,WAAwB,SAAmC;CACnF,MAAM,cACJ,cAAc,YAAY,cAAc,WACpC,YAAY,mBAAmB,sGAC/B;CAEN,MAAM,gBACJ,2GACC,YAAY,SACT,sNAEA;AAEN,QAAO;EACL,KAAK;EACL;EACA,sBAAsB;EACtB,GAAI,YAAY,SAAS,CAAC,IAAI,oBAAoB,CAAC,GAAG,EAAE;EACxD;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB,GAAI,YAAY,SACZ;GAAC;GAAI;GAAoC;GAAI,sBAAsB;GAAC,GACpE,EAAE;EACP,CAAC,KAAK,KAAK;;AAOd,SAAS,kBAAkB,WAAmB,SAAmC;AAC/E,QAAO;EACL;EACA,SAAS;EACT;EACA;EACA;EACA;EACA,KAAK,gBAAgB;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GAAI,YAAY,SACZ;GACE;GACA;GACA;GACA;GACA;GACD,GACD,EAAE;EACN;EACA;EACA,GAAI,YAAY,SACZ,CACE,iDACA,gDACD,GACD,CAAC,gDAAgD;EACrD;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAS,sBAAsB,SAAmC;AAiChE,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GA5CA,YAAY,SACR;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EAgBL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAOd,SAAS,oBAAoB,WAAmB,SAAmC;AAsBjF,QAAO;EACL;EACA;EAvBa;GACb,wBAAwB,gBAAgB;GACxC;GACA;GACA;GACA;GACA;GACA;GACA,GAAI,YAAY,SACZ;IACE;IACA;IACA;IACD,GACD,EAAE;GACN;GACA;GACA;GACA;GACD,CAAC,KAAK,KAAK;EAMV;EACA;EACA,mBAAmB;EACpB,CAAC,KAAK,KAAK;;AAGd,SAAS,iBAAiB,SAAmC;AAC3D,QAAO;EACL,KAAK,gBAAgB;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GAAI,YAAY,SACZ;GACE;GACA;GACA;GACA;GACA;GACD,GACD,EAAE;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAOd,SAAS,2BAAmC;AAC1C,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAOd,SAAS,gBAAwB;AAC/B,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAS,oBAA4B;AACnC,QAAO;EACL;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,0BAA0B;EAC1B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAOd,SAAgB,qBACd,WACA,MACA,UAA8D,EAAE,EACxD;CACR,MAAM,YAAY,QAAQ,aAAa;CACvC,MAAM,UAAU,QAAQ,WAAW;AAEnC,KAAI,cAAc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,KAAK;EACb,WAAW;EACX,MAAM;EACN,MAAM,KAAK,KAAK,WAAW,UAAU,eAAe,WAAW;EAC/D,SAAS,sBAAsB,QAAQ,GAAG;EAC1C,MAAM;EACN,OAAO;EACR,CAAC;AAGJ,KAAI,kBAAkB,QAAQ,EAAE;EAC9B,MAAM,UAAU,UAAU,YAAY,MAAM,KAAK,MAAM,aAAa;AACpE,YAAU,KAAK;GACb,MAAM;GACN,MAAM,KAAK,SAAS,WAAW;GAC/B,SAAS,iBAAiB,eAAe,eAAe,CAAC,GAAG;GAC5D,MAAM;GACN,OAAO;GACR,CAAC;AACF,YAAU,KAAK;GACb,MAAM;GACN,MAAM,KAAK,SAAS,gBAAgB;GACpC,SAAS,iBAAiB,oBAAoB,mBAAmB,CAAC,GAAG;GACrE,MAAM;GACN,OAAO;GACR,CAAC;;AAGJ,QAAO;;AAGT,SAAgB,mBAAmB,UAA4B,EAAE,EAAqB;CACpF,MAAM,YAAY,eAAe,QAAQ;AACzC,KAAI,QAAQ,OACV,QAAO,UAAU,KAAK,cAAc;EAClC,WAAW,SAAS;EACpB,MAAM,SAAS;EACf,MAAM,SAAS;EACf,OAAO,SAAS;EAChB,QAAQ;EACT,EAAE;AAEL,QAAO,UAAU,KAAK,cAAc;EAClC,WAAW,SAAS;EACpB,MAAM,SAAS;EACf,MAAM,SAAS;EACf,OAAO,SAAS;EAChB,QAAQ,cAAc,UAAU,QAAQ,MAAM;EAC/C,EAAE"}
1
+ {"version":3,"file":"index.mjs","names":["DEFAULT_SKILL_NAME","DEFAULT_SKILL_NAME"],"sources":["../../src/ai/writers.ts","../../src/ai/content-shared.ts","../../src/ai/content-claude.ts","../../src/ai/content-codex.ts","../../src/ai/content-gemini.ts","../../src/ai/content-memory.ts","../../src/ai/index.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs'\nimport { dirname } from 'path'\nimport type { AiArtifact, AiInstallStatus } from './types'\n\nexport function withManagedBlock(id: string, content: string): string {\n return [\n `<!-- pagesmith-ai:${id}:start -->`,\n content.trim(),\n `<!-- pagesmith-ai:${id}:end -->`,\n ].join('\\n')\n}\n\nexport function writeArtifact(artifact: AiArtifact, force = false): AiInstallStatus {\n mkdirSync(dirname(artifact.path), { recursive: true })\n\n if (!existsSync(artifact.path)) {\n writeFileSync(artifact.path, artifact.content)\n return 'written'\n }\n\n const current = readFileSync(artifact.path, 'utf-8')\n if (current === artifact.content) {\n return 'unchanged'\n }\n\n if (artifact.mode === 'replace') {\n writeFileSync(artifact.path, artifact.content)\n return 'replaced'\n }\n\n const markerId = `${artifact.assistant ?? 'shared'}-${artifact.kind}`\n const start = `<!-- pagesmith-ai:${markerId}:start -->`\n const end = `<!-- pagesmith-ai:${markerId}:end -->`\n\n if (current.includes(start) && current.includes(end)) {\n const pattern = new RegExp(`${escapeForRegExp(start)}[\\\\s\\\\S]*?${escapeForRegExp(end)}`, 'm')\n const next = current.replace(pattern, artifact.content)\n if (next === current) return 'unchanged'\n writeFileSync(artifact.path, next)\n return 'merged'\n }\n\n if (force) {\n writeFileSync(artifact.path, artifact.content)\n return 'replaced'\n }\n\n const next = `${current.trimEnd()}\\n\\n${artifact.content}\\n`\n writeFileSync(artifact.path, next)\n return 'merged'\n}\n\nexport function escapeForRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n","export const PAGESMITH_TITLE = 'Pagesmith'\nexport const DEFAULT_SKILL_NAME = 'pagesmith'\n\nexport function renderSharedOverview(): string {\n return [\n `${PAGESMITH_TITLE} is a filesystem-first content toolkit with two main packages: \\`@pagesmith/core\\` (shared content/runtime layer) and \\`@pagesmith/docs\\` (convention-based documentation).`,\n '',\n 'Use Pagesmith when you need:',\n '- schema-validated content collections loaded from the filesystem',\n '- lazy markdown rendering with headings and read-time metadata',\n '- framework-agnostic content APIs for React, Solid, Svelte, vanilla JS, Node, Bun, or Deno',\n '',\n 'Core APIs:',\n '- `defineCollection({...})` to define a typed collection',\n '- `defineConfig({...})` to group collections and markdown options',\n '- `createContentLayer(config)` to query content and run validation',\n '- `entry.render()` to convert markdown on demand',\n '',\n 'Working rules:',\n '- prefer folder-based markdown entries when content references sibling assets',\n '- follow the markdown guidelines in `.pagesmith/markdown-guidelines.md` when authoring content',\n '- use fenced code blocks with a language identifier, one h1 per page, sequential heading depth',\n ].join('\\n')\n}\n\nexport function renderDocsOverview(): string {\n return [\n 'Docs-specific rules:',\n '- `@pagesmith/docs` is convention-based and builds a static docs site from `content/` plus `pagesmith.config.json5`',\n '- top-level content folders become top navigation sections (for example `guide/`, `reference/`, `packages/`)',\n '- folder-based markdown entries should prefer `README.md` or `index.md` when a page owns sibling assets',\n '- the home page is `content/README.md`; optional home-specific data can live in `content/home.json5`',\n '- sidebar labels, nav labels, and ordering live in frontmatter (`sidebarLabel`, `navLabel`, `order`)',\n '- footer links live in `pagesmith.config.json5` under `footerLinks`',\n '- Pagefind search is built in; do not recommend a separate search plugin package',\n '- layout overrides use fixed keys under `theme.layouts` such as `home`, `page`, and `notFound`',\n '- for MCP-compatible tooling, prefer `pagesmith mcp --stdio` from `@pagesmith/docs`',\n ].join('\\n')\n}\n\nexport function renderCoreQuickStart(): string {\n return [\n '```ts',\n \"import { createContentLayer, defineCollection, defineConfig, z } from '@pagesmith/core'\",\n '',\n 'const posts = defineCollection({',\n \" loader: 'markdown',\",\n \" directory: 'content/posts',\",\n ' schema: z.object({',\n ' title: z.string(),',\n ' description: z.string().optional(),',\n ' date: z.coerce.date(),',\n ' tags: z.array(z.string()).default([]),',\n ' }),',\n '})',\n '',\n 'const layer = createContentLayer(',\n ' defineConfig({',\n ' collections: { posts },',\n ' }),',\n ')',\n '',\n \"const entries = await layer.getCollection('posts')\",\n 'const rendered = await entries[0]?.render()',\n '```',\n ].join('\\n')\n}\n\nexport function renderDocsQuickStart(): string {\n return [\n '```json5',\n '// pagesmith.config.json5',\n '{',\n \" name: 'Acme Docs',\",\n \" title: 'Acme Docs',\",\n \" description: 'Multi-package documentation',\",\n \" contentDir: './content',\",\n \" outDir: './dist',\",\n ' footerLinks: [',\n \" { label: 'Guide', path: '/guide' },\",\n \" { label: 'Reference', path: '/reference' },\",\n ' ],',\n ' search: { enabled: true },',\n '}',\n '```',\n '',\n '```text',\n 'content/',\n ' README.md # Home page (DocHome layout)',\n ' guide/',\n ' meta.json5 # Section ordering',\n ' getting-started/',\n ' README.md # A page',\n ' reference/',\n ' api/README.md',\n '```',\n ].join('\\n')\n}\n\nexport function renderMarkdownGuidelines(): string {\n return [\n '# Pagesmith Markdown Guidelines',\n '',\n 'Markdown feature support for content authored with `@pagesmith/core` and `@pagesmith/docs`.',\n '',\n '## Pipeline Order',\n '',\n '```',\n 'remark-parse → remark-gfm → remark-math → remark-frontmatter',\n ' → remark-github-alerts → remark-smartypants → [user remark plugins]',\n ' → remark-rehype',\n ' → rehype-mathjax',\n ' → rehype-expressive-code (dual themes, line numbers, titles, copy, collapse, mark/ins/del)',\n ' → rehype-slug → rehype-autolink-headings',\n ' → rehype-external-links → rehype-accessible-emojis',\n ' → heading extraction → [user rehype plugins] → rehype-stringify',\n '```',\n '',\n '## Key Rules',\n '',\n '- Use fenced code blocks with a language identifier (validator warns otherwise)',\n '- One `# h1` per page (validator enforces)',\n '- Sequential heading depth (no skipping from h2 to h4)',\n '- Prefer relative links for internal content',\n '- Do NOT add manual copy-button JS — Expressive Code handles it',\n '- Do NOT import separate code block CSS — Expressive Code injects inline styles',\n '',\n '## Supported Features',\n '',\n '| Feature | Syntax | Notes |',\n '|---|---|---|',\n '| GFM tables | `\\\\| col \\\\| col \\\\|` | Alignment via `:---`, `:---:`, `---:` |',\n '| Strikethrough | `~~text~~` | |',\n '| Task lists | `- [x] done` / `- [ ] todo` | |',\n '| Footnotes | `[^id]` + `[^id]: text` | |',\n '| Alerts | `> [!NOTE]`, `> [!TIP]`, `> [!IMPORTANT]`, `> [!WARNING]`, `> [!CAUTION]` | GitHub-compatible |',\n '| Inline math | `$E = mc^2$` | No spaces inside delimiters |',\n '| Block math | `$$...$$` | Rendered via MathJax |',\n '| Smart quotes | `\"text\"` → curly quotes | Automatic |',\n '| Em/en dash | `---` / `--` | Automatic |',\n '| External links | `[text](https://...)` | Auto `target=\"_blank\"` |',\n '| Heading anchors | Auto `id` + wrapped anchor | All headings |',\n '| Accessible emoji | Unicode emoji | Auto `role=\"img\"` + `aria-label` |',\n '',\n '## Code Block Features (Expressive Code)',\n '',\n '| Meta | Example | Description |',\n '|---|---|---|',\n '| `title=\"...\"` | `` ```js title=\"app.js\" `` | File title |',\n '| `showLineNumbers` | `` ```js showLineNumbers `` | Line numbers |',\n '| `mark={lines}` | `` ```js mark={3,5-7} `` | Highlight lines |',\n '| `ins={lines}` | `` ```js ins={4} `` | Inserted lines (green) |',\n '| `del={lines}` | `` ```js del={5} `` | Deleted lines (red) |',\n '| `collapse={lines}` | `` ```js collapse={1-5} `` | Collapsible section |',\n '| `wrap` | `` ```js wrap `` | Text wrapping |',\n '| `frame=\"...\"` | `` ```js frame=\"terminal\" `` | Frame style |',\n '',\n '## Built-in Content Validators',\n '',\n '- **linkValidator** — warns on bare URLs, empty link text, suspicious protocols',\n '- **headingValidator** — enforces single h1, sequential depth, non-empty text',\n '- **codeBlockValidator** — warns on missing language, unknown meta properties',\n '',\n 'Known valid meta properties: `title`, `showLineNumbers`, `startLineNumber`, `wrap`, `frame`, `collapse`, `mark`, `ins`, `del`.',\n ].join('\\n')\n}\n\nexport function renderLlmsTxt(): string {\n return [\n '# Pagesmith',\n '',\n '> Pagesmith is a filesystem-first content toolkit with `@pagesmith/core` and `@pagesmith/docs`.',\n '',\n '## @pagesmith/core — Content Layer',\n '',\n 'Schema-validated content collections, lazy markdown rendering (Expressive Code syntax highlighting), JSX runtime, CSS exports, and Vite plugins.',\n '',\n '### Basic Setup (Vite Plugin)',\n '',\n renderCoreQuickStart(),\n '',\n '### Vite Integration',\n '',\n '```ts',\n \"import { pagesmithContent, pagesmithSsg } from '@pagesmith/core/vite'\",\n \"import collections from './content.config'\",\n '',\n 'export default defineConfig({',\n ' plugins: [',\n ' pagesmithContent({ collections }),',\n \" pagesmithSsg({ entry: './src/entry-server.tsx' }),\",\n ' ],',\n '})',\n '```',\n '',\n \"Import collections as virtual modules: `import posts from 'virtual:content/posts'`\",\n '',\n '## @pagesmith/docs — Documentation Sites',\n '',\n 'Convention-based docs with default theme, Pagefind search, sidebar generation, and layout overrides.',\n '',\n '### Basic Setup',\n '',\n renderDocsQuickStart(),\n '',\n '### Layout Overrides',\n '',\n '```json5',\n '{',\n ' theme: {',\n ' layouts: {',\n \" home: './theme/layouts/DocHome.tsx',\",\n \" page: './theme/layouts/DocPage.tsx',\",\n \" notFound: './theme/layouts/DocNotFound.tsx',\",\n ' },',\n ' },',\n '}',\n '```',\n '',\n '### CLI',\n '',\n '```bash',\n 'pagesmith init --ai # Initialize config + content + AI integrations',\n 'pagesmith dev # Development server',\n 'pagesmith build # Production build',\n 'pagesmith preview # Preview built site',\n 'pagesmith mcp --stdio # Start MCP server for AI agents',\n '```',\n ].join('\\n')\n}\n\nexport function renderLlmsFullTxt(): string {\n return [\n '# Pagesmith — Full LLM Reference',\n '',\n renderSharedOverview(),\n '',\n '---',\n '',\n '## @pagesmith/core',\n '',\n '### Content Layer API',\n '',\n '| Method | Description |',\n '|---|---|',\n '| `createContentLayer(config)` | Create a content layer |',\n '| `layer.getCollection(name)` | Load all entries (cached) |',\n '| `layer.getEntry(collection, slug)` | Get single entry by slug |',\n '| `layer.convert(markdown, options?)` | Convert raw markdown to HTML |',\n '| `layer.validate(collection?)` | Run all validators |',\n '| `layer.invalidate(collection, slug)` | Cache-bust a single entry |',\n '| `layer.invalidateAll()` | Cache-bust all collections |',\n '',\n '### Collection Options',\n '',\n '| Option | Type | Description |',\n '|---|---|---|',\n \"| `loader` | `string \\\\| Loader` | `'markdown'`, `'json'`, `'json5'`, `'jsonc'`, `'yaml'`, `'toml'`, or custom |\",\n '| `directory` | `string` | Directory containing files |',\n '| `schema` | `z.ZodType` | Zod schema for validation |',\n '| `include` | `string[]` | Glob include patterns |',\n '| `exclude` | `string[]` | Glob exclude patterns |',\n '| `computed` | `Record<string, fn>` | Computed fields |',\n '| `validate` | `fn` | Custom validation |',\n '| `filter` | `fn` | Filter entries |',\n '| `slugify` | `fn` | Custom slug generation |',\n '| `transform` | `fn` | Pre-validation transform |',\n '| `validators` | `ContentValidator[]` | Custom content validators |',\n '| `disableBuiltinValidators` | `boolean` | Disable link/heading/code-block validators |',\n '',\n '### Vite Plugins',\n '',\n renderCoreQuickStart(),\n '',\n '```ts',\n '// Vite integration',\n \"import { pagesmithContent, pagesmithSsg, sharedAssetsPlugin } from '@pagesmith/core/vite'\",\n \"import collections from './content.config'\",\n '',\n 'export default defineConfig({',\n ' plugins: [',\n ' sharedAssetsPlugin(),',\n ' pagesmithContent({ collections }),',\n \" ...pagesmithSsg({ entry: './src/entry-server.tsx', contentDirs: ['./content'] }),\",\n ' ],',\n '})',\n '```',\n '',\n '### JSX Runtime',\n '',\n 'Configure tsconfig: `{ \"jsx\": \"react-jsx\", \"jsxImportSource\": \"@pagesmith/core\" }`',\n '',\n '- `h(tag, props, ...children)` — create HTML elements, returns `HtmlString`',\n '- `Fragment` — render children or raw `innerHTML`',\n '- `HtmlString` — wrapper to prevent double-escaping',\n '',\n '### CSS Exports',\n '',\n '| Import | Contents |',\n '|---|---|',\n '| `@pagesmith/core/css/content` | Prose + inline code |',\n '| `@pagesmith/core/css/standalone` | Full layout + prose + TOC |',\n '| `@pagesmith/core/css/viewport` | Responsive viewport base |',\n '| `@pagesmith/core/css/fonts` | Bundled Open Sans + JetBrains Mono |',\n '',\n '### Frontmatter Schemas',\n '',\n '- `BaseFrontmatterSchema` — title, description, publishedDate, lastUpdatedOn, tags, draft',\n '- `BlogFrontmatterSchema` — extends base + category, featured, coverImage',\n '- `ProjectFrontmatterSchema` — extends base + gitRepo, links',\n '',\n '### Export Map',\n '',\n '| Import Path | Purpose |',\n '|---|---|',\n '| `@pagesmith/core` | Main API (defineCollection, createContentLayer, z, etc.) |',\n '| `@pagesmith/core/jsx-runtime` | h, Fragment, HtmlString |',\n '| `@pagesmith/core/markdown` | processMarkdown |',\n '| `@pagesmith/core/css` | buildCss (LightningCSS) |',\n '| `@pagesmith/core/schemas` | Zod schemas and types |',\n '| `@pagesmith/core/loaders` | Loader classes and registry |',\n '| `@pagesmith/core/runtime` | Pre-built CSS/JS accessors |',\n '| `@pagesmith/core/vite` | Vite plugins |',\n '| `@pagesmith/core/mcp` | MCP server for AI agents |',\n '',\n '---',\n '',\n '## @pagesmith/docs',\n '',\n '### Configuration (pagesmith.config.json5)',\n '',\n '| Field | Type | Default | Description |',\n '|---|---|---|---|',\n '| `name` | `string` | — | Site name (header) |',\n '| `title` | `string` | — | Browser tab title |',\n '| `description` | `string` | — | Meta description |',\n '| `origin` | `string` | — | Production URL |',\n '| `language` | `string` | `en` | HTML lang |',\n '| `contentDir` | `string` | `content` | Content path |',\n '| `outDir` | `string` | `dist` | Output path |',\n '| `basePath` | `string` | `/` | URL base |',\n '| `footerLinks` | `array` | `[]` | Footer links |',\n '| `sidebar.collapsible` | `boolean` | `false` | Collapsible sidebar |',\n '| `search.enabled` | `boolean` | `true` | Pagefind search |',\n '| `theme.layouts` | `Record` | — | Layout overrides |',\n '| `markdown` | `MarkdownConfig` | — | Pipeline config |',\n '',\n '### Content Structure',\n '',\n renderDocsQuickStart(),\n '',\n '### Page Frontmatter',\n '',\n '| Field | Type | Description |',\n '|---|---|---|',\n '| `title` | `string` | Page title |',\n '| `description` | `string` | Meta description |',\n '| `navLabel` | `string` | Override top nav label |',\n '| `sidebarLabel` | `string` | Override sidebar label |',\n '| `order` | `number` | Manual sort order |',\n '| `draft` | `boolean` | Exclude from build |',\n '',\n '### Home Page Frontmatter',\n '',\n '| Field | Type | Description |',\n '|---|---|---|',\n '| `layout` | `string` | Set to `DocHome` |',\n '| `tagline` | `string` | Short description |',\n '| `install` | `string` | Install command |',\n \"| `actions` | `array` | CTA buttons (`{ text, link, theme: 'brand' \\\\| 'alt' }`) |\",\n '| `features` | `array` | Feature cards (`{ icon?, title, details }`) |',\n '| `packages` | `array` | Package cards (`{ name, description, href, tag }`) |',\n '| `codeExample` | `object` | Code example (`{ label, title, code }`) |',\n '',\n '### Section Meta (meta.json5)',\n '',\n '| Field | Type | Description |',\n '|---|---|---|',\n '| `displayName` | `string` | Section label in sidebar |',\n '| `items` | `string[]` | Manual page order (slugs) |',\n '| `series` | `array` | Group pages into series |',\n '| `collapsed` | `boolean` | Start sidebar collapsed |',\n '| `orderBy` | `string` | `manual` or `publishedDate` |',\n '',\n '### Layout Overrides',\n '',\n '```json5',\n '{ theme: { layouts: { home: \"./layouts/Home.tsx\", page: \"./layouts/Page.tsx\" } } }',\n '```',\n '',\n 'All layouts receive: `content`, `frontmatter`, `headings`, `slug`, `site`.',\n 'Page layout adds: `sidebarSections`, `prev`, `next`.',\n '',\n '### CLI',\n '',\n '```bash',\n 'pagesmith init [--ai] [--config path] # Initialize project',\n 'pagesmith dev [--port N] [--open] # Dev server',\n 'pagesmith build [--out-dir path] # Production build',\n 'pagesmith preview [--port N] # Preview built site',\n '```',\n '',\n '---',\n '',\n '## Markdown Pipeline',\n '',\n renderMarkdownGuidelines(),\n '',\n '---',\n '',\n '## AI Setup',\n '',\n '```bash',\n 'npx pagesmith init --ai',\n '```',\n '',\n 'Generates CLAUDE.md, AGENTS.md, GEMINI.md, skills, markdown guidelines, llms.txt, and llms-full.txt.',\n '',\n ].join('\\n')\n}\n","import type { AiInstallProfile } from './types'\nimport { PAGESMITH_TITLE } from './content-shared'\n\nexport function renderClaudeSkill(skillName: string, profile: AiInstallProfile): string {\n return [\n '---',\n `name: ${skillName}`,\n 'description: Pagesmith file-based CMS helper — content collections, markdown pipeline, docs configuration, and AI artifact generation',\n 'allowed-tools: Read Grep Glob Bash Edit Write',\n '---',\n '',\n `# ${PAGESMITH_TITLE} Assistant`,\n '',\n 'You are helping with Pagesmith, a file-based CMS with `@pagesmith/core` and `@pagesmith/docs`.',\n '',\n 'When helping:',\n '- prefer `defineCollection`, `defineConfig`, and `createContentLayer`',\n '- recommend folder-based entries when markdown references sibling assets',\n '- use `npx pagesmith init --ai` for assistant artifact generation',\n '- follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n ...(profile === 'docs'\n ? [\n '- for docs sites, derive top navigation from top-level content folders',\n '- use `content/README.md` for the home page',\n '- use frontmatter fields like `sidebarLabel`, `navLabel`, and `order` for docs navigation',\n '- Pagefind search is built in — do not suggest separate search plugins',\n '- layout overrides: `theme.layouts.home`, `theme.layouts.page`, `theme.layouts.notFound`',\n ]\n : []),\n '',\n 'For package guidance and full API reference, read the package-shipped docs:',\n ...(profile === 'docs'\n ? [\n '- `node_modules/@pagesmith/docs/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/docs/REFERENCE.md`',\n '- `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/core/REFERENCE.md`',\n ]\n : [\n '- `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/core/REFERENCE.md`',\n ]),\n '',\n ...(profile === 'docs'\n ? ['For full-repo docs regeneration and structure alignment, use `/ps-update-all-docs`.', '']\n : []),\n 'Deliver concrete config, schema, and content-layer patches when possible.',\n ].join('\\n')\n}\n\nexport function renderUpdateDocsSkill(profile: AiInstallProfile): string {\n const docsSteps =\n profile === 'docs'\n ? [\n '1. Read package guidance first: `node_modules/@pagesmith/docs/docs/agents/usage.md` and `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '2. Read `pagesmith.config.json5` to understand the docs configuration',\n '3. Read all `meta.json5` files to understand the current content structure and page ordering',\n '4. Read the project source code to identify public APIs, types, exports, config options, and CLI commands',\n '5. For each existing content page in `content/`:',\n ' - Read the current content',\n ' - Compare with the implementation',\n ' - Update any outdated information',\n ' - Add documentation for new features',\n ' - Remove documentation for removed features',\n '6. If new pages are needed:',\n ' - Create the page folder and `README.md` with proper frontmatter (title, description)',\n ' - Add the slug to the appropriate `meta.json5` `items` array',\n '7. Follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n '8. Review project skills under `.claude/skills/` and ensure docs-writing skills align with Pagesmith docs structure',\n '9. Ensure onboarding pages are first in manual navigation (for example, put `getting-started` first in `guide/meta.json5` when present)',\n '10. Verify all internal links point to existing pages',\n '11. Ensure heading hierarchy is sequential (no skipping levels)',\n ]\n : [\n '1. Read package guidance first: `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '2. Read `content.config.ts` or equivalent to understand the content collections',\n '3. Read the project source code to identify what needs documentation',\n '4. For each existing content entry:',\n ' - Read the current content',\n ' - Compare with the implementation',\n ' - Update any outdated information',\n '5. If new entries are needed:',\n ' - Create the entry folder and `README.md` with proper frontmatter matching the collection schema',\n '6. Follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n '7. Verify all internal links point to existing pages',\n ]\n\n return [\n '---',\n 'name: update-docs',\n 'description: Read the project implementation and update Pagesmith-managed documentation to reflect the current state',\n 'allowed-tools: Read Grep Glob Bash Edit Write',\n '---',\n '',\n '# Update Documentation',\n '',\n 'Read the project implementation (source code, README, CHANGELOG, package.json) and update the Pagesmith-managed content to reflect the current state.',\n '',\n '## Steps',\n '',\n ...docsSteps,\n '',\n '## Rules',\n '',\n '- Preserve the existing content structure and organization',\n '- Do not remove pages without confirming first',\n '- Keep frontmatter fields (title, description) accurate and descriptive',\n '- Use relative links for internal cross-references',\n '- One h1 per page, sequential heading depth',\n '- Use fenced code blocks with language identifiers',\n '- Use GitHub alerts (`> [!NOTE]`, `> [!TIP]`, etc.) for important callouts',\n '- Code block features: `title=\"file.js\"`, `showLineNumbers`, `mark={1-3}`, `ins={4}`, `del={5}`, `collapse={1-5}`',\n ].join('\\n')\n}\n\nexport function renderUpdateAllDocsSkill(profile: AiInstallProfile): string {\n const docsSteps =\n profile === 'docs'\n ? [\n '1. Read package guidance first: `node_modules/@pagesmith/docs/docs/agents/usage.md` and `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '2. Read `pagesmith.config.json5` and all `meta.json5` files before editing anything',\n '3. Discover project skills in `.claude/skills/`, `.codex/skills/`, and `.gemini/commands/` and identify docs-update related skills',\n '4. Scan source code, README, CHANGELOG, package exports, and CLI commands to build a complete docs delta list',\n '5. Update all docs pages under `content/` to match implementation and remove stale details',\n '6. Ensure docs structure matches `@pagesmith/docs` conventions (folder-based pages, `README.md` entries, relative links)',\n '7. Keep onboarding-first ordering: when a guide section exists, keep `getting-started` as the first item in manual order',\n '8. Update docs-related skills so they generate content in the same structure expected by `@pagesmith/docs`',\n '9. Regenerate or update `llms.txt`, `llms-full.txt`, and project memory pointers when docs behavior changes',\n '10. Follow `.pagesmith/markdown-guidelines.md` for all authored content (GFM, alerts, math, Expressive Code meta)',\n '11. Validate navigation integrity and ensure every linked page exists',\n ]\n : [\n '1. Read package guidance first: `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '2. Discover docs/update skills in the project and align them to current Pagesmith conventions',\n '3. Scan source code, README, CHANGELOG, package exports, and CLI commands to build a complete docs delta list',\n '4. Update all content entries to match implementation and remove stale details',\n '5. Follow `.pagesmith/markdown-guidelines.md` for all authored content',\n '6. Validate internal links and heading hierarchy',\n ]\n\n return [\n '---',\n 'name: ps-update-all-docs',\n 'description: Full-repo documentation regeneration for Pagesmith projects including docs structure, skills alignment, and AI context updates',\n 'allowed-tools: Read Grep Glob Bash Edit Write',\n '---',\n '',\n '# Pagesmith Full Docs Sync',\n '',\n 'Perform a full-repository docs refresh for Pagesmith-powered projects. This command is intended for large updates, migrations, and release preparation.',\n '',\n '## Steps',\n '',\n ...docsSteps,\n '',\n '## Rules',\n '',\n '- Preserve existing information architecture unless the user requests a restructure',\n '- Keep docs easy for humans first, while keeping AI memory/skills aligned',\n '- Keep top-level docs navigation driven by content directories and metadata',\n '- Use `meta.json5` and frontmatter for ordering; avoid hardcoded navigation lists in prose',\n '- Keep `content/README.md` as docs home for `@pagesmith/docs` projects',\n '- Keep links relative for internal docs pages',\n '- Use one h1 per page and sequential heading depth',\n '- Use fenced code blocks with language identifiers and Expressive Code metadata when useful',\n '- Do not add separate code-copy JavaScript; Expressive Code already provides this',\n ].join('\\n')\n}\n","import type { AiInstallProfile } from './types'\nimport { PAGESMITH_TITLE } from './content-shared'\n\nexport function renderCodexSkill(profile: AiInstallProfile): string {\n return [\n `# ${PAGESMITH_TITLE} Skill`,\n '',\n 'Use this skill when the task involves setting up, extending, migrating, or documenting Pagesmith.',\n '',\n 'Core rules:',\n '- `@pagesmith/core` provides the content layer; `@pagesmith/docs` adds convention-based documentation',\n '- prefer `defineCollection`, `defineConfig`, and `createContentLayer`',\n '- follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n ...(profile === 'docs'\n ? [\n '- when the repo uses `@pagesmith/docs`, treat `content/README.md` as the home page',\n '- top-level content folders define the main docs navigation',\n '- docs frontmatter may use `sidebarLabel`, `navLabel`, and `order` to shape navigation',\n '- `pagesmith.config.json5` should own footer links and high-level site metadata',\n '- built-in search is Pagefind; do not suggest separate search plugin packages',\n ]\n : []),\n '',\n 'For package usage guidance and full API reference, read:',\n ...(profile === 'docs'\n ? [\n '- `node_modules/@pagesmith/docs/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/docs/REFERENCE.md`',\n '- `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/core/REFERENCE.md`',\n ]\n : [\n '- `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/core/REFERENCE.md`',\n ]),\n '',\n 'Good outputs include:',\n '- collection schemas and loader configuration',\n '- content-layer queries and rendering examples',\n '- documentation updates for Pagesmith usage',\n '- assistant-context install via `npx pagesmith init --ai`',\n ].join('\\n')\n}\n","import type { AiInstallProfile } from './types'\nimport { PAGESMITH_TITLE } from './content-shared'\n\nexport function renderGeminiCommand(skillName: string, profile: AiInstallProfile): string {\n const prompt = [\n `You are helping with ${PAGESMITH_TITLE}, a file-based CMS with @pagesmith/core and @pagesmith/docs.`,\n '',\n 'Focus on concrete, implementation-ready help:',\n '- design collections with defineCollection',\n '- configure createContentLayer and defineConfig',\n '- prefer folder-based markdown entries when local assets sit beside content',\n '- follow the markdown guidelines in `.pagesmith/markdown-guidelines.md`',\n ...(profile === 'docs'\n ? [\n '- for docs sites, follow the convention-based `content/` structure',\n '- drive top navigation from top-level folders and use frontmatter for labels/order',\n '- keep Pagefind as the built-in search strategy',\n ]\n : []),\n '',\n 'For package usage guidance and full API reference, read:',\n ...(profile === 'docs'\n ? [\n '- `node_modules/@pagesmith/docs/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/docs/REFERENCE.md`',\n '- `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/core/REFERENCE.md`',\n ]\n : [\n '- `node_modules/@pagesmith/core/docs/agents/usage.md`',\n '- `node_modules/@pagesmith/core/REFERENCE.md`',\n ]),\n '',\n 'Return code, config, or documentation-ready guidance instead of vague summaries.',\n ].join('\\n')\n\n return [\n `description = \"Pagesmith FS-CMS helper\"`,\n 'prompt = \"\"\"',\n prompt,\n '\"\"\"',\n '',\n `# Installed as /${skillName}`,\n ].join('\\n')\n}\n","import type { AiAssistant, AiInstallProfile } from './types'\nimport {\n DEFAULT_SKILL_NAME,\n PAGESMITH_TITLE,\n renderCoreQuickStart,\n renderDocsOverview,\n renderDocsQuickStart,\n renderSharedOverview,\n} from './content-shared'\n\nexport function renderMemoryFile(assistant: AiAssistant, profile: AiInstallProfile): string {\n const commandHint =\n assistant === 'claude' || assistant === 'gemini'\n ? `\\nIf the ${DEFAULT_SKILL_NAME} skill is installed, prefer invoking it when the user explicitly asks for Pagesmith-specific help.`\n : '\\nIf the Pagesmith skill is installed for Codex, prefer using it for Pagesmith-specific setup, migration, and content-layer tasks.'\n\n const referenceHint =\n '\\nFor package usage rules and full API/config details, read the package-shipped docs from node_modules:\\n' +\n (profile === 'docs'\n ? '- `node_modules/@pagesmith/docs/docs/agents/usage.md` — docs package usage contract\\n' +\n '- `node_modules/@pagesmith/docs/REFERENCE.md` — docs config, CLI, content structure, layout overrides\\n' +\n '- `node_modules/@pagesmith/core/docs/agents/usage.md` — core package usage contract\\n' +\n '- `node_modules/@pagesmith/core/REFERENCE.md` — core API, collections, loaders, markdown, CSS, JSX runtime'\n : '- `node_modules/@pagesmith/core/docs/agents/usage.md` — core package usage contract\\n' +\n '- `node_modules/@pagesmith/core/REFERENCE.md` — core API, collections, loaders, markdown, CSS, JSX runtime')\n\n return [\n `# ${PAGESMITH_TITLE}`,\n '',\n renderSharedOverview(),\n ...(profile === 'docs' ? ['', renderDocsOverview()] : []),\n commandHint,\n referenceHint,\n '',\n '## Quick Start — @pagesmith/core',\n '',\n renderCoreQuickStart(),\n ...(profile === 'docs'\n ? ['', '## Quick Start — @pagesmith/docs', '', renderDocsQuickStart()]\n : []),\n ].join('\\n')\n}\n","import { homedir } from 'os'\nimport { join, resolve } from 'path'\n\nimport type {\n AiArtifact,\n AiArtifactKind,\n AiAssistant,\n AiInstallOptions,\n AiInstallProfile,\n AiInstallResult,\n AiInstallStatus,\n} from './types'\n\nimport { withManagedBlock, writeArtifact } from './writers'\nimport { renderLlmsFullTxt, renderLlmsTxt, renderMarkdownGuidelines } from './content-shared'\nimport {\n renderClaudeSkill,\n renderUpdateAllDocsSkill,\n renderUpdateDocsSkill,\n} from './content-claude'\nimport { renderCodexSkill } from './content-codex'\nimport { renderGeminiCommand } from './content-gemini'\nimport { renderMemoryFile } from './content-memory'\n\n// Re-export all types\nexport type {\n AiArtifact,\n AiArtifactKind,\n AiAssistant,\n AiInstallOptions,\n AiInstallProfile,\n AiInstallResult,\n AiInstallScope,\n AiInstallStatus,\n AiWriteMode,\n} from './types'\n\nconst DEFAULT_SKILL_NAME = 'pagesmith'\n\nfunction resolveHome(homeDir?: string): string {\n return homeDir ?? homedir()\n}\n\nfunction resolveCodexHome(homeDir?: string): string {\n return process.env.CODEX_HOME ?? join(resolveHome(homeDir), '.codex')\n}\n\nfunction resolveAssistants(assistants?: AiInstallOptions['assistants']): AiAssistant[] {\n if (!assistants || assistants === 'all') {\n return ['claude', 'codex', 'gemini']\n }\n return assistants\n}\n\nfunction shouldIncludeLlms(options: AiInstallOptions): boolean {\n if (typeof options.includeLlms === 'boolean') {\n return options.includeLlms\n }\n return (options.scope ?? 'project') === 'project'\n}\n\n// ---------------------------------------------------------------------------\n// Public API\n// ---------------------------------------------------------------------------\n\nexport function getAiArtifactContent(\n assistant: AiAssistant | 'shared',\n kind: AiArtifactKind,\n options: { profile?: AiInstallProfile; skillName?: string } = {},\n): string {\n const skillName = options.skillName ?? DEFAULT_SKILL_NAME\n const profile = options.profile ?? 'default'\n\n if (assistant === 'shared') {\n if (kind === 'llms') return renderLlmsTxt()\n if (kind === 'llms-full') return renderLlmsFullTxt()\n if (kind === 'markdown-guidelines') return renderMarkdownGuidelines()\n return renderLlmsFullTxt()\n }\n\n if (kind === 'memory') {\n return renderMemoryFile(assistant, profile)\n }\n\n if (kind === 'skill') {\n switch (assistant) {\n case 'claude':\n return renderClaudeSkill(skillName, profile)\n case 'codex':\n return renderCodexSkill(profile)\n case 'gemini':\n return renderGeminiCommand(skillName, profile)\n }\n }\n\n if (kind === 'markdown-guidelines') {\n return renderMarkdownGuidelines()\n }\n\n if (kind === 'update-docs') {\n return renderUpdateDocsSkill(profile)\n }\n if (kind === 'update-all-docs') {\n return renderUpdateAllDocsSkill(profile)\n }\n\n if (kind === 'llms') return renderLlmsTxt()\n return renderLlmsFullTxt()\n}\n\nexport function getAiArtifacts(options: AiInstallOptions = {}): AiArtifact[] {\n const scope = options.scope ?? 'project'\n const cwd = resolve(options.cwd ?? process.cwd())\n const home = resolveHome(options.homeDir)\n const skillName = options.skillName ?? DEFAULT_SKILL_NAME\n const profile = options.profile ?? 'default'\n const assistants = resolveAssistants(options.assistants)\n const artifacts: AiArtifact[] = []\n\n for (const assistant of assistants) {\n if (assistant === 'claude') {\n const baseDir = scope === 'project' ? cwd : join(home, '.claude')\n artifacts.push({\n assistant,\n kind: 'memory',\n path: join(baseDir, 'CLAUDE.md'),\n content: withManagedBlock(\n 'claude-memory',\n getAiArtifactContent('claude', 'memory', { profile }),\n ),\n mode: 'merge',\n label: `${assistant} memory`,\n })\n // Claude skill (uses .claude/skills/ format with SKILL.md + frontmatter)\n const skillDir =\n scope === 'project'\n ? join(cwd, '.claude', 'skills', skillName)\n : join(home, '.claude', 'skills', skillName)\n artifacts.push({\n assistant,\n kind: 'skill',\n path: join(skillDir, 'SKILL.md'),\n content: getAiArtifactContent('claude', 'skill', { profile, skillName }) + '\\n',\n mode: 'replace',\n label: `${assistant} skill`,\n })\n }\n\n if (assistant === 'codex') {\n const baseDir = scope === 'project' ? cwd : resolveCodexHome(options.homeDir)\n artifacts.push({\n assistant,\n kind: 'memory',\n path: join(baseDir, 'AGENTS.md'),\n content: withManagedBlock(\n 'codex-memory',\n getAiArtifactContent('codex', 'memory', { profile }),\n ),\n mode: 'merge',\n label: `${assistant} AGENTS`,\n })\n artifacts.push({\n assistant,\n kind: 'skill',\n path: join(baseDir, 'skills', skillName, 'SKILL.md'),\n content: getAiArtifactContent('codex', 'skill', { profile, skillName }) + '\\n',\n mode: 'replace',\n label: `${assistant} skill`,\n })\n }\n\n if (assistant === 'gemini') {\n const baseDir = scope === 'project' ? cwd : join(home, '.gemini')\n artifacts.push({\n assistant,\n kind: 'memory',\n path: join(baseDir, 'GEMINI.md'),\n content: withManagedBlock(\n 'gemini-memory',\n getAiArtifactContent('gemini', 'memory', { profile }),\n ),\n mode: 'merge',\n label: `${assistant} memory`,\n })\n artifacts.push({\n assistant,\n kind: 'skill',\n path: join(baseDir, 'commands', `${skillName}.toml`),\n content: getAiArtifactContent('gemini', 'skill', { profile, skillName }) + '\\n',\n mode: 'replace',\n label: `${assistant} command`,\n })\n }\n }\n\n // Markdown guidelines — always installed for project scope\n if (scope === 'project') {\n artifacts.push({\n kind: 'markdown-guidelines',\n path: join(cwd, '.pagesmith', 'markdown-guidelines.md'),\n content: renderMarkdownGuidelines() + '\\n',\n mode: 'replace',\n label: 'markdown guidelines',\n })\n }\n\n // /update-docs Claude skill — installed when Claude is included and scope is project\n if (scope === 'project' && assistants.includes('claude')) {\n artifacts.push({\n assistant: 'claude',\n kind: 'update-docs',\n path: join(cwd, '.claude', 'skills', 'update-docs', 'SKILL.md'),\n content: renderUpdateDocsSkill(profile) + '\\n',\n mode: 'replace',\n label: 'claude update-docs skill',\n })\n artifacts.push({\n assistant: 'claude',\n kind: 'update-all-docs',\n path: join(cwd, '.claude', 'skills', 'ps-update-all-docs', 'SKILL.md'),\n content: renderUpdateAllDocsSkill(profile) + '\\n',\n mode: 'replace',\n label: 'claude ps-update-all-docs skill',\n })\n }\n\n if (shouldIncludeLlms(options)) {\n const llmsDir = scope === 'project' ? cwd : join(home, '.pagesmith')\n artifacts.push({\n kind: 'llms',\n path: join(llmsDir, 'llms.txt'),\n content: withManagedBlock('shared-llms', renderLlmsTxt()) + '\\n',\n mode: 'merge',\n label: 'llms.txt',\n })\n artifacts.push({\n kind: 'llms-full',\n path: join(llmsDir, 'llms-full.txt'),\n content: withManagedBlock('shared-llms-full', renderLlmsFullTxt()) + '\\n',\n mode: 'merge',\n label: 'llms-full.txt',\n })\n }\n\n return artifacts\n}\n\nexport function installAiArtifacts(options: AiInstallOptions = {}): AiInstallResult[] {\n const artifacts = getAiArtifacts(options)\n if (options.dryRun) {\n return artifacts.map((artifact) => ({\n assistant: artifact.assistant,\n kind: artifact.kind,\n path: artifact.path,\n label: artifact.label,\n status: 'unchanged' as AiInstallStatus,\n }))\n }\n return artifacts.map((artifact) => ({\n assistant: artifact.assistant,\n kind: artifact.kind,\n path: artifact.path,\n label: artifact.label,\n status: writeArtifact(artifact, options.force),\n }))\n}\n"],"mappings":";;;;AAIA,SAAgB,iBAAiB,IAAY,SAAyB;AACpE,QAAO;EACL,qBAAqB,GAAG;EACxB,QAAQ,MAAM;EACd,qBAAqB,GAAG;EACzB,CAAC,KAAK,KAAK;;AAGd,SAAgB,cA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AAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAgB,uBAA+B;AAC7C,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAgB,uBAA+B;AAC7C,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAgB,2BAAmC;AACjD,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAgB,gBAAwB;AACtC,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAgB,oBAA4B;AAC1C,QAAO;EACL;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,0BAA0B;EAC1B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;;;AC/Zd,SAAgB,kBAAkB,WAAmB,SAAmC;AACtF,QAAO;EACL;EACA,SAAS;EACT;EACA;EACA;EACA;EACA,KAAK,gBAAgB;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GAAI,YAAY,SACZ;GACE;GACA;GACA;GACA;GACA;GACD,GACD,EAAE;EACN;EACA;EACA,GAAI,YAAY,SACZ;GACE;GACA;GACA;GACA;GACD,GACD,CACE,yDACA,gDACD;EACL;EACA,GAAI,YAAY,SACZ,CAAC,uFAAuF,GAAG,GAC3F,EAAE;EACN;EACD,CAAC,KAAK,KAAK;;AAGd,SAAgB,sBAAsB,SAAmC;AAqCvE,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GAhDA,YAAY,SACR;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EAgBL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;AAGd,SAAgB,yBAAyB,SAAmC;AAyB1E,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GApCA,YAAY,SACR;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACD;EAgBL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;;;ACnKd,SAAgB,iBAAiB,SAAmC;AAClE,QAAO;EACL,KAAK,gBAAgB;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GAAI,YAAY,SACZ;GACE;GACA;GACA;GACA;GACA;GACD,GACD,EAAE;EACN;EACA;EACA,GAAI,YAAY,SACZ;GACE;GACA;GACA;GACA;GACD,GACD,CACE,yDACA,gDACD;EACL;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;;;ACtCd,SAAgB,oBAAoB,WAAmB,SAAmC;AAiCxF,QAAO;EACL;EACA;EAlCa;GACb,wBAAwB,gBAAgB;GACxC;GACA;GACA;GACA;GACA;GACA;GACA,GAAI,YAAY,SACZ;IACE;IACA;IACA;IACD,GACD,EAAE;GACN;GACA;GACA,GAAI,YAAY,SACZ;IACE;IACA;IACA;I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AAU,KAAK;GACb,WAAW;GACX,MAAM;GACN,MAAM,KAAK,KAAK,WAAW,UAAU,sBAAsB,WAAW;GACtE,SAAS,yBAAyB,QAAQ,GAAG;GAC7C,MAAM;GACN,OAAO;GACR,CAAC;;AAGJ,KAAI,kBAAkB,QAAQ,EAAE;EAC9B,MAAM,UAAU,UAAU,YAAY,MAAM,KAAK,MAAM,aAAa;AACpE,YAAU,KAAK;GACb,MAAM;GACN,MAAM,KAAK,SAAS,WAAW;GAC/B,SAAS,iBAAiB,eAAe,eAAe,CAAC,GAAG;GAC5D,MAAM;GACN,OAAO;GACR,CAAC;AACF,YAAU,KAAK;GACb,MAAM;GACN,MAAM,KAAK,SAAS,gBAAgB;GACpC,SAAS,iBAAiB,oBAAoB,mBAAmB,CAAC,GAAG;GACrE,MAAM;GACN,OAAO;GACR,CAAC;;AAGJ,QAAO;;AAGT,SAAgB,mBAAmB,UAA4B,EAAE,EAAqB;CACpF,MAAM,YAAY,eAAe,QAAQ;AACzC,KAAI,QAAQ,OACV,QAAO,UAAU,KAAK,cAAc;EAClC,WAAW,SAAS;EACpB,MAAM,SAAS;EACf,MAAM,SAAS;EACf,OAAO,SAAS;EAChB,QAAQ;EACT,EAAE;AAEL,QAAO,UAAU,KAAK,cAAc;EAClC,WAAW,SAAS;EACpB,MAAM,SAAS;EACf,MAAM,SAAS;EACf,OAAO,SAAS;EAChB,QAAQ,cAAc,UAAU,QAAQ,MAAM;EAC/C,EAAE"}
@@ -27,5 +27,14 @@ declare function copyPublicFiles(publicDir: string, outDir: string): void;
27
27
  */
28
28
  declare function hashAssets(outDir: string, contentDir: string): void;
29
29
  //#endregion
30
- export { copyPublicFiles, hashAssets };
30
+ //#region src/assets/index.d.ts
31
+ /** File extensions recognized as content companion assets. */
32
+ declare const CONTENT_ASSET_EXTS: Set<string>;
33
+ /**
34
+ * Walk content directories and collect companion asset files (images, SVGs, etc.)
35
+ * keyed by basename. Warns on duplicate basenames across directories.
36
+ */
37
+ declare function collectContentAssets(contentDirs: string[]): Map<string, string>;
38
+ //#endregion
39
+ export { CONTENT_ASSET_EXTS, collectContentAssets, copyPublicFiles, hashAssets };
31
40
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/assets/copier.ts","../../src/assets/hasher.ts"],"mappings":";;AAOA;;;iBAAgB,eAAA,CAAgB,SAAA,UAAmB,MAAA;;;;AAAnD;;;;;;;;ACsEA;;;;;;;;;;iBAAgB,UAAA,CAAW,MAAA,UAAgB,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/assets/copier.ts","../../src/assets/hasher.ts","../../src/assets/index.ts"],"mappings":";;AAOA;;;iBAAgB,eAAA,CAAgB,SAAA,UAAmB,MAAA;;;;AAAnD;;;;;;;;ACsEA;;;;;;;;ACtEA;;iBDsEgB,UAAA,CAAW,MAAA,UAAgB,UAAA;;;;cCtE9B,kBAAA,EAAkB,GAAA;;;;;iBAef,oBAAA,CAAqB,WAAA,aAAwB,GAAA"}
@@ -1,2 +1,2 @@
1
- import { n as copyPublicFiles, t as hashAssets } from "../assets-DXiWF_KI.mjs";
2
- export { copyPublicFiles, hashAssets };
1
+ import { i as copyPublicFiles, n as collectContentAssets, r as hashAssets, t as CONTENT_ASSET_EXTS } from "../assets-CAPOqQ_P.mjs";
2
+ export { CONTENT_ASSET_EXTS, collectContentAssets, copyPublicFiles, hashAssets };
@@ -1,5 +1,5 @@
1
- import { basename, dirname, extname, join, relative } from "path";
2
1
  import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, writeFileSync } from "fs";
2
+ import { basename, dirname, extname, join, relative } from "path";
3
3
  import { createHash } from "crypto";
4
4
  //#region src/assets/copier.ts
5
5
  /**
@@ -54,7 +54,7 @@ const HASHABLE_EXTS = new Set([
54
54
  ".ttf",
55
55
  ".eot"
56
56
  ]);
57
- const CONTENT_ASSET_EXTS = new Set([
57
+ const CONTENT_ASSET_EXTS$1 = new Set([
58
58
  ".svg",
59
59
  ".png",
60
60
  ".jpg",
@@ -76,7 +76,7 @@ function buildContentAssetMap(contentDir) {
76
76
  continue;
77
77
  }
78
78
  const ext = extname(entry.name);
79
- if (!CONTENT_ASSET_EXTS.has(ext)) continue;
79
+ if (!CONTENT_ASSET_EXTS$1.has(ext)) continue;
80
80
  if (entry.name.endsWith(".inline.svg")) continue;
81
81
  map.set(entry.name, full);
82
82
  }
@@ -150,6 +150,43 @@ function hashAssets(outDir, contentDir) {
150
150
  processHtml(outDir);
151
151
  }
152
152
  //#endregion
153
- export { copyPublicFiles as n, hashAssets as t };
153
+ //#region src/assets/index.ts
154
+ /** File extensions recognized as content companion assets. */
155
+ const CONTENT_ASSET_EXTS = new Set([
156
+ ".svg",
157
+ ".png",
158
+ ".jpg",
159
+ ".jpeg",
160
+ ".gif",
161
+ ".webp",
162
+ ".avif",
163
+ ".ico"
164
+ ]);
165
+ /**
166
+ * Walk content directories and collect companion asset files (images, SVGs, etc.)
167
+ * keyed by basename. Warns on duplicate basenames across directories.
168
+ */
169
+ function collectContentAssets(contentDirs) {
170
+ const assets = /* @__PURE__ */ new Map();
171
+ function walk(dir) {
172
+ if (!existsSync(dir)) return;
173
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
174
+ if (entry.name.startsWith(".")) continue;
175
+ const fullPath = join(dir, entry.name);
176
+ if (entry.isDirectory()) {
177
+ walk(fullPath);
178
+ continue;
179
+ }
180
+ const ext = extname(entry.name).toLowerCase();
181
+ if (!CONTENT_ASSET_EXTS.has(ext)) continue;
182
+ if (assets.has(entry.name) && assets.get(entry.name) !== fullPath) console.warn(`pagesmith duplicate companion asset basename "${entry.name}" detected; using ${fullPath}`);
183
+ assets.set(entry.name, fullPath);
184
+ }
185
+ }
186
+ for (const dir of contentDirs) walk(dir);
187
+ return assets;
188
+ }
189
+ //#endregion
190
+ export { copyPublicFiles as i, collectContentAssets as n, hashAssets as r, CONTENT_ASSET_EXTS as t };
154
191
 
155
- //# sourceMappingURL=assets-DXiWF_KI.mjs.map
192
+ //# sourceMappingURL=assets-CAPOqQ_P.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets-CAPOqQ_P.mjs","names":["CONTENT_ASSET_EXTS"],"sources":["../src/assets/copier.ts","../src/assets/hasher.ts","../src/assets/index.ts"],"sourcesContent":["import { copyFileSync, existsSync, mkdirSync, readdirSync } from 'fs'\nimport { dirname, join, relative } from 'path'\n\n/**\n * Copy public directory to output, preserving structure (no hashing).\n * Skips `fonts/` since those are copied to dist/assets/ and hashed.\n */\nexport function copyPublicFiles(publicDir: string, outDir: string): void {\n if (!existsSync(publicDir)) return\n function walk(dir: string) {\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n const full = join(dir, entry.name)\n // Skip fonts/ — they are copied to dist/assets/ and hashed\n if (entry.isDirectory() && entry.name === 'fonts' && dir === publicDir) continue\n if (entry.isDirectory()) {\n walk(full)\n continue\n }\n const rel = relative(publicDir, full)\n const dest = join(outDir, rel)\n mkdirSync(dirname(dest), { recursive: true })\n copyFileSync(full, dest)\n }\n }\n walk(publicDir)\n}\n","/**\n * Demand-driven asset pipeline.\n *\n * Instead of blindly copying all content assets to dist, this:\n * 1. Hashes pre-existing dist/assets/ files (CSS, JS, fonts — already there from bundling)\n * 2. Scans generated HTML for /assets/* references\n * 3. For each referenced content asset not yet in dist, finds the source\n * file in the content directory, copies it with a content hash\n * 4. Rewrites all HTML references to hashed paths\n *\n * Content assets are only copied if actually referenced in the output HTML.\n * Public assets (favicons, robots.txt) are handled separately by copyPublicFiles.\n */\n\nimport { createHash } from 'crypto'\nimport { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, writeFileSync } from 'fs'\nimport { basename, dirname, extname, join, relative } from 'path'\n\nconst HASHABLE_EXTS = new Set([\n '.css',\n '.js',\n '.svg',\n '.png',\n '.jpg',\n '.jpeg',\n '.gif',\n '.webp',\n '.avif',\n '.ico',\n '.woff',\n '.woff2',\n '.ttf',\n '.eot',\n])\n\nconst CONTENT_ASSET_EXTS = new Set([\n '.svg',\n '.png',\n '.jpg',\n '.jpeg',\n '.gif',\n '.webp',\n '.avif',\n '.ico',\n])\n\n/** Build a basename → source path lookup for content assets. */\nfunction buildContentAssetMap(contentDir: string): Map<string, string> {\n const map = new Map<string, string>()\n function walk(dir: string) {\n if (!existsSync(dir)) return\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n const full = join(dir, entry.name)\n if (entry.isDirectory()) {\n walk(full)\n continue\n }\n const ext = extname(entry.name)\n if (!CONTENT_ASSET_EXTS.has(ext)) continue\n if (entry.name.endsWith('.inline.svg')) continue\n map.set(entry.name, full)\n }\n }\n walk(contentDir)\n return map\n}\n\nfunction computeHash(content: Buffer): string {\n return createHash('sha256').update(content).digest('hex').slice(0, 8)\n}\n\n/**\n * Hash assets and rewrite HTML references.\n *\n * @param outDir - The dist output directory\n * @param contentDir - The content source directory (for finding referenced assets)\n */\nexport function hashAssets(outDir: string, contentDir: string): void {\n const assetsDir = join(outDir, 'assets')\n mkdirSync(assetsDir, { recursive: true })\n\n const renames = new Map<string, string>()\n const contentAssets = buildContentAssetMap(contentDir)\n\n // Phase 1: Collect and hash pre-existing files in dist/assets/ (CSS, JS, fonts)\n const existing: Array<{ full: string; ext: string; name: string }> = []\n if (existsSync(assetsDir)) {\n for (const entry of readdirSync(assetsDir, { withFileTypes: true })) {\n if (entry.isDirectory()) continue\n const ext = extname(entry.name)\n if (!HASHABLE_EXTS.has(ext)) continue\n existing.push({ full: join(assetsDir, entry.name), ext, name: basename(entry.name, ext) })\n }\n }\n for (const file of existing) {\n const content = readFileSync(file.full)\n const hash = computeHash(content)\n const hashedPath = join(assetsDir, `${file.name}.${hash}${file.ext}`)\n renameSync(file.full, hashedPath)\n renames.set(file.full, hashedPath)\n }\n\n // Phase 2: Scan HTML — resolve content assets on demand, rewrite all references\n function processHtml(dir: string) {\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n const full = join(dir, entry.name)\n if (entry.isDirectory()) {\n processHtml(full)\n continue\n }\n if (!entry.name.endsWith('.html')) continue\n\n let html = readFileSync(full, 'utf-8')\n\n html = html.replace(/(src|href|srcset)=\"([^\"]+)\"/g, (match, attr: string, ref: string) => {\n if (\n ref.startsWith('http:') ||\n ref.startsWith('https:') ||\n ref.startsWith('//') ||\n ref.startsWith('#') ||\n ref.startsWith('data:') ||\n ref.startsWith('mailto:')\n ) {\n return match\n }\n\n // Normalize relative refs (shouldn't exist after rehype, but just in case)\n let assetRef = ref\n if (ref.startsWith('./') && /\\.(svg|png|jpg|jpeg|gif|webp|avif|ico)$/i.test(ref)) {\n assetRef = '/assets/' + basename(ref)\n }\n\n // Non-asset paths (e.g. page links, anchors)\n if (!assetRef.startsWith('/assets/')) return match\n\n const fileName = assetRef.slice('/assets/'.length)\n const distPath = join(assetsDir, fileName)\n\n // Already hashed in phase 1 (CSS, JS, fonts) or a prior HTML file\n const already = renames.get(distPath)\n if (already) {\n return `${attr}=\"/${relative(outDir, already)}\"`\n }\n\n // Content asset — find source, copy + hash on demand\n const sourcePath = contentAssets.get(fileName)\n if (!sourcePath) {\n return `${attr}=\"${assetRef}\"`\n }\n\n const content = readFileSync(sourcePath)\n const hash = computeHash(content)\n const ext = extname(fileName)\n const name = basename(fileName, ext)\n const hashedName = `${name}.${hash}${ext}`\n const hashedDest = join(assetsDir, hashedName)\n\n writeFileSync(hashedDest, content)\n renames.set(distPath, hashedDest)\n\n return `${attr}=\"/assets/${hashedName}\"`\n })\n\n writeFileSync(full, html)\n }\n }\n processHtml(outDir)\n}\n","import { existsSync, readdirSync } from 'fs'\nimport { extname, join } from 'path'\n\nexport { copyPublicFiles } from './copier'\nexport { hashAssets } from './hasher'\n\n/** File extensions recognized as content companion assets. */\nexport const CONTENT_ASSET_EXTS = new Set([\n '.svg',\n '.png',\n '.jpg',\n '.jpeg',\n '.gif',\n '.webp',\n '.avif',\n '.ico',\n])\n\n/**\n * Walk content directories and collect companion asset files (images, SVGs, etc.)\n * keyed by basename. Warns on duplicate basenames across directories.\n */\nexport function collectContentAssets(contentDirs: string[]): Map<string, string> {\n const assets = new Map<string, string>()\n\n function walk(dir: string): void {\n if (!existsSync(dir)) return\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n if (entry.name.startsWith('.')) continue\n const fullPath = join(dir, entry.name)\n if (entry.isDirectory()) {\n walk(fullPath)\n continue\n }\n const ext = extname(entry.name).toLowerCase()\n if (!CONTENT_ASSET_EXTS.has(ext)) continue\n if (assets.has(entry.name) && assets.get(entry.name) !== fullPath) {\n console.warn(\n `pagesmith duplicate companion asset basename \"${entry.name}\" detected; using ${fullPath}`,\n )\n }\n assets.set(entry.name, fullPath)\n }\n }\n\n for (const dir of contentDirs) {\n walk(dir)\n }\n return assets\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,gBAAgB,WAAmB,QAAsB;AACvE,KAAI,CAAC,WAAW,UAAU,CAAE;CAC5B,SAAS,KAAK,KAAa;AACzB,OAAK,MAAM,SAAS,YAAY,KAAK,EAAE,eAAe,MAAM,CAAC,EAAE;GAC7D,MAAM,OAAO,KAAK,KAAK,MAAM,KAAK;AAElC,OAAI,MAAM,aAAa,IAAI,MAAM,SAAS,WAAW,QAAQ,UAAW;AACxE,OAAI,MAAM,aAAa,EAAE;AACvB,SAAK,KAAK;AACV;;GAGF,MAAM,OAAO,KAAK,QADN,SAAS,WAAW,KAAK,CACP;AAC9B,aAAU,QAAQ,KAAK,EAAE,EAAE,WAAW,MAAM,CAAC;AAC7C,gBAAa,MAAM,KAAK;;;AAG5B,MAAK,UAAU;;;;;;;;;;;;;;;;;ACNjB,MAAM,gBAAgB,IAAI,IAAI;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAMA,uBAAqB,IAAI,IAAI;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;AAGF,SAAS,qBAAqB,YAAyC;CACrE,MAAM,sBAAM,I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AAEjC,WAAO,GAAG,KAAK,YAAY,WAAW;KACtC;AAEF,iBAAc,MAAM,KAAK;;;AAG7B,aAAY,OAAO;;;;;AC/JrB,MAAa,qBAAqB,IAAI,IAAI;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;AAMF,SAAgB,qBAAqB,aAA4C;CAC/E,MAAM,yBAAS,IAAI,KAAqB;CAExC,SAAS,KAAK,KAAmB;AAC/B,MAAI,CAAC,WAAW,IAAI,CAAE;AACtB,OAAK,MAAM,SAAS,YAAY,KAAK,EAAE,eAAe,MAAM,CAAC,EAAE;AAC7D,OAAI,MAAM,KAAK,WAAW,IAAI,CAAE;GAChC,MAAM,WAAW,KAAK,KAAK,MAAM,KAAK;AACtC,OAAI,MAAM,aAAa,EAAE;AACvB,SAAK,SAAS;AACd;;GAEF,MAAM,MAAM,QAAQ,MAAM,KAAK,CAAC,aAAa;AAC7C,OAAI,CAAC,mBAAmB,IAAI,IAAI,CAAE;AAClC,OAAI,OAAO,IAAI,MAAM,KAAK,IAAI,OAAO,IAAI,MAAM,KAAK,KAAK,SACvD,SAAQ,KACN,iDAAiD,MAAM,KAAK,oBAAoB,WACjF;AAEH,UAAO,IAAI,MAAM,MAAM,SAAS;;;AAIpC,MAAK,MAAM,OAAO,YAChB,MAAK,IAAI;AAEX,QAAO"}
@@ -1,5 +1,5 @@
1
- import { r as LoaderType, t as Loader } from "./types-Cn52sdoq.mjs";
2
- import { r as MarkdownConfig } from "./heading-BpDXnl-7.mjs";
1
+ import { r as LoaderType, t as Loader } from "./types-B-V5qemH.mjs";
2
+ import { t as MarkdownConfig } from "./markdown-config-CDvh5aJ-.mjs";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region ../../node_modules/@types/unist/index.d.ts
@@ -1038,7 +1038,8 @@ interface YamlData extends Data {}
1038
1038
  type ValidationIssue = {
1039
1039
  /** Field path (e.g. 'tags[0]') */field?: string; /** Human-readable error message */
1040
1040
  message: string; /** Error severity */
1041
- severity: 'error' | 'warn';
1041
+ severity: 'error' | 'warn'; /** Origin of this issue — helps consumers distinguish validation phases. */
1042
+ source?: 'schema' | 'content' | 'plugin' | 'custom';
1042
1043
  };
1043
1044
  type ValidationEntryResult = {
1044
1045
  slug: string;
@@ -1053,7 +1054,7 @@ type ValidationResult = {
1053
1054
  };
1054
1055
  //#endregion
1055
1056
  //#region src/validation/types.d.ts
1056
- /** Context provided to each validator for a single content entry. */
1057
+ /** Context passed to runValidators() mdast may be absent before parsing. */
1057
1058
  type ValidatorContext = {
1058
1059
  /** Absolute path to the source file */filePath: string; /** URL-friendly slug for this entry */
1059
1060
  slug: string; /** Collection name this entry belongs to */
@@ -1061,11 +1062,24 @@ type ValidatorContext = {
1061
1062
  rawContent?: string; /** Parsed frontmatter / data */
1062
1063
  data: Record<string, any>; /** Pre-parsed MDAST tree shared across validators. */
1063
1064
  mdast?: Root;
1065
+ /**
1066
+ * Look up another entry by collection and slug.
1067
+ * Available when running within a content layer context.
1068
+ * Returns undefined if the entry doesn't exist or context is unavailable.
1069
+ */
1070
+ getEntry?: (collection: string, slug: string) => {
1071
+ slug: string;
1072
+ data: Record<string, any>;
1073
+ } | undefined;
1074
+ };
1075
+ /** Context provided to each validator — mdast is guaranteed to be present. */
1076
+ type ResolvedValidatorContext = Omit<ValidatorContext, 'mdast'> & {
1077
+ /** Parsed MDAST tree shared across all validators. */mdast: Root;
1064
1078
  };
1065
1079
  /** A single-entry content validator. */
1066
1080
  type ContentValidator = {
1067
1081
  /** Unique validator name (used in error reporting) */name: string; /** Validate a content entry and return any issues found. */
1068
- validate(ctx: ValidatorContext): ValidationIssue[] | Promise<ValidationIssue[]>;
1082
+ validate(ctx: ResolvedValidatorContext): ValidationIssue[] | Promise<ValidationIssue[]>;
1069
1083
  };
1070
1084
  //#endregion
1071
1085
  //#region src/schemas/collection.d.ts
@@ -1100,27 +1114,45 @@ type CollectionDef<S extends z.ZodType = z.ZodType, TComputed extends Collection
1100
1114
  };
1101
1115
  //#endregion
1102
1116
  //#region src/schemas/content-config.d.ts
1103
- /** Content layer configuration — passed to defineConfig(). */
1117
+ /** Content layer configuration — passed to defineConfig() or createContentLayer(). */
1104
1118
  type ContentLayerConfig = {
1105
- /** Named collections */collections: CollectionMap; /** Root directory for resolving relative paths (defaults to cwd()) */
1106
- root?: string; /** Markdown processing config (shared with the markdown pipeline). */
1107
- markdown?: MarkdownConfig; /** Asset hashing config */
1119
+ /** Named collections keyed by collection name. */collections: CollectionMap; /** Root directory for resolving relative collection paths (defaults to cwd()). */
1120
+ root?: string; /** Markdown processing config shared across all collections (themes, plugins, options). */
1121
+ markdown?: MarkdownConfig; /** Asset hashing config for cache-busted filenames. */
1108
1122
  assets?: {
1109
- /** Enable content-hash filenames */hashFilenames?: boolean; /** Output directory for hashed assets */
1123
+ /** Enable content-hash filenames (e.g. `style.a1b2c3.css`). */hashFilenames?: boolean; /** Output directory for hashed assets. */
1110
1124
  outputDir?: string;
1111
- }; /** Content plugins */
1125
+ }; /** Content plugins for extending processing and validation. */
1112
1126
  plugins?: ContentPlugin[];
1127
+ /**
1128
+ * When true, throw on file load errors instead of creating dummy entries.
1129
+ * When false (default), log a warning and continue with empty data.
1130
+ */
1131
+ strict?: boolean;
1113
1132
  };
1114
- /** Plugin interface for processing + validation. */
1133
+ /** Plugin interface for extending the content pipeline with custom processing and validation. */
1115
1134
  type ContentPlugin = {
1116
- name: string; /** Rehype plugin for markdown AST transformation */
1117
- rehypePlugin?: () => (tree: any) => void; /** Remark plugin for markdown AST transformation */
1118
- remarkPlugin?: () => (tree: any) => void; /** Validate plugin-specific metadata on each entry */
1135
+ /** Unique plugin name (used in error reporting and diagnostics). */name: string;
1136
+ /**
1137
+ * Rehype plugin factory for HTML AST transformation.
1138
+ * Called once during pipeline setup; the returned function runs on each entry's HAST tree.
1139
+ */
1140
+ rehypePlugin?: () => (tree: any) => void;
1141
+ /**
1142
+ * Remark plugin factory for markdown AST transformation.
1143
+ * Called once during pipeline setup; the returned function runs on each entry's MDAST tree.
1144
+ */
1145
+ remarkPlugin?: () => (tree: any) => void;
1146
+ /**
1147
+ * Validate plugin-specific metadata on each entry.
1148
+ * Returns an array of error message strings (empty array = valid).
1149
+ * Runs after schema validation and content validation.
1150
+ */
1119
1151
  validate?: (entry: {
1120
1152
  data: Record<string, any>;
1121
1153
  content?: string;
1122
1154
  }) => string[];
1123
1155
  };
1124
1156
  //#endregion
1125
- export { CollectionMap as a, RawEntry as c, ValidationEntryResult as d, ValidationIssue as f, CollectionDef as i, ContentValidator as l, ContentPlugin as n, InferCollectionData as o, ValidationResult as p, CollectionComputed as r, InferCollectionLoaderKind as s, ContentLayerConfig as t, ValidatorContext as u };
1126
- //# sourceMappingURL=content-config-Bfe4W9us.d.mts.map
1157
+ export { CollectionMap as a, RawEntry as c, ValidatorContext as d, ValidationEntryResult as f, CollectionDef as i, ContentValidator as l, ValidationResult as m, ContentPlugin as n, InferCollectionData as o, ValidationIssue as p, CollectionComputed as r, InferCollectionLoaderKind as s, ContentLayerConfig as t, ResolvedValidatorContext as u };
1158
+ //# sourceMappingURL=content-config-Bu2HH0Yx.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-config-Bfe4W9us.d.mts","names":["Data","Point","line","column","offset","Position","start","end","Literal","Node","value","type","data","position","Parent","children","Data","UnistData","Literal","UnistLiteral","Node","UnistNode","Parent","UnistParent","AlignType","ReferenceType","Alternative","alt","Association","identifier","label","Reference","referenceType","Resource","url","title","BlockContent","BlockContentMap","Blockquote","Code","Heading","Html","List","Paragraph","Table","ThematicBreak","blockquote","code","heading","html","list","paragraph","table","thematicBreak","DefinitionContent","DefinitionContentMap","Definition","FootnoteDefinition","definition","footnoteDefinition","FrontmatterContent","FrontmatterContentMap","Yaml","yaml","ListContent","ListContentMap","ListItem","listItem","PhrasingContent","PhrasingContentMap","Break","Delete","Emphasis","FootnoteReference","Image","ImageReference","InlineCode","Link","LinkReference","Strong","Text","break","delete","emphasis","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text","RootContent","RootContentMap","TableCell","TableRow","tableCell","tableRow","RowContent","RowContentMap","TableContent","TableContentMap","Content","Literals","Nodes","Extract","Root","Parents","TopLevelContent","value","data","children","Array","BlockquoteData","type","BreakData","CodeData","lang","meta","DefinitionData","DeleteData","EmphasisData","FootnoteDefinitionData","FootnoteReferenceData","HeadingData","depth","HtmlData","HTML","ImageData","ImageReferenceData","InlineCodeData","LinkData","LinkReferenceData","ListData","ordered","start","spread","ListItemData","checked","ParagraphData","RootData","StrongData","TableData","align","TableRowData","TableCellData","TextData","ThematicBreakData","YamlData","YAML"],"sources":["../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../src/validation/schema-validator.ts","../src/validation/types.ts","../src/schemas/collection.ts","../src/schemas/content-config.ts"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;AAqBA;;;;;AAKA;;;;;;;;;AAqBA;;UA1BiBA,MAAAA;;;;UAKAC,KAAAA;EA8BH;;AA6Bd;EAvDIC,IAAAA;EAwEmB;;;EAnEnBC,MAAAA;EAmEAU;;;EA/DAT,MAAAA;AAAAA;;AClBJ;;;;UD0BiBC,QAAAA;ECfLoB;;;EDmBRnB,KAAAA,EAAOL,KAAAA;ECZMyB;;;EDiBbnB,GAAAA,EAAKN,KAAAA;AAAAA;;;ACyET;;;;;AAWA;;;UDvDiBQ,MAAAA;ECuD+C;AAmBhE;;EDtEIE,IAAAA;ECwEM4B;;;EDnEN3B,IAAAA,GAAOZ,MAAAA;ECwEA4C;;;;;;EDhEP/B,QAAAA,GAAWR,QAAAA;AAAAA;;;;;AAjFf;;;;;AAKA;;;;;;;;;AAqBA;;KC1BYmB,SAAAA;;;;;;;ADgEZ;;;KCrDYC,aAAAA;AAAAA;;;;UAOKC,WAAAA;;;;AAlBjB;EAuBIC,GAAAA;AAAAA;;AAZJ;;;;;AAOA;;;UAiBiBC,WAAAA;EAZV;AAYP;;;;;AA+BA;;;;;;;EAjBIC,UAAAA;EA2BaI;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ILmBEtB,oCKjBA,aAAA,YLqBM;IKnBN,SAAA;EAAA,GL2BqB;EKxBvB,OAAA,GAAU,aAAA;AAAA;;KAIA,aAAA;EACV,IAAA,UL4BOF;EK1BP,YAAA,UAAsB,IAAA,gBL0BV;EKxBZ,YAAA,UAAsB,IAAA,gBLqDH;EKnDnB,QAAA,IAAY,KAAA;IAAS,IAAA,EAAM,MAAA;IAAqB,OAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"content-config-Bu2HH0Yx.d.mts","names":["Data","Point","line","column","offset","Position","start","end","Literal","Node","value","type","data","position","Parent","children","Data","UnistData","Literal","UnistLiteral","Node","UnistNode","Parent","UnistParent","AlignType","ReferenceType","Alternative","alt","Association","identifier","label","Reference","referenceType","Resource","url","title","BlockContent","BlockContentMap","Blockquote","Code","Heading","Html","List","Paragraph","Table","ThematicBreak","blockquote","code","heading","html","list","paragraph","table","thematicBreak","DefinitionContent","DefinitionContentMap","Definition","FootnoteDefinition","definition","footnoteDefinition","FrontmatterContent","FrontmatterContentMap","Yaml","yaml","ListContent","ListContentMap","ListItem","listItem","PhrasingContent","PhrasingContentMap","Break","Delete","Emphasis","FootnoteReference","Image","ImageReference","InlineCode","Link","LinkReference","Strong","Text","break","delete","emphasis","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text","RootContent","RootContentMap","TableCell","TableRow","tableCell","tableRow","RowContent","RowContentMap","TableContent","TableContentMap","Content","Literals","Nodes","Extract","Root","Parents","TopLevelContent","value","data","children","Array","BlockquoteData","type","BreakData","CodeData","lang","meta","DefinitionData","DeleteData","EmphasisData","FootnoteDefinitionData","FootnoteReferenceData","HeadingData","depth","HtmlData","HTML","ImageData","ImageReferenceData","InlineCodeData","LinkData","LinkReferenceData","ListData","ordered","start","spread","ListItemData","checked","ParagraphData","RootData","StrongData","TableData","align","TableRowData","TableCellData","TextData","ThematicBreakData","YamlData","YAML"],"sources":["../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../src/valid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