@vite-hub/docs 0.6.1 → 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.
- package/README.md +3 -3
- package/dist/agent-copy-DTCo8cLy.js +48 -0
- package/dist/{content-C_WXjV3y.js → content-Chgcvz1q.js} +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/{manifest-Bti_WxDZ.js → manifest-CQMreQZ5.js} +3 -3
- package/dist/{manifest-DJ2DyNue.d.ts → manifest-DmITPRKL.d.ts} +1 -1
- package/dist/{markdown-B97RuMXs.d.ts → markdown-Ul8Z9B5A.d.ts} +1 -1
- package/dist/navigation.d.ts +6 -1
- package/dist/navigation.js +21 -4
- package/dist/{nuxt-CPt71DeE.d.ts → nuxt-B0kdfz6P.d.ts} +8 -3
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.js +38 -19
- package/dist/{page-B8_70-5D.d.ts → page-Cp7sifcg.d.ts} +2 -2
- package/dist/primitive-rail.d.ts +1 -1
- package/dist/primitive-rail.js +3 -2
- package/dist/{raw-CQukuLuj.js → raw-Dh38kL9g.js} +1 -0
- package/dist/runnable.d.ts +2 -2
- package/dist/runtime/app/assistant/DocsAssistantPanel.vue +9 -5
- package/dist/runtime/app/components/AppHeader.vue +3 -9
- package/dist/runtime/app/components/DocsAsideLeftTop.vue +4 -10
- package/dist/runtime/app/components/DocsLearn.vue +9 -8
- package/dist/runtime/app/components/DocsLearnCodePre.vue +9 -20
- package/dist/runtime/app/components/DocsPageHeaderLinks.vue +1 -3
- package/dist/runtime/app/components/DocsPlayground.vue +3 -3
- package/dist/runtime/app/components/DocsRail.vue +14 -30
- package/dist/runtime/app/components/DocsRailTooltip.vue +18 -0
- package/dist/runtime/app/components/DocsSidebarStrip.vue +3 -7
- package/dist/runtime/app/components/DocsSidebars.vue +2 -1
- package/dist/runtime/app/components/content/CopyPrompt.vue +72 -0
- package/dist/runtime/app/components/content/Example.vue +2 -1
- package/dist/runtime/app/composables/docs.ts +11 -24
- package/dist/runtime/app/layouts/docs.vue +7 -0
- package/dist/runtime/app/plugins/vitehub-ui.ts +22 -0
- package/dist/runtime/server/llms.js +1 -1
- package/dist/runtime/server/markdown.js +2 -2
- package/dist/runtime/server/mcp.js +1 -1
- package/dist/runtime/server/page.d.ts +1 -1
- package/dist/runtime/server/page.js +1 -1
- package/dist/runtime/server/raw.js +1 -1
- package/dist/runtime/server/search.d.ts +1 -1
- package/dist/runtime/server/search.js +3 -3
- package/dist/runtime/server/sitemap.js +1 -1
- package/dist/runtime/theme/design.css +15 -0
- package/dist/server.d.ts +3 -3
- package/dist/server.js +2 -2
- package/dist/{steps-C3tGwhNK.d.ts → steps-DzSu3r8K.d.ts} +1 -1
- package/dist/{types-B6YlHil4.d.ts → types-Dl6yjlwV.d.ts} +2 -0
- package/package.json +14 -11
- package/dist/agent-copy-CY9_RkHN.js +0 -32
|
@@ -169,6 +169,21 @@ html:where(.vh-docs).dark .shiki span {
|
|
|
169
169
|
overflow-wrap: break-word;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
/* A guide sits in a `ui-sdk` scope root, where the kit underlines plain links and boxes code. Its prose keeps the docs look. */
|
|
173
|
+
@layer kit {
|
|
174
|
+
.vh-docs-workspace .vh-ws-guide-content a:not([data-slot]) {
|
|
175
|
+
color: inherit;
|
|
176
|
+
text-decoration: inherit;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.vh-docs-workspace .vh-ws-guide-content pre code {
|
|
180
|
+
padding: 0;
|
|
181
|
+
border-radius: 0;
|
|
182
|
+
background: none;
|
|
183
|
+
font-size: inherit;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
172
187
|
/* On a home page, the Markdown between the app's blocks keeps the reading measure and the gutter of a docs page. */
|
|
173
188
|
.vh-docs-home-prose {
|
|
174
189
|
width: 100%;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as createDocsContent, c as checkDocsLinks, i as DocsSourceInput, n as DocsManifestOptions, o as createDocsManifest, r as DocsSource, s as DocsLinkCheckOptions, t as DocsContentSource } from "./manifest-
|
|
2
|
-
import { a as docsSearchSections, i as docsMarkdown, n as DocsParserOptions, r as createDocsParser, t as DocsDocument } from "./markdown-
|
|
3
|
-
import { n as DocsPageResponse, r as docsPageResponse, t as DocsPageLink } from "./page-
|
|
1
|
+
import { a as createDocsContent, c as checkDocsLinks, i as DocsSourceInput, n as DocsManifestOptions, o as createDocsManifest, r as DocsSource, s as DocsLinkCheckOptions, t as DocsContentSource } from "./manifest-DmITPRKL.js";
|
|
2
|
+
import { a as docsSearchSections, i as docsMarkdown, n as DocsParserOptions, r as createDocsParser, t as DocsDocument } from "./markdown-Ul8Z9B5A.js";
|
|
3
|
+
import { n as DocsPageResponse, r as docsPageResponse, t as DocsPageLink } from "./page-Cp7sifcg.js";
|
|
4
4
|
type RawMarkdownOptions = {
|
|
5
5
|
/** Origin that site-relative links point to, such as `https://vitehub.dev`. Empty keeps them relative. */
|
|
6
6
|
siteUrl?: string;
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as checkDocsLinks, n as createDocsContent, r as createDocsManifest } from "./manifest-
|
|
1
|
+
import { l as checkDocsLinks, n as createDocsContent, r as createDocsManifest } from "./manifest-CQMreQZ5.js";
|
|
2
2
|
import { a as docsSearchSections, i as docsMarkdown, t as createDocsParser } from "./markdown-BzZkYb24.js";
|
|
3
|
-
import { t as toRawMarkdown } from "./raw-
|
|
3
|
+
import { t as toRawMarkdown } from "./raw-Dh38kL9g.js";
|
|
4
4
|
import { i as docsPageResponse } from "./page-DWsretqk.js";
|
|
5
5
|
export { checkDocsLinks, createDocsContent, createDocsManifest, createDocsParser, docsMarkdown, docsPageResponse, docsSearchSections, toRawMarkdown };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as DocsConnectProvider } from "./types-
|
|
1
|
+
import { c as DocsConnectProvider } from "./types-Dl6yjlwV.js";
|
|
2
2
|
import { WorkspaceRenderContext, WorkspaceRenderResult } from "@vite-hub/ui/workspace";
|
|
3
3
|
import { Component } from "vue";
|
|
4
4
|
/** Text files of an app, keyed by a relative path such as `server/api/greet.post.ts`. */
|
|
@@ -269,5 +269,7 @@ interface DocsSearchSection {
|
|
|
269
269
|
keywords?: string[];
|
|
270
270
|
/** `false` on the one record of a page that search engines skip, such as a generated error code page. */
|
|
271
271
|
indexed?: false;
|
|
272
|
+
/** `true` on the records of a panel's Overview and the pages inside the panel, such as the diagnostics of a section. */
|
|
273
|
+
panel?: true;
|
|
272
274
|
}
|
|
273
275
|
export { docsPageFields as _, DocsSearchSection as a, expandDottedKeys as b, DocsConnectProvider as c, DocsPageFrontmatter as d, DocsPageNavigation as f, docsLayouts as g, DocsSectionFile as h, DocsPageWorkspace as i, DocsLayout as l, DocsPlaygroundTab as m, DocsManifest as n, DocsSection as o, DocsPlaygroundExample as p, DocsPage as r, DocsTocLink as s, DocsAppPage as t, DocsPageFile as u, docsPageSchema as v, docsSectionSchema as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-hub/docs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "A documentation site on ViteHub primitives: typed Markdown pages, navigation, tutorials, search, agent resources, Console editing, and a docs assistant.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"content",
|
|
@@ -71,12 +71,15 @@
|
|
|
71
71
|
"@nuxt/fonts": "^1.2.0",
|
|
72
72
|
"@nuxt/kit": "4.6.4",
|
|
73
73
|
"@takumi-rs/core": "2.22.1",
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@vite-hub/
|
|
77
|
-
"@vite-hub/
|
|
78
|
-
"@vite-hub/
|
|
79
|
-
"@vite-hub/
|
|
74
|
+
"@ui-sdk/core": "0.1.0-beta.20",
|
|
75
|
+
"@ui-sdk/vue": "0.1.0-beta.20",
|
|
76
|
+
"@vite-hub/content": "0.7.0",
|
|
77
|
+
"@vite-hub/kit": "0.7.0",
|
|
78
|
+
"@vite-hub/rate-limit": "0.7.0",
|
|
79
|
+
"@vite-hub/source": "0.7.0",
|
|
80
|
+
"@vite-hub/ui": "0.7.0",
|
|
81
|
+
"@vite-hub/web-container": "0.7.0",
|
|
82
|
+
"@vite-hub/workspace": "0.7.0",
|
|
80
83
|
"@vueuse/core": "^15.0.0",
|
|
81
84
|
"comark-content": "0.5.1",
|
|
82
85
|
"comark-zoom": "^0.14.3",
|
|
@@ -100,8 +103,8 @@
|
|
|
100
103
|
"@nuxt/ui": "^4.13.0",
|
|
101
104
|
"@types/node": "^24.19.2",
|
|
102
105
|
"@vue/test-utils": "2.6.0",
|
|
103
|
-
"@vite-hub/agent": "0.
|
|
104
|
-
"@vite-hub/gateways": "0.
|
|
106
|
+
"@vite-hub/agent": "0.7.0",
|
|
107
|
+
"@vite-hub/gateways": "0.7.0",
|
|
105
108
|
"@vite-hub/icons": "0.1.0",
|
|
106
109
|
"@vite-hub/internal": "0.0.1",
|
|
107
110
|
"comark": "^0.9.2",
|
|
@@ -125,8 +128,8 @@
|
|
|
125
128
|
"@comark/html": "^0.8.1 || ^0.9.0",
|
|
126
129
|
"@comark/vue": "^0.8.1 || ^0.9.0",
|
|
127
130
|
"@nuxt/ui": "^4.11.0",
|
|
128
|
-
"@vite-hub/agent": "0.
|
|
129
|
-
"@vite-hub/gateways": "0.
|
|
131
|
+
"@vite-hub/agent": "0.7.0",
|
|
132
|
+
"@vite-hub/gateways": "0.7.0",
|
|
130
133
|
"comark": "^0.8.1 || ^0.9.0",
|
|
131
134
|
"comark-ui": "^0.14.3",
|
|
132
135
|
"nuxt": "^4.7.0 || >=5.0.0-0",
|
|
@@ -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 };
|