@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.
- package/README.md +54 -24
- package/app/components/DocsAsideLeftBody.vue +13 -0
- package/app/components/DocsAsideLeftTop.vue +6 -0
- package/app/components/DocsAsideRightBottom.vue +29 -0
- package/app/components/OgImage/Nuxt.vue +40 -16
- package/app/components/PageHeaderLinks.vue +35 -9
- package/app/components/content/CommitChangelog.vue +34 -10
- package/app/components/content/ComponentEmits.vue +2 -2
- package/app/components/content/ComponentExample.vue +10 -10
- package/app/components/content/ComponentProps.vue +5 -3
- package/app/components/content/ComponentPropsSchema.vue +5 -1
- package/app/components/content/ComponentSlots.vue +2 -2
- package/app/components/content/HighlightInlineType.vue +1 -1
- package/app/components/content/PageLastCommit.vue +12 -8
- package/app/components/footer/Footer.vue +22 -0
- package/app/components/footer/FooterLeft.vue +7 -0
- package/app/components/footer/FooterRight.vue +14 -0
- package/app/components/header/Header.vue +4 -7
- package/app/components/header/HeaderCTA.vue +18 -0
- package/app/components/header/HeaderCenter.vue +7 -0
- package/app/components/theme-picker/ThemePicker.vue +24 -201
- package/app/composables/useFaq.ts +21 -0
- package/app/composables/useHighlighter.ts +22 -0
- package/app/composables/useTheme.ts +223 -0
- package/app/layouts/docs.vue +2 -15
- package/app/pages/docs/[...slug].vue +1 -1
- package/app/types/index.d.ts +6 -0
- package/app/utils/shiki-transformer-icon-highlight.ts +1 -1
- package/app/utils/unicode.ts +12 -0
- package/content.config.ts +2 -1
- package/modules/ai-chat/index.ts +90 -0
- package/modules/ai-chat/runtime/components/AiChat.vue +22 -0
- package/modules/ai-chat/runtime/components/AiChatFloatingInput.vue +85 -0
- package/modules/ai-chat/runtime/components/AiChatModelSelect.vue +24 -0
- package/modules/ai-chat/runtime/components/AiChatPreStream.vue +58 -0
- package/modules/ai-chat/runtime/components/AiChatReasoning.vue +49 -0
- package/modules/ai-chat/runtime/components/AiChatSlideover.vue +245 -0
- package/modules/ai-chat/runtime/components/AiChatSlideoverFaq.vue +41 -0
- package/modules/ai-chat/runtime/components/AiChatToolCall.vue +31 -0
- package/modules/ai-chat/runtime/composables/useAIChat.ts +45 -0
- package/modules/ai-chat/runtime/composables/useModels.ts +58 -0
- package/modules/ai-chat/runtime/composables/useTools.ts +31 -0
- package/modules/ai-chat/runtime/server/api/search.ts +84 -0
- package/modules/ai-chat/runtime/server/utils/docs_agent.ts +49 -0
- package/modules/ai-chat/runtime/server/utils/getModel.ts +25 -0
- package/modules/css.ts +2 -0
- package/nuxt.config.ts +27 -39
- package/package.json +16 -6
- package/server/mcp/tools/get-page.ts +60 -0
- package/server/mcp/tools/list-pages.ts +49 -0
- package/app/components/AdsCarbon.vue +0 -3
- package/app/components/Footer.vue +0 -32
- 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
|
-
})
|