@vite-hub/docs 0.4.1 → 0.5.0

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 (57) hide show
  1. package/README.md +164 -6
  2. package/dist/{assistant-pages-BN7hNsSZ.js → assistant-pages-CqNlHsx-.js} +1 -1
  3. package/dist/{assistant-shared-WzButktj.js → assistant-shared-DhiLHKSl.js} +2 -2
  4. package/dist/assistant-worker.js +1 -1
  5. package/dist/assistant.js +1 -1
  6. package/dist/{content-CPZGnn3S.js → content-BQVlMshL.js} +55 -15
  7. package/dist/{draft-BjWmaiLn.js → draft-CSsTYSeb.js} +2 -2
  8. package/dist/{error-diagnostics-B_ZOy7kF.js → error-diagnostics-CmgtG9xa.js} +64 -0
  9. package/dist/index.d.ts +7 -6
  10. package/dist/index.js +4 -4
  11. package/dist/link-checker-redirects.js +1 -1
  12. package/dist/{manifest-CMoxcwPm.d.ts → manifest-Drbdw1us.d.ts} +1 -1
  13. package/dist/{manifest-ZdxLrcvt.js → manifest-DvECmwX-.js} +62 -26
  14. package/dist/{markdown-DUWnEMPp.js → markdown-1M1FbjCw.js} +1 -1
  15. package/dist/{page-Dx2JD3y1.d.ts → markdown-BiKrT08O.d.ts} +2 -25
  16. package/dist/navigation.d.ts +9 -3
  17. package/dist/navigation.js +22 -8
  18. package/dist/{nuxt-CAGpKl_-.d.ts → nuxt-8O2OB_hI.d.ts} +80 -4
  19. package/dist/nuxt.d.ts +2 -2
  20. package/dist/nuxt.js +1269 -58
  21. package/dist/{page-GPt09oex.js → page-Bb0TfRKi.js} +19 -3
  22. package/dist/page-BryUCmYf.d.ts +26 -0
  23. package/dist/primitive-rail.d.ts +1 -4
  24. package/dist/primitive-rail.js +1 -4
  25. package/dist/{redirects-CmR1yu5A.js → redirects-BJj58IsY.js} +34 -21
  26. package/dist/runnable.d.ts +37 -0
  27. package/dist/runnable.js +105 -0
  28. package/dist/runtime/app/components/DocsAsideLeftBody.vue +2 -8
  29. package/dist/runtime/app/components/DocsLearn.vue +215 -0
  30. package/dist/runtime/app/components/DocsLearnCodePre.vue +98 -0
  31. package/dist/runtime/app/components/DocsLearnFile.vue +21 -0
  32. package/dist/runtime/app/components/DocsPage.vue +11 -5
  33. package/dist/runtime/app/components/DocsPlayground.vue +117 -0
  34. package/dist/runtime/app/components/content/Example.vue +18 -49
  35. package/dist/runtime/app/components/content/PageList.vue +1 -5
  36. package/dist/runtime/app/layouts/docs.vue +36 -8
  37. package/dist/runtime/app/middleware/docs-layout.ts +2 -2
  38. package/dist/runtime/app/utils/docs-learn.ts +31 -0
  39. package/dist/runtime/app/utils/docs-playground.ts +3 -0
  40. package/dist/runtime/server/llms.js +1 -1
  41. package/dist/runtime/server/markdown.d.ts +0 -5
  42. package/dist/runtime/server/markdown.js +10 -1
  43. package/dist/runtime/server/mcp.js +1 -1
  44. package/dist/runtime/server/page.d.ts +1 -1
  45. package/dist/runtime/server/page.js +3 -3
  46. package/dist/runtime/server/raw.js +2 -9
  47. package/dist/runtime/server/search.d.ts +1 -1
  48. package/dist/runtime/server/search.js +3 -2
  49. package/dist/runtime/server/sitemap.js +1 -1
  50. package/dist/{schema-DwpXW0VZ.js → schema-DcWZ3Q3M.js} +97 -5
  51. package/dist/server.d.ts +3 -2
  52. package/dist/server.js +3 -3
  53. package/dist/snapshot-worker.mjs +40 -0
  54. package/dist/steps-DBlkJwtD.d.ts +105 -0
  55. package/dist/steps-DF-11dJn.js +32 -0
  56. package/dist/{types-BhG6vGfG.d.ts → types-CHU_fy9l.d.ts} +69 -4
  57. package/package.json +17 -10
package/README.md CHANGED
@@ -26,6 +26,8 @@ export default defineNuxtConfig({
26
26
 
27
27
  The module installs Nuxt UI, `@vite-hub/ui`, `nuxt-agent-discovery`, and `nuxt-link-checker` for you, so a new site does not add them to `modules`. An app that already lists `@nuxt/ui` keeps it before the docs module, as in [Add docs to an existing app](#add-docs-to-an-existing-app). Content serves the agent files: `/raw/<page>.md`, `llms.txt`, `llms-full.txt`, `sitemap.md`, `sitemap.xml`, and the MCP server. Set `site.url` to the public origin: llms.txt, canonical links, and the raw Markdown links use it.
28
28
 
29
+ The module turns off Nuxt's idle prefetch of lazy chunks in the whole app, such as the editor and the comark blocks. A page loads the chunks that it renders. A link loads its page and payload when the reader points at it or focuses it, unless the app sets `experimental.defaults.nuxtLink.prefetchOn`.
30
+
29
31
  The shell uses Lucide, Simple Icons, and VS Code Icons. Install `@iconify-json/lucide`, `@iconify-json/simple-icons`, and `@iconify-json/vscode-icons` to serve them from your app. Without them, `@nuxt/icon` gets them from the Iconify API.
30
32
 
31
33
  Apps that use `vite-hub` add `vite-hub/docs/nuxt` to `modules` in place of `@vite-hub/docs/nuxt`, and import the root and the assistant from `vite-hub/docs` and `vite-hub/docs/assistant`.
@@ -81,6 +83,25 @@ The module reads the `.md` and `.navigation.yml` files of every source through V
81
83
 
82
84
  `sources` configures the site pages, search, Markdown resources, and the pages that the docs assistant reads.
83
85
 
86
+ A page that the build generates, such as a list of the skills in a repository, is a `files()` Source. Its loader runs when the build reads the pages, so nothing writes the page into the content folder first:
87
+
88
+ ```ts
89
+ import { readdir } from "node:fs/promises"
90
+ import { files } from "vite-hub/source"
91
+
92
+ async function skillCatalog() {
93
+ const skills = await readdir("../skills")
94
+ return ["---", "title: All skills", "---", ...skills.map(name => `- \`${name}\``)].join("\n")
95
+ }
96
+
97
+ export default defineNuxtConfig({
98
+ docs: {
99
+ base: "/",
100
+ sources: ["content", { source: files({ "catalog.md": skillCatalog }), mount: "/skills" }],
101
+ },
102
+ })
103
+ ```
104
+
84
105
  ```ts
