@vite-hub/docs 0.6.0 → 0.7.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 +5 -4
  2. package/dist/agent-copy-DTCo8cLy.js +48 -0
  3. package/dist/{content-C_WXjV3y.js → content-Chgcvz1q.js} +2 -2
  4. package/dist/index.d.ts +5 -5
  5. package/dist/{manifest-Bti_WxDZ.js → manifest-CQMreQZ5.js} +3 -3
  6. package/dist/{manifest-DJ2DyNue.d.ts → manifest-DmITPRKL.d.ts} +1 -1
  7. package/dist/{markdown-B97RuMXs.d.ts → markdown-Ul8Z9B5A.d.ts} +1 -1
  8. package/dist/navigation.d.ts +6 -1
  9. package/dist/navigation.js +21 -4
  10. package/dist/{nuxt-CYAIBEHE.d.ts → nuxt-B0kdfz6P.d.ts} +11 -3
  11. package/dist/nuxt.d.ts +1 -1
  12. package/dist/nuxt.js +41 -69
  13. package/dist/{page-B8_70-5D.d.ts → page-Cp7sifcg.d.ts} +2 -2
  14. package/dist/primitive-rail.d.ts +1 -1
  15. package/dist/primitive-rail.js +3 -2
  16. package/dist/{raw-CQukuLuj.js → raw-Dh38kL9g.js} +1 -0
  17. package/dist/runnable.d.ts +2 -2
  18. package/dist/runtime/app/assistant/DocsAssistantPanel.vue +9 -5
  19. package/dist/runtime/app/components/AppHeader.vue +3 -9
  20. package/dist/runtime/app/components/AppSearch.vue +33 -10
  21. package/dist/runtime/app/components/DocsAsideLeftTop.vue +4 -10
  22. package/dist/runtime/app/components/DocsBuiltWith.vue +31 -0
  23. package/dist/runtime/app/components/DocsCatalogFooter.vue +4 -3
  24. package/dist/runtime/app/components/DocsLanding.vue +1 -3
  25. package/dist/runtime/app/components/DocsLearn.vue +9 -8
  26. package/dist/runtime/app/components/DocsLearnCodePre.vue +9 -20
  27. package/dist/runtime/app/components/DocsMarkdown.vue +17 -5
  28. package/dist/runtime/app/components/DocsPage.vue +26 -2
  29. package/dist/runtime/app/components/DocsPageHeaderLinks.vue +1 -3
  30. package/dist/runtime/app/components/DocsPlayground.vue +3 -3
  31. package/dist/runtime/app/components/DocsRail.vue +14 -30
  32. package/dist/runtime/app/components/DocsRailTooltip.vue +18 -0
  33. package/dist/runtime/app/components/DocsSidebarStrip.vue +3 -7
  34. package/dist/runtime/app/components/DocsSidebars.vue +2 -1
  35. package/dist/runtime/app/components/content/CopyPrompt.vue +72 -0
  36. package/dist/runtime/app/components/content/Example.vue +2 -1
  37. package/dist/runtime/app/composables/docs.ts +11 -24
  38. package/dist/runtime/app/layouts/docs.vue +7 -0
  39. package/dist/runtime/app/plugins/vitehub-ui.ts +22 -0
  40. package/dist/runtime/server/llms.js +1 -1
  41. package/dist/runtime/server/markdown.js +2 -2
  42. package/dist/runtime/server/mcp.js +1 -1
  43. package/dist/runtime/server/page.d.ts +1 -1
  44. package/dist/runtime/server/page.js +1 -1
  45. package/dist/runtime/server/raw.js +1 -1
  46. package/dist/runtime/server/search.d.ts +1 -1
  47. package/dist/runtime/server/search.js +3 -3
  48. package/dist/runtime/server/sitemap.js +1 -1
  49. package/dist/runtime/theme/design.css +15 -0
  50. package/dist/server.d.ts +3 -3
  51. package/dist/server.js +2 -2
  52. package/dist/{steps-C3tGwhNK.d.ts → steps-DzSu3r8K.d.ts} +1 -1
  53. package/dist/{theme-CxBzPBZ9.js → theme-DRktv19v.js} +1 -1
  54. package/dist/theme.js +1 -1
  55. package/dist/{types-B6YlHil4.d.ts → types-Dl6yjlwV.d.ts} +2 -0
  56. package/package.json +17 -14
  57. package/dist/agent-copy-CY9_RkHN.js +0 -32
@@ -1,32 +0,0 @@
1
- import { docsManifestPages, docsRawSectionLinks } from "./navigation.js";
2
- import { t as toRawMarkdown } from "./raw-CQukuLuj.js";
3
- // src/agent-copy.ts
4
- /**
5
- * The copy of a page that agents read at `/raw/<page>.md`: the source as plain Markdown with absolute links, then the
6
- * links of its section. `siteUrl` is the public origin with the app base, such as `https://docs.example.com/portal`.
7
- */
8
- function docsAgentCopy(manifest, page, source, siteUrl) {
9
- return {
10
- markdown: toRawMarkdown(source, {
11
- siteUrl,
12
- pagePath: page.path
13
- }),
14
- footer: docsRawSectionLinks(manifest, page.path, siteUrl)
15
- };
16
- }
17
- /** The Content Source of a page, named like `createDocsContent()` names it: `docs_<index>` for the server asset `docs-<index>`. */
18
- function docsContentSource(page) {
19
- return `docs_${page.source ? page.source.slice(5) : 0}`;
20
- }
21
- /** The pages of each Content Source of the docs, `docs_<index>`, by their file in the Source. */
22
- function docsAgentPages(manifest) {
23
- const sources = /* @__PURE__ */ new Map();
24
- for (const page of docsManifestPages(manifest)) {
25
- const name = docsContentSource(page);
26
- const pages = sources.get(name) ?? /* @__PURE__ */ new Map();
27
- pages.set(page.file, page);
28
- sources.set(name, pages);
29
- }
30
- return sources;
31
- }
32
- export { docsAgentPages as n, docsContentSource as r, docsAgentCopy as t };