@kirchdev/duxt 0.1.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/LICENSE +21 -0
- package/README.md +151 -0
- package/app/app.config.ts +13 -0
- package/app/app.vue +122 -0
- package/app/assets/css/duxt.css +555 -0
- package/app/assets/css/typeset.css +498 -0
- package/app/components/DuxtBrand.vue +53 -0
- package/app/components/DuxtBreadcrumb.vue +37 -0
- package/app/components/DuxtCodeBlock.vue +143 -0
- package/app/components/DuxtCopyPage.vue +117 -0
- package/app/components/DuxtFooter.vue +86 -0
- package/app/components/DuxtHeader.vue +496 -0
- package/app/components/DuxtJsonEditor.vue +359 -0
- package/app/components/DuxtLandingProse.vue +90 -0
- package/app/components/DuxtLandingShowcase.vue +295 -0
- package/app/components/DuxtLiveWindow.vue +343 -0
- package/app/components/DuxtLocale.vue +86 -0
- package/app/components/DuxtMetaList.vue +76 -0
- package/app/components/DuxtNavigation.vue +94 -0
- package/app/components/DuxtNavigationLink.vue +41 -0
- package/app/components/DuxtOpenApiCallbacks.vue +92 -0
- package/app/components/DuxtOpenApiClient.vue +1339 -0
- package/app/components/DuxtOpenApiMedia.vue +108 -0
- package/app/components/DuxtOpenApiMethod.vue +59 -0
- package/app/components/DuxtOpenApiParameters.vue +114 -0
- package/app/components/DuxtOpenApiResponses.vue +109 -0
- package/app/components/DuxtOpenApiSchema.vue +365 -0
- package/app/components/DuxtOpenApiSecurity.vue +115 -0
- package/app/components/DuxtPageFeedback.vue +56 -0
- package/app/components/DuxtPageInfo.vue +194 -0
- package/app/components/DuxtPageNav.vue +93 -0
- package/app/components/DuxtPreviewSkeleton.vue +262 -0
- package/app/components/DuxtProgress.vue +45 -0
- package/app/components/DuxtSearch.vue +271 -0
- package/app/components/DuxtSections.vue +65 -0
- package/app/components/DuxtShortcuts.vue +46 -0
- package/app/components/DuxtSkipLink.vue +34 -0
- package/app/components/DuxtToc.vue +86 -0
- package/app/components/DuxtTranslationBanner.vue +64 -0
- package/app/components/DuxtVersion.vue +168 -0
- package/app/components/DuxtVersionBanner.vue +109 -0
- package/app/components/OgImage/Duxt.satori.vue +82 -0
- package/app/components/content/Accordion.vue +37 -0
- package/app/components/content/AccordionItem.vue +46 -0
- package/app/components/content/Callout.vue +58 -0
- package/app/components/content/ChangelogGroup.vue +91 -0
- package/app/components/content/ChangelogReleases.vue +520 -0
- package/app/components/content/CodeGroup.vue +183 -0
- package/app/components/content/DevtoolsPanel.vue +107 -0
- package/app/components/content/Field.vue +50 -0
- package/app/components/content/FieldGroup.vue +8 -0
- package/app/components/content/FileTree.vue +92 -0
- package/app/components/content/Mermaid.vue +70 -0
- package/app/components/content/OpenApiOperation.vue +185 -0
- package/app/components/content/OpenApiOperations.vue +72 -0
- package/app/components/content/OpenApiOverview.vue +302 -0
- package/app/components/content/PackageManagers.vue +187 -0
- package/app/components/content/PageCards.vue +48 -0
- package/app/components/content/Partial.vue +65 -0
- package/app/components/content/Preview.vue +173 -0
- package/app/components/content/ProseA.vue +55 -0
- package/app/components/content/ProseH2.vue +53 -0
- package/app/components/content/ProseH3.vue +53 -0
- package/app/components/content/ProseH4.vue +53 -0
- package/app/components/content/ProseImg.vue +87 -0
- package/app/components/content/ProsePre.vue +58 -0
- package/app/components/content/ProseTable.vue +11 -0
- package/app/components/content/Since.vue +21 -0
- package/app/components/content/Steps.vue +20 -0
- package/app/components/content/Tab.vue +23 -0
- package/app/components/content/TabGroup.vue +58 -0
- package/app/components/ui/alert/Alert.vue +21 -0
- package/app/components/ui/alert/AlertDescription.vue +22 -0
- package/app/components/ui/alert/AlertTitle.vue +22 -0
- package/app/components/ui/alert/index.ts +24 -0
- package/app/components/ui/badge/Badge.vue +28 -0
- package/app/components/ui/badge/index.ts +52 -0
- package/app/components/ui/breadcrumb/Breadcrumb.vue +13 -0
- package/app/components/ui/breadcrumb/BreadcrumbEllipsis.vue +22 -0
- package/app/components/ui/breadcrumb/BreadcrumbItem.vue +17 -0
- package/app/components/ui/breadcrumb/BreadcrumbLink.vue +24 -0
- package/app/components/ui/breadcrumb/BreadcrumbList.vue +22 -0
- package/app/components/ui/breadcrumb/BreadcrumbPage.vue +20 -0
- package/app/components/ui/breadcrumb/BreadcrumbSeparator.vue +21 -0
- package/app/components/ui/breadcrumb/index.ts +7 -0
- package/app/components/ui/button/Button.vue +31 -0
- package/app/components/ui/button/index.ts +39 -0
- package/app/components/ui/card/Card.vue +22 -0
- package/app/components/ui/card/CardAction.vue +22 -0
- package/app/components/ui/card/CardContent.vue +14 -0
- package/app/components/ui/card/CardDescription.vue +17 -0
- package/app/components/ui/card/CardFooter.vue +17 -0
- package/app/components/ui/card/CardHeader.vue +22 -0
- package/app/components/ui/card/CardTitle.vue +17 -0
- package/app/components/ui/card/index.ts +7 -0
- package/app/components/ui/collapsible/Collapsible.vue +19 -0
- package/app/components/ui/collapsible/CollapsibleContent.vue +12 -0
- package/app/components/ui/collapsible/CollapsibleTrigger.vue +12 -0
- package/app/components/ui/collapsible/index.ts +3 -0
- package/app/components/ui/command/Command.vue +98 -0
- package/app/components/ui/command/CommandDialog.vue +42 -0
- package/app/components/ui/command/CommandEmpty.vue +31 -0
- package/app/components/ui/command/CommandGroup.vue +52 -0
- package/app/components/ui/command/CommandInput.vue +45 -0
- package/app/components/ui/command/CommandItem.vue +85 -0
- package/app/components/ui/command/CommandList.vue +32 -0
- package/app/components/ui/command/CommandSeparator.vue +23 -0
- package/app/components/ui/command/CommandShortcut.vue +19 -0
- package/app/components/ui/command/index.ts +29 -0
- package/app/components/ui/dialog/Dialog.vue +15 -0
- package/app/components/ui/dialog/DialogClose.vue +12 -0
- package/app/components/ui/dialog/DialogContent.vue +61 -0
- package/app/components/ui/dialog/DialogDescription.vue +25 -0
- package/app/components/ui/dialog/DialogFooter.vue +30 -0
- package/app/components/ui/dialog/DialogHeader.vue +17 -0
- package/app/components/ui/dialog/DialogOverlay.vue +28 -0
- package/app/components/ui/dialog/DialogScrollContent.vue +65 -0
- package/app/components/ui/dialog/DialogTitle.vue +25 -0
- package/app/components/ui/dialog/DialogTrigger.vue +12 -0
- package/app/components/ui/dialog/index.ts +10 -0
- package/app/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/app/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +47 -0
- package/app/components/ui/dropdown-menu/DropdownMenuContent.vue +47 -0
- package/app/components/ui/dropdown-menu/DropdownMenuGroup.vue +12 -0
- package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +41 -0
- package/app/components/ui/dropdown-menu/DropdownMenuLabel.vue +27 -0
- package/app/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +48 -0
- package/app/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/app/components/ui/dropdown-menu/DropdownMenuShortcut.vue +19 -0
- package/app/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/app/components/ui/dropdown-menu/DropdownMenuSubContent.vue +34 -0
- package/app/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +34 -0
- package/app/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/app/components/ui/dropdown-menu/index.ts +16 -0
- package/app/components/ui/input/Input.vue +35 -0
- package/app/components/ui/input/index.ts +1 -0
- package/app/components/ui/navigation-menu/NavigationMenu.vue +42 -0
- package/app/components/ui/navigation-menu/NavigationMenuContent.vue +35 -0
- package/app/components/ui/navigation-menu/NavigationMenuIndicator.vue +32 -0
- package/app/components/ui/navigation-menu/NavigationMenuItem.vue +23 -0
- package/app/components/ui/navigation-menu/NavigationMenuLink.vue +30 -0
- package/app/components/ui/navigation-menu/NavigationMenuList.vue +30 -0
- package/app/components/ui/navigation-menu/NavigationMenuTrigger.vue +31 -0
- package/app/components/ui/navigation-menu/NavigationMenuViewport.vue +30 -0
- package/app/components/ui/navigation-menu/index.ts +14 -0
- package/app/components/ui/scroll-area/ScrollArea.vue +31 -0
- package/app/components/ui/scroll-area/ScrollBar.vue +38 -0
- package/app/components/ui/scroll-area/index.ts +2 -0
- package/app/components/ui/select/Select.vue +15 -0
- package/app/components/ui/select/SelectContent.vue +59 -0
- package/app/components/ui/select/SelectGroup.vue +19 -0
- package/app/components/ui/select/SelectItem.vue +42 -0
- package/app/components/ui/select/SelectItemText.vue +12 -0
- package/app/components/ui/select/SelectLabel.vue +16 -0
- package/app/components/ui/select/SelectScrollDownButton.vue +28 -0
- package/app/components/ui/select/SelectScrollUpButton.vue +28 -0
- package/app/components/ui/select/SelectSeparator.vue +20 -0
- package/app/components/ui/select/SelectTrigger.vue +32 -0
- package/app/components/ui/select/SelectValue.vue +12 -0
- package/app/components/ui/select/index.ts +11 -0
- package/app/components/ui/separator/Separator.vue +30 -0
- package/app/components/ui/separator/index.ts +1 -0
- package/app/components/ui/sheet/Sheet.vue +15 -0
- package/app/components/ui/sheet/SheetClose.vue +12 -0
- package/app/components/ui/sheet/SheetContent.vue +68 -0
- package/app/components/ui/sheet/SheetDescription.vue +23 -0
- package/app/components/ui/sheet/SheetFooter.vue +15 -0
- package/app/components/ui/sheet/SheetHeader.vue +15 -0
- package/app/components/ui/sheet/SheetOverlay.vue +28 -0
- package/app/components/ui/sheet/SheetTitle.vue +23 -0
- package/app/components/ui/sheet/SheetTrigger.vue +12 -0
- package/app/components/ui/sheet/index.ts +8 -0
- package/app/components/ui/sidebar/Sidebar.vue +110 -0
- package/app/components/ui/sidebar/SidebarContent.vue +23 -0
- package/app/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/app/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/app/components/ui/sidebar/SidebarGroupAction.vue +31 -0
- package/app/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/app/components/ui/sidebar/SidebarGroupLabel.vue +30 -0
- package/app/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/app/components/ui/sidebar/SidebarInput.vue +19 -0
- package/app/components/ui/sidebar/SidebarInset.vue +23 -0
- package/app/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/app/components/ui/sidebar/SidebarMenuAction.vue +42 -0
- package/app/components/ui/sidebar/SidebarMenuBadge.vue +28 -0
- package/app/components/ui/sidebar/SidebarMenuButton.vue +60 -0
- package/app/components/ui/sidebar/SidebarMenuButtonChild.vue +36 -0
- package/app/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/app/components/ui/sidebar/SidebarMenuSkeleton.vue +35 -0
- package/app/components/ui/sidebar/SidebarMenuSub.vue +24 -0
- package/app/components/ui/sidebar/SidebarMenuSubButton.vue +43 -0
- package/app/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/app/components/ui/sidebar/SidebarProvider.vue +109 -0
- package/app/components/ui/sidebar/SidebarRail.vue +35 -0
- package/app/components/ui/sidebar/SidebarSeparator.vue +19 -0
- package/app/components/ui/sidebar/SidebarTrigger.vue +26 -0
- package/app/components/ui/sidebar/index.ts +62 -0
- package/app/components/ui/sidebar/utils.ts +19 -0
- package/app/components/ui/skeleton/Skeleton.vue +17 -0
- package/app/components/ui/skeleton/index.ts +1 -0
- package/app/components/ui/sonner/Sonner.vue +67 -0
- package/app/components/ui/sonner/index.ts +1 -0
- package/app/components/ui/tabs/Tabs.vue +26 -0
- package/app/components/ui/tabs/TabsContent.vue +23 -0
- package/app/components/ui/tabs/TabsList.vue +28 -0
- package/app/components/ui/tabs/TabsTrigger.vue +30 -0
- package/app/components/ui/tabs/index.ts +4 -0
- package/app/components/ui/textarea/Textarea.vue +32 -0
- package/app/components/ui/textarea/index.ts +1 -0
- package/app/components/ui/tooltip/Tooltip.vue +15 -0
- package/app/components/ui/tooltip/TooltipContent.vue +49 -0
- package/app/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/app/components/ui/tooltip/TooltipTrigger.vue +12 -0
- package/app/components/ui/tooltip/index.ts +4 -0
- package/app/composables/useActiveHeading.ts +90 -0
- package/app/composables/useDuxtAnimatedHeight.ts +155 -0
- package/app/composables/useDuxtBreadcrumb.ts +60 -0
- package/app/composables/useDuxtChoice.ts +28 -0
- package/app/composables/useDuxtCollection.ts +89 -0
- package/app/composables/useDuxtConfig.ts +47 -0
- package/app/composables/useDuxtNavigation.ts +87 -0
- package/app/composables/useDuxtPageFocus.ts +30 -0
- package/app/composables/useDuxtPath.ts +42 -0
- package/app/composables/useDuxtSearch.ts +208 -0
- package/app/composables/useDuxtSection.ts +44 -0
- package/app/composables/useDuxtSectionRow.ts +49 -0
- package/app/composables/useDuxtShortcuts.ts +58 -0
- package/app/composables/useDuxtSiteUrl.ts +27 -0
- package/app/composables/useDuxtToast.ts +25 -0
- package/app/composables/useDuxtVersion.ts +138 -0
- package/app/composables/useFuzzySearch.ts +83 -0
- package/app/composables/usePackageManager.ts +4 -0
- package/app/composables/useRecentPages.ts +52 -0
- package/app/error.vue +133 -0
- package/app/layouts/changelog.vue +85 -0
- package/app/layouts/default.vue +23 -0
- package/app/layouts/docs.vue +62 -0
- package/app/layouts/reference.vue +85 -0
- package/app/lib/utils.ts +7 -0
- package/app/middleware/duxt-section-layout.global.ts +57 -0
- package/app/pages/[...slug].vue +441 -0
- package/app/pages/index.vue +479 -0
- package/app/types/duxt.d.ts +955 -0
- package/app/utils/aside.ts +16 -0
- package/app/utils/changelog.ts +182 -0
- package/app/utils/code-highlight.ts +116 -0
- package/app/utils/duxt-config.ts +185 -0
- package/app/utils/duxt-text.ts +135 -0
- package/app/utils/file-icons.ts +62 -0
- package/app/utils/generated-sections.ts +190 -0
- package/app/utils/generated-toc.ts +216 -0
- package/app/utils/heading-link.ts +32 -0
- package/app/utils/locale-path.ts +45 -0
- package/app/utils/navigation-tree.ts +206 -0
- package/app/utils/nearest-page.ts +72 -0
- package/app/utils/openapi.ts +1028 -0
- package/app/utils/package-command.ts +162 -0
- package/app/utils/request-samples.ts +635 -0
- package/app/utils/section-scope.ts +97 -0
- package/app/utils/sheet-navigation.ts +100 -0
- package/app/utils/source-file.ts +84 -0
- package/app/utils/version-choices.ts +68 -0
- package/app/utils/version-paths.ts +65 -0
- package/bin/duxt-report.mjs +45 -0
- package/components.json +19 -0
- package/content-cache.ts +193 -0
- package/content.config.ts +38 -0
- package/duxt-app-config.ts +124 -0
- package/highlight-langs.ts +68 -0
- package/i18n/i18n.config.ts +16 -0
- package/i18n/locales/de/duxt/changelog.json +17 -0
- package/i18n/locales/de/duxt/code.json +13 -0
- package/i18n/locales/de/duxt/defaults.json +22 -0
- package/i18n/locales/de/duxt/devtools.json +7 -0
- package/i18n/locales/de/duxt/error.json +10 -0
- package/i18n/locales/de/duxt/footer.json +7 -0
- package/i18n/locales/de/duxt/locale.json +7 -0
- package/i18n/locales/de/duxt/nav.json +17 -0
- package/i18n/locales/de/duxt/openapi.json +89 -0
- package/i18n/locales/de/duxt/page.json +34 -0
- package/i18n/locales/de/duxt/search.json +12 -0
- package/i18n/locales/de/duxt/shortcuts.json +11 -0
- package/i18n/locales/de/duxt/theme.json +7 -0
- package/i18n/locales/de/duxt/toc.json +7 -0
- package/i18n/locales/de/duxt/version.json +25 -0
- package/i18n/locales/en/duxt/changelog.json +17 -0
- package/i18n/locales/en/duxt/code.json +13 -0
- package/i18n/locales/en/duxt/defaults.json +22 -0
- package/i18n/locales/en/duxt/devtools.json +7 -0
- package/i18n/locales/en/duxt/error.json +10 -0
- package/i18n/locales/en/duxt/footer.json +7 -0
- package/i18n/locales/en/duxt/locale.json +7 -0
- package/i18n/locales/en/duxt/nav.json +17 -0
- package/i18n/locales/en/duxt/openapi.json +89 -0
- package/i18n/locales/en/duxt/page.json +34 -0
- package/i18n/locales/en/duxt/search.json +12 -0
- package/i18n/locales/en/duxt/shortcuts.json +11 -0
- package/i18n/locales/en/duxt/theme.json +7 -0
- package/i18n/locales/en/duxt/toc.json +7 -0
- package/i18n/locales/en/duxt/version.json +25 -0
- package/i18n/locales/es/duxt/changelog.json +17 -0
- package/i18n/locales/es/duxt/code.json +13 -0
- package/i18n/locales/es/duxt/defaults.json +22 -0
- package/i18n/locales/es/duxt/devtools.json +7 -0
- package/i18n/locales/es/duxt/error.json +10 -0
- package/i18n/locales/es/duxt/footer.json +7 -0
- package/i18n/locales/es/duxt/locale.json +7 -0
- package/i18n/locales/es/duxt/nav.json +17 -0
- package/i18n/locales/es/duxt/openapi.json +89 -0
- package/i18n/locales/es/duxt/page.json +34 -0
- package/i18n/locales/es/duxt/search.json +12 -0
- package/i18n/locales/es/duxt/shortcuts.json +11 -0
- package/i18n/locales/es/duxt/theme.json +7 -0
- package/i18n/locales/es/duxt/toc.json +7 -0
- package/i18n/locales/es/duxt/version.json +25 -0
- package/i18n/locales/fr/duxt/changelog.json +17 -0
- package/i18n/locales/fr/duxt/code.json +13 -0
- package/i18n/locales/fr/duxt/defaults.json +22 -0
- package/i18n/locales/fr/duxt/devtools.json +7 -0
- package/i18n/locales/fr/duxt/error.json +10 -0
- package/i18n/locales/fr/duxt/footer.json +7 -0
- package/i18n/locales/fr/duxt/locale.json +7 -0
- package/i18n/locales/fr/duxt/nav.json +17 -0
- package/i18n/locales/fr/duxt/openapi.json +89 -0
- package/i18n/locales/fr/duxt/page.json +34 -0
- package/i18n/locales/fr/duxt/search.json +12 -0
- package/i18n/locales/fr/duxt/shortcuts.json +11 -0
- package/i18n/locales/fr/duxt/theme.json +7 -0
- package/i18n/locales/fr/duxt/toc.json +7 -0
- package/i18n/locales/fr/duxt/version.json +25 -0
- package/i18n/locales/pt/duxt/changelog.json +17 -0
- package/i18n/locales/pt/duxt/code.json +13 -0
- package/i18n/locales/pt/duxt/defaults.json +22 -0
- package/i18n/locales/pt/duxt/devtools.json +7 -0
- package/i18n/locales/pt/duxt/error.json +10 -0
- package/i18n/locales/pt/duxt/footer.json +7 -0
- package/i18n/locales/pt/duxt/locale.json +7 -0
- package/i18n/locales/pt/duxt/nav.json +17 -0
- package/i18n/locales/pt/duxt/openapi.json +89 -0
- package/i18n/locales/pt/duxt/page.json +34 -0
- package/i18n/locales/pt/duxt/search.json +12 -0
- package/i18n/locales/pt/duxt/shortcuts.json +11 -0
- package/i18n/locales/pt/duxt/theme.json +7 -0
- package/i18n/locales/pt/duxt/toc.json +7 -0
- package/i18n/locales/pt/duxt/version.json +25 -0
- package/i18n/locales/pt-BR/duxt/error.json +8 -0
- package/i18n/locales/pt-BR/duxt/nav.json +10 -0
- package/i18n/locales/pt-BR/duxt/page.json +10 -0
- package/i18n/locales/pt-BR/duxt/search.json +11 -0
- package/i18n/locales/pt-BR/duxt/version.json +13 -0
- package/mdc.config.ts +28 -0
- package/modules/config.ts +440 -0
- package/modules/devtools.ts +126 -0
- package/modules/git-meta.ts +349 -0
- package/modules/redirects.ts +152 -0
- package/modules/validate.ts +137 -0
- package/nuxt.config.ts +530 -0
- package/openapi-model.ts +358 -0
- package/openapi-parse.ts +1052 -0
- package/package.json +161 -0
- package/public/devtools/cache.html +318 -0
- package/public/devtools/checks.html +309 -0
- package/public/devtools/config.html +461 -0
- package/public/devtools/i18n.html +309 -0
- package/public/devtools/pages.html +348 -0
- package/public/devtools/paths.html +315 -0
- package/public/devtools/redirects.html +309 -0
- package/public/devtools/search.html +324 -0
- package/public/devtools/sources.html +309 -0
- package/public/devtools/versions.html +318 -0
- package/report.ts +303 -0
- package/repository-root.ts +26 -0
- package/section-reports.ts +55 -0
- package/sections-changelog.ts +644 -0
- package/sections-openapi.ts +450 -0
- package/sections-resolve.ts +711 -0
- package/sections.ts +157 -0
- package/server/devtools/content.ts +120 -0
- package/server/devtools/context.ts +38 -0
- package/server/devtools/entry-path.ts +30 -0
- package/server/devtools/handler.ts +104 -0
- package/server/devtools/preview.ts +461 -0
- package/server/devtools/render/content.ts +233 -0
- package/server/devtools/render/sources.ts +414 -0
- package/server/devtools/render/system.ts +352 -0
- package/server/devtools/shell.ts +611 -0
- package/server/devtools/sources.ts +122 -0
- package/server/devtools/system.ts +178 -0
- package/server/mcp/tools/list-pages.ts +52 -0
- package/server/mcp/tools/read-page.ts +57 -0
- package/server/mcp/tools/search-docs.ts +74 -0
- package/server/middleware/raw-markdown.ts +86 -0
- package/server/routes/llms-full.txt.get.ts +75 -0
- package/server/routes/llms.txt.get.ts +63 -0
- package/server/routes/rss.xml.get.ts +125 -0
- package/server/utils/duxt-server-text.ts +46 -0
- package/sources-git.ts +113 -0
- package/sources-resolve.ts +908 -0
- package/sources.ts +287 -0
- package/validate-report.ts +494 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DuxtOpenApiMediaType } from '../../openapi-model';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One body, in each media type the document offers it in.
|
|
6
|
+
*
|
|
7
|
+
* The media type is a tab rather than a heading: `application/json` and
|
|
8
|
+
* `multipart/form-data` are two spellings of ONE body, and stacking them reads
|
|
9
|
+
* as two bodies a request would carry both of.
|
|
10
|
+
*/
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
content?: DuxtOpenApiMediaType[];
|
|
13
|
+
/**
|
|
14
|
+
* Which way this body travels, and therefore which fields it can hold.
|
|
15
|
+
*
|
|
16
|
+
* Required rather than defaulted: this component draws the request body AND
|
|
17
|
+
* every response, and a default would have to be wrong for one of them. The
|
|
18
|
+
* only way a caller can forget is by not compiling.
|
|
19
|
+
*/
|
|
20
|
+
direction: DuxtOpenApiDirection;
|
|
21
|
+
}>();
|
|
22
|
+
|
|
23
|
+
const types = computed(() => props.content ?? []);
|
|
24
|
+
const current = ref(0);
|
|
25
|
+
|
|
26
|
+
const media = computed(() => types.value[current.value] ?? types.value[0]);
|
|
27
|
+
|
|
28
|
+
/** The examples the document wrote, and — where it wrote none — a derived one. */
|
|
29
|
+
const examples = computed(() => {
|
|
30
|
+
const written = media.value?.examples ?? [];
|
|
31
|
+
if (written.length) return written;
|
|
32
|
+
|
|
33
|
+
const derived = openApiExampleValue(media.value?.schema, props.direction);
|
|
34
|
+
|
|
35
|
+
return derived === null ? [] : [{ name: 'example', value: derived }];
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div v-if="types.length" class="min-w-0">
|
|
41
|
+
<div v-if="types.length > 1" class="mb-3 flex flex-wrap gap-1.5">
|
|
42
|
+
<button
|
|
43
|
+
v-for="(entry, index) in types"
|
|
44
|
+
:key="entry.type"
|
|
45
|
+
type="button"
|
|
46
|
+
class="rounded-md px-2 py-1 font-mono text-xs transition-colors"
|
|
47
|
+
:class="
|
|
48
|
+
index === current
|
|
49
|
+
? 'bg-muted text-foreground'
|
|
50
|
+
: 'text-muted-foreground hover:text-foreground'
|
|
51
|
+
"
|
|
52
|
+
:aria-pressed="index === current"
|
|
53
|
+
@click="current = index"
|
|
54
|
+
>
|
|
55
|
+
{{ entry.type }}
|
|
56
|
+
</button>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<p v-else class="mb-2 font-mono text-xs text-muted-foreground">
|
|
60
|
+
{{ media?.type }}
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
<DuxtOpenApiSchema
|
|
64
|
+
v-if="media?.schema"
|
|
65
|
+
:schema="media.schema"
|
|
66
|
+
:direction="direction"
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
<div v-for="example in examples" :key="example.name" class="mt-3">
|
|
70
|
+
<p v-if="example.summary" class="mb-1 text-xs text-muted-foreground">
|
|
71
|
+
{{ example.summary }}
|
|
72
|
+
</p>
|
|
73
|
+
|
|
74
|
+
<!-- An external example is a URL the document points at; showing the URL
|
|
75
|
+
is the whole of what this build can honestly show. -->
|
|
76
|
+
<p
|
|
77
|
+
v-if="example.externalValue"
|
|
78
|
+
class="font-mono text-xs break-all text-muted-foreground"
|
|
79
|
+
>
|
|
80
|
+
{{ example.externalValue }}
|
|
81
|
+
</p>
|
|
82
|
+
|
|
83
|
+
<DuxtCodeBlock
|
|
84
|
+
v-else-if="example.value !== undefined"
|
|
85
|
+
:code="openApiJson(example.value)"
|
|
86
|
+
language="json"
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<!-- How each part of a multipart body is encoded, which is otherwise the
|
|
91
|
+
one thing a reader cannot guess from the schema. -->
|
|
92
|
+
<dl
|
|
93
|
+
v-if="media?.encoding?.length"
|
|
94
|
+
class="mt-3 space-y-1 text-xs text-muted-foreground"
|
|
95
|
+
>
|
|
96
|
+
<div
|
|
97
|
+
v-for="entry in media.encoding"
|
|
98
|
+
:key="entry.property"
|
|
99
|
+
class="flex gap-2"
|
|
100
|
+
>
|
|
101
|
+
<dt class="font-mono">{{ entry.property }}</dt>
|
|
102
|
+
<dd v-if="entry.contentType" class="font-mono">
|
|
103
|
+
{{ entry.contentType }}
|
|
104
|
+
</dd>
|
|
105
|
+
</div>
|
|
106
|
+
</dl>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* An HTTP method, as the chip every reference draws it as.
|
|
4
|
+
*
|
|
5
|
+
* A `UiBadge` WITH A TONE, not a pill of its own. The shape, the border, the
|
|
6
|
+
* radius and the sizing are the badge's — the same object the rest of the site
|
|
7
|
+
* marks things with — and what this component adds is the one thing a badge
|
|
8
|
+
* cannot know: which colour a method has. It was its own `span` before, built
|
|
9
|
+
* out of the same parts by hand, and it drifted from them the moment the badge
|
|
10
|
+
* changed.
|
|
11
|
+
*
|
|
12
|
+
* The colour is not decoration: a reader scanning a list of thirty endpoints
|
|
13
|
+
* finds the destructive one by its colour long before reading the word.
|
|
14
|
+
*
|
|
15
|
+
* `success` and `destructive` are the palette's own tokens; the rest are
|
|
16
|
+
* Tailwind's ramp, exactly as `Callout.vue` uses it — the theme has no token
|
|
17
|
+
* for "amber" and inventing four would put four more pairs into a palette a
|
|
18
|
+
* consumer overrides. A tenth of the colour as surface and a fifth as border is
|
|
19
|
+
* the badge's own construction, so every method reads as one of its badges and
|
|
20
|
+
* every one of them clears the contrast floor in both themes.
|
|
21
|
+
*/
|
|
22
|
+
const props = defineProps<{ method: string; class?: string }>();
|
|
23
|
+
|
|
24
|
+
const tones: Record<string, string> = {
|
|
25
|
+
get: 'border-sky-500/20 bg-sky-500/10 text-sky-700 dark:text-sky-400',
|
|
26
|
+
post: 'border-success/20 bg-success/10 text-success',
|
|
27
|
+
put: 'border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-400',
|
|
28
|
+
patch:
|
|
29
|
+
'border-violet-500/20 bg-violet-500/10 text-violet-700 dark:text-violet-400',
|
|
30
|
+
delete: 'border-destructive/20 bg-destructive/10 text-destructive',
|
|
31
|
+
head: 'border-border bg-muted text-muted-foreground',
|
|
32
|
+
options: 'border-border bg-muted text-muted-foreground',
|
|
33
|
+
trace: 'border-border bg-muted text-muted-foreground'
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const tone = computed(
|
|
37
|
+
() =>
|
|
38
|
+
tones[props.method.toLowerCase()] ??
|
|
39
|
+
'border-border bg-muted text-muted-foreground'
|
|
40
|
+
);
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<!-- `leading-none` and a fixed height rather than vertical padding around a
|
|
45
|
+
line box: an uppercase monospace face leaves more room under the caps
|
|
46
|
+
than over them, so the word sat visibly high in a padded chip. With no
|
|
47
|
+
leading of its own the text box is the glyphs, and centring is exact.
|
|
48
|
+
Callers still set the width, which is what lines a column of methods up
|
|
49
|
+
beside a column of paths. -->
|
|
50
|
+
<UiBadge
|
|
51
|
+
:class="[
|
|
52
|
+
'h-5 px-1.5 font-mono text-[0.6875rem] leading-none font-semibold tracking-wide uppercase',
|
|
53
|
+
tone,
|
|
54
|
+
props.class
|
|
55
|
+
]"
|
|
56
|
+
>
|
|
57
|
+
{{ method }}
|
|
58
|
+
</UiBadge>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DuxtOpenApiParameter } from '../../openapi-model';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The parameters an operation takes, grouped by where they go.
|
|
6
|
+
*
|
|
7
|
+
* GROUPED, not one flat table: `in` is the single most load-bearing field a
|
|
8
|
+
* parameter has — it decides whether the value goes in the URL, the query
|
|
9
|
+
* string, a header or a cookie — and a column carrying it is a column readers
|
|
10
|
+
* skim past. The heading says it once per group instead.
|
|
11
|
+
*
|
|
12
|
+
* A list rather than a `<table>` on purpose. A parameter is a name, a type, a
|
|
13
|
+
* sentence and a nested schema, and the schema does not fit in a cell: the
|
|
14
|
+
* table has to break out of itself for every object-shaped query parameter,
|
|
15
|
+
* which is most of them on a real API.
|
|
16
|
+
*/
|
|
17
|
+
const props = defineProps<{ parameters?: DuxtOpenApiParameter[] }>();
|
|
18
|
+
|
|
19
|
+
const ORDER = ['path', 'query', 'header', 'cookie'] as const;
|
|
20
|
+
|
|
21
|
+
const groups = computed(() =>
|
|
22
|
+
ORDER.map((where) => ({
|
|
23
|
+
where,
|
|
24
|
+
parameters: (props.parameters ?? []).filter(
|
|
25
|
+
(parameter) => parameter.in === where
|
|
26
|
+
)
|
|
27
|
+
})).filter((group) => group.parameters.length)
|
|
28
|
+
);
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<section v-if="groups.length" class="mt-8">
|
|
33
|
+
<h2 class="duxt-label">
|
|
34
|
+
{{ $t('duxt.openapi.parameters') }}
|
|
35
|
+
</h2>
|
|
36
|
+
|
|
37
|
+
<div v-for="group in groups" :key="group.where" class="mt-4">
|
|
38
|
+
<h3 class="text-xs font-medium text-foreground/80">
|
|
39
|
+
{{ $t(`duxt.openapi.in.${group.where}`) }}
|
|
40
|
+
</h3>
|
|
41
|
+
|
|
42
|
+
<ul class="mt-2 divide-y divide-border/60 border-t border-border/60">
|
|
43
|
+
<li
|
|
44
|
+
v-for="parameter in group.parameters"
|
|
45
|
+
:key="parameter.name"
|
|
46
|
+
class="py-3"
|
|
47
|
+
>
|
|
48
|
+
<DuxtOpenApiSchema
|
|
49
|
+
:schema="parameter.schema"
|
|
50
|
+
:name="parameter.name"
|
|
51
|
+
:required="parameter.required"
|
|
52
|
+
direction="request"
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<p
|
|
56
|
+
v-if="parameter.description"
|
|
57
|
+
class="mt-1 text-sm text-muted-foreground"
|
|
58
|
+
>
|
|
59
|
+
{{ parameter.description }}
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
<p
|
|
63
|
+
v-if="parameter.deprecated"
|
|
64
|
+
class="mt-1 text-xs text-muted-foreground"
|
|
65
|
+
>
|
|
66
|
+
{{ $t('duxt.openapi.deprecated') }}
|
|
67
|
+
</p>
|
|
68
|
+
|
|
69
|
+
<!-- `style` and `explode` decide how an array or an object becomes
|
|
70
|
+
text in a URL, which is the difference between `?a=1&a=2` and
|
|
71
|
+
`?a=1,2`. The specification's own words, so they are shown as
|
|
72
|
+
written rather than translated into a paraphrase. -->
|
|
73
|
+
<div
|
|
74
|
+
v-if="
|
|
75
|
+
parameter.style ||
|
|
76
|
+
parameter.explode !== undefined ||
|
|
77
|
+
parameter.allowEmptyValue
|
|
78
|
+
"
|
|
79
|
+
class="mt-1.5 flex flex-wrap gap-1.5"
|
|
80
|
+
>
|
|
81
|
+
<span
|
|
82
|
+
v-if="parameter.style"
|
|
83
|
+
class="rounded bg-muted px-1.5 py-0.5 font-mono text-[0.6875rem] text-muted-foreground"
|
|
84
|
+
>
|
|
85
|
+
style={{ parameter.style }}
|
|
86
|
+
</span>
|
|
87
|
+
<span
|
|
88
|
+
v-if="parameter.explode !== undefined"
|
|
89
|
+
class="rounded bg-muted px-1.5 py-0.5 font-mono text-[0.6875rem] text-muted-foreground"
|
|
90
|
+
>
|
|
91
|
+
explode={{ parameter.explode }}
|
|
92
|
+
</span>
|
|
93
|
+
<span
|
|
94
|
+
v-if="parameter.allowEmptyValue"
|
|
95
|
+
class="rounded bg-muted px-1.5 py-0.5 font-mono text-[0.6875rem] text-muted-foreground"
|
|
96
|
+
>
|
|
97
|
+
allowEmptyValue
|
|
98
|
+
</span>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<!-- `content` instead of `schema` is how a document says a parameter
|
|
102
|
+
is serialised as a body — a JSON object in a query string. Rare,
|
|
103
|
+
and invisible if it is not drawn. -->
|
|
104
|
+
<div v-if="parameter.content?.length" class="mt-3">
|
|
105
|
+
<DuxtOpenApiMedia
|
|
106
|
+
:content="parameter.content"
|
|
107
|
+
direction="request"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
</li>
|
|
111
|
+
</ul>
|
|
112
|
+
</div>
|
|
113
|
+
</section>
|
|
114
|
+
</template>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DuxtOpenApiResponse } from '../../openapi-model';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The responses an operation can send, in the order the parser put them.
|
|
6
|
+
*
|
|
7
|
+
* Every status expanded rather than one selected at a time. A reference is read
|
|
8
|
+
* to find out what the error shapes are, and a tab strip that hides four of
|
|
9
|
+
* five responses answers that question only for whoever already knew which tab
|
|
10
|
+
* to open.
|
|
11
|
+
*/
|
|
12
|
+
defineProps<{ responses?: DuxtOpenApiResponse[] }>();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<section v-if="responses?.length" class="mt-8">
|
|
17
|
+
<h2 class="duxt-label">
|
|
18
|
+
{{ $t('duxt.openapi.responses') }}
|
|
19
|
+
</h2>
|
|
20
|
+
|
|
21
|
+
<!-- A hairline between responses rather than a card around each: what
|
|
22
|
+
separates two of them is that one ends and the next begins, which is
|
|
23
|
+
what a rule says. The card said "one object" a third time on a page
|
|
24
|
+
that had already said it about the security and the parameters. -->
|
|
25
|
+
<div class="mt-3 divide-y divide-border/60 border-t border-border/60">
|
|
26
|
+
<div v-for="response in responses" :key="response.status" class="py-4">
|
|
27
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
28
|
+
<UiBadge
|
|
29
|
+
:class="[
|
|
30
|
+
'h-5 px-1.5 font-mono text-[0.6875rem] leading-none font-semibold tabular-nums',
|
|
31
|
+
openApiStatusTone(response.status)
|
|
32
|
+
]"
|
|
33
|
+
>
|
|
34
|
+
{{ response.status }}
|
|
35
|
+
</UiBadge>
|
|
36
|
+
|
|
37
|
+
<span v-if="response.description" class="text-sm">
|
|
38
|
+
{{ response.description }}
|
|
39
|
+
</span>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="mt-3 space-y-4">
|
|
43
|
+
<div v-if="response.headers?.length">
|
|
44
|
+
<h3 class="mb-2 text-xs font-medium text-muted-foreground">
|
|
45
|
+
{{ $t('duxt.openapi.headers') }}
|
|
46
|
+
</h3>
|
|
47
|
+
<ul class="space-y-3">
|
|
48
|
+
<li v-for="header in response.headers" :key="header.name">
|
|
49
|
+
<DuxtOpenApiSchema
|
|
50
|
+
:schema="header.schema"
|
|
51
|
+
:name="header.name"
|
|
52
|
+
:required="header.required"
|
|
53
|
+
direction="response"
|
|
54
|
+
/>
|
|
55
|
+
<p
|
|
56
|
+
v-if="header.description"
|
|
57
|
+
class="mt-1 text-sm text-muted-foreground"
|
|
58
|
+
>
|
|
59
|
+
{{ header.description }}
|
|
60
|
+
</p>
|
|
61
|
+
</li>
|
|
62
|
+
</ul>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<DuxtOpenApiMedia
|
|
66
|
+
v-if="response.content?.length"
|
|
67
|
+
:content="response.content"
|
|
68
|
+
direction="response"
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
<p
|
|
72
|
+
v-else-if="!response.headers?.length"
|
|
73
|
+
class="text-sm text-muted-foreground"
|
|
74
|
+
>
|
|
75
|
+
{{ $t('duxt.openapi.noBody') }}
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
<!-- Links are the one part of the specification that says what a
|
|
79
|
+
reader can do NEXT with what came back, and the part every
|
|
80
|
+
renderer drops first. -->
|
|
81
|
+
<div v-if="response.links?.length">
|
|
82
|
+
<h3 class="mb-2 text-xs font-medium text-muted-foreground">
|
|
83
|
+
{{ $t('duxt.openapi.links') }}
|
|
84
|
+
</h3>
|
|
85
|
+
<ul class="space-y-2">
|
|
86
|
+
<li v-for="link in response.links" :key="link.name">
|
|
87
|
+
<div class="flex flex-wrap items-baseline gap-2">
|
|
88
|
+
<code class="font-mono text-sm">{{ link.name }}</code>
|
|
89
|
+
<span
|
|
90
|
+
v-if="link.operationId ?? link.operationRef"
|
|
91
|
+
class="font-mono text-xs text-muted-foreground"
|
|
92
|
+
>
|
|
93
|
+
{{ link.operationId ?? link.operationRef }}
|
|
94
|
+
</span>
|
|
95
|
+
</div>
|
|
96
|
+
<p
|
|
97
|
+
v-if="link.description"
|
|
98
|
+
class="text-sm text-muted-foreground"
|
|
99
|
+
>
|
|
100
|
+
{{ link.description }}
|
|
101
|
+
</p>
|
|
102
|
+
</li>
|
|
103
|
+
</ul>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</section>
|
|
109
|
+
</template>
|