@vite-hub/docs 0.5.0 → 0.5.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 (61) hide show
  1. package/README.md +3 -1
  2. package/dist/{agent-copy-xPaWye_g.js → agent-copy-CY9_RkHN.js} +2 -3
  3. package/dist/{assistant-pages-CqNlHsx-.js → assistant-pages-BbWfd69g.js} +3 -4
  4. package/dist/{assistant-shared-CWIKRtBv.d.ts → assistant-shared-BWeRcmVS.d.ts} +0 -2
  5. package/dist/{assistant-shared-DhiLHKSl.js → assistant-shared-JcfjK-qg.js} +3 -4
  6. package/dist/assistant-worker.d.ts +1 -3
  7. package/dist/assistant-worker.js +2 -3
  8. package/dist/assistant.d.ts +1 -3
  9. package/dist/assistant.js +2 -3
  10. package/dist/{content-BQVlMshL.js → content-C_WXjV3y.js} +7 -15
  11. package/dist/{draft-CSsTYSeb.js → draft-rOGhtXch.js} +3 -4
  12. package/dist/{error-diagnostics-CmgtG9xa.js → error-diagnostics-Daz9oBJS.js} +1 -2
  13. package/dist/{files-UY4h1_36.js → files-BBoAGhhM.js} +1 -2
  14. package/dist/index.d.ts +5 -7
  15. package/dist/index.js +3 -4
  16. package/dist/link-checker-redirects.d.ts +0 -2
  17. package/dist/link-checker-redirects.js +2 -3
  18. package/dist/{manifest-DvECmwX-.js → manifest-Bti_WxDZ.js} +5 -7
  19. package/dist/{manifest-Drbdw1us.d.ts → manifest-DJ2DyNue.d.ts} +1 -5
  20. package/dist/{markdown-BiKrT08O.d.ts → markdown-B97RuMXs.d.ts} +1 -3
  21. package/dist/{markdown-1M1FbjCw.js → markdown-BzZkYb24.js} +2 -3
  22. package/dist/navigation.d.ts +2 -4
  23. package/dist/navigation.js +1 -2
  24. package/dist/{nuxt-8O2OB_hI.d.ts → nuxt-CYAIBEHE.d.ts} +3 -13
  25. package/dist/nuxt.d.ts +2 -2
  26. package/dist/nuxt.js +43 -57
  27. package/dist/{page-BryUCmYf.d.ts → page-B8_70-5D.d.ts} +2 -4
  28. package/dist/{page-Bb0TfRKi.js → page-DWsretqk.js} +1 -2
  29. package/dist/primitive-rail.d.ts +0 -6
  30. package/dist/primitive-rail.js +3 -6
  31. package/dist/{raw-BChwipz_.js → raw-CQukuLuj.js} +1 -2
  32. package/dist/{redirects-BJj58IsY.js → redirects-BEFu4KLR.js} +2 -3
  33. package/dist/runnable.d.ts +2 -6
  34. package/dist/runnable.js +2 -3
  35. package/dist/runtime/server/llms.d.ts +0 -2
  36. package/dist/runtime/server/llms.js +2 -3
  37. package/dist/runtime/server/markdown.d.ts +0 -2
  38. package/dist/runtime/server/markdown.js +3 -4
  39. package/dist/runtime/server/mcp.d.ts +0 -2
  40. package/dist/runtime/server/mcp.js +2 -3
  41. package/dist/runtime/server/page.d.ts +1 -3
  42. package/dist/runtime/server/page.js +4 -5
  43. package/dist/runtime/server/raw.d.ts +0 -2
  44. package/dist/runtime/server/raw.js +2 -3
  45. package/dist/runtime/server/search.d.ts +1 -3
  46. package/dist/runtime/server/search.js +3 -4
  47. package/dist/runtime/server/sitemap.d.ts +0 -2
  48. package/dist/runtime/server/sitemap.js +3 -5
  49. package/dist/runtime/server/trailing-slash.d.ts +0 -2
  50. package/dist/runtime/server/trailing-slash.js +1 -2
  51. package/dist/{schema-DcWZ3Q3M.js → schema-CmSiwC4t.js} +1 -2
  52. package/dist/server.d.ts +3 -5
  53. package/dist/server.js +4 -4
  54. package/dist/{steps-DBlkJwtD.d.ts → steps-C3tGwhNK.d.ts} +1 -3
  55. package/dist/{steps-DF-11dJn.js → steps-muDP1nYT.js} +1 -2
  56. package/dist/{theme-BXyu4uFL.d.ts → theme-CgJRnVdT.d.ts} +0 -4
  57. package/dist/{theme-DzC8LtMH.js → theme-CxBzPBZ9.js} +2 -4
  58. package/dist/theme.d.ts +1 -1
  59. package/dist/theme.js +1 -2
  60. package/dist/{types-CHU_fy9l.d.ts → types-B6YlHil4.d.ts} +0 -4
  61. package/package.json +35 -34
