@movk/nuxt-docs 1.5.1 → 1.6.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.
Files changed (53) hide show
  1. package/README.md +54 -24
  2. package/app/components/DocsAsideLeftBody.vue +13 -0
  3. package/app/components/DocsAsideLeftTop.vue +6 -0
  4. package/app/components/DocsAsideRightBottom.vue +29 -0
  5. package/app/components/OgImage/Nuxt.vue +40 -16
  6. package/app/components/PageHeaderLinks.vue +35 -9
  7. package/app/components/content/CommitChangelog.vue +34 -10
  8. package/app/components/content/ComponentEmits.vue +2 -2
  9. package/app/components/content/ComponentExample.vue +10 -10
  10. package/app/components/content/ComponentProps.vue +5 -3
  11. package/app/components/content/ComponentPropsSchema.vue +5 -1
  12. package/app/components/content/ComponentSlots.vue +2 -2
  13. package/app/components/content/HighlightInlineType.vue +1 -1
  14. package/app/components/content/PageLastCommit.vue +12 -8
  15. package/app/components/footer/Footer.vue +22 -0
  16. package/app/components/footer/FooterLeft.vue +7 -0
  17. package/app/components/footer/FooterRight.vue +14 -0
  18. package/app/components/header/Header.vue +4 -7
  19. package/app/components/header/HeaderCTA.vue +18 -0
  20. package/app/components/header/HeaderCenter.vue +7 -0
  21. package/app/components/theme-picker/ThemePicker.vue +24 -201
  22. package/app/composables/useFaq.ts +21 -0
  23. package/app/composables/useHighlighter.ts +22 -0
  24. package/app/composables/useTheme.ts +223 -0
  25. package/app/layouts/docs.vue +2 -15
  26. package/app/pages/docs/[...slug].vue +1 -1
  27. package/app/types/index.d.ts +6 -0
  28. package/app/utils/shiki-transformer-icon-highlight.ts +1 -1
  29. package/app/utils/unicode.ts +12 -0
  30. package/content.config.ts +2 -1
  31. package/modules/ai-chat/index.ts +90 -0
  32. package/modules/ai-chat/runtime/components/AiChat.vue +22 -0
  33. package/modules/ai-chat/runtime/components/AiChatFloatingInput.vue +85 -0
  34. package/modules/ai-chat/runtime/components/AiChatModelSelect.vue +24 -0
  35. package/modules/ai-chat/runtime/components/AiChatPreStream.vue +58 -0
  36. package/modules/ai-chat/runtime/components/AiChatReasoning.vue +49 -0
  37. package/modules/ai-chat/runtime/components/AiChatSlideover.vue +245 -0
  38. package/modules/ai-chat/runtime/components/AiChatSlideoverFaq.vue +41 -0
  39. package/modules/ai-chat/runtime/components/AiChatToolCall.vue +31 -0
  40. package/modules/ai-chat/runtime/composables/useAIChat.ts +45 -0
  41. package/modules/ai-chat/runtime/composables/useModels.ts +58 -0
  42. package/modules/ai-chat/runtime/composables/useTools.ts +31 -0
  43. package/modules/ai-chat/runtime/server/api/search.ts +84 -0
  44. package/modules/ai-chat/runtime/server/utils/docs_agent.ts +49 -0
  45. package/modules/ai-chat/runtime/server/utils/getModel.ts +25 -0
  46. package/modules/css.ts +2 -0
  47. package/nuxt.config.ts +27 -39
  48. package/package.json +16 -6
  49. package/server/mcp/tools/get-page.ts +60 -0
  50. package/server/mcp/tools/list-pages.ts +49 -0
  51. package/app/components/AdsCarbon.vue +0 -3
  52. package/app/components/Footer.vue +0 -32
  53. package/modules/llms.ts +0 -27
@@ -1,32 +0,0 @@
1
- <script setup lang="ts">
2
- const route = useRoute()
3
- const { footer } = useAppConfig()
4
- </script>
5
-
6
- <template>
7
- <USeparator :icon="route.path === '/' ? undefined : 'i-simple-icons-nuxtdotjs'" class="h-px" />
8
-
9
- <UFooter
10
- :ui="{
11
- left: 'text-sm text-muted',
12
- root: 'border-t border-default'
13
- }"
14
- >
15
- <template #left>
16
- <MDC v-if="footer?.credits" :value="footer.credits" unwrap="p" />
17
- </template>
18
-
19
- <template #right>
20
- <template v-if="footer.socials?.length">
21
- <UTooltip
22
- v-for="(link, count) in footer.socials"
23
- :key="count"
24
- :text="link.label || (link as any)['aria-label']"
25
- class="hidden lg:flex"
26
- >
27
- <UButton v-bind="{ color: 'neutral', variant: 'ghost', ...link }" />
28
- </UTooltip>
29
- </template>
30
- </template>
31
- </UFooter>
32
- </template>
package/modules/llms.ts DELETED
@@ -1,27 +0,0 @@
1
- import { defineNuxtModule } from '@nuxt/kit'
2
- import { copyFile } from 'node:fs/promises'
3
- import { join } from 'node:path'
4
-
5
- export default defineNuxtModule({
6
- meta: {
7
- name: 'llms'
8
- },
9
- async setup(_options, nuxt) {
10
- /**
11
- * @see https://vercel.com/docs/functions/configuring-functions/advanced-configuration
12
- * Vercel 会将所有动态路由转为 Serverless Function,导致 500 错误。
13
- * 访问 '_llms-full.txt' 静态资源以绕过此问题。
14
- */
15
- nuxt.hook('nitro:build:public-assets', async ({ options }) => {
16
- const outputDir = options.output.publicDir
17
- try {
18
- const source = join(outputDir, 'llms-full.txt')
19
- const dest = join(outputDir, '_llms-full.txt')
20
- await copyFile(source, dest)
21
- console.log(`✅ Copied: ${source} → ${dest}`)
22
- } catch (err) {
23
- console.warn(`⚠️ Failed to process:`, err instanceof Error ? err.message : String(err))
24
- }
25
- })
26
- }
27
- })