undocs 0.2.8 → 0.2.10
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.vue +1 -1
- package/app/components/AppHeader.vue +4 -5
- package/app/components/SocialButtons.vue +2 -1
- package/app/error.vue +1 -1
- package/app/modules/tailwind.ts +0 -11
- package/app/nuxt.config.ts +0 -7
- package/app/pages/[...slug].vue +20 -13
- package/app/tailwind.config.ts +21 -1
- package/package.json +12 -11
package/app/app.vue
CHANGED
|
@@ -33,18 +33,17 @@ const navLinks = computed(() => {
|
|
|
33
33
|
{{ appConfig.site.name }}
|
|
34
34
|
</span>
|
|
35
35
|
</NuxtLink>
|
|
36
|
-
<div class="hidden lg:flex ml-8">
|
|
37
|
-
<UDocsSearchButton label="Search..." />
|
|
38
|
-
</div>
|
|
39
36
|
</template>
|
|
40
37
|
|
|
41
|
-
<template #center>
|
|
38
|
+
<template #center>
|
|
39
|
+
<UContentSearchButton label="Search..." class="hidden lg:flex" />
|
|
40
|
+
</template>
|
|
42
41
|
|
|
43
42
|
<template #right>
|
|
44
43
|
<UHeaderLinks :links="navLinks" class="mr-4" v-if="navLinks.length > 1" />
|
|
45
44
|
|
|
46
45
|
<UTooltip class="lg:hidden" text="Search" :shortcuts="[metaSymbol, 'K']">
|
|
47
|
-
<
|
|
46
|
+
<UContentSearchButton :label="null" />
|
|
48
47
|
</UTooltip>
|
|
49
48
|
|
|
50
49
|
<!-- <ColorPicker /> -->
|
package/app/error.vue
CHANGED
package/app/modules/tailwind.ts
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import { createRequire } from 'node:module'
|
|
2
1
|
import { defineNuxtModule } from 'nuxt/kit'
|
|
3
2
|
|
|
4
|
-
// Remove deprecated color warnings for Bun
|
|
5
|
-
// https://github.com/nuxt/ui/issues/809
|
|
6
|
-
const _require = createRequire(import.meta.url)
|
|
7
|
-
const defaultColors = _require('tailwindcss/colors.js')
|
|
8
|
-
delete defaultColors.lightBlue
|
|
9
|
-
delete defaultColors.warmGray
|
|
10
|
-
delete defaultColors.trueGray
|
|
11
|
-
delete defaultColors.coolGray
|
|
12
|
-
delete defaultColors.blueGray
|
|
13
|
-
|
|
14
3
|
export default defineNuxtModule({
|
|
15
4
|
setup(_, nuxt) {
|
|
16
5
|
if (nuxt.options._prepare) {
|
package/app/nuxt.config.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { join } from 'node:path'
|
|
2
1
|
import { defineNuxtConfig } from 'nuxt/config'
|
|
3
2
|
|
|
4
3
|
// Flag enabled when developing docs theme
|
|
@@ -99,12 +98,6 @@ export default defineNuxtConfig({
|
|
|
99
98
|
tailwindcss: {
|
|
100
99
|
viewer: dev,
|
|
101
100
|
quiet: !dev,
|
|
102
|
-
config: {
|
|
103
|
-
content: {
|
|
104
|
-
// eslint-disable-next-line unicorn/prefer-module
|
|
105
|
-
files: [join(__dirname, '{components,pages,layouts}/**/*.vue')],
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
101
|
},
|
|
109
102
|
typescript: {
|
|
110
103
|
strict: false,
|
package/app/pages/[...slug].vue
CHANGED
|
@@ -53,6 +53,10 @@ const tocLinks = computed(() =>
|
|
|
53
53
|
href: `#${link.id}`,
|
|
54
54
|
})),
|
|
55
55
|
)
|
|
56
|
+
|
|
57
|
+
const scrollToTop = () => {
|
|
58
|
+
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })
|
|
59
|
+
}
|
|
56
60
|
</script>
|
|
57
61
|
|
|
58
62
|
<template>
|
|
@@ -60,18 +64,21 @@ const tocLinks = computed(() =>
|
|
|
60
64
|
<UPageHeader :title="page.title" :description="page.description" :links="page.links" :headline="headline">
|
|
61
65
|
</UPageHeader>
|
|
62
66
|
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
<div class="mt-4 top-[calc(var(--header-height)_+_0.5rem)] z-10 flex justify-end lg:sticky">
|
|
68
|
+
<UDropdown
|
|
69
|
+
v-if="tocLinks.length > 2"
|
|
70
|
+
:items="[[{ label: 'Return to top', click: scrollToTop }], tocLinks]"
|
|
71
|
+
:popper="{ placement: 'bottom-end' }"
|
|
72
|
+
v-model:open="tocOpen"
|
|
73
|
+
>
|
|
74
|
+
<UButton
|
|
75
|
+
color="white"
|
|
76
|
+
label="On this page"
|
|
77
|
+
:trailing="false"
|
|
78
|
+
:icon="`i-heroicons-chevron-${tocOpen ? 'down' : 'left'}-20-solid`"
|
|
79
|
+
/>
|
|
80
|
+
</UDropdown>
|
|
81
|
+
</div>
|
|
75
82
|
|
|
76
83
|
<UPageBody prose>
|
|
77
84
|
<ContentRenderer v-if="page.body" :value="page" />
|
|
@@ -91,7 +98,7 @@ const tocLinks = computed(() =>
|
|
|
91
98
|
]"
|
|
92
99
|
/>
|
|
93
100
|
</div>
|
|
94
|
-
<
|
|
101
|
+
<UContentSurround v-if="surround?.length" class="mb-4" :surround="surround" />
|
|
95
102
|
</div>
|
|
96
103
|
</UPageBody>
|
|
97
104
|
</UPage>
|
package/app/tailwind.config.ts
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
import { resolve, join } from 'node:path'
|
|
1
2
|
import type { Config } from 'tailwindcss'
|
|
2
3
|
import defaultTheme from 'tailwindcss/defaultTheme'
|
|
3
4
|
|
|
5
|
+
// eslint-disable-next-line unicorn/prefer-module
|
|
6
|
+
const uiDir = resolve(require.resolve('@nuxt/ui'), '..')
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line unicorn/prefer-module
|
|
9
|
+
const uiProDir = resolve(require.resolve('@nuxt/ui-pro'), '..')
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line unicorn/prefer-module
|
|
12
|
+
const appDir = __dirname
|
|
13
|
+
|
|
14
|
+
const contentFiles = [
|
|
15
|
+
join(appDir, '{components,pages,layouts}/**/*.{vue,mjs,js,cjs,ts}'),
|
|
16
|
+
join(appDir, '.unjs/{components,pages,layouts}/**/*.{vue,mjs,js,cjs,ts}'),
|
|
17
|
+
join(uiDir, 'runtime/**/*.{vue,mjs,js,cjs,ts}'),
|
|
18
|
+
join(uiProDir, 'components/**/*.{vue,mjs,js,cjs,ts}'),
|
|
19
|
+
join(uiProDir, 'modules/pro/runtime/**/*.{vue,mjs,js,cjs,ts}'),
|
|
20
|
+
]
|
|
21
|
+
|
|
4
22
|
export default <Partial<Config>>{
|
|
5
|
-
content:
|
|
23
|
+
content: {
|
|
24
|
+
files: contentFiles,
|
|
25
|
+
},
|
|
6
26
|
theme: {
|
|
7
27
|
extend: {
|
|
8
28
|
fontFamily: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "undocs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"repository": "unjs/undocs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,22 +30,23 @@
|
|
|
30
30
|
"undocs": "./cli/main.mjs"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@headlessui/vue": "^1.7.19",
|
|
33
34
|
"@nuxt/content": "^2.12.0",
|
|
34
|
-
"@nuxt/ui": "^2.
|
|
35
|
-
"@nuxt/ui-pro": "^0.
|
|
35
|
+
"@nuxt/ui": "^2.14.0",
|
|
36
|
+
"@nuxt/ui-pro": "^1.0.0",
|
|
36
37
|
"@nuxtjs/fontaine": "^0.4.1",
|
|
37
38
|
"@nuxtjs/google-fonts": "^3.1.3",
|
|
38
39
|
"@nuxtjs/plausible": "^0.2.4",
|
|
39
40
|
"@nuxtjs/seo": "^2.0.0-rc.8",
|
|
40
|
-
"@nuxtjs/tailwindcss": "^6.11.
|
|
41
|
-
"automd": "^0.3.
|
|
42
|
-
"c12": "^1.
|
|
43
|
-
"citty": "^0.1.
|
|
41
|
+
"@nuxtjs/tailwindcss": "^6.11.4",
|
|
42
|
+
"automd": "^0.3.5",
|
|
43
|
+
"c12": "^1.9.0",
|
|
44
|
+
"citty": "^0.1.6",
|
|
44
45
|
"consola": "^3.2.3",
|
|
45
46
|
"defu": "^6.1.4",
|
|
46
47
|
"is-buffer": "^2.0.5",
|
|
47
48
|
"nuxi": "^3.10.1",
|
|
48
|
-
"nuxt": "^3.10.
|
|
49
|
+
"nuxt": "^3.10.3",
|
|
49
50
|
"nuxt-build-cache": "^0.1.1",
|
|
50
51
|
"pkg-types": "^1.0.3",
|
|
51
52
|
"scule": "^1.3.0",
|
|
@@ -53,12 +54,12 @@
|
|
|
53
54
|
"theme-colors": "^0.1.0",
|
|
54
55
|
"unctx": "^2.3.1",
|
|
55
56
|
"unstorage": "^1.10.1",
|
|
56
|
-
"vue": "
|
|
57
|
-
"vue-router": "^4.
|
|
57
|
+
"vue": "^3.4.19",
|
|
58
|
+
"vue-router": "^4.3.0"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@nuxt/eslint-config": "^0.2.0",
|
|
61
|
-
"@types/node": "^20.11.
|
|
62
|
+
"@types/node": "^20.11.20",
|
|
62
63
|
"changelogen": "^0.5.5",
|
|
63
64
|
"eslint": "^8.56.0",
|
|
64
65
|
"eslint-config-unjs": "^0.2.1",
|