@movk/nuxt-docs 1.7.1 → 1.7.2

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.
@@ -53,7 +53,9 @@ export function useTheme() {
53
53
  },
54
54
  set(option) {
55
55
  appConfig.theme.font = option
56
- window.localStorage.setItem(`${site.name}-ui-font`, appConfig.theme.font)
56
+ if (appConfig.theme.font) {
57
+ window.localStorage.setItem(`${site.name}-ui-font`, appConfig.theme.font)
58
+ }
57
59
  if (appConfig.vercelAnalytics?.debug) track('Theme Changed', { setting: 'font', value: option })
58
60
  }
59
61
  })
@@ -78,7 +80,9 @@ export function useTheme() {
78
80
  set(option) {
79
81
  appConfig.theme.icons = option
80
82
  appConfig.ui.icons = themeIcons[option as keyof typeof themeIcons] as any
81
- window.localStorage.setItem(`${site.name}-ui-icons`, appConfig.theme.icons)
83
+ if (appConfig.theme.icons) {
84
+ window.localStorage.setItem(`${site.name}-ui-icons`, appConfig.theme.icons)
85
+ }
82
86
  if (appConfig.vercelAnalytics?.debug) track('Theme Changed', { setting: 'icons', value: option })
83
87
  }
84
88
  })
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <UMain>
2
+ <UMain as="main">
3
3
  <slot />
4
4
  </UMain>
5
5
  </template>
@@ -64,7 +64,7 @@ defineShortcuts(shortcuts)
64
64
  class="fixed bottom-6 left-1/2 -translate-x-1/2 z-50 px-4"
65
65
  style="will-change: transform"
66
66
  >
67
- <UForm @submit.prevent="handleSubmit">
67
+ <form @submit.prevent="handleSubmit">
68
68
  <UInput
69
69
  ref="inputRef"
70
70
  v-model="input"
@@ -94,7 +94,7 @@ defineShortcuts(shortcuts)
94
94
  </div>
95
95
  </template>
96
96
  </UInput>
97
- </UForm>
97
+ </form>
98
98
  </motion.div>
99
99
  </AnimatePresence>
100
100
  </template>
package/nuxt.schema.ts CHANGED
@@ -2,6 +2,42 @@ import { field, group } from '@nuxt/content/preview'
2
2
 
3
3
  export default defineNuxtSchema({
4
4
  appConfig: {
5
+ theme: group({
6
+ title: '主题',
7
+ description: '主题相关配置',
8
+ icon: 'i-lucide-palette',
9
+ fields: {
10
+ radius: field({
11
+ type: 'number',
12
+ title: '圆角',
13
+ description: '全局圆角值,单位 rem',
14
+ icon: 'i-lucide-corner-up-left',
15
+ default: 0.25
16
+ }),
17
+ blackAsPrimary: field({
18
+ type: 'boolean',
19
+ title: '黑色主色调',
20
+ description: '是否将黑色设置为主色调',
21
+ icon: 'i-lucide-moon',
22
+ default: false
23
+ }),
24
+ icons: field({
25
+ type: 'string',
26
+ title: '图标集',
27
+ description: '全局图标集名称',
28
+ icon: 'i-lucide-icon',
29
+ default: 'lucide'
30
+ }),
31
+ font: field({
32
+ type: 'string',
33
+ title: '字体',
34
+ description: '全局字体名称',
35
+ icon: 'i-lucide-type',
36
+ default: 'Public Sans'
37
+ })
38
+ }
39
+ }),
40
+
5
41
  vercelAnalytics: group({
6
42
  title: 'Vercel Analytics',
7
43
  description: 'Vercel Analytics 配置',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@movk/nuxt-docs",
3
3
  "type": "module",
4
- "version": "1.7.1",
4
+ "version": "1.7.2",
5
5
  "private": false,
6
6
  "description": "Modern Nuxt 4 documentation theme with auto-generated component docs, AI chat assistant, MCP server, and complete developer experience optimization.",
7
7
  "author": "YiXuan <mhaibaraai@gmail.com>",
@@ -28,9 +28,9 @@
28
28
  "README.md"
29
29
  ],
30
30
  "dependencies": {
31
- "@ai-sdk/gateway": "^3.0.11",
32
- "@ai-sdk/mcp": "^1.0.5",
33
- "@ai-sdk/vue": "^3.0.27",
31
+ "@ai-sdk/gateway": "^3.0.13",
32
+ "@ai-sdk/mcp": "^1.0.6",
33
+ "@ai-sdk/vue": "^3.0.33",
34
34
  "@iconify-json/lucide": "^1.2.84",
35
35
  "@iconify-json/simple-icons": "^1.2.66",
36
36
  "@iconify-json/vscode-icons": "^1.2.38",
@@ -48,11 +48,11 @@
48
48
  "@vercel/speed-insights": "^1.3.1",
49
49
  "@vueuse/core": "^14.1.0",
50
50
  "@vueuse/nuxt": "^14.1.0",
51
- "ai": "^6.0.27",
51
+ "ai": "^6.0.33",
52
52
  "defu": "^6.1.4",
53
53
  "exsolve": "^1.0.8",
54
54
  "git-url-parse": "^16.1.0",
55
- "motion-v": "^1.8.1",
55
+ "motion-v": "^1.9.0",
56
56
  "nuxt": "^4.2.2",
57
57
  "nuxt-component-meta": "^0.16.0",
58
58
  "nuxt-llms": "^0.1.3",