docus 4.2.0 → 5.0.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/app/app.config.ts +0 -2
- package/app/app.vue +4 -4
- package/app/components/docs/DocsPageHeaderLinks.vue +2 -2
- package/app/error.vue +3 -3
- package/modules/css.ts +2 -2
- package/nuxt.config.ts +1 -1
- package/package.json +3 -3
package/app/app.config.ts
CHANGED
package/app/app.vue
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { PageCollections } from '@nuxt/content'
|
|
3
|
-
import * as
|
|
3
|
+
import * as nuxtUiLocales from '@nuxt/ui/locale'
|
|
4
4
|
|
|
5
5
|
const { seo } = useAppConfig()
|
|
6
6
|
const site = useSiteConfig()
|
|
7
7
|
const { locale, locales, isEnabled, switchLocalePath } = useDocusI18n()
|
|
8
8
|
|
|
9
|
-
const lang = computed(() =>
|
|
10
|
-
const dir = computed(() =>
|
|
9
|
+
const lang = computed(() => nuxtUiLocales[locale.value as keyof typeof nuxtUiLocales]?.code || 'en')
|
|
10
|
+
const dir = computed(() => nuxtUiLocales[locale.value as keyof typeof nuxtUiLocales]?.dir || 'ltr')
|
|
11
11
|
const collectionName = computed(() => isEnabled.value ? `docs_${locale.value}` : 'docs')
|
|
12
12
|
|
|
13
13
|
useHead({
|
|
@@ -58,7 +58,7 @@ provide('navigation', navigation)
|
|
|
58
58
|
</script>
|
|
59
59
|
|
|
60
60
|
<template>
|
|
61
|
-
<UApp :locale="
|
|
61
|
+
<UApp :locale="nuxtUiLocales[locale as keyof typeof nuxtUiLocales]">
|
|
62
62
|
<NuxtLoadingIndicator color="var(--ui-primary)" />
|
|
63
63
|
|
|
64
64
|
<NuxtLayout>
|
|
@@ -42,7 +42,7 @@ async function copyPage() {
|
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
<template>
|
|
45
|
-
<
|
|
45
|
+
<UFieldGroup size="sm">
|
|
46
46
|
<UButton
|
|
47
47
|
:label="t('docs.copy.page')"
|
|
48
48
|
:icon="copied ? 'i-lucide-check' : 'i-lucide-copy'"
|
|
@@ -70,5 +70,5 @@ async function copyPage() {
|
|
|
70
70
|
class="border-l border-muted"
|
|
71
71
|
/>
|
|
72
72
|
</UDropdownMenu>
|
|
73
|
-
</
|
|
73
|
+
</UFieldGroup>
|
|
74
74
|
</template>
|
package/app/error.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { NuxtError } from '#app'
|
|
3
3
|
import type { PageCollections } from '@nuxt/content'
|
|
4
|
-
import * as
|
|
4
|
+
import * as nuxtUiLocales from '@nuxt/ui/locale'
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{
|
|
7
7
|
error: NuxtError
|
|
@@ -9,8 +9,8 @@ const props = defineProps<{
|
|
|
9
9
|
|
|
10
10
|
const { locale, locales, isEnabled, t, switchLocalePath } = useDocusI18n()
|
|
11
11
|
|
|
12
|
-
const lang = computed(() =>
|
|
13
|
-
const dir = computed(() =>
|
|
12
|
+
const lang = computed(() => nuxtUiLocales[locale.value as keyof typeof nuxtUiLocales]?.code || 'en')
|
|
13
|
+
const dir = computed(() => nuxtUiLocales[locale.value as keyof typeof nuxtUiLocales]?.dir || 'ltr')
|
|
14
14
|
useHead({
|
|
15
15
|
htmlAttrs: {
|
|
16
16
|
lang,
|
package/modules/css.ts
CHANGED
|
@@ -11,7 +11,7 @@ export default defineNuxtModule({
|
|
|
11
11
|
const resolver = createResolver(import.meta.url)
|
|
12
12
|
|
|
13
13
|
const contentDir = joinURL(dir, 'content')
|
|
14
|
-
const
|
|
14
|
+
const uiPath = resolveModulePath('@nuxt/ui', { from: import.meta.url, conditions: ['style'] })
|
|
15
15
|
const tailwindPath = resolveModulePath('tailwindcss', { from: import.meta.url, conditions: ['style'] })
|
|
16
16
|
const layerDir = resolver.resolve('../app')
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ export default defineNuxtModule({
|
|
|
19
19
|
filename: 'docus.css',
|
|
20
20
|
getContents: () => {
|
|
21
21
|
return `@import ${JSON.stringify(tailwindPath)};
|
|
22
|
-
@import ${JSON.stringify(
|
|
22
|
+
@import ${JSON.stringify(uiPath)};
|
|
23
23
|
|
|
24
24
|
@source "${contentDir.replace(/\\/g, '/')}/**/*";
|
|
25
25
|
@source "${layerDir.replace(/\\/g, '/')}/**/*";
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docus",
|
|
3
3
|
"description": "Nuxt layer for Docus documentation theme",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"repository": {
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@iconify-json/lucide": "^1.2.68",
|
|
26
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
26
|
+
"@iconify-json/simple-icons": "^1.2.53",
|
|
27
27
|
"@iconify-json/vscode-icons": "^1.2.30",
|
|
28
28
|
"@nuxt/content": "^3.7.1",
|
|
29
29
|
"@nuxt/image": "^1.11.0",
|
|
30
30
|
"@nuxt/kit": "^4.1.2",
|
|
31
|
-
"@nuxt/ui
|
|
31
|
+
"@nuxt/ui": "^4.0.0",
|
|
32
32
|
"@nuxtjs/i18n": "^10.1.0",
|
|
33
33
|
"@nuxtjs/mdc": "^0.17.4",
|
|
34
34
|
"@nuxtjs/robots": "^5.5.5",
|