package/README.md CHANGED
@@ -463,6 +463,8 @@ The design follows the comark-ui site on top of the ViteHub design system (`@vit
463
463
  - `app.config.ts` `ui` keys. Your values win over the design. The design wins over the Nuxt UI defaults, also when `@nuxt/ui` comes first in `modules`.
464
464
  - CSS variables in your stylesheet, such as `--vh-content-width` (prose width), `--vh-toc-width`, `--vh-panel-width`, `--vh-grain` (`none` turns the grain off), `--font-sans`, and the Nuxt UI `--ui-*` colors.
465
465
 
466
+ If a font provider fails, the build reports the error and continues. The browser can use the fallback fonts. To fail the build instead, set `fonts.throwOnError: true` in `nuxt.config.ts`.
467
+
466
468
  In an app with its own `app.vue`, the theme stays on the docs pages:
467
469
 
468
470
  - The theme's CSS applies below the `vh-docs` class. The docs layouts put it on `<html>` on docs pages only.
@@ -520,7 +522,7 @@ Turn it off with `docs: { comments: false }`. The `comments` option of `vite-hub
520
522
  The docs assistant answers reader questions from your pages and links the pages that it used. It is a ViteHub Agent preset, `docsAssistant`. By default it runs on your ChatGPT plan, so you need no API key: with Codex on Node.js, and with a model-backed Driver in a Cloudflare Worker build.
521
523
 
522
524
  ```sh
523
- pnpm add vite-hub @vite-hub/agent @vite-hub/workflow @vite-hub/connections @vite-hub/database drizzle-orm@1.0.0-rc.5 @openai/codex
525
+ pnpm add vite-hub @vite-hub/agent @vite-hub/workflow @vite-hub/connections @vite-hub/database drizzle-orm@1.0.0-rc.6 @openai/codex
524
526
  ```
525
527
 
526
528
  ```ts
@@ -1,6 +1,6 @@
1
1
  import { docsManifestPages, docsRawSectionLinks } from "./navigation.js";
2
- import { t as toRawMarkdown } from "./raw-BChwipz_.js";
3
- //#region src/agent-copy.ts
2
+ import { t as toRawMarkdown } from "./raw-CQukuLuj.js";
3
+ // src/agent-copy.ts
4
4
  /**
5
5
  * The copy of a page that agents read at `/raw/<page>.md`: the source as plain Markdown with absolute links, then the
6
6
  * links of its section. `siteUrl` is the public origin with the app base, such as `https://docs.example.com/portal`.
@@ -29,5 +29,4 @@ function docsAgentPages(manifest) {
29
29
  }
30
30
  return sources;
31
31
  }
32
- //#endregion
33
32
  export { docsAgentPages as n, docsContentSource as r, docsAgentCopy as t };
@@ -1,8 +1,8 @@
1
+ import { t as docsErrorDiagnostics } from "./error-diagnostics-Daz9oBJS.js";
1
2
  import { docsManifestPages } from "./navigation.js";
2
- import { t as docsErrorDiagnostics } from "./error-diagnostics-CmgtG9xa.js";
3
- import { n as readDocsFile, t as hasDocsFile } from "./files-UY4h1_36.js";
3
+ import { n as readDocsFile, t as hasDocsFile } from "./files-BBoAGhhM.js";
4
4
  import manifest from "#docs/manifest";
5
- //#region src/runtime/assistant-pages.ts
5
+ // src/runtime/assistant-pages.ts
6
6
  /**
7
7
  * The Workspace path of a page: its URL path as a Markdown file, and `index.md` for a folder page. The assistant's rules
8
8
  * turn a path back into the URL, so `docs/guide/setup.md` is `/docs/guide/setup`, whatever the source and mount of the page.
@@ -33,5 +33,4 @@ async function readDocsAssistantPage(path) {
33
33
  if (text === null) throw docsErrorDiagnostics.DOCS_ASSISTANT_PAGE_MISSING({ path });
34
34
  return text;
35
35
  }
36
- //#endregion
37
36
  export { listDocsAssistantPagePaths, readDocsAssistantPage };
@@ -2,7 +2,6 @@ import { RateLimitIdentity } from "@vite-hub/agent/capabilities";
2
2
  import { AgentCapabilityDefinition, WorkspaceAgentDefinition } from "@vite-hub/agent";
3
3
  import { RateLimitPolicy } from "@vite-hub/rate-limit";
4
4
  import "@vite-hub/workspace";
5
- //#region src/assistant-shared.d.ts
6
5
  /** Invocation context key that holds the path of the page the reader has open. */
7
6
  declare const docsPageContextKey = "docsPage";
8
7
  /** Returns the page path from a chat request body, or an empty string when it is missing or not a plain path. */
