@vite-hub/docs 0.0.0 → 0.4.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 (115) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +456 -0
  3. package/dist/agent-copy-xPaWye_g.js +33 -0
  4. package/dist/assistant-pages-BN7hNsSZ.js +37 -0
  5. package/dist/assistant-shared-CWIKRtBv.d.ts +28 -0
  6. package/dist/assistant-shared-WzButktj.js +113 -0
  7. package/dist/assistant-worker.d.ts +11 -0
  8. package/dist/assistant-worker.js +16 -0
  9. package/dist/assistant.d.ts +14 -0
  10. package/dist/assistant.js +19 -0
  11. package/dist/content-CPZGnn3S.js +141 -0
  12. package/dist/draft-BjWmaiLn.js +45 -0
  13. package/dist/error-diagnostics-B_ZOy7kF.js +93 -0
  14. package/dist/files-UY4h1_36.js +38 -0
  15. package/dist/index.d.ts +28 -0
  16. package/dist/index.js +27 -0
  17. package/dist/link-checker-redirects.d.ts +13 -0
  18. package/dist/link-checker-redirects.js +25 -0
  19. package/dist/manifest-CMoxcwPm.d.ts +80 -0
  20. package/dist/manifest-ZdxLrcvt.js +434 -0
  21. package/dist/markdown-DUWnEMPp.js +378 -0
  22. package/dist/navigation.d.ts +283 -0
  23. package/dist/navigation.js +519 -0
  24. package/dist/nuxt-CAGpKl_-.d.ts +241 -0
  25. package/dist/nuxt.d.ts +3 -0
  26. package/dist/nuxt.js +1868 -0
  27. package/dist/page-Dx2JD3y1.d.ts +74 -0
  28. package/dist/page-GPt09oex.js +82 -0
  29. package/dist/primitive-rail.d.ts +110 -0
  30. package/dist/primitive-rail.js +289 -0
  31. package/dist/raw-BChwipz_.js +857 -0
  32. package/dist/redirects-CmR1yu5A.js +74 -0
  33. package/dist/runtime/app/app.vue +11 -0
  34. package/dist/runtime/app/assistant/DocsAssistant.vue +81 -0
  35. package/dist/runtime/app/assistant/DocsAssistantOff.vue +8 -0
  36. package/dist/runtime/app/assistant/DocsAssistantPanel.vue +322 -0
  37. package/dist/runtime/app/components/AppHeader.vue +368 -0
  38. package/dist/runtime/app/components/AppSearch.vue +68 -0
  39. package/dist/runtime/app/components/DocsAppShell.vue +62 -0
  40. package/dist/runtime/app/components/DocsArticle.vue +184 -0
  41. package/dist/runtime/app/components/DocsAsideFooter.vue +94 -0
  42. package/dist/runtime/app/components/DocsAsideLeftBody.vue +584 -0
  43. package/dist/runtime/app/components/DocsAsideLeftTop.vue +132 -0
  44. package/dist/runtime/app/components/DocsBrandMark.vue +52 -0
  45. package/dist/runtime/app/components/DocsCatalogFooter.vue +129 -0
  46. package/dist/runtime/app/components/DocsCodePanel.vue +388 -0
  47. package/dist/runtime/app/components/DocsCodePre.vue +120 -0
  48. package/dist/runtime/app/components/DocsHeaderActions.vue +4 -0
  49. package/dist/runtime/app/components/DocsLanding.vue +83 -0
  50. package/dist/runtime/app/components/DocsMarkdown.vue +64 -0
  51. package/dist/runtime/app/components/DocsPage.vue +149 -0
  52. package/dist/runtime/app/components/DocsPageCredits.vue +41 -0
  53. package/dist/runtime/app/components/DocsPageHeaderLinks.vue +120 -0
  54. package/dist/runtime/app/components/DocsRail.vue +239 -0
  55. package/dist/runtime/app/components/DocsSidebarStrip.vue +81 -0
  56. package/dist/runtime/app/components/DocsSidebars.vue +63 -0
  57. package/dist/runtime/app/components/OgImage/DocsPage.takumi.vue +33 -0
  58. package/dist/runtime/app/components/content/AgentOnly.vue +9 -0
  59. package/dist/runtime/app/components/content/CodeTree.vue +203 -0
  60. package/dist/runtime/app/components/content/ComarkHtml.vue +31 -0
  61. package/dist/runtime/app/components/content/Correct.vue +17 -0
  62. package/dist/runtime/app/components/content/Example.vue +260 -0
  63. package/dist/runtime/app/components/content/ExamplePreview.vue +6 -0
  64. package/dist/runtime/app/components/content/Examples.vue +71 -0
  65. package/dist/runtime/app/components/content/Incorrect.vue +17 -0
  66. package/dist/runtime/app/components/content/McpClient.vue +170 -0
  67. package/dist/runtime/app/components/content/McpInstall.vue +238 -0
  68. package/dist/runtime/app/components/content/PageList.vue +206 -0
  69. package/dist/runtime/app/components/content/ProductFeatureItem.vue +43 -0
  70. package/dist/runtime/app/components/content/ProductFeatures.vue +17 -0
  71. package/dist/runtime/app/components/content/TutorialStep.vue +39 -0
  72. package/dist/runtime/app/composables/docs-assistant-problem.ts +59 -0
  73. package/dist/runtime/app/composables/docs-theme.ts +15 -0
  74. package/dist/runtime/app/composables/docs.ts +83 -0
  75. package/dist/runtime/app/composables/headerActions.ts +6 -0
  76. package/dist/runtime/app/composables/icons.ts +14 -0
  77. package/dist/runtime/app/composables/seo.ts +64 -0
  78. package/dist/runtime/app/composables/tutorial.ts +40 -0
  79. package/dist/runtime/app/composables/useDocsAssistant.ts +17 -0
  80. package/dist/runtime/app/error.vue +88 -0
  81. package/dist/runtime/app/layouts/default.vue +7 -0
  82. package/dist/runtime/app/layouts/docs.vue +104 -0
  83. package/dist/runtime/app/middleware/docs-layout.ts +23 -0
  84. package/dist/runtime/app/pages/docs-page.vue +3 -0
  85. package/dist/runtime/app/plugins/comark-css.ts +14 -0
  86. package/dist/runtime/app/plugins/icon-stroke.ts +12 -0
  87. package/dist/runtime/app/plugins/theme-color.ts +18 -0
  88. package/dist/runtime/app/utils/docs-theme.ts +43 -0
  89. package/dist/runtime/app/utils/file-tree.ts +40 -0
  90. package/dist/runtime/server/llms.d.ts +6 -0
  91. package/dist/runtime/server/llms.js +7 -0
  92. package/dist/runtime/server/markdown.d.ts +10 -0
  93. package/dist/runtime/server/markdown.js +11 -0
  94. package/dist/runtime/server/mcp.d.ts +6 -0
  95. package/dist/runtime/server/mcp.js +7 -0
  96. package/dist/runtime/server/page.d.ts +7 -0
  97. package/dist/runtime/server/page.js +27 -0
  98. package/dist/runtime/server/raw.d.ts +10 -0
  99. package/dist/runtime/server/raw.js +23 -0
  100. package/dist/runtime/server/search.d.ts +6 -0
  101. package/dist/runtime/server/search.js +32 -0
  102. package/dist/runtime/server/sitemap.d.ts +6 -0
  103. package/dist/runtime/server/sitemap.js +52 -0
  104. package/dist/runtime/server/trailing-slash.d.ts +10 -0
  105. package/dist/runtime/server/trailing-slash.js +28 -0
  106. package/dist/runtime/theme/design.css +464 -0
  107. package/dist/schema-DwpXW0VZ.js +98 -0
  108. package/dist/server.d.ts +15 -0
  109. package/dist/server.js +5 -0
  110. package/dist/theme-BXyu4uFL.d.ts +32 -0
  111. package/dist/theme-DzC8LtMH.js +237 -0
  112. package/dist/theme.d.ts +2 -0
  113. package/dist/theme.js +2 -0
  114. package/dist/types-BhG6vGfG.d.ts +212 -0
  115. package/package.json +144 -1
