@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,498 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* shadcn/typeset — https://ui.shadcn.com/docs/typeset
|
|
3
|
+
*
|
|
4
|
+
* Vendored verbatim from https://www.shadcn-vue.com/typeset.css. The registry
|
|
5
|
+
* has no `typeset` item, so the CLI cannot fetch or update it: re-download the
|
|
6
|
+
* file to upgrade, and keep local changes in duxt.css's preset instead of
|
|
7
|
+
* editing here.
|
|
8
|
+
*
|
|
9
|
+
* It lives in @layer components, below Tailwind's utilities — which is why a
|
|
10
|
+
* component can set `list-none` on itself and win, the problem prose.css
|
|
11
|
+
* needed :where() and a base layer to solve by hand.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
@layer components {
|
|
15
|
+
.typeset {
|
|
16
|
+
--typeset-font-body: inherit;
|
|
17
|
+
--typeset-font-heading: var(--font-heading);
|
|
18
|
+
--typeset-font-mono: var(--font-mono);
|
|
19
|
+
--typeset-size: 1em;
|
|
20
|
+
--typeset-leading: 1.75;
|
|
21
|
+
--typeset-flow: 1.25em;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@layer components {
|
|
26
|
+
.typeset {
|
|
27
|
+
font-family: var(--typeset-font-body);
|
|
28
|
+
font-size: calc(var(--typeset-size) * 1.125);
|
|
29
|
+
line-height: var(--typeset-leading);
|
|
30
|
+
color: var(--color-foreground, currentColor);
|
|
31
|
+
overflow-wrap: break-word;
|
|
32
|
+
margin-trim: block-start;
|
|
33
|
+
|
|
34
|
+
@media (min-width: 48rem), print {
|
|
35
|
+
font-size: var(--typeset-size);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
--typeset-muted: var(
|
|
39
|
+
--color-muted-foreground,
|
|
40
|
+
color-mix(in oklab, currentColor 60%, transparent)
|
|
41
|
+
);
|
|
42
|
+
--typeset-rule: var(
|
|
43
|
+
--color-border,
|
|
44
|
+
color-mix(in oklab, currentColor 20%, transparent)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.typeset
|
|
49
|
+
*:not(
|
|
50
|
+
:where(
|
|
51
|
+
.not-typeset,
|
|
52
|
+
[data-not-typeset],
|
|
53
|
+
.not-typeset *,
|
|
54
|
+
[data-not-typeset] *
|
|
55
|
+
)
|
|
56
|
+
) {
|
|
57
|
+
/* Paragraphs. */
|
|
58
|
+
&:where(p) {
|
|
59
|
+
margin-block-start: var(--typeset-flow);
|
|
60
|
+
margin-block-end: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Headings. */
|
|
64
|
+
&:where(h1, h2, h3, h4, h5, h6) {
|
|
65
|
+
color: var(--color-foreground, currentColor);
|
|
66
|
+
font-family: var(--typeset-font-heading);
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
margin-block-end: 0;
|
|
69
|
+
}
|
|
70
|
+
&:where(h1) {
|
|
71
|
+
font-size: 1.75em;
|
|
72
|
+
line-height: 1.3;
|
|
73
|
+
margin-block-start: var(--typeset-flow);
|
|
74
|
+
}
|
|
75
|
+
&:where(h2) {
|
|
76
|
+
font-size: 1.25em;
|
|
77
|
+
line-height: 1.4;
|
|
78
|
+
margin-block-start: calc(var(--typeset-flow) * 1.4);
|
|
79
|
+
}
|
|
80
|
+
&:where(h3) {
|
|
81
|
+
font-size: 1.125em;
|
|
82
|
+
line-height: 1.45;
|
|
83
|
+
margin-block-start: var(--typeset-flow);
|
|
84
|
+
}
|
|
85
|
+
&:where(h4) {
|
|
86
|
+
font-size: 1em;
|
|
87
|
+
line-height: 1.5;
|
|
88
|
+
margin-block-start: var(--typeset-flow);
|
|
89
|
+
}
|
|
90
|
+
&:where(h5) {
|
|
91
|
+
font-size: 0.875em;
|
|
92
|
+
line-height: 1.5;
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
color: var(--typeset-muted);
|
|
95
|
+
margin-block-start: calc(var(--typeset-flow) / 0.875);
|
|
96
|
+
}
|
|
97
|
+
&:where(h6) {
|
|
98
|
+
font-size: 0.8125em;
|
|
99
|
+
line-height: 1.5;
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
letter-spacing: 0.08em;
|
|
102
|
+
text-transform: uppercase;
|
|
103
|
+
color: var(--typeset-muted);
|
|
104
|
+
margin-block-start: calc(var(--typeset-flow) / 0.8125);
|
|
105
|
+
}
|
|
106
|
+
/* Anchors. */
|
|
107
|
+
&:where([id]) {
|
|
108
|
+
scroll-margin-block-start: var(--typeset-flow);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Headings own the space below them. */
|
|
112
|
+
&:where(h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + *) {
|
|
113
|
+
margin-block-start: 1em;
|
|
114
|
+
}
|
|
115
|
+
&:where(:is(h1, h2, h3, h4) :is(code)) {
|
|
116
|
+
font-size: 0.9em;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Links. */
|
|
120
|
+
&:where(a) {
|
|
121
|
+
color: inherit;
|
|
122
|
+
font-weight: 500;
|
|
123
|
+
text-decoration-line: underline;
|
|
124
|
+
text-decoration-color: color-mix(in oklab, currentColor 30%, transparent);
|
|
125
|
+
}
|
|
126
|
+
&:where(a:hover) {
|
|
127
|
+
text-decoration-color: currentColor;
|
|
128
|
+
}
|
|
129
|
+
&:where(a:focus-visible) {
|
|
130
|
+
outline: 2px solid var(--color-ring, currentColor);
|
|
131
|
+
outline-offset: 2px;
|
|
132
|
+
border-radius: 0.125em;
|
|
133
|
+
}
|
|
134
|
+
&:where(:is(h1, h2, h3, h4, h5, h6) :is(a)) {
|
|
135
|
+
font-weight: inherit;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Inline semantics. */
|
|
139
|
+
&:where(strong, b) {
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
}
|
|
142
|
+
&:where(:is(h1, h2, h3, h4) :is(strong, b)) {
|
|
143
|
+
font-weight: 600;
|
|
144
|
+
}
|
|
145
|
+
&:where(mark) {
|
|
146
|
+
background-color: color-mix(
|
|
147
|
+
in oklab,
|
|
148
|
+
oklch(0.86 0.17 95) 40%,
|
|
149
|
+
transparent
|
|
150
|
+
);
|
|
151
|
+
color: inherit;
|
|
152
|
+
padding: 0.05em 0.15em;
|
|
153
|
+
border-radius: 0.2em;
|
|
154
|
+
}
|
|
155
|
+
&:where(abbr[title]) {
|
|
156
|
+
text-decoration-line: underline;
|
|
157
|
+
text-decoration-style: dotted;
|
|
158
|
+
text-underline-offset: 0.2em;
|
|
159
|
+
cursor: help;
|
|
160
|
+
}
|
|
161
|
+
&:where(del, s) {
|
|
162
|
+
color: var(--typeset-muted);
|
|
163
|
+
text-decoration-line: line-through;
|
|
164
|
+
}
|
|
165
|
+
&:where(sup, sub) {
|
|
166
|
+
font-size: 0.75em;
|
|
167
|
+
line-height: 0;
|
|
168
|
+
position: relative;
|
|
169
|
+
vertical-align: baseline;
|
|
170
|
+
}
|
|
171
|
+
&:where(sup) {
|
|
172
|
+
top: -0.5em;
|
|
173
|
+
}
|
|
174
|
+
&:where(sub) {
|
|
175
|
+
bottom: -0.25em;
|
|
176
|
+
}
|
|
177
|
+
&:where(sup a) {
|
|
178
|
+
text-decoration-line: none;
|
|
179
|
+
font-weight: 500;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Lists. */
|
|
183
|
+
&:where(ul) {
|
|
184
|
+
list-style-type: disc;
|
|
185
|
+
}
|
|
186
|
+
&:where(ol) {
|
|
187
|
+
list-style-type: decimal;
|
|
188
|
+
}
|
|
189
|
+
&:where(ul ul) {
|
|
190
|
+
list-style-type: circle;
|
|
191
|
+
}
|
|
192
|
+
&:where(ul ul ul) {
|
|
193
|
+
list-style-type: square;
|
|
194
|
+
}
|
|
195
|
+
&:where(ol[type='a' i]) {
|
|
196
|
+
list-style-type: lower-alpha;
|
|
197
|
+
}
|
|
198
|
+
&:where(ol[type='i' i]) {
|
|
199
|
+
list-style-type: lower-roman;
|
|
200
|
+
}
|
|
201
|
+
&:where(ol[type='A' s]) {
|
|
202
|
+
list-style-type: upper-alpha;
|
|
203
|
+
}
|
|
204
|
+
&:where(ol[type='I' s]) {
|
|
205
|
+
list-style-type: upper-roman;
|
|
206
|
+
}
|
|
207
|
+
&:where(ul, ol) {
|
|
208
|
+
margin-block-start: var(--typeset-flow);
|
|
209
|
+
margin-block-end: 0;
|
|
210
|
+
padding-inline-start: 1.5em;
|
|
211
|
+
}
|
|
212
|
+
&:where(li) {
|
|
213
|
+
margin-block-start: 0.5em;
|
|
214
|
+
padding-inline-start: 0.4em;
|
|
215
|
+
}
|
|
216
|
+
&:where(li > p, li > ul, li > ol) {
|
|
217
|
+
margin-block-start: 0.5em;
|
|
218
|
+
}
|
|
219
|
+
&:where(ul > li)::marker {
|
|
220
|
+
color: var(--typeset-muted);
|
|
221
|
+
}
|
|
222
|
+
&:where(ol > li)::marker {
|
|
223
|
+
color: var(--typeset-muted);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* GFM task lists. */
|
|
227
|
+
&:where(ul.contains-task-list) {
|
|
228
|
+
list-style-type: none;
|
|
229
|
+
padding-inline-start: 0.25em;
|
|
230
|
+
}
|
|
231
|
+
&:where(li.task-list-item > input[type='checkbox']) {
|
|
232
|
+
margin-inline-end: 0.5em;
|
|
233
|
+
vertical-align: -0.1em;
|
|
234
|
+
accent-color: var(--color-primary, currentColor);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Disclosures. */
|
|
238
|
+
&:where(details) {
|
|
239
|
+
margin-block-start: var(--typeset-flow);
|
|
240
|
+
margin-block-end: 0;
|
|
241
|
+
}
|
|
242
|
+
&:where(summary) {
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
font-weight: 500;
|
|
245
|
+
}
|
|
246
|
+
&:where(summary)::marker {
|
|
247
|
+
color: var(--typeset-muted);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Keyboard keys. */
|
|
251
|
+
&:where(kbd) {
|
|
252
|
+
font-family: inherit;
|
|
253
|
+
font-size: 0.85em;
|
|
254
|
+
font-weight: 500;
|
|
255
|
+
border: 1px solid var(--typeset-rule);
|
|
256
|
+
border-block-end-width: 2px;
|
|
257
|
+
border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
|
|
258
|
+
padding: 0.0625em 0.35em;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* Definition lists. */
|
|
262
|
+
&:where(dl) {
|
|
263
|
+
margin-block-start: var(--typeset-flow);
|
|
264
|
+
margin-block-end: 0;
|
|
265
|
+
}
|
|
266
|
+
&:where(dt) {
|
|
267
|
+
font-weight: 500;
|
|
268
|
+
margin-block-start: 1em;
|
|
269
|
+
}
|
|
270
|
+
&:where(dt + dt) {
|
|
271
|
+
margin-block-start: 0.25em;
|
|
272
|
+
}
|
|
273
|
+
&:where(dd) {
|
|
274
|
+
margin-block-start: 0.25em;
|
|
275
|
+
margin-inline-start: 0;
|
|
276
|
+
padding-inline-start: 1em;
|
|
277
|
+
color: var(--typeset-muted);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* Inline code. */
|
|
281
|
+
&:where(:not(pre) > code) {
|
|
282
|
+
background-color: var(
|
|
283
|
+
--color-muted,
|
|
284
|
+
color-mix(in oklab, currentColor 8%, transparent)
|
|
285
|
+
);
|
|
286
|
+
font-family: var(--typeset-font-mono);
|
|
287
|
+
font-size: 0.85em;
|
|
288
|
+
border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
|
|
289
|
+
padding: 0.125em 0.3em;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* Code blocks. */
|
|
293
|
+
&:where(pre) {
|
|
294
|
+
background-color: var(
|
|
295
|
+
--color-muted,
|
|
296
|
+
color-mix(in oklab, currentColor 8%, transparent)
|
|
297
|
+
);
|
|
298
|
+
font-family: var(--typeset-font-mono);
|
|
299
|
+
font-size: 0.875em;
|
|
300
|
+
line-height: 1.5;
|
|
301
|
+
tab-size: 2;
|
|
302
|
+
direction: ltr;
|
|
303
|
+
border-radius: var(--radius, 0.5em);
|
|
304
|
+
padding: 0.75em 1em;
|
|
305
|
+
overflow-x: auto;
|
|
306
|
+
margin-block-start: calc(var(--typeset-flow) / 0.875);
|
|
307
|
+
margin-block-end: 0;
|
|
308
|
+
}
|
|
309
|
+
&:where(pre code) {
|
|
310
|
+
background-color: transparent;
|
|
311
|
+
font-family: inherit;
|
|
312
|
+
font-size: inherit;
|
|
313
|
+
padding: 0;
|
|
314
|
+
border-radius: 0;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* Blockquote. */
|
|
318
|
+
&:where(blockquote) {
|
|
319
|
+
border-inline-start: 2px solid var(--typeset-rule);
|
|
320
|
+
padding-inline-start: 1em;
|
|
321
|
+
margin-block-start: var(--typeset-flow);
|
|
322
|
+
margin-block-end: 0;
|
|
323
|
+
margin-inline: 0;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* Dividers. */
|
|
327
|
+
&:where(hr) {
|
|
328
|
+
border: 0;
|
|
329
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
330
|
+
margin-block-start: calc(var(--typeset-flow) * 2.4);
|
|
331
|
+
margin-block-end: 0;
|
|
332
|
+
}
|
|
333
|
+
&:where(hr + h1, hr + h2, hr + h3, hr + h4) {
|
|
334
|
+
margin-block-start: var(--typeset-flow);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* GFM footnotes. */
|
|
338
|
+
&:where(.footnotes, [data-footnotes]) {
|
|
339
|
+
margin-block-start: calc(var(--typeset-flow) * 2);
|
|
340
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
341
|
+
padding-block-start: var(--typeset-flow);
|
|
342
|
+
font-size: 0.875em;
|
|
343
|
+
color: var(--typeset-muted);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* Math. */
|
|
347
|
+
&:where(math[display='block']) {
|
|
348
|
+
margin-block-start: var(--typeset-flow);
|
|
349
|
+
margin-block-end: 0;
|
|
350
|
+
overflow-x: auto;
|
|
351
|
+
overflow-y: hidden;
|
|
352
|
+
padding-block: 0.25em;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* Media. */
|
|
356
|
+
&:where(img, video) {
|
|
357
|
+
border-radius: var(--radius, 0.5em);
|
|
358
|
+
max-width: 100%;
|
|
359
|
+
height: auto;
|
|
360
|
+
margin-block-start: var(--typeset-flow);
|
|
361
|
+
margin-block-end: 0;
|
|
362
|
+
}
|
|
363
|
+
&:where(p img) {
|
|
364
|
+
margin-block-start: 0;
|
|
365
|
+
}
|
|
366
|
+
&:where(figure) {
|
|
367
|
+
margin-block-start: var(--typeset-flow);
|
|
368
|
+
margin-block-end: 0;
|
|
369
|
+
margin-inline: 0;
|
|
370
|
+
}
|
|
371
|
+
&:where(figcaption, caption) {
|
|
372
|
+
color: var(--typeset-muted);
|
|
373
|
+
font-size: 0.875em;
|
|
374
|
+
text-align: center;
|
|
375
|
+
margin-block-start: calc(0.75em / 0.875);
|
|
376
|
+
}
|
|
377
|
+
&:where(caption) {
|
|
378
|
+
caption-side: bottom;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/* Tables. Separators sit on cells, not tr:last-child: append-safe.
|
|
382
|
+
Bare tables stay real tables (keep their semantics) and wrap to fit. */
|
|
383
|
+
&:where(table) {
|
|
384
|
+
max-width: 100%;
|
|
385
|
+
font-size: 1em;
|
|
386
|
+
line-height: 1.5;
|
|
387
|
+
font-variant-numeric: tabular-nums;
|
|
388
|
+
border-collapse: separate;
|
|
389
|
+
border-spacing: 0;
|
|
390
|
+
border-block-end: 1px solid var(--typeset-rule);
|
|
391
|
+
margin-block-start: var(--typeset-flow);
|
|
392
|
+
margin-block-end: 0;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/* Horizontal scroll for any wide block. Wrap it and the wrapper owns the
|
|
396
|
+
flow margin. Tables shrink to fit, so widen the table to make it scroll
|
|
397
|
+
instead of compress. */
|
|
398
|
+
&:where(.typeset-scroll) {
|
|
399
|
+
overflow-x: auto;
|
|
400
|
+
margin-block-start: var(--typeset-flow);
|
|
401
|
+
}
|
|
402
|
+
&:where(.typeset-scroll > *) {
|
|
403
|
+
margin-block-start: 0;
|
|
404
|
+
}
|
|
405
|
+
&:where(.typeset-scroll table) {
|
|
406
|
+
width: max-content;
|
|
407
|
+
max-width: none;
|
|
408
|
+
}
|
|
409
|
+
&:where(thead th) {
|
|
410
|
+
font-weight: 500;
|
|
411
|
+
text-align: start;
|
|
412
|
+
white-space: nowrap;
|
|
413
|
+
padding: 0.65em 1em;
|
|
414
|
+
}
|
|
415
|
+
&:where(:is(tbody, tfoot) :is(td, th)) {
|
|
416
|
+
padding: 0.75em 1em;
|
|
417
|
+
text-align: start;
|
|
418
|
+
vertical-align: top;
|
|
419
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
420
|
+
}
|
|
421
|
+
&:where(tbody th, tfoot th) {
|
|
422
|
+
font-weight: 500;
|
|
423
|
+
}
|
|
424
|
+
&:where(th:first-child, td:first-child) {
|
|
425
|
+
padding-inline-start: 0;
|
|
426
|
+
}
|
|
427
|
+
&:where(th[align='center'], td[align='center']) {
|
|
428
|
+
text-align: center;
|
|
429
|
+
}
|
|
430
|
+
&:where(th[align='right'], td[align='right']) {
|
|
431
|
+
text-align: end;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/* Blocks inside list items keep the list's tighter rhythm. */
|
|
435
|
+
&:where(li > blockquote, li > table, li > figure) {
|
|
436
|
+
margin-block-start: 0.5em;
|
|
437
|
+
}
|
|
438
|
+
&:where(li > pre) {
|
|
439
|
+
margin-block-start: calc(0.5em / 0.875);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
@media print {
|
|
443
|
+
&:where(pre, table, blockquote, figure) {
|
|
444
|
+
break-inside: avoid;
|
|
445
|
+
}
|
|
446
|
+
&:where(h1, h2, h3, h4) {
|
|
447
|
+
break-after: avoid;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* Forced colors strips the code background, so give it a border. */
|
|
452
|
+
@media (forced-colors: active) {
|
|
453
|
+
&:where(:not(pre) > code) {
|
|
454
|
+
border: 1px solid;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/* First child adds no space above. Last so it wins ties. */
|
|
460
|
+
.typeset
|
|
461
|
+
> :where(:first-child):not(
|
|
462
|
+
:where(
|
|
463
|
+
.not-typeset,
|
|
464
|
+
[data-not-typeset],
|
|
465
|
+
.not-typeset *,
|
|
466
|
+
[data-not-typeset] *
|
|
467
|
+
)
|
|
468
|
+
),
|
|
469
|
+
.typeset
|
|
470
|
+
> :where(:first-child)
|
|
471
|
+
> :where(:first-child):not(
|
|
472
|
+
:where(
|
|
473
|
+
.not-typeset,
|
|
474
|
+
[data-not-typeset],
|
|
475
|
+
.not-typeset *,
|
|
476
|
+
[data-not-typeset] *
|
|
477
|
+
)
|
|
478
|
+
),
|
|
479
|
+
.typeset
|
|
480
|
+
:where(
|
|
481
|
+
li > :first-child,
|
|
482
|
+
blockquote > :first-child,
|
|
483
|
+
td > :first-child,
|
|
484
|
+
th > :first-child,
|
|
485
|
+
dd > :first-child,
|
|
486
|
+
figure > :first-child,
|
|
487
|
+
figure > picture > img
|
|
488
|
+
):not(
|
|
489
|
+
:where(
|
|
490
|
+
.not-typeset,
|
|
491
|
+
[data-not-typeset],
|
|
492
|
+
.not-typeset *,
|
|
493
|
+
[data-not-typeset] *
|
|
494
|
+
)
|
|
495
|
+
) {
|
|
496
|
+
margin-block-start: 0;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Whose site this is, in one place.
|
|
4
|
+
*
|
|
5
|
+
* The header draws it twice (mobile sheet, desktop bar) and the footer once, so
|
|
6
|
+
* without this the branching between "a logo image" and "an icon beside a
|
|
7
|
+
* title" would sit in three templates and drift between them.
|
|
8
|
+
*
|
|
9
|
+
* THE LAYER STAYS UNBRANDED. `logo` is unset by default and the fallback is a
|
|
10
|
+
* generic book icon beside `title` — a site extending duxt must show its own
|
|
11
|
+
* name, never this one. duxt's own `www/` sets `logo` like any other consumer,
|
|
12
|
+
* which is also what keeps the option honest: the development site exercises
|
|
13
|
+
* the same path a stranger takes.
|
|
14
|
+
*/
|
|
15
|
+
const props = withDefaults(defineProps<{ size?: 'sm' | 'md' }>(), {
|
|
16
|
+
size: 'md'
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const duxt = useDuxtConfig();
|
|
20
|
+
|
|
21
|
+
// A wordmark is wider than it is tall and every one has its own ratio, so the
|
|
22
|
+
// height is fixed and the width follows. Matching the icon's box would squash
|
|
23
|
+
// one logo and starve another.
|
|
24
|
+
const logoHeight = computed(() => (props.size === 'sm' ? 'h-4' : 'h-5'));
|
|
25
|
+
const iconSize = computed(() => (props.size === 'sm' ? 'size-4' : 'size-5'));
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<template v-if="duxt.logo?.src">
|
|
30
|
+
<!-- Two images and a CSS swap rather than reading the colour mode in
|
|
31
|
+
script: `useColorMode()` resolves on the client, so a scripted choice
|
|
32
|
+
renders the light mark into the server HTML and flips it after
|
|
33
|
+
hydration. The same pattern the landing preview uses. -->
|
|
34
|
+
<img
|
|
35
|
+
:src="duxt.logo.src"
|
|
36
|
+
:alt="duxt.logo.alt ?? duxt.title"
|
|
37
|
+
:class="[logoHeight, duxt.logo.srcDark ? 'w-auto dark:hidden' : 'w-auto']"
|
|
38
|
+
decoding="async"
|
|
39
|
+
/>
|
|
40
|
+
<img
|
|
41
|
+
v-if="duxt.logo.srcDark"
|
|
42
|
+
:src="duxt.logo.srcDark"
|
|
43
|
+
alt=""
|
|
44
|
+
:class="[logoHeight, 'hidden w-auto dark:block']"
|
|
45
|
+
decoding="async"
|
|
46
|
+
/>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<template v-else>
|
|
50
|
+
<Icon name="lucide:book-open-text" :class="[iconSize, 'text-primary']" />
|
|
51
|
+
{{ duxt.title }}
|
|
52
|
+
</template>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// The path from the section down to this page, so a deep page says where it
|
|
3
|
+
// sits without the reader consulting the sidebar.
|
|
4
|
+
//
|
|
5
|
+
// Rendered even when it holds a single entry — a section root, where the trail
|
|
6
|
+
// is just the section itself. The redundancy is real (the section tab above is
|
|
7
|
+
// already marked active, and the H1 below repeats the word) but it buys
|
|
8
|
+
// something worth more: the heading sits at the same height on every page.
|
|
9
|
+
// Showing it only where it has two entries made the title jump as the reader
|
|
10
|
+
// moved between a section root and a page inside it. nuxt.com makes the same
|
|
11
|
+
// trade, and prints the section above the title even where it matches it.
|
|
12
|
+
//
|
|
13
|
+
// The trail itself is computed in `useDuxtBreadcrumb`, because the page emits
|
|
14
|
+
// the same one as BreadcrumbList JSON-LD.
|
|
15
|
+
const props = defineProps<{ path: string }>();
|
|
16
|
+
|
|
17
|
+
const localeLink = useDuxtLink();
|
|
18
|
+
const trail = await useDuxtBreadcrumb(() => props.path);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<UiBreadcrumb v-if="trail.length" :aria-label="$t('duxt.nav.breadcrumb')">
|
|
23
|
+
<UiBreadcrumbList>
|
|
24
|
+
<template v-for="(item, index) in trail" :key="item.path">
|
|
25
|
+
<UiBreadcrumbItem>
|
|
26
|
+
<UiBreadcrumbPage v-if="index === trail.length - 1">{{
|
|
27
|
+
item.title
|
|
28
|
+
}}</UiBreadcrumbPage>
|
|
29
|
+
<UiBreadcrumbLink v-else as-child>
|
|
30
|
+
<NuxtLink :to="localeLink(item.path)">{{ item.title }}</NuxtLink>
|
|
31
|
+
</UiBreadcrumbLink>
|
|
32
|
+
</UiBreadcrumbItem>
|
|
33
|
+
<UiBreadcrumbSeparator v-if="index < trail.length - 1" />
|
|
34
|
+
</template>
|
|
35
|
+
</UiBreadcrumbList>
|
|
36
|
+
</UiBreadcrumb>
|
|
37
|
+
</template>
|