@@ -24,5 +23,4 @@ interface DocsRateLimitOptions {
24
23
  * memory: they reset on restart and do not span processes.
25
24
  */
26
25
  declare function docsRateLimit(options?: DocsRateLimitOptions): AgentCapabilityDefinition;
27
- //#endregion
28
26
  export { docsRateLimit as i, docsPageContextKey as n, docsPageFromBody as r, DocsRateLimitOptions as t };
@@ -5,7 +5,7 @@ import { webChat } from "@vite-hub/agent/channels";
5
5
  import { createRateLimiter } from "@vite-hub/rate-limit";
6
6
  import { memoryRateLimitDriver } from "@vite-hub/rate-limit/drivers/memory";
7
7
  import { custom } from "@vite-hub/workspace";
8
- //#region src/assistant-shared.ts
8
+ // src/assistant-shared.ts
9
9
  /** Invocation context key that holds the path of the page the reader has open. */
10
10
  const docsPageContextKey = "docsPage";
11
11
  const docsRules = `You answer questions from readers of this documentation site.
@@ -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-CqNlHsx-.js")).listDocsAssistantPagePaths(),
69
+ getKeys: async () => (await import("./assistant-pages-BbWfd69g.js")).listDocsAssistantPagePaths(),
70
70
  getItem: async (key) => ({
71
71
  key,
72
- content: await (await import("./assistant-pages-CqNlHsx-.js")).readDocsAssistantPage(key),
72
+ content: await (await import("./assistant-pages-BbWfd69g.js")).readDocsAssistantPage(key),
73
73
  mediaType: "text/markdown"
74
74
  })
75
75
  });
@@ -109,5 +109,4 @@ function defineDocsAssistant(driver, capabilities = []) {
109
109
  }
110
110
  });
111
111
  }
112
- //#endregion
113
112
  export { docsPageFromBody as a, docsPageContextKey as i, docsAssistantModel as n, docsRateLimit as o, docsInstructions as r, defineDocsAssistant as t };
@@ -1,11 +1,9 @@
1
- import { i as docsRateLimit, n as docsPageContextKey, r as docsPageFromBody, t as DocsRateLimitOptions } from "./assistant-shared-CWIKRtBv.js";
1
+ import { i as docsRateLimit, n as docsPageContextKey, r as docsPageFromBody, t as DocsRateLimitOptions } from "./assistant-shared-BWeRcmVS.js";
2
2
  import { WorkspaceAgentDefinition } from "@vite-hub/agent";
3
- //#region src/assistant-worker.d.ts
4
3
  /**
5
4
  * The docs assistant in a Worker build: the `docsAssistant` of Node.js with a model-backed Driver on the same ChatGPT
6
5
  * plan, because a Worker cannot start Codex. The model reads the pages with the read-only Workspace shell, which
7
6
  * Codex does not need: it has its own.
8
7
  */
9
8
  export declare const docsAssistant: WorkspaceAgentDefinition;
10
- //#endregion
11
9
  export { type DocsRateLimitOptions, docsPageContextKey, docsPageFromBody, docsRateLimit };
@@ -1,7 +1,7 @@
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";
1
+ import { a as docsPageFromBody, i as docsPageContextKey, n as docsAssistantModel, o as docsRateLimit, r as docsInstructions, t as defineDocsAssistant } from "./assistant-shared-JcfjK-qg.js";
2
2
  import { workspaceShell } from "@vite-hub/agent/capabilities";
3
3
  import { chatgpt } from "@vite-hub/gateways";
4
- //#region src/assistant-worker.ts
4
+ // src/assistant-worker.ts
5
5
  /**
6
6
  * The docs assistant in a Worker build: the `docsAssistant` of Node.js with a model-backed Driver on the same ChatGPT
7
7
  * plan, because a Worker cannot start Codex. The model reads the pages with the read-only Workspace shell, which
@@ -12,5 +12,4 @@ const docsAssistant = defineDocsAssistant({
12
12
  gateway: chatgpt(),
13
13
  instructions: docsInstructions
14
14
  }, [workspaceShell()]);
15
- //#endregion
16
15
  export { docsAssistant, docsPageContextKey, docsPageFromBody, docsRateLimit };
@@ -1,6 +1,5 @@
1
- import { i as docsRateLimit, n as docsPageContextKey, r as docsPageFromBody, t as DocsRateLimitOptions } from "./assistant-shared-CWIKRtBv.js";
1
+ import { i as docsRateLimit, n as docsPageContextKey, r as docsPageFromBody, t as DocsRateLimitOptions } from "./assistant-shared-BWeRcmVS.js";
2
2
  import { WorkspaceAgentDefinition } from "@vite-hub/agent";
3
- //#region src/assistant.d.ts
4
3
  /**
5
4
  * The docs assistant: a ViteHub Agent that answers from the site's Markdown pages, on the site owner's ChatGPT plan
6
5
  * through the `chatgpt` Connection, so no API key is needed.
@@ -10,5 +9,4 @@ import { WorkspaceAgentDefinition } from "@vite-hub/agent";
10
9
  * `defineAgent({ extends: docsAssistant, ... })` to change any part.
11
10
  */
12
11
  export declare const docsAssistant: WorkspaceAgentDefinition;
13
- //#endregion
14
12
  export { type DocsRateLimitOptions, docsPageContextKey, docsPageFromBody, docsRateLimit };
package/dist/assistant.js CHANGED
@@ -1,7 +1,7 @@
1
- import { a as docsPageFromBody, i as docsPageContextKey, o as docsRateLimit, r as docsInstructions, t as defineDocsAssistant } from "./assistant-shared-DhiLHKSl.js";
1
+ import { a as docsPageFromBody, i as docsPageContextKey, o as docsRateLimit, r as docsInstructions, t as defineDocsAssistant } from "./assistant-shared-JcfjK-qg.js";
2
2
  import { chatgpt } from "@vite-hub/gateways";
3
3
  import { codexDriver } from "@vite-hub/agent";
4
- //#region src/assistant.ts
4
+ // src/assistant.ts
5
5
  /**
6
6
  * The docs assistant: a ViteHub Agent that answers from the site's Markdown pages, on the site owner's ChatGPT plan
7
7
  * through the `chatgpt` Connection, so no API key is needed.
@@ -15,5 +15,4 @@ const docsAssistant = defineDocsAssistant(codexDriver({
15
15
  permissions: "allow-edits-unattended",
16
16
  instructions: docsInstructions
17
17
  }));
18
- //#endregion
19
18
  export { docsAssistant, docsPageContextKey, docsPageFromBody, docsRateLimit };
@@ -1,7 +1,7 @@
1
+ import { n as docsAgentPages, r as docsContentSource, t as docsAgentCopy } from "./agent-copy-CY9_RkHN.js";
2
+ import { i as docsMarkdown, n as docsDocumentOf, r as docsImageSizes, t as createDocsParser } from "./markdown-BzZkYb24.js";
1
3
  import { docsAppPath, docsManifestPages, docsRawPath } from "./navigation.js";
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-1M1FbjCw.js";
4
- import { n as readDocsFile } from "./files-UY4h1_36.js";
4
+ import { n as readDocsFile } from "./files-BBoAGhhM.js";
5
5
  import "node:module";
6
6
  import { defu } from "defu";
7
7
  import { contentSource, defineContent } from "@vite-hub/content";
@@ -11,7 +11,7 @@ import { useRuntimeConfig } from "nitro/runtime-config";
11
11
  import examples from "#docs/example-sources";
12
12
  import imageSizes from "#docs/image-sizes";
13
13
  import parser, { githubRepo } from "#docs/parser";
14
- //#region \0rolldown/runtime.js
14
+ // \0rolldown/runtime.js
15
15
  var __defProp = Object.defineProperty;
16
16
  var __exportAll = (all, no_symbols) => {
17
17
  let target = {};
@@ -22,8 +22,7 @@ var __exportAll = (all, no_symbols) => {
22
22
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
23
23
  return target;
24
24
  };
25
- //#endregion
26
- //#region src/runtime/documents.ts
25
+ // src/runtime/documents.ts
27
26
  const references = githubRepo ? { github: { references: { repo: githubRepo } } } : {};
28
27
  /**
29
28
  * The one parser configuration of the site. The runtime Content of the page route and search, drafts, and credits parse
@@ -36,14 +35,8 @@ const docsParserOptions = {
36
35
  plugins: [...parser.plugins ?? [], docsImageSizes(imageSizes)]
37
36
  };
38
37
  const parseDocsDocument = createDocsParser(docsParserOptions);
39
- //#endregion
40
- //#region src/runtime/content.ts
41
- var content_exports = /* @__PURE__ */ __exportAll({
42
- docsContent: () => docsContent,
43
- docsMarkdownContent: () => docsMarkdownContent,
44
- readDocsPage: () => readDocsPage,
45
- readDocsRawCopy: () => readDocsRawCopy
46
- });
38
+ // src/runtime/content.ts
39
+ var content_exports = /* @__PURE__ */ __exportAll({ docsMarkdownContent: () => docsMarkdownContent });
47
40
  /** One docs folder as a Content Source, from the production bundle or development server assets. */
48
41
  function bundledPages(base) {
49
42
  const read = (key) => readDocsFile(base, key);
@@ -177,5 +170,4 @@ async function readDocsPage(page) {
177
170
  const document = await docsContent().get(`${docsContentSource(page)}/${page.file}`, { fresh: import.meta.dev });
178
171
  return document ? docsDocumentOf(document) : null;
179
172
  }
180
- //#endregion
181
173
  export { parseDocsDocument as a, readDocsRawCopy as i, docsContent as n, readDocsPage as r, content_exports as t };
@@ -1,7 +1,7 @@
1
1
  import { docsSectionForPath, findDocsPage, normalizeDocsPath } from "./navigation.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
- //#region src/draft.ts
2
+ import { i as docsPageResponse, n as docsPageOf } from "./page-DWsretqk.js";
3
+ import { i as docsPageSchema, t as docsFrontmatter } from "./schema-CmSiwC4t.js";
4
+ // 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.
7
7
  * A preview frame shows the draft of its one document, also before the page is published. A preview cookie shows the
@@ -41,5 +41,4 @@ function pageId(manifest, path, section) {
41
41
  if (!section) return "";
42
42
  return path === section ? "index" : path.slice(section.length + 1);
43
43
  }
44
- //#endregion
45
44
  export { docsDraftResponse };
@@ -1,5 +1,5 @@
1
1
  import { defineDiagnostics } from "nostics";
2
- //#region src/error-diagnostics.ts
2
+ // src/error-diagnostics.ts
3
3
  const docsErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
4
4
  docsBase: "https://vitehub.dev/docs/docs-site/diagnostics",
5
5
  codes: {
@@ -153,5 +153,4 @@ const docsErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
153
153
  }
154
154
  }
155
155
  });
156
- //#endregion
157
156
  export { docsErrorDiagnostics as t };
@@ -1,5 +1,5 @@
1
1
  import files from "#docs/files";
2
- //#region src/runtime/files.ts
2
+ // src/runtime/files.ts
3
3
  const decoder = new TextDecoder();
4
4
  let unpacked;
5
5
  async function unpack(base64) {
@@ -34,5 +34,4 @@ async function readDocsFile(store, file) {
34
34
  const bytes = await (unpacked ??= unpack(files.packed));
35
35
  return decoder.decode(bytes.subarray(range[0], range[1]));
36
36
  }
37
- //#endregion
38
37
  export { readDocsFile as n, hasDocsFile as t };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
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";
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-B6YlHil4.js";
2
+ import { t as DocsDocument } from "./markdown-B97RuMXs.js";
3
+ import { n as DocsPageResponse, t as DocsPageLink } from "./page-B8_70-5D.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-CYAIBEHE.js";
6
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, isDocsWorkspaceLayout, normalizeDocsBase, normalizeDocsPath } from "./navigation.js";
6
+ import { i as DocsSourceInput, r as DocsSource, t as DocsContentSource } from "./manifest-DJ2DyNue.js";
7
7
  import { ContentLabel, DocumentsDefinition } from "@vite-hub/content";
8
- //#region src/collection.d.ts
9
8
  interface DocsCollectionOptions {
10
9
  /**
11
10
  * Glob of the Markdown pages in the Content Workspace, such as `content/**\/*.md`. The folder before the first
@@ -25,5 +24,4 @@ interface DocsCollectionOptions {
25
24
  * export default defineContent({ extends: cms, collections: { docs: docsCollection() } })
26
25
  */
27
26
  export declare function docsCollection(options?: DocsCollectionOptions): DocumentsDefinition<typeof docsPageFields>;
28
- //#endregion
29
27
  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,8 +1,8 @@
1
+ import { a as docsSectionSchema, i as docsPageSchema, n as docsLayouts, o as expandDottedKeys, r as docsPageFields } from "./schema-CmSiwC4t.js";
2
+ import { r as docsPagePath } from "./page-DWsretqk.js";
1
3
  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
- //#region src/collection.ts
5
+ // src/collection.ts
6
6
  /**
7
7
  * A Content collection over the docs Markdown pages, so the Console edits, previews, and publishes them. Its fields are
8
8
  * the page frontmatter, and each document's URL is the page URL: `content/docs/kv/index.md` is `/docs/kv`.
@@ -23,5 +23,4 @@ function docsCollection(options = {}) {
23
23
  url: ({ id }) => docsPagePath(id)
24
24
  });
25
25
  }
26
- //#endregion
27
26
  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,4 +1,3 @@
1
- //#region src/link-checker-redirects.d.ts
2
1
  /**
3
2
  * The link checker reads its options once, when Nuxt installs it, and reports every link to a redirect. The docs module
4
3
  * installs this module just before it, after the app's modules have added their route rules, so a link to a redirect
@@ -9,5 +8,4 @@
9
8
  declare const linkCheckerRedirects: {
10
9
  (inlineOptions: Record<string, never>, nuxt: never): unknown;
11
10
  };
12
- //#endregion
13
11
  export { linkCheckerRedirects as default };
@@ -1,7 +1,7 @@
1
1
  import { docsAppPath } from "./navigation.js";
2
- import { r as docsRedirects } from "./redirects-BJj58IsY.js";
2
+ import { r as docsRedirects } from "./redirects-BEFu4KLR.js";
3
3
  import { defineNuxtModule } from "@nuxt/kit";
4
- //#region src/link-checker-redirects.ts
4
+ // src/link-checker-redirects.ts
5
5
  /**
6
6
  * The link checker reads its options once, when Nuxt installs it, and reports every link to a redirect. The docs module
7
7
  * installs this module just before it, after the app's modules have added their route rules, so a link to a redirect
@@ -21,5 +21,4 @@ const linkCheckerRedirects = defineNuxtModule({
21
21
  linkChecker.excludeLinks = [...linkChecker.excludeLinks ?? [], ...redirects.map((redirect) => docsAppPath(redirect.from, options.app.baseURL))];
22
22
  }
23
23
  });
24
- //#endregion
25
24
  export { linkCheckerRedirects as default };
@@ -1,7 +1,7 @@
1
1
  import { docsManifestPages, normalizeDocsBase } from "./navigation.js";
2
- import { a as docsSectionSchema, i as docsPageSchema, t as docsFrontmatter } from "./schema-DcWZ3Q3M.js";
3
- import { n as docsPageOf, r as docsPagePath } from "./page-Bb0TfRKi.js";
4
- import { t as docsErrorDiagnostics } from "./error-diagnostics-CmgtG9xa.js";
2
+ import { a as docsSectionSchema, i as docsPageSchema, t as docsFrontmatter } from "./schema-CmSiwC4t.js";
3
+ import { n as docsPageOf, r as docsPagePath } from "./page-DWsretqk.js";
4
+ import { t as docsErrorDiagnostics } from "./error-diagnostics-Daz9oBJS.js";
5
5
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
6
6
  import { join, matchesGlob, posix, relative, resolve, sep } from "node:path";
7
7
  import { ELEMENT_NODE, parse as parse$1, walkSync } from "ultrahtml";
@@ -9,7 +9,7 @@ import { contentSource, defineContent } from "@vite-hub/content";
9
9
  import { glob, useSource } from "@vite-hub/source";
10
10
  import { parseFrontmatter } from "comark/parse";
11
11
  import yaml from "comark-content/plugins/yaml";
12
- //#region src/check-links.ts
12
+ // src/check-links.ts
13
13
  /** `DOCS_LINKS_BROKEN`, with the list of problems in `problems`. */
14
14
  function docsLinkError(problems) {
15
15
  return Object.assign(docsErrorDiagnostics.DOCS_LINKS_BROKEN({ problems }), { problems });
@@ -158,8 +158,7 @@ function decode(text) {
158
158
  return value > 0 && value <= 1114111 ? String.fromCodePoint(value) : "�";
159
159
  });
160
160
  }