@@ -0,0 +1,260 @@
1
+ <script setup lang="ts">
2
+ import examples from "#docs/examples"
3
+
4
+ // `:::example`: a preview with its source a switch away, and an optional link that opens it in a playground. Around a
5
+ // Markdown code block, the parser put the rendered Markdown in an `example-preview` node before the source. With
6
+ // `name`, the preview is the Vue file of that name in the examples folder, and the parser made its source the code.
7
+ const props = defineProps<{
8
+ label?: string
9
+ /** A playground URL that opens this example. */
10
+ play?: string
11
+ /** A Vue file in the examples folder, without `.vue`. */
12
+ name?: string
13
+ /** The height, in rem, that a Vue example keeps before its module loads. Markdown writes it as a string. */
14
+ height?: number | string
15
+ /** Show a Vue example edge to edge, at a fixed height, for chats and dashboards. */
16
+ flush?: boolean
17
+ /** Show a Reset control that mounts a Vue example again with its first state. */
18
+ reset?: boolean
19
+ }>()
20
+
21
+ // `::examples` passes its view in, so the next tab opens in the view the reader picked.
22
+ const view = defineModel<"preview" | "code">("view", { default: "preview" })
23
+ const loader = props.name ? examples[props.name] : undefined
24
+ const live = loader ? defineAsyncComponent(loader) : undefined
25
+ const mounts = ref(0)
26
+ const seg = useTemplateRef<HTMLElement>("seg")
27
+ const thumb = ref<{ left: number, width: number, slide: boolean } | null>(null)
28
+
29
+ // The thumb slides under the pressed button. Its place is measured, because "Preview" and "Code" differ in width.
30
+ function place(slide = false) {
31
+ const button = seg.value?.querySelector<HTMLElement>(`[data-view="${view.value}"]`)
32
+ if (button?.offsetWidth) thumb.value = { left: button.offsetLeft, width: button.offsetWidth, slide }
33
+ }
34
+
35
+ // A switch in a hidden tab measures zero, so it's placed again, without sliding, whenever its size changes: when its
36
+ // tab opens or the font loads.
37
+ let resizes: ResizeObserver | undefined
38
+ watch(view, () => nextTick(() => place(true)))
39
+ onMounted(() => {
40
+ resizes = new ResizeObserver(() => place())
41
+ if (seg.value) resizes.observe(seg.value)
42
+ })
43
+ onBeforeUnmount(() => resizes?.disconnect())
44
+ </script>
45
+
46
+ <template>
47
+ <div class="vh-example" :data-view="view">
48
+ <div class="vh-example-bar">
49
+ <p v-if="$slots.title" class="vh-example-title"><slot name="title" /></p>
50
+ <a v-if="play" :href="play" class="vh-example-play">
51
+ <UIcon name="i-lucide-flask-conical" class="size-3.5" />
52
+ Playground
53
+ </a>
54
+ <button v-if="live && reset" type="button" class="vh-example-play" @click="mounts++">
55
+ <UIcon name="i-lucide-rotate-ccw" class="size-3.5" />
56
+ Reset
57
+ </button>
58
+ <div ref="seg" class="vh-seg" role="group" aria-label="View">
59
+ <span v-if="thumb" class="vh-seg-thumb" :class="{ 'is-still': !thumb.slide }" :style="{ transform: `translateX(${thumb.left - 3}px)`, width: `${thumb.width}px` }" aria-hidden="true" />
60
+ <button type="button" data-focus-inset data-view="preview" :aria-pressed="view === 'preview'" :class="{ 'is-unmeasured': !thumb }" @click="view = 'preview'">Preview</button>
61
+ <button type="button" data-focus-inset data-view="code" :aria-pressed="view === 'code'" :class="{ 'is-unmeasured': !thumb }" @click="view = 'code'">Code</button>
62
+ </div>
63
+ </div>
64
+ <div class="vh-example-body">
65
+ <div
66
+ v-if="live"
67
+ class="docs-example-preview vh-example-live"
68
+ :class="{ 'is-flush': flush }"
69
+ :style="height ? { '--vh-example-height': `${height}rem` } : undefined"
70
+ >
71
+ <Suspense>
72
+ <component :is="live" :key="mounts" />
73
+ <template #fallback>
74
+ <div role="status" class="vh-example-loading">Loading preview…</div>
75
+ </template>
76
+ </Suspense>
77
+ </div>
78
+ <slot />
79
+ </div>
80
+ </div>
81
+ </template>
82
+
83
+ <style scoped>
84
+ .vh-example {
85
+ margin-block: 1.5rem;
86
+ }
87
+
88
+ /* A lone example puts its controls above the frame, at the right. In a group of examples they join the tab row. */
89
+ .vh-example-bar {
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: flex-end;
93
+ gap: 0.75rem;
94
+ margin-bottom: 0.5rem;
95
+ }
96
+
97
+ /* A title, such as Correct or Incorrect on a lint rule's examples, leads the bar. */
98
+ .vh-example-title {
99
+ display: inline-flex;
100
+ align-items: center;
101
+ gap: 0.375rem;
102
+ margin: 0 auto 0 0;
103
+ color: var(--ui-text-highlighted);
104
+ font-size: 0.875rem;
105
+ font-weight: 500;
106
+ }
107
+
108
+ .vh-example-play {
109
+ display: inline-flex;
110
+ align-items: center;
111
+ gap: 0.35rem;
112
+ color: var(--ui-text-dimmed);
113
+ font-size: 0.75rem;
114
+ font-weight: 500;
115
+ transition: color 150ms ease;
116
+ }
117
+
118
+ @media (hover: hover) {
119
+ .vh-example-play:hover {
120
+ color: var(--ui-text-highlighted);
121
+ }
122
+ }
123
+
124
+ /* A segmented switch: a muted track and a raised thumb that slides to the pressed button. */
125
+ .vh-seg {
126
+ position: relative;
127
+ display: inline-flex;
128
+ border-radius: calc(var(--ui-radius) * 2);
129
+ background: var(--ui-bg-elevated);
130
+ padding: 3px;
131
+ }
132
+
133
+ .vh-seg-thumb {
134
+ position: absolute;
135
+ top: 3px;
136
+ bottom: 3px;
137
+ left: 3px;
138
+ border-radius: 6px;
139
+ background: var(--vh-raised);
140
+ box-shadow: 0 0 0 1px var(--ui-border);
141
+ transition: transform 200ms var(--vh-ease-out), width 200ms var(--vh-ease-out);
142
+ }
143
+
144
+ .vh-seg button {
145
+ position: relative;
146
+ border-radius: 6px;
147
+ padding: 0.2rem 0.65rem;
148
+ color: var(--ui-text-muted);
149
+ font-size: 0.75rem;
150
+ font-weight: 500;
151
+ line-height: 1.5;
152
+ transition: color 150ms ease;
153
+ }
154
+
155
+ /* Before the thumb is measured, the pressed button carries the raised surface itself. */
156
+ .vh-seg button.is-unmeasured[aria-pressed="true"] {
157
+ background: var(--vh-raised);
158
+ box-shadow: 0 0 0 1px var(--ui-border);
159
+ }
160
+
161
+ .vh-seg button[aria-pressed="true"] {
162
+ color: var(--ui-text-highlighted);
163
+ }
164
+
165
+ @media (hover: hover) {
166
+ .vh-seg button:hover {
167
+ color: var(--ui-text-highlighted);
168
+ }
169
+ }
170
+
171
+
172
+ /* Touch screens get 44px targets. */
173
+ @media (pointer: coarse) {
174
+ .vh-seg button {
175
+ min-height: 2.75rem;
176
+ padding: 0.45rem 0.85rem;
177
+ }
178
+
179
+ .vh-example-play {
180
+ min-height: 2.75rem;
181
+ }
182
+ }
183
+
184
+ .vh-seg-thumb.is-still {
185
+ transition: none;
186
+ }
187
+
188
+ @media (prefers-reduced-motion: reduce) {
189
+ .vh-seg-thumb {
190
+ transition: none;
191
+ }
192
+ }
193
+
194
+ /* The preview sits in a hairline frame. The source shows in its own code block. */
195
+ .vh-example[data-view="preview"] > .vh-example-body:has(> .docs-example-preview) > :deep(:not(.docs-example-preview)),
196
+ .vh-example[data-view="code"] > .vh-example-body > :deep(.docs-example-preview) {
197
+ display: none;
198
+ }
199
+
200
+ .vh-example-body > :deep(.docs-example-preview) {
201
+ border-radius: calc(var(--ui-radius) * 2);
202
+ box-shadow: 0 0 0 1px var(--ui-border);
203
+ padding: 1.25rem 1.5rem;
204
+ }
205
+
206
+ /* Blocks add their own `style` and `script` elements, which aren't the first or last thing a reader sees. */
207
+ .vh-example-body > :deep(.docs-example-preview > :nth-child(1 of :not(style, script))) {
208
+ margin-top: 0;
209
+ }
210
+
211
+ .vh-example-body > :deep(.docs-example-preview > :nth-last-child(1 of :not(style, script))) {
212
+ margin-bottom: 0;
213
+ }
214
+
215
+ /* A block that draws its own frame marks its root with `data-comark-frame` and needs no second one around it, so a
216
+ preview that holds only such blocks drops its ring and padding and stacks them with a gap. comark-ui's charts and
217
+ tables don't carry the marker, and a plain `figure`, `pre`, or `table` frames itself too. A block that only has an
218
+ HTML renderer arrives in a `.comark-html` wrapper, so its direct children are checked for the marker as well.
219
+ Only in the Preview view: these rules come after the one that hides the preview and are as specific, so they would win. */
220
+ .vh-example[data-view="preview"] > .vh-example-body > :deep(.docs-example-preview:not(:has(> :not(style, script, .comark-html, [data-comark-frame], .cch, .ctb, figure, pre, table))):not(:has(> .comark-html > :not(style, script, [data-comark-frame], .cch, .ctb, figure, pre, table)))),
221
+ .vh-example[data-view="preview"] > .vh-example-body > :deep(.docs-example-preview:has(> p > :is(.cm-video, .cm-audio))) {
222
+ display: flex;
223
+ flex-direction: column;
224
+ gap: 1rem;
225
+ box-shadow: none;
226
+ padding: 0;
227
+ }
228
+
229
+ .vh-example-body > :deep(.docs-example-preview > :is([data-comark-frame], .cch, .ctb)),
230
+ .vh-example-body > :deep(.docs-example-preview > .comark-html > [data-comark-frame]) {
231
+ margin-block: 0;
232
+ }
233
+
234
+ .vh-example-body > :deep(:not(.docs-example-preview)) {
235
+ margin-block: 0;
236
+ }
237
+
238
+ /* A Vue example keeps its height before its module loads. The height is a minimum, so text that wraps on a narrow
239
+ screen grows the frame. A flush example fills a fixed height edge to edge, as a chat fills its parent. */
240
+ .vh-example-live {
241
+ min-width: 0;
242
+ min-height: calc(var(--vh-example-height, 0rem) + 2.5rem);
243
+ overflow-x: auto;
244
+ }
245
+
246
+ .vh-example-live.is-flush {
247
+ height: var(--vh-example-height, auto);
248
+ min-height: 0;
249
+ overflow: hidden;
250
+ padding: 0;
251
+ }
252
+
253
+ .vh-example-loading {
254
+ display: grid;
255
+ min-height: var(--vh-example-height, 4rem);
256
+ place-items: center;
257
+ color: var(--ui-text-muted);
258
+ font-size: 0.875rem;
259
+ }
260
+ </style>
@@ -0,0 +1,6 @@
1
+ <!-- The rendered copy of an example, which the parser writes before the example's source. -->
2
+ <template>
3
+ <div class="docs-example-preview">
4
+ <slot />
5
+ </div>
6
+ </template>
@@ -0,0 +1,71 @@
1
+ <script setup lang="ts">
2
+ // `::examples`: one tab per `:::example`. Each example's Playground link and Preview and Code switch sit at the end of
3
+ // the tab row.
4
+ import type { VNode } from "vue"
5
+
6
+ const slots = useSlots()
7
+ const items = computed(() => (slots.default?.() ?? []).filter((node: VNode) => typeof node.type === "object"))
8
+ const labels = computed(() => items.value.map((node, at) => String(node.props?.label ?? `Example ${at + 1}`)))
9
+ const active = ref(0)
10
+ // Mount each preview on first use, then retain its state between tabs.
11
+ const opened = ref(new Set([0]))
12
+ // One view for every example, so Code stays on when the reader changes tabs.
13
+ const view = ref<"preview" | "code">("preview")
14
+ const tabs = computed(() => labels.value.map((label, at) => ({ label, value: at })))
15
+
16
+ watch(active, (at) => opened.value.add(at))
17
+ </script>
18
+
19
+ <template>
20
+ <div class="vh-examples">
21
+ <UTabs v-model="active" :items="tabs" :content="false" class="vh-examples-tabs" aria-label="Examples" />
22
+ <div
23
+ v-for="(item, at) in items"
24
+ v-show="at === active"
25
+ :key="at"
26
+ role="tabpanel"
27
+ :aria-label="labels[at]"
28
+ class="vh-examples-panel"
29
+ >
30
+ <component :is="item" v-if="opened.has(at)" v-model:view="view" />
31
+ </div>
32
+ </div>
33
+ </template>
34
+
35
+ <style scoped>
36
+ .vh-examples {
37
+ position: relative;
38
+ margin: 2.5rem 0 1.5rem;
39
+ }
40
+
41
+ /* The theme's underline tabs. Room is kept at the end for the controls of the open example. */
42
+ .vh-examples-tabs {
43
+ margin: 0 15.5rem 0.75rem 0;
44
+ overflow-x: auto;
45
+ scrollbar-width: none;
46
+ }
47
+
48
+ .vh-examples-panel > :deep(.vh-example) {
49
+ margin-block: 0;
50
+ }
51
+
52
+ .vh-examples-panel :deep(.vh-example-bar) {
53
+ position: absolute;
54
+ top: 0.3rem;
55
+ right: 0;
56
+ margin: 0;
57
+ }
58
+
59
+ /* On a narrow page the controls take their own row under the tabs. */
60
+ @media (width < 40rem) {
61
+ .vh-examples-tabs {
62
+ margin-right: 0;
63
+ }
64
+
65
+ .vh-examples-panel :deep(.vh-example-bar) {
66
+ position: static;
67
+ margin-bottom: 0.5rem;
68
+ }
69
+ }
70
+
71
+ </style>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ // `::incorrect`: an example titled Incorrect, such as Markdown that a lint rule reports. `title` or the `#title` slot renames it.
3
+ import Example from "./Example.vue"
4
+
5
+ defineOptions({ inheritAttrs: false })
6
+ defineProps<{ title?: string }>()
7
+ </script>
8
+
9
+ <template>
10
+ <Example v-bind="$attrs">
11
+ <template #title>
12
+ <UIcon name="i-lucide-circle-x" class="size-4" :style="{ color: 'var(--ui-error)' }" aria-hidden="true" />
13
+ <slot name="title">{{ title ?? "Incorrect" }}</slot>
14
+ </template>
15
+ <slot />
16
+ </Example>
17
+ </template>
@@ -0,0 +1,170 @@
1
+ <script setup lang="ts">
2
+ // `:::mcp-client{label icon method}` inside `::mcp-install`: the setup of one client. Its Markdown is the steps,
3
+ // usually a numbered list, which shows as numbered circles. `install` adds the client's one-click install link,
4
+ // and `note` adds a footer line.
5
+ import { docsMcpInstallLinks } from "#docs/navigation"
6
+
7
+ const props = defineProps<{
8
+ label: string
9
+ icon?: string
10
+ /** How the server gets into this client, such as "Terminal" or "Settings". */
11
+ method?: string
12
+ /** A client with a one-click install link from the site's MCP config. */
13
+ install?: "cursor" | "vscode"
14
+ note?: string
15
+ }>()
16
+
17
+ const { mcp, site } = useDocsConfig()
18
+ const installUrl = computed(() => props.install && mcp ? docsMcpInstallLinks(mcp)[props.install] : undefined)
19
+ </script>
20
+
21
+ <template>
22
+ <article class="vh-mcp-guide" :aria-label="`${label} setup`">
23
+ <header class="vh-mcp-guide-header">
24
+ <span class="vh-mcp-guide-logo"><UIcon :name="icon ?? 'i-lucide-plug'" aria-hidden="true" /></span>
25
+ <div class="vh-mcp-guide-title">
26
+ <h3>Add the {{ site.name }} MCP to {{ label }}</h3>
27
+ <p v-if="method">{{ method }}</p>
28
+ </div>
29
+ <UButton
30
+ v-if="installUrl"
31
+ :to="installUrl"
32
+ external
33
+ size="sm"
34
+ variant="outline"
35
+ color="neutral"
36
+ trailing-icon="i-lucide-arrow-up-right"
37
+ :label="`Add to ${label}`"
38
+ />
39
+ </header>
40
+ <div class="vh-mcp-guide-body">
41
+ <slot />
42
+ </div>
43
+ <footer v-if="note" class="vh-mcp-guide-note">{{ note }}</footer>
44
+ </article>
45
+ </template>
46
+
47
+ <style scoped>
48
+ .vh-mcp-guide {
49
+ overflow: hidden;
50
+ border: 1px solid var(--ui-border);
51
+ border-radius: calc(var(--ui-radius) * 3);
52
+ background: var(--ui-bg);
53
+ }
54
+
55
+ .vh-mcp-guide-header {
56
+ display: flex;
57
+ flex-wrap: wrap;
58
+ align-items: center;
59
+ gap: 0.75rem;
60
+ padding: 0.75rem 1rem;
61
+ border-bottom: 1px solid var(--ui-border);
62
+ }
63
+
64
+ .vh-mcp-guide-logo {
65
+ display: flex;
66
+ flex-shrink: 0;
67
+ align-items: center;
68
+ justify-content: center;
69
+ width: 2.25rem;
70
+ height: 2.25rem;
71
+ border: 1px solid var(--ui-border);
72
+ border-radius: calc(var(--ui-radius) * 2);
73
+ font-size: 1.25rem;
74
+ }
75
+
76
+ .vh-mcp-guide-title {
77
+ flex: 1 1 10rem;
78
+ min-width: 0;
79
+ }
80
+
81
+ .vh-mcp-guide-title h3 {
82
+ margin: 0;
83
+ font-size: 0.875rem;
84
+ font-weight: 500;
85
+ line-height: 1.25rem;
86
+ color: var(--ui-text-highlighted);
87
+ }
88
+
89
+ .vh-mcp-guide-title p {
90
+ margin: 0;
91
+ font-size: 0.75rem;
92
+ line-height: 1rem;
93
+ color: var(--ui-text-muted);
94
+ }
95
+
96
+ .vh-mcp-guide-body {
97
+ padding: 1rem;
98
+ font-size: 0.875rem;
99
+ line-height: 1.375rem;
100
+ color: var(--ui-text-muted);
101
+ }
102
+
103
+ .vh-mcp-guide-body :deep(> :first-child) {
104
+ margin-top: 0;
105
+ }
106
+
107
+ .vh-mcp-guide-body :deep(> :last-child) {
108
+ margin-bottom: 0;
109
+ }
110
+
111
+ .vh-mcp-guide-body :deep(p) {
112
+ margin-block: 0.5rem;
113
+ }
114
+
115
+ .vh-mcp-guide-body :deep(code:not(pre code)) {
116
+ color: var(--ui-text-highlighted);
117
+ }
118
+
119
+ /* Numbered steps: each item gets its number in a circle, like a setup guide. */
120
+ .vh-mcp-guide-body :deep(ol) {
121
+ display: grid;
122
+ gap: 0.875rem;
123
+ margin: 0;
124
+ padding: 0;
125
+ list-style: none;
126
+ counter-reset: vh-mcp-step;
127
+ }
128
+
129
+ .vh-mcp-guide-body :deep(ol > li) {
130
+ position: relative;
131
+ min-width: 0;
132
+ margin: 0;
133
+ padding-left: 2.25rem;
134
+ counter-increment: vh-mcp-step;
135
+ }
136
+
137
+ .vh-mcp-guide-body :deep(ol > li)::before {
138
+ content: counter(vh-mcp-step);
139
+ position: absolute;
140
+ top: -0.0625rem;
141
+ left: 0;
142
+ display: flex;
143
+ align-items: center;
144
+ justify-content: center;
145
+ width: 1.5rem;
146
+ height: 1.5rem;
147
+ border: 1px solid var(--ui-border);
148
+ border-radius: 999px;
149
+ font-size: 0.75rem;
150
+ font-variant-numeric: tabular-nums;
151
+ color: var(--ui-text-toned);
152
+ }
153
+
154
+ .vh-mcp-guide-body :deep(ol > li > p:first-child) {
155
+ margin-top: 0;
156
+ }
157
+
158
+ .vh-mcp-guide-body :deep(li .code-block-wrapper) {
159
+ margin-block: 0.5rem 0;
160
+ }
161
+
162
+ .vh-mcp-guide-note {
163
+ padding: 0.75rem 1rem;
164
+ border-top: 1px solid var(--ui-border);
165
+ background: var(--ui-bg-muted);
166
+ font-size: 0.75rem;
167
+ line-height: 1.25rem;
168
+ color: var(--ui-text-muted);
169
+ }
170
+ </style>