85
106
  import { github, glob } from "vite-hub/source"
86
107
 
@@ -115,12 +136,14 @@ The `components` module exports a default map of Comark tags to Vue components.
115
136
  | `credits` | None | Inline Markdown at the end of the page, such as `Icons from [Lucide](https://lucide.dev).` |
116
137
  | `keywords` | None | Words that find the page in search besides its own text: a list, or one string with commas. They rank below the page title and with headings. |
117
138
  | `icon` | `i-lucide-file-text` | Sidebar icon, as an Iconify name. |
118
- | `layout` | `article` | `article`, `tutorial`, `landing`, or `home`. |
119
- | `sidebar` | `true` | `false` hides the left navigation on this page. `collapsed` starts it as a narrow column that the reader opens. |
120
- | `toc` | `true`, `false` on `landing` | `false` hides the "On this page" outline. |
139
+ | `layout` | `article` | `article`, `tutorial`, `landing`, `home`, `playground`, or `learn`. See [Workspace pages](#workspace-pages). |
140
+ | `sidebar` | `true`, `collapsed` on `playground` and `learn` | `false` hides the left navigation on this page. `collapsed` starts it as a narrow column that the reader opens. |
141
+ | `toc` | `true`, `false` on `landing`, `home`, `playground`, and `learn` | `false` hides the "On this page" outline. |
121
142
  | `codePanel` | `false` | Tutorials only. Shows the files of the current step beside the prose. |
122
143
  | `tutorial` | None | Tutorials only. `project` or `quickstart`, for your own tutorial catalog. |
123
144
  | `navigation` | Listed | `false` keeps the page out of the sidebar. Or `{ title, order, group, kind, panel }`. See [Panels](#panels). |
145
+ | `examples`, `tabs`, `render`, `connect`, `port` | None | `layout: playground` only. See [Workspace pages](#workspace-pages). |
146
+ | `fixture`, `guide`, `lesson`, `preview`, `port` | None | `layout: learn` only. See [Workspace pages](#workspace-pages). |
124
147
  | `seo` | None | `{ title, description, image, index }` for search results and shares when they must differ from the page. `image` is a path in `public/` or a URL, or `false` for no share image. `index: false` asks search engines not to index the page. See [Pages that search engines skip](#pages-that-search-engines-skip). |
125
148
 
126
149
  Dotted keys work too, such as `navigation.order: 2`. A wrong field stops the build with `DOCS_CONTENT_INVALID`. In development, the terminal shows the error and the site keeps the last valid pages until you fix the file.
@@ -163,9 +186,10 @@ navigation.panel: true
163
186
  - `article` is prose with the outline on the right.
164
187
  - `tutorial` numbers each `::tutorial-step` block. With `codePanel: true`, a sticky panel on wide screens shows the file tree and the file that the reader is on. Code blocks named `commands/...` or `output/...`, and shell blocks, stay in the prose.
165
188
  - `landing` is a wide Overview page without the outline. A section Overview ends with the catalog of every section.
189
+ - `playground` and `learn` fill the page with a code workspace. See [Workspace pages](#workspace-pages).
166
190
  - `home` is a product home page under the site header, with no title, actions, sidebar, or outline. Your `components/content/` blocks, such as a `::product-hero`, take the full width. The Markdown between them, such as a heading, a list, or a code group, gets the prose styles and the width of a docs page. The page keeps its search entry, Markdown copy, and share image.
167
191
 
168
- The left navigation (the section rail and the page sidebar) and the right outline show on every docs page. Turn them off for one page with `sidebar: false` or `toc: false`. A page that needs the width, such as a playground, sets `sidebar: collapsed`: wide screens show a narrow column with the logo, a button that opens the navigation, search, and the site links, or the rail on a site that has one. An app page in the docs layout sets it with `definePageMeta({ layout: "docs", sidebar: "collapsed" })`. A code panel tutorial starts collapsed too.
192
+ The left navigation (the section rail and the page sidebar) and the right outline show on every docs page. Turn them off for one page with `sidebar: false` or `toc: false`. A page that needs the width, such as a playground, sets `sidebar: collapsed`: wide screens show a narrow column with the logo, a button that opens the navigation, search, and the site links, or the rail on a site that has one. An app page in the docs layout sets it with `definePageMeta({ layout: "docs", sidebar: "collapsed" })`. That page fills the viewport under the header and the window does not scroll: the root element of the page is exactly as tall as the viewport, so `height: 100%` inside it fills the screen, and content that is taller scrolls inside the page. A code panel tutorial starts collapsed too.
169
193
 
170
194
  ````md
171
195
  ---
@@ -183,6 +207,140 @@ console.log("hello")
183
207
  ::
184
208
  ````
185
209
 
210
+ ### Workspace pages
211
+
212
+ Two layouts fill the page with a code workspace: an editor, a file tree, a preview, and a terminal. The frontmatter of the page sets the workspace, so you add no app page and no config. On a phone or in a browser without WebContainer support, the page shows its own text instead.
213
+
214
+ `layout: playground` opens the apps of `examples`. Each example is a folder of the app, relative to the app root. Without `render`, the examples run in a WebContainer: it runs `npm install`, then `npm run dev`, and the preview shows the server on `port`.
215
+
216
+ ```md [content/docs/try/playground.md]
217
+ ---
218
+ title: Playground
219
+ layout: playground
220
+ examples:
221
+ - { id: hello, label: Hello, group: Servers, dir: examples/hello, open: message.txt }
222
+ - { id: clock, label: Clock, group: Servers, dir: examples/clock, open: server.mjs }
223
+ tabs:
224
+ - { value: messages, label: Messages }
225
+ ---
226
+
227
+ The text of the page shows when the workspace cannot run.
228
+ ```
229
+
230
+ | Field | Default | Use |
231
+ | --- | --- | --- |
232
+ | `examples` | Required | `{ id, label, group, description, dir, open, preview, readonly }`, in menu order. `id` is the `?example=` value. `group` is the heading in the examples menu. `open` is the file that the editor opens first. `preview` is the path that the preview opens. `readonly` lists text files of `dir` that the reader cannot edit. With more than one example and no `?example=`, the page opens on a start screen. |
233
+ | `tabs` | None | `{ value, label }`: more output tabs. The tab `messages` renders `app/components/playground/PlaygroundTabMessages.vue`, which reads the workspace with `useWorkspace()` from `@vite-hub/ui/workspace`. A missing component fails the build with `DOCS_WORKSPACE_TAB_MISSING`. |
234
+ | `render` | None | A module relative to the app root, such as `app/playground/render.ts`. The page runs its default export on the files 200 ms after each edit, and shows the HTML in an Output tab. No WebContainer starts, so the page works on every device. |
235
+ | `connect` | None | Accounts that the reader can connect in a Connect tab: `anthropic`, `github`, `netlify`, `openai`, or `vercel`. Each one takes a token in the tab. Any other name, such as `cloudflare`, which needs a relay, fails the build with `DOCS_CONTENT_INVALID`. A token stays in the browser tab, and the app gets it as an environment variable of the dev server, such as `GITHUB_TOKEN`. Not with `render`. |
236
+ | `port` | `3000` | The port of the dev server. Not with `render`. |
237
+
238
+ ```ts [app/playground/render.ts]
239
+ import type { DocsRenderFunction } from "@vite-hub/docs/runnable"
240
+
241
+ const render: DocsRenderFunction = (files) => {
242
+ const html = files["index.html"]
243
+ if (html === undefined) return { html: "", issues: [{ message: "Create index.html." }] }
244
+ return { html }
245
+ }
246
+
247
+ export default render
248
+ ```
249
+
250
+ #### Read-only files, binary files, and issues
251
+
252
+ `readonly` marks files of an example that the reader can read but not edit, such as a model that a build trained. The editor refuses typing in them and shows "Read-only". `useWorkspace().setFile` in a tab component can still change them. A path that is not a text file of `dir` fails the build with `DOCS_WORKSPACE_READONLY_MISSING`.
253
+
254
+ ```md [content/docs/try/models.md]
255
+ ---
256
+ title: Models
257
+ layout: playground
258
+ render: app/playground/render.ts
259
+ examples:
260
+ - { id: recipes, label: Recipes, dir: examples/recipes, open: input.txt, readonly: [recipes.model.ts] }
261
+ ---
262
+ ```
263
+
264
+ A file of `dir` that is not valid UTF-8, such as `weights.bin`, is a binary asset. It needs no frontmatter. The tree and the editor never show it. The page module carries it as base64 and turns it back into bytes when it loads. A `render` function reads it from `example.assets`, and a WebContainer example mounts it next to the files. An issue with `file` shows `file:line`, and a click opens that file.
265
+
266
+ ```ts [app/playground/render.ts]
267
+ import type { DocsRenderFunction } from "@vite-hub/docs/runnable"
268
+
269
+ const render: DocsRenderFunction = (files, { example }) => {
270
+ const weights = example.assets?.["weights.bin"]
271
+ if (!weights) return { html: "", issues: [{ message: "Train the model first.", file: "recipes.model.ts", line: 1 }] }
272
+ return { html: `<p>${files["input.txt"] ?? ""}: ${weights.byteLength} bytes of weights</p>` }
273
+ }
274
+
275
+ export default render
276
+ ```
277
+
278
+ `layout: learn` and `#build/playground-templates.mjs` read the text files of a fixture only.
279
+
280
+ `layout: learn` is a lesson. Its `::tutorial-step` blocks become the steps of the workspace, and the guide shows the text of the current step. `fixture` is a folder in the `runnable.fixtures` folder (`fixtures` by default) with the app after the last step, as for [runnable lessons](#runnable-lessons-and-examples). Each step loads the files of the fixture that its code blocks name. A file name in inline code, such as `` `greeting.mjs` ``, opens the file. A file code block gets "Show in editor", and a `curl` block gets "Run in workspace". `?step=2` opens step 2, and Solve writes the files of the step.
281
+
282
+ ````md [content/docs/try/first-server.md]
283
+ ---
284
+ title: Your first server
285
+ layout: learn
286
+ fixture: first-server
287
+ ---
288
+
289
+ ::tutorial-step{title="Write a greeting"}
290
+ ## Write a greeting
291
+
292
+ ```js [greeting.mjs]
293
+ export default () => "Hello."
294
+ ```
295
+ ::
296
+ ````
297
+
298
+ | Field | Default | Use |
299
+ | --- | --- | --- |
300
+ | `fixture` | Required | The folder of the app after the last step. |
301
+ | `guide` | `side` | `side` puts the step text in a column beside the code, `top` puts it over the code. |
302
+ | `lesson` | This page | The URL of another docs page whose `::tutorial-step` blocks are the steps, such as a get started guide, so the prose has one source. The page then has a canonical link to that page. |
303
+ | `preview` | `/` | The path that the preview opens. |
304
+ | `port` | `3000` | The port of the dev server. |
305
+
306
+ A WebContainer runs only in a cross-origin isolated page. The module lists every `learn` page and every `playground` page without `render`, and passes them to `vite-hub/nuxt` as `webContainer.routes`, in either module order. The app needs `vite-hub/nuxt` and `@vite-hub/web-container`; without them, the build fails with `DOCS_WORKSPACE_VITEHUB_MISSING`. A `render` page stays a plain page. A missing `dir`, `fixture`, or `render` file fails the build with `DOCS_WORKSPACE_DIR_MISSING` or `DOCS_WORKSPACE_RENDER_MISSING`, and a `readonly` path that is not a text file of its `dir` with `DOCS_WORKSPACE_READONLY_MISSING`. Each workspace page gets an id from its path, such as `learn-first-agent` for `/learn/first-agent`, and the id names its snapshots, its examples, and its zip. Two pages with one id, such as `/docs/a/b` and `/docs/a-b`, fail the build with `DOCS_WORKSPACE_ID_COLLISION`, and so does a page id that matches a `slug` in `runnable.lessons` or an `id` in `runnable.examples`.
307
+
308
+ The frontmatter is the one source of truth for workspace pages. `runnable.lessons` and `runnable.examples` stay for app pages that read `#build/runnable-tutorials.mjs` and `#build/playground-templates.mjs`, such as a custom `/learn/[slug]` page. Both use one snapshot build: an example with the dependencies of a lesson mounts the snapshot of that lesson, and `nuxt build` writes the snapshots of workspace pages as it does for `runnable`. A `layout: tutorial` page with `codePanel` works as before.
309
+
310
+ ### Runnable lessons and examples
311
+
312
+ `runnable` runs lessons and starting apps in the reader's browser, in a WebContainer. Each one is an app in the fixtures folder. The page stays the lesson text, and the fixture is the app after the last step: every file code block of a `::tutorial-step` must equal the fixture file.
313
+
314
+ ```ts [nuxt.config.ts]
315
+ export default defineNuxtConfig({
316
+ modules: ["@vite-hub/docs/nuxt"],
317
+ docs: {
318
+ runnable: {
319
+ lessons: [{ slug: "first-route", page: "/docs/first-route", fixture: "first-route" }],
320
+ examples: [{ id: "kv", label: "KV", description: "Store and read a value.", fixture: "kv", open: "server/api/kv.post.ts", preview: "/api/kv" }],
321
+ },
322
+ },
323
+ })
324
+ ```
325
+
326
+ | Option | Default | Description |
327
+ | --- | --- | --- |
328
+ | `fixtures` | `fixtures` | The folder of the apps, relative to the app root. |
329
+ | `lessons` | `[]` | `{ slug, page, fixture }`. `slug` names the lesson and its snapshot. `page` is the URL of a docs page with `::tutorial-step` blocks, from `dir` or from `sources`. |
330
+ | `examples` | `[]` | `{ id, label, description, fixture, open, preview }`, in menu order. `open` is the file that the editor opens first, and `preview` is the path that the preview opens. |
331
+ | `start` | None | The URL of a docs page whose code blocks give a file before the step that writes it, such as an Installation page. Without it, that file does not exist before its step. |
332
+ | `pnpmWorkspace` | None | The folder of `pnpm-workspace.yaml`, relative to the app root. Set it when fixtures use `catalog:` or `workspace:` specifiers: the build rewrites them to npm versions, and packs the workspace packages that a fixture uses into its snapshot. The packages are the folders that its `packages` patterns match, as pnpm finds them. |
333
+
334
+ The build writes three modules that app pages import, and does not add pages:
335
+
336
+ - `#build/runnable-tutorials.mjs` exports `runnableTutorials`: the files before step 1 and the files of each step.
337
+ - `#build/playground-templates.mjs` exports `playgroundTemplates`: the files of each example.
338
+ - `#build/learn-facts.mjs` exports `learnFacts`: the step count and reading time of each `layout: tutorial` and `layout: learn` page, by URL.
339
+
340
+ Their types and the browser helpers, such as `tutorialStepFiles()`, come from `@vite-hub/docs/runnable`.
341
+
342
+ `nuxt build` also writes a `node_modules` snapshot of each fixture to `/_tutorials/snapshots/<slug>.<hash>.<part>.bin` under the app base, so the workspace skips `npm install`. The snapshot holds the `dependencies` of the fixture, so the package that its `dev` script runs, such as `vite`, must be in `dependencies`. An example with the dependencies of a lesson uses the snapshot of that lesson. The npm lockfile `<fixture>.package-lock.json` beside each fixture pins the install. The build writes it when it is missing or no longer matches the dependencies: commit it. `nuxi prepare` never builds snapshots. `nuxt dev` reuses the last ones while the dependencies match, and builds them with `TUTORIAL_SNAPSHOTS=1`. `TUTORIAL_SNAPSHOTS=0` skips them in a build, and the workspace runs `npm install`. An app page that boots a WebContainer needs cross-origin isolation: list its routes in `vitehub.webContainer.routes`. Workspace pages get theirs from the module.
343
+
186
344
  ## Customize
187
345
 
188
346
  Most changes are options in `nuxt.config.ts`:
@@ -190,7 +348,7 @@ Most changes are options in `nuxt.config.ts`:
190
348
  | Option | Default | Use |
191
349
  | --- | --- | --- |
192
350
  | `dir` | `content` | Folder of Markdown pages. |
193
- | `base` | `/docs`, or `/` without a `docs/` folder | URL prefix whose folders are sections. |
351
+ | `base` | `/docs`, or `/` without a `docs/` folder in `dir` | URL prefix whose folders are sections. With `sources`, the default is always `/docs`. If all pages are outside the default base, setup warns with `DOCS_BASE_EMPTY`. Set `base: '/docs'` to keep them standalone without the warning. |
194
352
  | `site` | `{ name: "Docs" }` | `name`, `url` (canonical origin), `description`, `logo`, `badge` (`{ label, tooltip }`). A `logo` path is a one-color SVG that the theme fills with the text color. `{ light, dark }` shows a colored logo as it is, with `dark` in dark mode. |
195
353
  | `categories` | `[]` | Order of section categories in the rail and the catalog. |
196
354
  | `railExclude` | `[]` | Categories that the catalog lists but the rail leaves out. |
@@ -355,7 +513,7 @@ The module sets the `comments` option of `vite-hub/nuxt`, which turns on the Dat
355
513
  - `@` suggests the users of ViteHub Auth when the app has Auth, else the people who wrote in the threads.
356
514
  - The Console's Comments section lists the threads.
357
515
 
358
- Turn it off with `docs: { comments: false }`. An object goes to the `comments` option of `vite-hub/nuxt`, such as `{ database: "docs" }` or `{ overlay: false }`. A site without `vite-hub/nuxt` has no Comments; `comments: true` there fails the build with `DOCS_COMMENTS_VITEHUB_MISSING`.
516
+ Turn it off with `docs: { comments: false }`. The `comments` option of `vite-hub/nuxt` wins: when it turns Comments on, setup warns with `DOCS_COMMENTS_OFF_IGNORED`. An object goes to the `comments` option of `vite-hub/nuxt`, such as `{ database: "docs" }` or `{ overlay: false }`. A site without `vite-hub/nuxt` has no Comments; `comments: true` there fails the build with `DOCS_COMMENTS_VITEHUB_MISSING`.
359
517
 
360
518
  ## Docs assistant
361
519
 
@@ -1,5 +1,5 @@
1
1
  import { docsManifestPages } from "./navigation.js";
2
- import { t as docsErrorDiagnostics } from "./error-diagnostics-B_ZOy7kF.js";
2
+ import { t as docsErrorDiagnostics } from "./error-diagnostics-CmgtG9xa.js";
3
3
  import { n as readDocsFile, t as hasDocsFile } from "./files-UY4h1_36.js";
4
4
  import manifest from "#docs/manifest";
5
5
  //#region src/runtime/assistant-pages.ts
@@ -66,10 +66,10 @@ function docsPagesSource() {
66
66
  name: "docs-pages",
67
67
  materialize: "lazy",
68
68
  cache: false,
69
- getKeys: async () => (await import("./assistant-pages-BN7hNsSZ.js")).listDocsAssistantPagePaths(),
69
+ getKeys: async () => (await import("./assistant-pages-CqNlHsx-.js")).listDocsAssistantPagePaths(),
70
70
  getItem: async (key) => ({
71
71
  key,
72
- content: await (await import("./assistant-pages-BN7hNsSZ.js")).readDocsAssistantPage(key),
72
+ content: await (await import("./assistant-pages-CqNlHsx-.js")).readDocsAssistantPage(key),
73
73
  mediaType: "text/markdown"
74
74
  })
75
75
  });
@@ -1,4 +1,4 @@
1
- import { a as docsPageFromBody, i as docsPageContextKey, n as docsAssistantModel, o as docsRateLimit, r as docsInstructions, t as defineDocsAssistant } from "./assistant-shared-WzButktj.js";
1
+ import { a as docsPageFromBody, i as docsPageContextKey, n as docsAssistantModel, o as docsRateLimit, r as docsInstructions, t as defineDocsAssistant } from "./assistant-shared-DhiLHKSl.js";
2
2
  import { workspaceShell } from "@vite-hub/agent/capabilities";
3
3
  import { chatgpt } from "@vite-hub/gateways";
4
4
  //#region src/assistant-worker.ts
package/dist/assistant.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as docsPageFromBody, i as docsPageContextKey, o as docsRateLimit, r as docsInstructions, t as defineDocsAssistant } from "./assistant-shared-WzButktj.js";
1
+ import { a as docsPageFromBody, i as docsPageContextKey, o as docsRateLimit, r as docsInstructions, t as defineDocsAssistant } from "./assistant-shared-DhiLHKSl.js";
2
2
  import { chatgpt } from "@vite-hub/gateways";
3
3
  import { codexDriver } from "@vite-hub/agent";
4
4
  //#region src/assistant.ts
@@ -1,6 +1,6 @@
1
- import { docsManifestPages, docsRawPath, findDocsPage } from "./navigation.js";
1
+ import { docsAppPath, docsManifestPages, docsRawPath } from "./navigation.js";
2
2
  import { n as docsAgentPages, r as docsContentSource, t as docsAgentCopy } from "./agent-copy-xPaWye_g.js";
3
- import { i as docsMarkdown, n as docsDocumentOf, r as docsImageSizes, t as createDocsParser } from "./markdown-DUWnEMPp.js";
3
+ import { i as docsMarkdown, n as docsDocumentOf, r as docsImageSizes, t as createDocsParser } from "./markdown-1M1FbjCw.js";
4
4
  import { n as readDocsFile } from "./files-UY4h1_36.js";
5
5
  import "node:module";
6
6
  import { defu } from "defu";
@@ -40,6 +40,7 @@ const parseDocsDocument = createDocsParser(docsParserOptions);
40
40
  //#region src/runtime/content.ts
41
41
  var content_exports = /* @__PURE__ */ __exportAll({
42
42
  docsContent: () => docsContent,
43
+ docsMarkdownContent: () => docsMarkdownContent,
43
44
  readDocsPage: () => readDocsPage,
44
45
  readDocsRawCopy: () => readDocsRawCopy
45
46
  });
@@ -53,26 +54,65 @@ function bundledPages(base) {
53
54
  };
54
55
  }
55
56
  let content;
57
+ let rawPages;
58
+ function docsRawPage(path) {
59
+ rawPages ??= new Map(docsManifestPages(manifest).map((page) => [docsRawPath(page.path), page]));
60
+ return rawPages.get(path);
61
+ }
62
+ function docsSiteUrl(config) {
63
+ return `${config.site.url}${config.appBase.replace(/\/+$/, "")}`;
64
+ }
56
65
  /** The agent copy of a page from its file. The `rawMarkdown` option runs at build time, and the build keeps each page that it changed. */
57
66
  async function docsPageCopy(page, text, siteUrl) {
58
67
  const rewritten = await readDocsFile("docs-agent", `${docsContentSource(page)}/${page.file}`);
59
68
  return docsAgentCopy(manifest, page, rewritten === null ? text : String(rewritten), siteUrl);
60
69
  }
61
- /**
62
- * The agent copy at a raw path such as `/raw/docs/kv.md`, or null. Content finds a Source page by its URL only after it lists every file,
63
- * which costs a cold Worker about 250 ms on a large site. The manifest knows the file of each URL, so this reads the
64
- * one file and renders it with the copy that Content serves in `llms-full.txt` and the MCP server.
65
- */
66
- async function readDocsRawCopy(rawPath) {
67
- const path = rawPath.replace(/^\/raw/, "").replace(/\.md$/, "");
68
- const found = findDocsPage(manifest, path === "/index" ? "/" : path);
69
- if (!found || docsRawPath(found.page.path) !== rawPath) return null;
70
- const config = useRuntimeConfig().public.docs;
71
- const text = await readDocsFile(found.page.source ?? "docs", found.page.file);
70
+ async function readDocsPageCopy(page) {
71
+ const text = await readDocsFile(page.source ?? "docs", page.file);
72
72
  if (text === null) return null;
73
- const copy = await docsPageCopy(found.page, String(text), `${config.site.url}${config.appBase.replace(/\/+$/, "")}`);
73
+ const copy = await docsPageCopy(page, text, docsSiteUrl(useRuntimeConfig().public.docs));
74
74
  return `${copy.markdown}${copy.footer}`;
75
75
  }
76
+ /** Read an exact manifest URL without listing or parsing the Content Sources. */
77
+ async function readDocsRawCopy(pathname) {
78
+ const prefix = docsAppPath("/raw/", useRuntimeConfig().public.docs.appBase);
79
+ if (!pathname.startsWith(prefix)) return null;
80
+ let rawPath;
81
+ try {
82
+ rawPath = `/raw/${decodeURIComponent(pathname.slice(prefix.length))}`;
83
+ } catch (error) {
84
+ if (!(error instanceof URIError)) throw error;
85
+ return null;
86
+ }
87
+ const page = docsRawPage(rawPath);
88
+ return page ? await readDocsPageCopy(page) : null;
89
+ }
90
+ /** Use the manifest for canonical Docs twins and Content for other page lookups. */
91
+ function docsMarkdownContent(raw = false) {
92
+ const runtime = docsContent();
93
+ const base = useRuntimeConfig().public.docs.appBase.replace(/\/+$/, "");
94
+ const relativePath = (path) => base && path.startsWith(`${base}/`) ? path.slice(base.length) : path;
95
+ function twin(path) {
96
+ const relative = relativePath(path);
97
+ try {
98
+ return docsRawPage(`/raw${decodeURI(relative)}`);
99
+ } catch (error) {
100
+ if (!(error instanceof URIError)) throw error;
101
+ }
102
+ }
103
+ return {
104
+ seo: runtime.seo,
105
+ async markdown(path, options) {
106
+ if (raw) return await readDocsRawCopy(path);
107
+ const page = twin(path);
108
+ return page ? await readDocsPageCopy(page) : await runtime.markdown(path, options);
109
+ },
110
+ async hasMarkdown(path) {
111
+ const page = twin(path);
112
+ return page ? await readDocsFile(page.source ?? "docs", page.file) !== null : await runtime.hasMarkdown(path);
113
+ }
114
+ };
115
+ }
76
116
  /**
77
117
  * The docs pages as Content, parsed with the site's parser. The first read creates it. Each page has its URL from the
78
118
  * manifest, so Content serves the agent files: the `/raw/<page>.md` copies, `llms.txt`, `llms-full.txt`, `sitemap.md`,
@@ -80,7 +120,7 @@ async function readDocsRawCopy(rawPath) {
80
120
  */
81
121
  function docsContent() {
82
122
  const config = useRuntimeConfig().public.docs;
83
- const siteUrl = `${config.site.url}${config.appBase.replace(/\/+$/, "")}`;
123
+ const siteUrl = docsSiteUrl(config);
84
124
  if (content?.siteUrl === siteUrl) return content.runtime;
85
125
  const pages = docsAgentPages(manifest);
86
126
  const assets = new Map(docsManifestPages(manifest).map((page) => [docsContentSource(page), page.source ?? "docs"]));
@@ -1,6 +1,6 @@
1
1
  import { docsSectionForPath, findDocsPage, normalizeDocsPath } from "./navigation.js";
2
- import { i as docsPageSchema, t as docsFrontmatter } from "./schema-DwpXW0VZ.js";
3
- import { i as docsPageResponse, n as docsPageOf } from "./page-GPt09oex.js";
2
+ import { i as docsPageSchema, t as docsFrontmatter } from "./schema-DcWZ3Q3M.js";
3
+ import { i as docsPageResponse, n as docsPageOf } from "./page-Bb0TfRKi.js";
4
4
  //#region src/draft.ts
5
5
  /**
6
6
  * The draft of the page at `path`, parsed like a published page, or null when the request shows the published file.
@@ -11,10 +11,18 @@ const docsErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
11
11
  why: ({ path }) => `[@vite-hub/docs] The docs assistant's Workspace has no page at ${path}. The pages changed after the Workspace listed them.`,
12
12
  fix: "Ask the question again. The next Invocation lists the current pages."
13
13
  },
14
+ DOCS_BASE_EMPTY: {
15
+ why: ({ base, path }) => `[@vite-hub/docs] With docs.sources, the docs base defaults to ${base}. No page is at or below it, so pages such as ${path} render as standalone articles.`,
16
+ fix: "To show sections, set `docs: { base: '/' }` in nuxt.config.ts or mount the pages at `/docs`. To keep the pages standalone, set `docs: { base: '/docs' }`."
17
+ },
14
18
  DOCS_COMMENTS_DATABASE_OFF: {
15
19
  why: "[@vite-hub/docs] Docs sites on vite-hub/nuxt have Comments on, which keeps threads in the Database, but vitehub sets database: false.",
16
20
  fix: "Remove `database: false` from the `vitehub` options in nuxt.config.ts, or set `docs: { comments: false }`."
17
21
  },
22
+ DOCS_COMMENTS_OFF_IGNORED: {
23
+ why: "[@vite-hub/docs] docs.comments is false, but the vitehub options turn Comments on, and they win. Comments stay on.",
24
+ fix: "Remove `comments: false` from the `docs` options in nuxt.config.ts. To turn Comments off, set `comments: false` in the `vitehub` options."
25
+ },
18
26
  DOCS_COMMENTS_PACKAGE_MISSING: {
19
27
  why: "[@vite-hub/docs] Docs sites on vite-hub/nuxt have Comments on, which needs @vite-hub/comments.",
20
28
  fix: "Run `pnpm add @vite-hub/comments`, or set `docs: { comments: false }` in nuxt.config.ts."
@@ -43,6 +51,38 @@ const docsErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
43
51
  why: ({ problems }) => `Docs redirects break links:\n${problems.map((problem) => `- ${problem}`).join("\n")}`,
44
52
  fix: "Point each redirect route rule that the message lists to a docs page, or remove the rule when the page that it hides still exists."
45
53
  },
54
+ DOCS_RUNNABLE_CATALOG_VERSION_MISSING: {
55
+ why: ({ catalog, name }) => `[@vite-hub/docs] A fixture of docs.runnable uses catalog:, but the pnpm catalog "${catalog}" has no version of ${name}.`,
56
+ fix: "Set `docs.runnable.pnpmWorkspace` to the folder of pnpm-workspace.yaml, and add the package to the catalog that the specifier names."
57
+ },
58
+ DOCS_RUNNABLE_DEV_SERVER_MISSING: {
59
+ why: ({ fixture, name }) => `[@vite-hub/docs] The dev script of the fixture ${fixture} runs ${name}, but ${name} is in devDependencies. The snapshot of docs.runnable installs dependencies only, so the workspace cannot start.`,
60
+ fix: "Move the package that the message names from `devDependencies` to `dependencies` in the package.json of the fixture."
61
+ },
62
+ DOCS_RUNNABLE_FIXTURE_FILE_MISSING: {
63
+ why: ({ fixture, label, page }) => `[@vite-hub/docs] ${page} shows ${label}, but the fixture ${fixture} has no such file.`,
64
+ fix: "Add the file to the fixture folder, or correct the label of the code block in the lesson page."
65
+ },
66
+ DOCS_RUNNABLE_PACK_FAILED: {
67
+ why: ({ name }) => `[@vite-hub/docs] pnpm pack wrote no tarball for ${name}, so the snapshot of docs.runnable cannot install it.`,
68
+ fix: "Run `pnpm pack` in the folder of the package that the message names, and fix the error that it shows."
69
+ },
70
+ DOCS_RUNNABLE_PAGE_MISSING: {
71
+ why: ({ page }) => `[@vite-hub/docs] docs.runnable names the page ${page}, but the docs site has no page at that URL.`,
72
+ fix: "Set `page` of the lesson, or `docs.runnable.start`, to the URL of a docs page, such as `/docs/getting-started/first-agent`."
73
+ },
74
+ DOCS_RUNNABLE_STEPS_MISSING: {
75
+ why: ({ page }) => `[@vite-hub/docs] ${page} has no ::tutorial-step blocks, so docs.runnable cannot build its lesson.`,
76
+ fix: "Add `::tutorial-step{title=\"...\"}` blocks to the lesson page, or remove the lesson from `docs.runnable.lessons`."
77
+ },
78
+ DOCS_RUNNABLE_TITLE_MISSING: {
79
+ why: ({ block }) => `[@vite-hub/docs] A ::tutorial-step block has no title: ${block}`,
80
+ fix: "Give the block a title, such as `::tutorial-step{title=\"Add the route\"}`."
81
+ },
82
+ DOCS_RUNNABLE_WORKSPACE_PACKAGE_MISSING: {
83
+ why: ({ name }) => `[@vite-hub/docs] A fixture of docs.runnable uses workspace:, but the pnpm workspace has no package named ${name}.`,
84
+ fix: "Set `docs.runnable.pnpmWorkspace` to the folder of pnpm-workspace.yaml, and check that its `packages` patterns include the package."
85
+ },
46
86
  DOCS_SEO_DESCRIPTION_INVALID: {
47
87
  why: ({ problems }) => `Docs pages have no description, one of the wrong length, or the description of another page:\n${problems.map((problem) => `- ${problem}`).join("\n")}`,
48
88
  fix: "Set `description` in the frontmatter of each page that the message lists, with 70 to 160 characters, and give each page its own."
@@ -86,6 +126,30 @@ const docsErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
86
126
  DOCS_SOURCE_MOUNT_INVALID: {
87
127
  why: ({ mount }) => `Invalid docs source mount: ${mount}`,
88
128
  fix: "Set the `mount` of the docs source to a URL path such as `/guide`, without `.`, `..`, `?`, `#`, or backslash segments."
129
+ },
130
+ DOCS_WORKSPACE_DIR_MISSING: {
131
+ why: ({ dir, page }) => `The docs page ${page} runs the folder ${dir}, which does not exist.`,
132
+ fix: "Set `dir` of each example in `examples` to a folder of the app relative to the app root, or set `fixture` of a learn page to a folder in the `docs.runnable.fixtures` folder (`fixtures` by default)."
133
+ },
134
+ DOCS_WORKSPACE_ID_COLLISION: {
135
+ why: ({ id, owners }) => `${owners.join(" and ")} get the same workspace id ${id}, so their lessons, examples, or snapshots would overwrite each other.`,
136
+ fix: "Rename a page, or change the `slug` of a lesson or the `id` of an example in `docs.runnable`. A page's id is its path in lower case with each run of other characters as `-`, so `/docs/a/b` and `/docs/a-b` are both `docs-a-b`, and its examples are `<page id>--<example id>`. An example `kv` also takes the snapshot id `playground-kv`."
137
+ },
138
+ DOCS_WORKSPACE_READONLY_MISSING: {
139
+ why: ({ dir, example, page, path }) => `The example ${example} of the docs page ${page} marks ${path} read-only, but ${dir} has no text file at that path.`,
140
+ fix: "Set each path in `readonly` to a text file of the example's `dir`, relative to that folder, such as `model.ts`. Binary files, such as `weights.bin`, are never editable, so leave them out."
141
+ },
142
+ DOCS_WORKSPACE_RENDER_MISSING: {
143
+ why: ({ file, page }) => `The docs page ${page} renders with ${file}, which does not exist.`,
144
+ fix: "Set `render` to a module relative to the app root, such as `app/playground/render.ts`, whose default export takes the files and returns `{ html }`."
145
+ },
146
+ DOCS_WORKSPACE_TAB_MISSING: {
147
+ why: ({ file, page, tab }) => `The docs page ${page} has the tab \`${tab}\`, but ${file} does not exist.`,
148
+ fix: "Add the component that draws the tab, or remove the tab from `tabs`. The tab `messages` renders `app/components/playground/PlaygroundTabMessages.vue`, which reads the workspace with `useWorkspace()`."
149
+ },
150
+ DOCS_WORKSPACE_VITEHUB_MISSING: {
151
+ why: ({ pages }) => `[@vite-hub/docs] These pages run apps in a WebContainer, which needs vite-hub/nuxt for cross-origin isolation: ${pages.join(", ")}.`,
152
+ fix: "Add `vite-hub/nuxt` and `@vite-hub/web-container` to the app, or give each playground page a `render` module, which runs without a WebContainer."
89
153
  }
90
154
  }
91
155
  });
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { a as DocsSection, c as DocsPageFile, d as DocsSectionFile, f as docsLayouts, g as expandDottedKeys, h as docsSectionSchema, i as DocsSearchSection, l as DocsPageFrontmatter, m as docsPageSchema, n as DocsManifest, o as DocsTocLink, p as docsPageFields, r as DocsPage, s as DocsLayout, t as DocsAppPage, u as DocsPageNavigation } from "./types-BhG6vGfG.js";
2
- import { i as DocsDocument, n as DocsPageResponse, t as DocsPageLink } from "./page-Dx2JD3y1.js";
3
- import { a as DocsPublicConfig, n as DocsLogo, o as DocsSiteOptions, r as DocsModuleOptions, s as DocsStartOptions } from "./nuxt-CAGpKl_-.js";
4
- import { i as DocsSourceInput, r as DocsSource, t as DocsContentSource } from "./manifest-CMoxcwPm.js";
5
- import { DocsCatalogGroup, DocsGroup, DocsIcons, DocsLink, DocsMarkdownLinks, DocsPanelLoaders, DocsRailEntry, DocsSidebarGroup, DocsSidebarSection, DocsSidebarSectionBlock, docsCatalog, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageIcon, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRawPath, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionIcon, docsSidebarCollapses, docsSidebarGroups, docsSidebarSections, docsTutorialNavigationCookie, findDocsPage, normalizeDocsBase, normalizeDocsPath } from "./navigation.js";
1
+ import { _ as docsPageFields, a as DocsSearchSection, b as expandDottedKeys, d as DocsPageFrontmatter, f as DocsPageNavigation, g as docsLayouts, h as DocsSectionFile, i as DocsPageWorkspace, l as DocsLayout, m as DocsPlaygroundTab, n as DocsManifest, o as DocsSection, p as DocsPlaygroundExample, r as DocsPage, s as DocsTocLink, t as DocsAppPage, u as DocsPageFile, v as docsPageSchema, y as docsSectionSchema } from "./types-CHU_fy9l.js";
2
+ import { t as DocsDocument } from "./markdown-BiKrT08O.js";
3
+ import { n as DocsPageResponse, t as DocsPageLink } from "./page-BryUCmYf.js";
4
+ import { a as DocsPublicConfig, d as DocsRunnableOptions, l as DocsRunnableExample, n as DocsLogo, o as DocsSiteOptions, r as DocsModuleOptions, s as DocsStartOptions, u as DocsRunnableLesson } from "./nuxt-8O2OB_hI.js";
5
+ import { i as DocsSourceInput, r as DocsSource, t as DocsContentSource } from "./manifest-Drbdw1us.js";
6
+ import { DocsCatalogGroup, DocsGroup, DocsIcons, DocsLink, DocsMarkdownLinks, DocsPanelLoaders, DocsRailEntry, DocsSidebarGroup, DocsSidebarSection, DocsSidebarSectionBlock, docsCatalog, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageIcon, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRawPath, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionIcon, docsSidebarCollapses, docsSidebarGroups, docsSidebarSections, docsTutorialNavigationCookie, findDocsPage, isDocsWorkspaceLayout, normalizeDocsBase, normalizeDocsPath } from "./navigation.js";
6
7
  import { ContentLabel, DocumentsDefinition } from "@vite-hub/content";
7
8
  //#region src/collection.d.ts
8
9
  interface DocsCollectionOptions {
@@ -25,4 +26,4 @@ interface DocsCollectionOptions {
25
26
  */
26
27
  export declare function docsCollection(options?: DocsCollectionOptions): DocumentsDefinition<typeof docsPageFields>;
27
28
  //#endregion
28
- export { type DocsAppPage, type DocsCatalogGroup, type DocsCollectionOptions, type DocsContentSource, type DocsDocument, type DocsGroup, type DocsIcons, type DocsLayout, type DocsLink, type DocsLogo, type DocsManifest, type DocsMarkdownLinks, type DocsModuleOptions, type DocsPage, type DocsPageFile, type DocsPageFrontmatter, type DocsPageLink, type DocsPageNavigation, type DocsPageResponse, type DocsPanelLoaders, type DocsPublicConfig, type DocsRailEntry, type DocsSearchSection, type DocsSection, type DocsSectionFile, type DocsSidebarGroup, type DocsSidebarSection, type DocsSidebarSectionBlock, type DocsSiteOptions, type DocsSource, type DocsSourceInput, type DocsStartOptions, type DocsTocLink, docsCatalog, docsLayouts, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageFields, docsPageIcon, docsPageSchema, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRawPath, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionIcon, docsSectionSchema, docsSidebarCollapses, docsSidebarGroups, docsSidebarSections, docsTutorialNavigationCookie, expandDottedKeys, findDocsPage, normalizeDocsBase, normalizeDocsPath };
29
+ export { type DocsAppPage, type DocsCatalogGroup, type DocsCollectionOptions, type DocsContentSource, type DocsDocument, type DocsGroup, type DocsIcons, type DocsLayout, type DocsLink, type DocsLogo, type DocsManifest, type DocsMarkdownLinks, type DocsModuleOptions, type DocsPage, type DocsPageFile, type DocsPageFrontmatter, type DocsPageLink, type DocsPageNavigation, type DocsPageResponse, type DocsPageWorkspace, type DocsPanelLoaders, type DocsPlaygroundExample, type DocsPlaygroundTab, type DocsPublicConfig, type DocsRailEntry, type DocsRunnableExample, type DocsRunnableLesson, type DocsRunnableOptions, type DocsSearchSection, type DocsSection, type DocsSectionFile, type DocsSidebarGroup, type DocsSidebarSection, type DocsSidebarSectionBlock, type DocsSiteOptions, type DocsSource, type DocsSourceInput, type DocsStartOptions, type DocsTocLink, docsCatalog, docsLayouts, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageFields, docsPageIcon, docsPageSchema, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRawPath, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionIcon, docsSectionSchema, docsSidebarCollapses, docsSidebarGroups, docsSidebarSections, docsTutorialNavigationCookie, expandDottedKeys, findDocsPage, isDocsWorkspaceLayout, normalizeDocsBase, normalizeDocsPath };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { docsCatalog, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageIcon, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRawPath, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionIcon, docsSidebarCollapses, docsSidebarGroups, docsSidebarSections, docsTutorialNavigationCookie, findDocsPage, normalizeDocsBase, normalizeDocsPath } from "./navigation.js";
2
- import { a as docsSectionSchema, i as docsPageSchema, n as docsLayouts, o as expandDottedKeys, r as docsPageFields } from "./schema-DwpXW0VZ.js";
3
- import { r as docsPagePath } from "./page-GPt09oex.js";
1
+ import { docsCatalog, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageIcon, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRawPath, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionIcon, docsSidebarCollapses, docsSidebarGroups, docsSidebarSections, docsTutorialNavigationCookie, findDocsPage, isDocsWorkspaceLayout, normalizeDocsBase, normalizeDocsPath } from "./navigation.js";
2
+ import { a as docsSectionSchema, i as docsPageSchema, n as docsLayouts, o as expandDottedKeys, r as docsPageFields } from "./schema-DcWZ3Q3M.js";
3
+ import { r as docsPagePath } from "./page-Bb0TfRKi.js";
4
4
  import { documents } from "@vite-hub/content/collections";
5
5
  //#region src/collection.ts
6
6
  /**
@@ -24,4 +24,4 @@ function docsCollection(options = {}) {
24
24
  });
25
25
  }
26
26
  //#endregion
27
- export { docsCatalog, docsCollection, docsLayouts, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageFields, docsPageIcon, docsPageSchema, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRawPath, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionIcon, docsSectionSchema, docsSidebarCollapses, docsSidebarGroups, docsSidebarSections, docsTutorialNavigationCookie, expandDottedKeys, findDocsPage, normalizeDocsBase, normalizeDocsPath };
27
+ export { docsCatalog, docsCollection, docsLayouts, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageFields, docsPageIcon, docsPageSchema, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRawPath, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionIcon, docsSectionSchema, docsSidebarCollapses, docsSidebarGroups, docsSidebarSections, docsTutorialNavigationCookie, expandDottedKeys, findDocsPage, isDocsWorkspaceLayout, normalizeDocsBase, normalizeDocsPath };
@@ -1,5 +1,5 @@
1
1
  import { docsAppPath } from "./navigation.js";
2
- import { r as docsRedirects } from "./redirects-CmR1yu5A.js";
2
+ import { r as docsRedirects } from "./redirects-BJj58IsY.js";
3
3
  import { defineNuxtModule } from "@nuxt/kit";
4
4
  //#region src/link-checker-redirects.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { d as DocsSectionFile, n as DocsManifest } from "./types-BhG6vGfG.js";
1
+ import { h as DocsSectionFile, n as DocsManifest } from "./types-CHU_fy9l.js";
2
2
  import "nostics";
3
3
  import { ContentCheckOptions, ContentRuntime } from "@vite-hub/content";
4
4
  import { Source } from "@vite-hub/source";