@kirchdev/duxt 0.3.4 → 0.3.5-dev-main.44-5337cc1
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 +24 -9
- package/app/app.vue +17 -11
- package/app/assets/css/duxt.css +47 -6
- package/app/components/DuxtAnnouncements.vue +117 -0
- package/app/components/DuxtBrunoEntries.vue +62 -0
- package/app/components/DuxtCodeBlock.vue +18 -34
- package/app/components/DuxtCodeToolbar.vue +14 -0
- package/app/components/DuxtCopyButton.vue +33 -0
- package/app/components/DuxtCopyPage.vue +32 -30
- package/app/components/DuxtFooter.vue +39 -8
- package/app/components/DuxtHeader.vue +107 -48
- package/app/components/DuxtLandingProse.vue +1 -1
- package/app/components/DuxtLinkLabel.vue +36 -0
- package/app/components/DuxtLiveWindow.vue +8 -8
- package/app/components/DuxtLocale.vue +10 -1
- package/app/components/DuxtNavigation.vue +2 -2
- package/app/components/DuxtOpenApiClient.vue +285 -90
- package/app/components/DuxtOpenApiMedia.vue +30 -18
- package/app/components/DuxtOpenApiSchema.vue +10 -7
- package/app/components/DuxtPageFeedback.vue +7 -0
- package/app/components/DuxtPageInfo.vue +15 -12
- package/app/components/DuxtPageNav.vue +41 -27
- package/app/components/DuxtPreviewSkeleton.vue +4 -4
- package/app/components/DuxtProgress.vue +2 -14
- package/app/components/DuxtSearch.vue +230 -90
- package/app/components/DuxtSearchInput.vue +70 -0
- package/app/components/DuxtSections.vue +11 -1
- package/app/components/DuxtSegmented.vue +64 -0
- package/app/components/DuxtShortcuts.vue +16 -11
- package/app/components/DuxtShortcutsTrigger.vue +49 -0
- package/app/components/DuxtSkipLink.vue +1 -1
- package/app/components/DuxtToc.vue +16 -10
- package/app/components/DuxtTranslationBanner.vue +1 -1
- package/app/components/DuxtVersion.vue +53 -12
- package/app/components/DuxtVersionBanner.vue +5 -5
- package/app/components/content/AccordionItem.vue +2 -2
- package/app/components/content/BrunoOverview.vue +260 -0
- package/app/components/content/BrunoRequest.vue +141 -0
- package/app/components/content/BrunoRequests.vue +104 -0
- package/app/components/content/Callout.vue +5 -5
- package/app/components/content/ChangelogReleases.vue +161 -40
- package/app/components/content/CodeGroup.vue +41 -37
- package/app/components/content/Field.vue +1 -1
- package/app/components/content/FileTree.vue +1 -1
- package/app/components/content/OpenApiOperation.vue +4 -4
- package/app/components/content/OpenApiOperations.vue +1 -1
- package/app/components/content/OpenApiOverview.vue +1 -1
- package/app/components/content/PackageManagers.vue +42 -58
- package/app/components/content/PageCards.vue +7 -4
- package/app/components/content/Preview.vue +15 -39
- package/app/components/content/ProseImg.vue +596 -49
- package/app/components/content/Since.vue +1 -1
- package/app/components/content/Steps.vue +6 -4
- package/app/components/content/TabGroup.vue +13 -12
- package/app/components/ui/breadcrumb/BreadcrumbSeparator.vue +1 -1
- package/app/components/ui/command/CommandShortcut.vue +1 -1
- package/app/components/ui/dialog/DialogContent.vue +2 -2
- package/app/components/ui/dialog/DialogHeader.vue +1 -1
- package/app/components/ui/dialog/DialogScrollContent.vue +1 -1
- package/app/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +2 -2
- package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/app/components/ui/dropdown-menu/DropdownMenuLabel.vue +1 -1
- package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +2 -2
- package/app/components/ui/dropdown-menu/DropdownMenuShortcut.vue +1 -1
- package/app/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +2 -2
- package/app/components/ui/navigation-menu/NavigationMenuContent.vue +1 -1
- package/app/components/ui/navigation-menu/NavigationMenuTrigger.vue +1 -1
- package/app/components/ui/navigation-menu/NavigationMenuViewport.vue +1 -1
- package/app/components/ui/scroll-area/ScrollBar.vue +1 -1
- package/app/components/ui/select/SelectItem.vue +2 -2
- package/app/components/ui/sheet/SheetContent.vue +29 -3
- package/app/components/ui/sidebar/Sidebar.vue +28 -4
- package/app/components/ui/sidebar/SidebarGroupAction.vue +1 -1
- package/app/components/ui/sidebar/SidebarInset.vue +1 -1
- package/app/components/ui/sidebar/SidebarMenuAction.vue +1 -1
- package/app/components/ui/sidebar/SidebarMenuBadge.vue +1 -1
- package/app/components/ui/sidebar/SidebarMenuSub.vue +1 -1
- package/app/components/ui/sidebar/SidebarMenuSubButton.vue +1 -1
- package/app/components/ui/sidebar/SidebarProvider.vue +7 -16
- package/app/components/ui/sidebar/index.ts +10 -2
- package/app/components/ui/sidebar/utils.ts +0 -1
- package/app/components/ui/sonner/Sonner.vue +18 -0
- package/app/components/ui/tabs/TabsList.vue +13 -3
- package/app/components/ui/tabs/TabsTrigger.vue +24 -3
- package/app/components/ui/tooltip/TooltipContent.vue +2 -2
- package/app/composables/useActiveHeading.ts +3 -25
- package/app/composables/useDuxtAnalytics.ts +50 -0
- package/app/composables/useDuxtAnimatedHeight.ts +8 -38
- package/app/composables/useDuxtAnnouncements.ts +153 -0
- package/app/composables/useDuxtCopy.ts +51 -0
- package/app/composables/useDuxtDirection.ts +23 -0
- package/app/composables/useDuxtNavigation.ts +28 -8
- package/app/composables/useDuxtPath.ts +3 -5
- package/app/composables/useDuxtSearch.ts +87 -35
- package/app/composables/useDuxtSection.ts +15 -1
- package/app/composables/useDuxtSectionRow.ts +6 -5
- package/app/composables/useDuxtShortcuts.ts +319 -20
- package/app/composables/useDuxtVersion.ts +57 -6
- package/app/composables/useDuxtViewportMeasure.ts +37 -0
- package/app/composables/useFuzzySearch.ts +9 -4
- package/app/composables/useRecentPages.ts +14 -17
- package/app/error.vue +112 -74
- package/app/layouts/changelog.vue +9 -1
- package/app/layouts/default.vue +9 -0
- package/app/layouts/docs.vue +9 -1
- package/app/layouts/reference.vue +9 -1
- package/app/middleware/duxt-section-layout.global.ts +1 -3
- package/app/pages/[...slug].vue +146 -35
- package/app/pages/index.vue +15 -23
- package/app/types/duxt.d.ts +312 -4
- package/app/utils/analytics.ts +91 -0
- package/app/utils/announcements.ts +205 -0
- package/app/utils/changelog.ts +0 -28
- package/app/utils/code-highlight.ts +3 -1
- package/app/utils/contributor-avatar.ts +27 -0
- package/app/utils/direction.ts +43 -0
- package/app/utils/duxt-config.ts +43 -0
- package/app/utils/duxt-text.ts +10 -0
- package/app/utils/format-date.ts +28 -0
- package/app/utils/generated-sections.ts +68 -12
- package/app/utils/generated-toc.ts +14 -7
- package/app/utils/locale-path.ts +43 -0
- package/app/utils/navigation-tree.ts +51 -1
- package/app/utils/nearest-page.ts +8 -0
- package/app/utils/openapi.ts +16 -11
- package/app/utils/page-controls.ts +215 -0
- package/app/utils/pill.ts +61 -0
- package/app/utils/prose-image.ts +128 -0
- package/app/utils/search-context.ts +110 -0
- package/app/utils/search-display.ts +248 -0
- package/app/utils/section-scope.ts +65 -4
- package/app/utils/stored-json.ts +31 -0
- package/app/utils/version-choices.ts +6 -13
- package/app/utils/version-paths.ts +21 -0
- package/bin/duxt-cache-key.mjs +61 -0
- package/bin/duxt-og-cache.mjs +58 -0
- package/bin/{duxt-report.mjs → duxt.mjs} +13 -7
- package/bruno-model.ts +169 -0
- package/bruno-parse.ts +656 -0
- package/bruno-zip.ts +195 -0
- package/cli.ts +240 -0
- package/duxt-app-config.ts +18 -1
- package/frontmatter.ts +49 -0
- package/git-contributors.ts +322 -0
- package/i18n/locales/de/duxt/announcement.json +7 -0
- package/i18n/locales/de/duxt/bruno.json +25 -0
- package/i18n/locales/de/duxt/changelog.json +1 -1
- package/i18n/locales/de/duxt/code.json +2 -1
- package/i18n/locales/de/duxt/page.json +9 -0
- package/i18n/locales/de/duxt/shortcuts.json +1 -0
- package/i18n/locales/de/duxt/theme.json +2 -1
- package/i18n/locales/en/duxt/announcement.json +7 -0
- package/i18n/locales/en/duxt/bruno.json +25 -0
- package/i18n/locales/en/duxt/changelog.json +1 -1
- package/i18n/locales/en/duxt/code.json +2 -1
- package/i18n/locales/en/duxt/page.json +9 -0
- package/i18n/locales/en/duxt/shortcuts.json +1 -0
- package/i18n/locales/en/duxt/theme.json +2 -1
- package/i18n/locales/es/duxt/announcement.json +7 -0
- package/i18n/locales/es/duxt/bruno.json +25 -0
- package/i18n/locales/es/duxt/changelog.json +1 -1
- package/i18n/locales/es/duxt/code.json +2 -1
- package/i18n/locales/es/duxt/page.json +9 -0
- package/i18n/locales/es/duxt/shortcuts.json +1 -0
- package/i18n/locales/es/duxt/theme.json +2 -1
- package/i18n/locales/fr/duxt/announcement.json +7 -0
- package/i18n/locales/fr/duxt/bruno.json +25 -0
- package/i18n/locales/fr/duxt/changelog.json +1 -1
- package/i18n/locales/fr/duxt/code.json +2 -1
- package/i18n/locales/fr/duxt/page.json +9 -0
- package/i18n/locales/fr/duxt/shortcuts.json +1 -0
- package/i18n/locales/fr/duxt/theme.json +2 -1
- package/i18n/locales/pt/duxt/announcement.json +7 -0
- package/i18n/locales/pt/duxt/bruno.json +25 -0
- package/i18n/locales/pt/duxt/changelog.json +1 -1
- package/i18n/locales/pt/duxt/code.json +2 -1
- package/i18n/locales/pt/duxt/page.json +9 -0
- package/i18n/locales/pt/duxt/shortcuts.json +1 -0
- package/i18n/locales/pt/duxt/theme.json +2 -1
- package/modules/bruno.ts +118 -0
- package/modules/config.ts +26 -0
- package/modules/devtools.ts +2 -3
- package/modules/git-meta.ts +16 -47
- package/modules/search-records.ts +132 -0
- package/nuxt.config.ts +81 -7
- package/og-image-cache.ts +742 -0
- package/package.json +42 -10
- package/public/devtools/checks.html +2 -2
- package/public/devtools/config.html +59 -4
- package/public/devtools/pages.html +8 -1
- package/public/devtools/paths.html +1 -1
- package/public/devtools/sources.html +2 -2
- package/public/devtools/versions.html +3 -0
- package/report.ts +28 -19
- package/search-records.ts +380 -0
- package/section-input.ts +142 -0
- package/section-markdown.ts +67 -0
- package/section-reports.ts +10 -4
- package/sections-bruno.ts +571 -0
- package/sections-changelog.ts +76 -43
- package/sections-openapi.ts +12 -83
- package/sections-resolve.ts +174 -8
- package/sections.ts +33 -10
- package/server/devtools/shell.ts +1 -1
- package/server/mcp/tools/list-pages.ts +77 -36
- package/server/mcp/tools/list-versions.ts +84 -0
- package/server/mcp/tools/read-page.ts +80 -26
- package/server/mcp/tools/search-docs.ts +87 -53
- package/server/middleware/raw-markdown.ts +1 -1
- package/server/routes/llms-full.txt.get.ts +6 -8
- package/server/routes/llms.txt.get.ts +1 -1
- package/server/utils/duxt-server-text.ts +0 -13
- package/server/utils/llms-pages.ts +24 -9
- package/server/utils/mcp-docs.ts +577 -0
- package/sources-cache.ts +376 -0
- package/sources-git.ts +186 -31
- package/sources-resolve.ts +59 -1
- package/sources.ts +122 -13
- package/tfplugindocs.ts +158 -0
package/nuxt.config.ts
CHANGED
|
@@ -61,6 +61,8 @@ const locales = [
|
|
|
61
61
|
language: 'en-GB',
|
|
62
62
|
name: 'English (UK)',
|
|
63
63
|
files: [
|
|
64
|
+
'en/duxt/announcement.json',
|
|
65
|
+
'en/duxt/bruno.json',
|
|
64
66
|
'en/duxt/changelog.json',
|
|
65
67
|
'en/duxt/code.json',
|
|
66
68
|
'en/duxt/devtools.json',
|
|
@@ -83,6 +85,8 @@ const locales = [
|
|
|
83
85
|
language: 'en-US',
|
|
84
86
|
name: 'English (US)',
|
|
85
87
|
files: [
|
|
88
|
+
'en/duxt/announcement.json',
|
|
89
|
+
'en/duxt/bruno.json',
|
|
86
90
|
'en/duxt/changelog.json',
|
|
87
91
|
'en/duxt/code.json',
|
|
88
92
|
'en/duxt/devtools.json',
|
|
@@ -105,6 +109,8 @@ const locales = [
|
|
|
105
109
|
language: 'de-DE',
|
|
106
110
|
name: 'Deutsch',
|
|
107
111
|
files: [
|
|
112
|
+
'de/duxt/announcement.json',
|
|
113
|
+
'de/duxt/bruno.json',
|
|
108
114
|
'de/duxt/changelog.json',
|
|
109
115
|
'de/duxt/code.json',
|
|
110
116
|
'de/duxt/devtools.json',
|
|
@@ -127,6 +133,8 @@ const locales = [
|
|
|
127
133
|
language: 'es-ES',
|
|
128
134
|
name: 'Español',
|
|
129
135
|
files: [
|
|
136
|
+
'es/duxt/announcement.json',
|
|
137
|
+
'es/duxt/bruno.json',
|
|
130
138
|
'es/duxt/changelog.json',
|
|
131
139
|
'es/duxt/code.json',
|
|
132
140
|
'es/duxt/devtools.json',
|
|
@@ -149,6 +157,8 @@ const locales = [
|
|
|
149
157
|
language: 'fr-FR',
|
|
150
158
|
name: 'Français',
|
|
151
159
|
files: [
|
|
160
|
+
'fr/duxt/announcement.json',
|
|
161
|
+
'fr/duxt/bruno.json',
|
|
152
162
|
'fr/duxt/changelog.json',
|
|
153
163
|
'fr/duxt/code.json',
|
|
154
164
|
'fr/duxt/devtools.json',
|
|
@@ -171,6 +181,8 @@ const locales = [
|
|
|
171
181
|
language: 'pt-PT',
|
|
172
182
|
name: 'Português',
|
|
173
183
|
files: [
|
|
184
|
+
'pt/duxt/announcement.json',
|
|
185
|
+
'pt/duxt/bruno.json',
|
|
174
186
|
'pt/duxt/changelog.json',
|
|
175
187
|
'pt/duxt/code.json',
|
|
176
188
|
'pt/duxt/devtools.json',
|
|
@@ -193,6 +205,8 @@ const locales = [
|
|
|
193
205
|
language: 'pt-BR',
|
|
194
206
|
name: 'Português (Brasil)',
|
|
195
207
|
files: [
|
|
208
|
+
'pt/duxt/announcement.json',
|
|
209
|
+
'pt/duxt/bruno.json',
|
|
196
210
|
'pt/duxt/changelog.json',
|
|
197
211
|
'pt/duxt/code.json',
|
|
198
212
|
'pt/duxt/devtools.json',
|
|
@@ -242,6 +256,17 @@ export default defineNuxtConfig({
|
|
|
242
256
|
// serves that page at.
|
|
243
257
|
layer('./modules/redirects.ts'),
|
|
244
258
|
|
|
259
|
+
// The downloadable archive of every local Bruno collection, written during
|
|
260
|
+
// the build and served as a static asset. A no-op for a site that declares
|
|
261
|
+
// no `bruno` section.
|
|
262
|
+
layer('./modules/bruno.ts'),
|
|
263
|
+
|
|
264
|
+
// The layer's one build-time extension point: every parsed page of every
|
|
265
|
+
// source, version and language, handed to `duxt:search:records` so an
|
|
266
|
+
// external search provider can be a layer rather than a fork. Builds
|
|
267
|
+
// nothing while no consumer is listening, which is every site until one is.
|
|
268
|
+
layer('./modules/search-records.ts'),
|
|
269
|
+
|
|
245
270
|
/**
|
|
246
271
|
* The SEO half, BEFORE Content on purpose.
|
|
247
272
|
*
|
|
@@ -305,11 +330,37 @@ export default defineNuxtConfig({
|
|
|
305
330
|
mcp: {
|
|
306
331
|
description: 'The documentation this site publishes, readable by an agent.',
|
|
307
332
|
instructions:
|
|
308
|
-
'Call
|
|
309
|
-
'
|
|
333
|
+
'Call list_versions first: it gives the URL prefix that scopes one ' +
|
|
334
|
+
'documentation version. Pass that prefix to list_pages for its table of ' +
|
|
335
|
+
'contents or to search_docs to find a page by term, then read_page for ' +
|
|
336
|
+
'one page as Markdown.'
|
|
310
337
|
},
|
|
311
338
|
|
|
312
|
-
nitro:
|
|
339
|
+
nitro: {
|
|
340
|
+
/**
|
|
341
|
+
* THE MCP TOOLS CANNOT REACH THE REQUEST WITHOUT THIS.
|
|
342
|
+
*
|
|
343
|
+
* `@nuxtjs/mcp-toolkit` hands a tool handler the MCP SDK's
|
|
344
|
+
* `RequestHandlerExtra` and nothing of H3's, so the only way into the
|
|
345
|
+
* request from inside a tool is `useEvent()` — which throws
|
|
346
|
+
* "Nitro request context is not available" unless Nitro wraps each request
|
|
347
|
+
* in an `AsyncLocalStorage`. The toolkit's own server helpers
|
|
348
|
+
* (`useMcpServer`, `useMcpSession`, `useMcpLogger`) are built on the same
|
|
349
|
+
* call, so this is a prerequisite of mounting an MCP server rather than a
|
|
350
|
+
* preference of duxt's.
|
|
351
|
+
*
|
|
352
|
+
* It is the one Nitro flag this layer imposes on a consumer, and it is
|
|
353
|
+
* imposed knowingly: the alternative is four tools that answer from the
|
|
354
|
+
* global `$fetch` and the default locale instead of from the request, i.e.
|
|
355
|
+
* a second database-reading code path that exists only under `/mcp` and
|
|
356
|
+
* that only a Worker would ever have disagreed with. A consumer who wants
|
|
357
|
+
* it off writes `nitro: { experimental: { asyncContext: false } }` and
|
|
358
|
+
* loses `/mcp`, nothing else.
|
|
359
|
+
*/
|
|
360
|
+
experimental: { asyncContext: true },
|
|
361
|
+
|
|
362
|
+
...(wasm ? { externals: { traceInclude: [wasm] } } : {})
|
|
363
|
+
},
|
|
313
364
|
|
|
314
365
|
css: [layer('./app/assets/css/duxt.css')],
|
|
315
366
|
|
|
@@ -331,15 +382,38 @@ export default defineNuxtConfig({
|
|
|
331
382
|
dark: 'github-dark'
|
|
332
383
|
},
|
|
333
384
|
langs: highlightLangs
|
|
334
|
-
}
|
|
385
|
+
},
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* PARSE the whole outline; decide how much of it to draw later.
|
|
389
|
+
*
|
|
390
|
+
* MDC's `depth` is a COUNT from `h2` over `[h2,h3,h4,h5,h6]`, and its
|
|
391
|
+
* default of `2` stops at `h3` — so a page writing `toc: { maxDepth: 5 }`
|
|
392
|
+
* would have asked for headings Content never put in `body.toc`, and
|
|
393
|
+
* the field would be a promise the build quietly broke. Parsing all
|
|
394
|
+
* five costs a few rows in a table nobody queries by depth.
|
|
395
|
+
*
|
|
396
|
+
* It does NOT change what a reader sees: `duxtTocLinks` cuts the tree
|
|
397
|
+
* back to `duxt.toc.depth` — still `h3` — before `DuxtToc` draws it, so
|
|
398
|
+
* a page that asks for nothing gets exactly the column it always had.
|
|
399
|
+
*
|
|
400
|
+
* `searchDepth` is deliberately left alone. It bounds how deep into the
|
|
401
|
+
* node tree headings are looked for, not which levels count, so raising
|
|
402
|
+
* it would change which pages have an outline at all.
|
|
403
|
+
*/
|
|
404
|
+
toc: { depth: 5 }
|
|
335
405
|
}
|
|
336
406
|
},
|
|
337
407
|
|
|
338
408
|
// Content's default driver, better-sqlite3, is a native addon compiled
|
|
339
|
-
// through node-gyp. Node 24
|
|
340
|
-
// needed — see CLAUDE.md for the fallback if this
|
|
409
|
+
// through node-gyp. `native` is Node 24's own node:sqlite, so no driver
|
|
410
|
+
// package is needed — see CLAUDE.md for the fallback if this option ever
|
|
411
|
+
// goes away. It replaced `nativeSqlite: true`, which Content still honours
|
|
412
|
+
// but marks deprecated; a layer is the worst place to carry a deprecation,
|
|
413
|
+
// so tests/sqlite-connector.test.ts holds this block to whatever the
|
|
414
|
+
// installed Content declares current.
|
|
341
415
|
experimental: {
|
|
342
|
-
|
|
416
|
+
sqliteConnector: 'native'
|
|
343
417
|
}
|
|
344
418
|
},
|
|
345
419
|
|