From bfa2c1196a4707750caeeba501a68ba564d9219b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 07:16:59 +0000 Subject: [PATCH] Version Packages --- .changeset/collections-and-sync.md | 16 ---------- .changeset/config-driven-docs-nav.md | 16 ---------- .changeset/i18n-docs-support.md | 5 --- .changeset/leadtype-next-adapter.md | 11 ------- .changeset/type-table-source-root.md | 9 ------ apps/astro-example/CHANGELOG.md | 12 +++++++ apps/astro-example/package.json | 2 +- apps/next-example/CHANGELOG.md | 12 +++++++ apps/next-example/package.json | 2 +- apps/nuxt-example/CHANGELOG.md | 12 +++++++ apps/nuxt-example/package.json | 2 +- apps/sveltekit-example/CHANGELOG.md | 12 +++++++ apps/sveltekit-example/package.json | 2 +- packages/leadtype/CHANGELOG.md | 47 ++++++++++++++++++++++++++++ packages/leadtype/package.json | 2 +- 15 files changed, 100 insertions(+), 62 deletions(-) delete mode 100644 .changeset/collections-and-sync.md delete mode 100644 .changeset/config-driven-docs-nav.md delete mode 100644 .changeset/i18n-docs-support.md delete mode 100644 .changeset/leadtype-next-adapter.md delete mode 100644 .changeset/type-table-source-root.md create mode 100644 apps/astro-example/CHANGELOG.md create mode 100644 apps/next-example/CHANGELOG.md create mode 100644 apps/nuxt-example/CHANGELOG.md create mode 100644 apps/sveltekit-example/CHANGELOG.md diff --git a/.changeset/collections-and-sync.md b/.changeset/collections-and-sync.md deleted file mode 100644 index 0196a72..0000000 --- a/.changeset/collections-and-sync.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"leadtype": minor ---- - -Add `collections` config and `leadtype sync` for declarative multi-source docs (closes #42, #44). - -- New `defineCollection({ repository?, ref?, cacheDir?, dir, prefix?, schema?, groups?, include?, exclude? })` helper, and `collections?: Record` on `DocsConfig`. Local-only collections omit `repository`; remote collections clone the repo at `ref` into `cacheDir` (default `.leadtype/sources/@`). Multiple collections sharing a `(repository, ref)` pair share one clone. -- New `leadtype sync` command: `--refresh` re-fetches and fast-forwards, `--offline` errors on cache miss, `--repo ` filters by repository URL substring. State tracked in `/.leadtype-sync.json`. -- `leadtype generate` learns `--sync`, `--refresh`, `--offline` (mutually exclusive). Default behavior errors clearly when a remote cache is missing, naming the affected collection(s). -- New project-level config: `leadtype.config.{ts,js,mjs,cjs}` looked up in cwd before the legacy per-docs-dir `docs.config.*` path. Setting both top-level `groups` and `collections` is rejected at load. -- `leadtype lint` discovers `leadtype.config.ts` automatically and runs lint per collection, applying each collection's `schema` if set. Violations are prefixed with `[collection:]`. -- `git`-not-installed surfaces as an actionable message instead of a raw `ENOENT`. - -Legacy projects (single docs folder, top-level `groups` in `docs.config.ts`, `--docs-dir` flags) are unchanged — the legacy code path is byte-identical to before. - -Known limitation: `leadtype sync` has no built-in timeout; a long network stall will hang the process. Track via `Ctrl-C` for now; a configurable per-operation timeout is planned. diff --git a/.changeset/config-driven-docs-nav.md b/.changeset/config-driven-docs-nav.md deleted file mode 100644 index f9df21a..0000000 --- a/.changeset/config-driven-docs-nav.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"leadtype": minor ---- - -Add config-driven docs navigation with nested sections, explicit page placement, -wildcard includes, and root-relative page references. - -`defineDocsConfig()` and `defineCollection()` now accept `nav`, which is used by -`resolveDocsNavigation()`, `llms.txt`, full-context generation, Agent -Readability, `AGENTS.md`, source navigation, and CLI generation. Frontmatter -`group` remains supported as taxonomy, validation metadata, and fallback -navigation for projects that have not adopted `nav`. - -This also updates the example docs site and c15t example to dogfood root nav -nodes as top-level docs areas, with the active root node's pages and children -rendered as sidebar sections. diff --git a/.changeset/i18n-docs-support.md b/.changeset/i18n-docs-support.md deleted file mode 100644 index 23b8cfd..0000000 --- a/.changeset/i18n-docs-support.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"leadtype": patch ---- - -Add first-class docs i18n support with locale-aware generation, localized source loading, per-locale search/LLM/readability artifacts, and a new `leadtype/i18n` helper surface. Locale-scoped search generation now uses URL-path document ids to align generated indexes with the source API. diff --git a/.changeset/leadtype-next-adapter.md b/.changeset/leadtype-next-adapter.md deleted file mode 100644 index fade2fd..0000000 --- a/.changeset/leadtype-next-adapter.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"leadtype": minor ---- - -Add `leadtype/next` framework adapter and formalize the core/adapter boundary. - -`leadtype/next` exposes three server-only helpers for Next.js App Router: `createGenerateStaticParams(...)`, `createLoadPageData(...)`, and `createDocsRouteHandler(...)`. The route handler wraps `createAgentMarkdownResponse` so a docs app can serve raw markdown, handle `Accept: text/markdown` negotiation, and detect AI user agents from a one-line `route.ts`. The companion `leadtype/next/client` subpath exports a `useLeadtypeSearch` React hook plus a framework-free `createSearchClient` factory that lazy-loads `search-index.json` / `search-content.json` and runs BM25 per keystroke. - -`react` is now an optional peer dependency for `leadtype/next/client`. Server-only consumers never pull in React. - -Documents the core/adapter boundary in a new `docs/reference/architecture` page: leadtype core has zero framework runtime deps, adapters live at flat `leadtype/` subpaths, and **no leadtype package — core or adapter — ever ships rendered DOM**. State primitives (hooks, composables, stores, handler factories) are allowed; ``-style components are not. The docs also name the planned native adapter shapes for Nuxt, SvelteKit, Astro, TanStack Start, Vue search, and Svelte search without exporting those APIs yet. The boundary is now enforced by tests in `packages/leadtype/src/internal/package-surface.test.ts` that scan import graphs and fail if framework runtimes leak into core or one adapter imports from another. diff --git a/.changeset/type-table-source-root.md b/.changeset/type-table-source-root.md deleted file mode 100644 index ee692d4..0000000 --- a/.changeset/type-table-source-root.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"leadtype": patch ---- - -Default `` and `` path resolution to the Leadtype source root instead of `process.cwd()/docs`. - -This fixes generated docs for source roots such as `.c15t` or `.leadtype`, where `path="./packages/..."` should resolve against the configured source root. Source-MDX consumers can now pass `typeTableBasePath` / `typeTableStrict` through `createDocsSource()` or use `createMdxSourcePlugins()` for bundler-level configuration. Failed type extraction now emits a visible warning by default and can fail generation in strict mode. - -This changes the bare `mdxSourcePlugins` default for bundler consumers: when Leadtype can see the source MDX file path, it derives the base path from the first `docs` path segment instead of always using `process.cwd()/docs`. Projects that intentionally keep referenced TypeScript files under their docs folder should switch to `createMdxSourcePlugins({ typeTableBasePath: path.resolve(process.cwd(), "docs") })`. diff --git a/apps/astro-example/CHANGELOG.md b/apps/astro-example/CHANGELOG.md new file mode 100644 index 0000000..0d7a734 --- /dev/null +++ b/apps/astro-example/CHANGELOG.md @@ -0,0 +1,12 @@ +# astro-example + +## 0.0.1 + +### Patch Changes + +- Updated dependencies [8b84f60] +- Updated dependencies [aca9e8f] +- Updated dependencies [c7fcbf6] +- Updated dependencies [e923e9f] +- Updated dependencies [844a94d] + - leadtype@0.2.0 diff --git a/apps/astro-example/package.json b/apps/astro-example/package.json index aad8172..967a32f 100644 --- a/apps/astro-example/package.json +++ b/apps/astro-example/package.json @@ -1,6 +1,6 @@ { "name": "astro-example", - "version": "0.0.0", + "version": "0.0.1", "private": true, "type": "module", "scripts": { diff --git a/apps/next-example/CHANGELOG.md b/apps/next-example/CHANGELOG.md new file mode 100644 index 0000000..28e4279 --- /dev/null +++ b/apps/next-example/CHANGELOG.md @@ -0,0 +1,12 @@ +# next-example + +## 0.0.1 + +### Patch Changes + +- Updated dependencies [8b84f60] +- Updated dependencies [aca9e8f] +- Updated dependencies [c7fcbf6] +- Updated dependencies [e923e9f] +- Updated dependencies [844a94d] + - leadtype@0.2.0 diff --git a/apps/next-example/package.json b/apps/next-example/package.json index 81a7e06..c218105 100644 --- a/apps/next-example/package.json +++ b/apps/next-example/package.json @@ -1,6 +1,6 @@ { "name": "next-example", - "version": "0.0.0", + "version": "0.0.1", "private": true, "type": "module", "scripts": { diff --git a/apps/nuxt-example/CHANGELOG.md b/apps/nuxt-example/CHANGELOG.md new file mode 100644 index 0000000..9c50a73 --- /dev/null +++ b/apps/nuxt-example/CHANGELOG.md @@ -0,0 +1,12 @@ +# nuxt-example + +## 0.0.1 + +### Patch Changes + +- Updated dependencies [8b84f60] +- Updated dependencies [aca9e8f] +- Updated dependencies [c7fcbf6] +- Updated dependencies [e923e9f] +- Updated dependencies [844a94d] + - leadtype@0.2.0 diff --git a/apps/nuxt-example/package.json b/apps/nuxt-example/package.json index ee5d5a0..c1380cd 100644 --- a/apps/nuxt-example/package.json +++ b/apps/nuxt-example/package.json @@ -1,6 +1,6 @@ { "name": "nuxt-example", - "version": "0.0.0", + "version": "0.0.1", "private": true, "type": "module", "scripts": { diff --git a/apps/sveltekit-example/CHANGELOG.md b/apps/sveltekit-example/CHANGELOG.md new file mode 100644 index 0000000..7aad6c3 --- /dev/null +++ b/apps/sveltekit-example/CHANGELOG.md @@ -0,0 +1,12 @@ +# sveltekit-example + +## 0.0.1 + +### Patch Changes + +- Updated dependencies [8b84f60] +- Updated dependencies [aca9e8f] +- Updated dependencies [c7fcbf6] +- Updated dependencies [e923e9f] +- Updated dependencies [844a94d] + - leadtype@0.2.0 diff --git a/apps/sveltekit-example/package.json b/apps/sveltekit-example/package.json index 2336921..2b89773 100644 --- a/apps/sveltekit-example/package.json +++ b/apps/sveltekit-example/package.json @@ -1,6 +1,6 @@ { "name": "sveltekit-example", - "version": "0.0.0", + "version": "0.0.1", "private": true, "type": "module", "scripts": { diff --git a/packages/leadtype/CHANGELOG.md b/packages/leadtype/CHANGELOG.md index 9c8ef52..3b1cb42 100644 --- a/packages/leadtype/CHANGELOG.md +++ b/packages/leadtype/CHANGELOG.md @@ -1,5 +1,52 @@ # leadtype +## 0.2.0 + +### Minor Changes + +- 8b84f60: Add `collections` config and `leadtype sync` for declarative multi-source docs (closes #42, #44). + + - New `defineCollection({ repository?, ref?, cacheDir?, dir, prefix?, schema?, groups?, include?, exclude? })` helper, and `collections?: Record` on `DocsConfig`. Local-only collections omit `repository`; remote collections clone the repo at `ref` into `cacheDir` (default `.leadtype/sources/@`). Multiple collections sharing a `(repository, ref)` pair share one clone. + - New `leadtype sync` command: `--refresh` re-fetches and fast-forwards, `--offline` errors on cache miss, `--repo ` filters by repository URL substring. State tracked in `/.leadtype-sync.json`. + - `leadtype generate` learns `--sync`, `--refresh`, `--offline` (mutually exclusive). Default behavior errors clearly when a remote cache is missing, naming the affected collection(s). + - New project-level config: `leadtype.config.{ts,js,mjs,cjs}` looked up in cwd before the legacy per-docs-dir `docs.config.*` path. Setting both top-level `groups` and `collections` is rejected at load. + - `leadtype lint` discovers `leadtype.config.ts` automatically and runs lint per collection, applying each collection's `schema` if set. Violations are prefixed with `[collection:]`. + - `git`-not-installed surfaces as an actionable message instead of a raw `ENOENT`. + + Legacy projects (single docs folder, top-level `groups` in `docs.config.ts`, `--docs-dir` flags) are unchanged — the legacy code path is byte-identical to before. + + Known limitation: `leadtype sync` has no built-in timeout; a long network stall will hang the process. Track via `Ctrl-C` for now; a configurable per-operation timeout is planned. + +- aca9e8f: Add config-driven docs navigation with nested sections, explicit page placement, + wildcard includes, and root-relative page references. + + `defineDocsConfig()` and `defineCollection()` now accept `nav`, which is used by + `resolveDocsNavigation()`, `llms.txt`, full-context generation, Agent + Readability, `AGENTS.md`, source navigation, and CLI generation. Frontmatter + `group` remains supported as taxonomy, validation metadata, and fallback + navigation for projects that have not adopted `nav`. + + This also updates the example docs site and c15t example to dogfood root nav + nodes as top-level docs areas, with the active root node's pages and children + rendered as sidebar sections. + +- e923e9f: Add `leadtype/next` framework adapter and formalize the core/adapter boundary. + + `leadtype/next` exposes three server-only helpers for Next.js App Router: `createGenerateStaticParams(...)`, `createLoadPageData(...)`, and `createDocsRouteHandler(...)`. The route handler wraps `createAgentMarkdownResponse` so a docs app can serve raw markdown, handle `Accept: text/markdown` negotiation, and detect AI user agents from a one-line `route.ts`. The companion `leadtype/next/client` subpath exports a `useLeadtypeSearch` React hook plus a framework-free `createSearchClient` factory that lazy-loads `search-index.json` / `search-content.json` and runs BM25 per keystroke. + + `react` is now an optional peer dependency for `leadtype/next/client`. Server-only consumers never pull in React. + + Documents the core/adapter boundary in a new `docs/reference/architecture` page: leadtype core has zero framework runtime deps, adapters live at flat `leadtype/` subpaths, and **no leadtype package — core or adapter — ever ships rendered DOM**. State primitives (hooks, composables, stores, handler factories) are allowed; ``-style components are not. The docs also name the planned native adapter shapes for Nuxt, SvelteKit, Astro, TanStack Start, Vue search, and Svelte search without exporting those APIs yet. The boundary is now enforced by tests in `packages/leadtype/src/internal/package-surface.test.ts` that scan import graphs and fail if framework runtimes leak into core or one adapter imports from another. + +### Patch Changes + +- c7fcbf6: Add first-class docs i18n support with locale-aware generation, localized source loading, per-locale search/LLM/readability artifacts, and a new `leadtype/i18n` helper surface. Locale-scoped search generation now uses URL-path document ids to align generated indexes with the source API. +- 844a94d: Default `` and `` path resolution to the Leadtype source root instead of `process.cwd()/docs`. + + This fixes generated docs for source roots such as `.c15t` or `.leadtype`, where `path="./packages/..."` should resolve against the configured source root. Source-MDX consumers can now pass `typeTableBasePath` / `typeTableStrict` through `createDocsSource()` or use `createMdxSourcePlugins()` for bundler-level configuration. Failed type extraction now emits a visible warning by default and can fail generation in strict mode. + + This changes the bare `mdxSourcePlugins` default for bundler consumers: when Leadtype can see the source MDX file path, it derives the base path from the first `docs` path segment instead of always using `process.cwd()/docs`. Projects that intentionally keep referenced TypeScript files under their docs folder should switch to `createMdxSourcePlugins({ typeTableBasePath: path.resolve(process.cwd(), "docs") })`. + ## 0.1.2 ### Patch Changes diff --git a/packages/leadtype/package.json b/packages/leadtype/package.json index 6067531..84cbc2e 100644 --- a/packages/leadtype/package.json +++ b/packages/leadtype/package.json @@ -1,6 +1,6 @@ { "name": "leadtype", - "version": "0.1.2", + "version": "0.2.0", "description": "Framework-neutral docs pipeline tooling for MDX, LLM bundles, and search", "type": "module", "license": "MIT",