161
- //#endregion
162
- //#region src/manifest.ts
161
+ // src/manifest.ts
163
162
  const isContentSource = (input) => "getKeys" in input;
164
163
  /** The `sources` entries with absolute folders, in order. Page `source` names, such as `docs-1`, follow this order. */
165
164
  function resolveDocsSources(inputs, rootDir = process.cwd()) {
@@ -466,5 +465,4 @@ function joinPath(base, ...segments) {
466
465
  function titleCase(input) {
467
466
  return input.split(/[-/]/g).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
468
467
  }
469
- //#endregion
470
468
  export { docsAppManifestSource as a, resolveDocsSources as c, docsLinkExclusion as d, docsOutputFile as f, docsAppManifest as i, checkDocsLinks as l, createDocsContent as n, docsAppPanelSource as o, createDocsManifest as r, readDocsContent as s, contentName as t, docsLinkError as u };
@@ -1,8 +1,7 @@
1
- import { h as DocsSectionFile, n as DocsManifest } from "./types-CHU_fy9l.js";
1
+ import { h as DocsSectionFile, n as DocsManifest } from "./types-B6YlHil4.js";
2
2
  import "nostics";
3
3
  import { ContentCheckOptions, ContentRuntime } from "@vite-hub/content";
4
4
  import { Source } from "@vite-hub/source";
5
- //#region src/check-links.d.ts
6
5
  interface DocsLinkCheckOptions {
7
6
  dir: string;
8
7
  siteUrl: string;
@@ -21,8 +20,6 @@ interface DocsLinkCheckOptions {
21
20
  declare function checkDocsLinks(options: DocsLinkCheckOptions): {
22
21
  pages: number;
23
22
  };
24
- //#endregion
25
- //#region src/manifest.d.ts
26
23
  /**
27
24
  * Pages from a Content Source, such as `glob()` or `github()` from `@vite-hub/source`. The build reads its `.md` files
28
25
  * and its `.navigation.yml` files.
@@ -76,5 +73,4 @@ interface DocsContentOptions {
76
73
  }
77
74
  /** Read every docs source through Content and compute sections, pages, and their order. */
78
75
  declare function createDocsManifest(options: DocsManifestOptions): Promise<DocsManifest>;
79
- //#endregion
80
76
  export { createDocsContent as a, checkDocsLinks as c, DocsSourceInput as i, DocsManifestOptions as n, createDocsManifest as o, DocsSource as r, DocsLinkCheckOptions as s, DocsContentSource as t };
@@ -1,7 +1,6 @@
1
- import { a as DocsSearchSection, s as DocsTocLink } from "./types-CHU_fy9l.js";
1
+ import { a as DocsSearchSection, s as DocsTocLink } from "./types-B6YlHil4.js";
2
2
  import { PresetOptions } from "comark-ui/vue";
3
3
  import { Node, ParserOptions } from "comark";
4
- //#region src/markdown.d.ts
5
4
  /** A page parsed on the server. The client renders `nodes` and never parses Markdown itself. */
6
5
  interface DocsDocument {
7
6
  nodes: Node[];
@@ -47,5 +46,4 @@ declare function docsMarkdown(options?: DocsParserOptions): {
47
46
  declare function createDocsParser(options?: DocsParserOptions): (markdown: string) => Promise<DocsDocument>;
48
47
  /** Split a page into one search entry per h2 and h3, like Nuxt UI's content search expects. */
49
48
  declare function docsSearchSections(path: string, title: string, nodes: Node[]): DocsSearchSection[];
50
- //#endregion
51
49
  export { docsSearchSections as a, docsMarkdown as i, DocsParserOptions as n, createDocsParser as r, DocsDocument as t };
@@ -1,4 +1,4 @@
1
- import { t as docsErrorDiagnostics } from "./error-diagnostics-CmgtG9xa.js";
1
+ import { t as docsErrorDiagnostics } from "./error-diagnostics-Daz9oBJS.js";
2
2
  import { defu } from "defu";
3
3
  import { ELEMENT_NODE, parse, walkSync } from "ultrahtml";
4
4
  import { contentSearchSections } from "@vite-hub/content";
@@ -20,7 +20,7 @@ import markdownLanguage from "shiki/dist/langs/markdown.mjs";
20
20
  import mdc from "shiki/dist/langs/mdc.mjs";
21
21
  import githubDark from "shiki/dist/themes/github-dark-default.mjs";
22
22
  import githubLight from "shiki/dist/themes/github-light-default.mjs";
23
- //#region src/markdown.ts
23
+ // src/markdown.ts
24
24
  const languages = [
25
25
  css,
26
26
  diff,
@@ -374,5 +374,4 @@ function docsSearchSections(path, title, nodes) {
374
374
  nodes
375
375
  }, { ignore: searchIgnore });
376
376
  }
377
- //#endregion
378
377
  export { docsSearchSections as a, docsMarkdown as i, docsDocumentOf as n, docsImageSizes as r, createDocsParser as t };
@@ -1,5 +1,4 @@
1
- import { a as DocsSearchSection, l as DocsLayout, n as DocsManifest, o as DocsSection, r as DocsPage, t as DocsAppPage } from "./types-CHU_fy9l.js";
2
- //#region src/navigation.d.ts
1
+ import { a as DocsSearchSection, l as DocsLayout, n as DocsManifest, o as DocsSection, r as DocsPage, t as DocsAppPage } from "./types-B6YlHil4.js";
3
2
  /** A link that the site options add to the shell, such as a tutorials page or a community chat. */
4
3
  export interface DocsLink {
5
4
  label: string;
@@ -285,5 +284,4 @@ export declare function docsMcpInstallLinks(server: {
285
284
  * query words come first, then the higher score: page titles over headings and keywords over text. Titles tolerate typos and prefixes, text
286
285
  * matches whole words and prefixes. Ties keep the order of the index, which follows the navigation.
287
286
  */
288
- export declare function createDocsSearch(records: readonly DocsSearchSection[]): (query: string, limit: number) => DocsSearchSection[];
289
- //#endregion
287
+ export declare function createDocsSearch(records: readonly DocsSearchSection[]): (query: string, limit: number) => DocsSearchSection[];
@@ -1,4 +1,4 @@
1
- //#region src/navigation.ts
1
+ // src/navigation.ts
2
2
  /** Every page of the manifest, root first. */
3
3
  function docsManifestPages(manifest) {
4
4
  return [
@@ -529,5 +529,4 @@ function createDocsSearch(records) {
529
529
  return hits.slice(0, limit).map((hit) => hit.entry.record);
530
530
  };
531
531
  }
532
- //#endregion
533
532
  export { createDocsSearch, docsAppPath, docsCanonicalUrl, docsCatalog, docsHasRail, docsHomePath, docsIconStroke, docsIndexedPages, docsManifestPages, docsMarkdownLinks, docsMcpInstallLinks, docsPageIcon, docsPageIndexed, docsPanelGroupWindow, docsPanelOf, docsPanelPages, docsPanelSidebarGroups, docsPanelWindow, docsRailEntries, docsRailEntry, docsRailGroups, docsRailIcon, docsRailTarget, docsRawFile, docsRawPath, docsRawSectionLinks, docsRawSectionLinksMarker, docsRelatedSections, docsSectionForPath, docsSectionGroup, docsSectionHome, docsSectionIcon, docsSectionPanels, docsSidebarCollapses, docsSidebarGroup, docsSidebarGroups, docsSidebarSections, docsStartPage, docsTutorialNavigationCookie, docsUnindexedSearchSections, findDocsPage, isDocsPath, isDocsWorkspaceLayout, loadDocsPanels, normalizeDocsBase, normalizeDocsPath };
@@ -1,10 +1,9 @@
1
- import { h as DocsSectionFile, r as DocsPage } from "./types-CHU_fy9l.js";
2
- import "./steps-DBlkJwtD.js";
3
- import { i as DocsSourceInput, s as DocsLinkCheckOptions } from "./manifest-Drbdw1us.js";
1
+ import "./steps-C3tGwhNK.js";
2
+ import { h as DocsSectionFile, r as DocsPage } from "./types-B6YlHil4.js";
3
+ import { i as DocsSourceInput, s as DocsLinkCheckOptions } from "./manifest-DJ2DyNue.js";
4
4
  import { DocsGroup, DocsIcons, DocsLink } from "./navigation.js";
5
5
  import { ContentLlmsSection } from "@vite-hub/content";
6
6
  import { PublicRuntimeConfig } from "nuxt/schema";
7
- //#region src/comments-nuxt.d.ts
8
7
  /** Comments on a docs site: the `comments` option of `vite-hub/nuxt`, which these pass to. */
9
8
  interface DocsCommentsOptions {
10
9
  /** The Database Definition that keeps the threads. Default: the default or only Database. */
@@ -14,8 +13,6 @@ interface DocsCommentsOptions {
14
13
  /** `false` leaves the overlay out of the pages. The Comments API, the operations, and the Console section stay. */
15
14
  overlay?: false;
16
15
  }
17
- //#endregion
18
- //#region src/runnable/build.d.ts
19
16
  /** A lesson that runs in the reader's browser. */
20
17
  interface RunnableTutorialSource {
21
18
  /** The id of the lesson and of its snapshot, such as `first-agent`. */
@@ -25,8 +22,6 @@ interface RunnableTutorialSource {
25
22
  /** The folder of the app after the last step, in the fixtures folder. */
26
23
  fixture: string;
27
24
  }
28
- //#endregion
29
- //#region src/runnable/playground.d.ts
30
25
  /** A starting app of the playground. */
31
26
  interface PlaygroundTemplateSource {
32
27
  /** The `?template=` value and the id in share links. */
@@ -47,8 +42,6 @@ interface PlaygroundTemplateSource {
47
42
  /** The paths of the files that the editor does not let the reader change. */
48
43
  readonly?: string[];
49
44
  }
50
- //#endregion
51
- //#region src/runnable/nuxt.d.ts
52
45
  type DocsRunnableLesson = RunnableTutorialSource;
53
46
  type DocsRunnableExample = PlaygroundTemplateSource;
54
47
  /** `runnable` of the docs module options. */
@@ -80,8 +73,6 @@ interface DocsRunnableOptions {
80
73
  */
81
74
  pnpmWorkspace?: string;
82
75
  }
83
- //#endregion
84
- //#region src/nuxt.d.ts
85
76
  interface DocsSiteOptions {
86
77
  /** Name in titles, the rail, and llms.txt. */
87
78
  name?: string;
@@ -313,5 +304,4 @@ interface DocsNuxtModule {
313
304
  getMeta?: () => Promise<Record<string, unknown>>;
314
305
  }
315
306
  declare const docsNuxtModule: DocsNuxtModule;
316
- //#endregion
317
307
  export { DocsPublicConfig as a, docsNuxtModule as c, DocsRunnableOptions as d, DocsCommentsOptions as f, DocsNuxtModule as i, DocsRunnableExample as l, DocsLogo as n, DocsSiteOptions as o, DocsModuleOptions as r, DocsStartOptions as s, DocsLlmsOptions as t, DocsRunnableLesson as u };
package/dist/nuxt.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { a as DocsPublicConfig, c as docsNuxtModule, d as DocsRunnableOptions, f as DocsCommentsOptions, i as DocsNuxtModule, l as DocsRunnableExample, n as DocsLogo, o as DocsSiteOptions, r as DocsModuleOptions, s as DocsStartOptions, t as DocsLlmsOptions, u as DocsRunnableLesson } from "./nuxt-8O2OB_hI.js";
2
- import { a as DocsThemeScope } from "./theme-BXyu4uFL.js";
1
+ import { a as DocsPublicConfig, c as docsNuxtModule, d as DocsRunnableOptions, f as DocsCommentsOptions, i as DocsNuxtModule, l as DocsRunnableExample, n as DocsLogo, o as DocsSiteOptions, r as DocsModuleOptions, s as DocsStartOptions, t as DocsLlmsOptions, u as DocsRunnableLesson } from "./nuxt-CYAIBEHE.js";
2
+ import { a as DocsThemeScope } from "./theme-CgJRnVdT.js";
3
3
  export { type DocsCommentsOptions, DocsLlmsOptions, DocsLogo, DocsModuleOptions, DocsNuxtModule, DocsPublicConfig, type DocsRunnableExample, type DocsRunnableLesson, type DocsRunnableOptions, DocsSiteOptions, DocsStartOptions, type DocsThemeScope, docsNuxtModule as default };