@vite-hub/docs 0.4.1 → 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.
- package/README.md +167 -7
- package/dist/{agent-copy-xPaWye_g.js → agent-copy-CY9_RkHN.js} +2 -3
- package/dist/{assistant-pages-BN7hNsSZ.js → assistant-pages-BbWfd69g.js} +3 -4
- package/dist/{assistant-shared-CWIKRtBv.d.ts → assistant-shared-BWeRcmVS.d.ts} +0 -2
- package/dist/{assistant-shared-WzButktj.js → assistant-shared-JcfjK-qg.js} +3 -4
- package/dist/assistant-worker.d.ts +1 -3
- package/dist/assistant-worker.js +2 -3
- package/dist/assistant.d.ts +1 -3
- package/dist/assistant.js +2 -3
- package/dist/{content-CPZGnn3S.js → content-C_WXjV3y.js} +60 -28
- package/dist/{draft-BjWmaiLn.js → draft-rOGhtXch.js} +3 -4
- package/dist/{error-diagnostics-B_ZOy7kF.js → error-diagnostics-Daz9oBJS.js} +65 -2
- package/dist/{files-UY4h1_36.js → files-BBoAGhhM.js} +1 -2
- package/dist/index.d.ts +7 -8
- package/dist/index.js +5 -6
- package/dist/link-checker-redirects.d.ts +0 -2
- package/dist/link-checker-redirects.js +2 -3
- package/dist/{manifest-ZdxLrcvt.js → manifest-Bti_WxDZ.js} +64 -30
- package/dist/{manifest-CMoxcwPm.d.ts → manifest-DJ2DyNue.d.ts} +1 -5
- package/dist/{page-Dx2JD3y1.d.ts → markdown-B97RuMXs.d.ts} +2 -27
- package/dist/{markdown-DUWnEMPp.js → markdown-BzZkYb24.js} +2 -3
- package/dist/navigation.d.ts +10 -6
- package/dist/navigation.js +23 -10
- package/dist/{nuxt-CAGpKl_-.d.ts → nuxt-CYAIBEHE.d.ts} +74 -8
- package/dist/nuxt.d.ts +3 -3
- package/dist/nuxt.js +1286 -89
- package/dist/page-B8_70-5D.d.ts +24 -0
- package/dist/{page-GPt09oex.js → page-DWsretqk.js} +20 -5
- package/dist/primitive-rail.d.ts +1 -10
- package/dist/primitive-rail.js +4 -10
- package/dist/{raw-BChwipz_.js → raw-CQukuLuj.js} +1 -2
- package/dist/{redirects-CmR1yu5A.js → redirects-BEFu4KLR.js} +35 -23
- package/dist/runnable.d.ts +33 -0
- package/dist/runnable.js +104 -0
- package/dist/runtime/app/components/DocsAsideLeftBody.vue +2 -8
- package/dist/runtime/app/components/DocsLearn.vue +215 -0
- package/dist/runtime/app/components/DocsLearnCodePre.vue +98 -0
- package/dist/runtime/app/components/DocsLearnFile.vue +21 -0
- package/dist/runtime/app/components/DocsPage.vue +11 -5
- package/dist/runtime/app/components/DocsPlayground.vue +117 -0
- package/dist/runtime/app/components/content/Example.vue +18 -49
- package/dist/runtime/app/components/content/PageList.vue +1 -5
- package/dist/runtime/app/layouts/docs.vue +36 -8
- package/dist/runtime/app/middleware/docs-layout.ts +2 -2
- package/dist/runtime/app/utils/docs-learn.ts +31 -0
- package/dist/runtime/app/utils/docs-playground.ts +3 -0
- package/dist/runtime/server/llms.d.ts +0 -2
- package/dist/runtime/server/llms.js +2 -3
- package/dist/runtime/server/markdown.d.ts +0 -7
- package/dist/runtime/server/markdown.js +11 -3
- package/dist/runtime/server/mcp.d.ts +0 -2
- package/dist/runtime/server/mcp.js +2 -3
- package/dist/runtime/server/page.d.ts +1 -3
- package/dist/runtime/server/page.js +4 -5
- package/dist/runtime/server/raw.d.ts +0 -2
- package/dist/runtime/server/raw.js +3 -11
- package/dist/runtime/server/search.d.ts +1 -3
- package/dist/runtime/server/search.js +4 -4
- package/dist/runtime/server/sitemap.d.ts +0 -2
- package/dist/runtime/server/sitemap.js +3 -5
- package/dist/runtime/server/trailing-slash.d.ts +0 -2
- package/dist/runtime/server/trailing-slash.js +1 -2
- package/dist/schema-CmSiwC4t.js +189 -0
- package/dist/server.d.ts +3 -4
- package/dist/server.js +4 -4
- package/dist/snapshot-worker.mjs +40 -0
- package/dist/steps-C3tGwhNK.d.ts +103 -0
- package/dist/steps-muDP1nYT.js +31 -0
- package/dist/{theme-BXyu4uFL.d.ts → theme-CgJRnVdT.d.ts} +0 -4
- package/dist/{theme-DzC8LtMH.js → theme-CxBzPBZ9.js} +2 -4
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -2
- package/dist/{types-BhG6vGfG.d.ts → types-B6YlHil4.d.ts} +69 -8
- package/package.json +40 -32
- package/dist/schema-DwpXW0VZ.js +0 -98
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
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";
|
|
3
4
|
import { DocsGroup, DocsIcons, DocsLink } from "./navigation.js";
|
|
4
5
|
import { ContentLlmsSection } from "@vite-hub/content";
|
|
5
6
|
import { PublicRuntimeConfig } from "nuxt/schema";
|
|
6
|
-
//#region src/comments-nuxt.d.ts
|
|
7
7
|
/** Comments on a docs site: the `comments` option of `vite-hub/nuxt`, which these pass to. */
|
|
8
8
|
interface DocsCommentsOptions {
|
|
9
9
|
/** The Database Definition that keeps the threads. Default: the default or only Database. */
|
|
@@ -13,8 +13,66 @@ interface DocsCommentsOptions {
|
|
|
13
13
|
/** `false` leaves the overlay out of the pages. The Comments API, the operations, and the Console section stay. */
|
|
14
14
|
overlay?: false;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/** A lesson that runs in the reader's browser. */
|
|
17
|
+
interface RunnableTutorialSource {
|
|
18
|
+
/** The id of the lesson and of its snapshot, such as `first-agent`. */
|
|
19
|
+
slug: string;
|
|
20
|
+
/** The URL of the docs page, such as `/docs/getting-started/first-agent`. */
|
|
21
|
+
page: string;
|
|
22
|
+
/** The folder of the app after the last step, in the fixtures folder. */
|
|
23
|
+
fixture: string;
|
|
24
|
+
}
|
|
25
|
+
/** A starting app of the playground. */
|
|
26
|
+
interface PlaygroundTemplateSource {
|
|
27
|
+
/** The `?template=` value and the id in share links. */
|
|
28
|
+
id: string;
|
|
29
|
+
label: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
/** The heading of the example in the examples menu. */
|
|
32
|
+
group?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The folder in the fixtures folder, so an example and a lesson can share one copy of the code. An absolute path,
|
|
35
|
+
* such as the `dir` of a `layout: playground` example, works too.
|
|
36
|
+
*/
|
|
37
|
+
fixture: string;
|
|
38
|
+
/** The file that the editor opens first. */
|
|
39
|
+
open?: string;
|
|
40
|
+
/** The path that the preview opens when the dev server is ready. */
|
|
41
|
+
preview?: string;
|
|
42
|
+
/** The paths of the files that the editor does not let the reader change. */
|
|
43
|
+
readonly?: string[];
|
|
44
|
+
}
|
|
45
|
+
type DocsRunnableLesson = RunnableTutorialSource;
|
|
46
|
+
type DocsRunnableExample = PlaygroundTemplateSource;
|
|
47
|
+
/** `runnable` of the docs module options. */
|
|
48
|
+
interface DocsRunnableOptions {
|
|
49
|
+
/**
|
|
50
|
+
* The folder of the apps that lessons and examples run, relative to the app root. Defaults to `fixtures`. Each app
|
|
51
|
+
* is a folder in it. The npm lockfile that pins its snapshot sits beside it as `<folder>.package-lock.json`.
|
|
52
|
+
*/
|
|
53
|
+
fixtures?: string;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Give each lesson a page with `layout: learn` instead, which sets its `fixture` in the frontmatter. This
|
|
56
|
+
* list is for an app page that renders the workspace itself and imports `#build/runnable-tutorials.mjs`.
|
|
57
|
+
*/
|
|
58
|
+
lessons?: DocsRunnableLesson[];
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated List the examples in the frontmatter of a page with `layout: playground` instead. This list is for an
|
|
61
|
+
* app page that renders the workspace itself and imports `#build/playground-templates.mjs`.
|
|
62
|
+
*/
|
|
63
|
+
examples?: DocsRunnableExample[];
|
|
64
|
+
/**
|
|
65
|
+
* A docs page, such as `/docs/getting-started/installation`, whose code blocks give the version of a file before the
|
|
66
|
+
* lesson step that writes it. Without it, a file that a step writes does not exist before that step.
|
|
67
|
+
*/
|
|
68
|
+
start?: string;
|
|
69
|
+
/**
|
|
70
|
+
* The folder of `pnpm-workspace.yaml`, relative to the app root, when fixtures use `catalog:` or `workspace:`
|
|
71
|
+
* specifiers. The workspace packages that a fixture uses are built and packed into its snapshot. Without it, fixtures
|
|
72
|
+
* install from npm only.
|
|
73
|
+
*/
|
|
74
|
+
pnpmWorkspace?: string;
|
|
75
|
+
}
|
|
18
76
|
interface DocsSiteOptions {
|
|
19
77
|
/** Name in titles, the rail, and llms.txt. */
|
|
20
78
|
name?: string;
|
|
@@ -59,7 +117,9 @@ interface DocsModuleOptions {
|
|
|
59
117
|
components?: string;
|
|
60
118
|
/**
|
|
61
119
|
* URL prefix whose folders are sections in the rail. Defaults to `/docs` when the content folder has a `docs/` folder,
|
|
62
|
-
* and to `/` when it has none, so the docs are the whole site.
|
|
120
|
+
* and to `/` when it has none, so the docs are the whole site. With `sources`, the default is always `/docs`.
|
|
121
|
+
* If the site has pages but none are at or below the default base, setup warns with `DOCS_BASE_EMPTY`.
|
|
122
|
+
* Set `base: '/docs'` to keep those pages standalone without the warning.
|
|
63
123
|
*/
|
|
64
124
|
base?: string;
|
|
65
125
|
site?: DocsSiteOptions;
|
|
@@ -161,6 +221,13 @@ interface DocsModuleOptions {
|
|
|
161
221
|
* `examples`, so `::example{name="ButtonExample"}` renders `app/examples/ButtonExample.vue` beside its source.
|
|
162
222
|
*/
|
|
163
223
|
examples?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Lessons and playground examples that run in the reader's browser, in a WebContainer. Each one runs an app from the
|
|
226
|
+
* fixtures folder. The build writes `#build/runnable-tutorials.mjs`, `#build/playground-templates.mjs`,
|
|
227
|
+
* `#build/learn-facts.mjs`, and a `node_modules` snapshot of each app at `/_tutorials/snapshots/` under the app base.
|
|
228
|
+
* Each lesson names its page by URL, so the page can come from `dir` or from `sources`.
|
|
229
|
+
*/
|
|
230
|
+
runnable?: DocsRunnableOptions;
|
|
164
231
|
}
|
|
165
232
|
/** `llms` of the docs module options. */
|
|
166
233
|
interface DocsLlmsOptions {
|
|
@@ -237,5 +304,4 @@ interface DocsNuxtModule {
|
|
|
237
304
|
getMeta?: () => Promise<Record<string, unknown>>;
|
|
238
305
|
}
|
|
239
306
|
declare const docsNuxtModule: DocsNuxtModule;
|
|
240
|
-
|
|
241
|
-
export { DocsPublicConfig as a, docsNuxtModule as c, DocsNuxtModule as i, DocsCommentsOptions as l, DocsLogo as n, DocsSiteOptions as o, DocsModuleOptions as r, DocsStartOptions as s, DocsLlmsOptions as t };
|
|
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, i as DocsNuxtModule, l as
|
|
2
|
-
import { a as DocsThemeScope } from "./theme-
|
|
3
|
-
export { type DocsCommentsOptions, DocsLlmsOptions, DocsLogo, DocsModuleOptions, DocsNuxtModule, DocsPublicConfig, DocsSiteOptions, DocsStartOptions, type DocsThemeScope, docsNuxtModule as default };
|
|
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
|
+
export { type DocsCommentsOptions, DocsLlmsOptions, DocsLogo, DocsModuleOptions, DocsNuxtModule, DocsPublicConfig, type DocsRunnableExample, type DocsRunnableLesson, type DocsRunnableOptions, DocsSiteOptions, DocsStartOptions, type DocsThemeScope, docsNuxtModule as default };
|