docus 3.0.0-beta.1 → 3.0.0-beta.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.
- package/components/app/Container.vue +2 -0
- package/components/app/Footer.vue +2 -0
- package/components/app/NavbarLogo.vue +2 -0
- package/components/content/ButtonLink.vue +1 -0
- package/components/content/CodeGroup.vue +1 -0
- package/components/content/CopyButton.vue +1 -0
- package/components/content/ReadMore.vue +1 -0
- package/components/content/Sandbox.vue +2 -0
- package/components/content/Terminal.vue +22 -28
- package/components/content/VideoPlayer.vue +2 -0
- package/components/docs/DocsAside.vue +2 -0
- package/components/docs/DocsAsideTree.vue +1 -0
- package/components/docs/DocsPageContent.vue +2 -0
- package/components/docs/DocsToc.vue +2 -0
- package/components/globals/Icon.vue +1 -1
- package/components/globals/NuxtImg.vue +2 -0
- package/components/globals/SocialIcons.vue +2 -0
- package/components/globals/ThemeSelect.vue +3 -3
- package/components/prose/ProseHr.vue +1 -1
- package/components/prose/ProseImg.vue +18 -20
- package/composables/useContent.ts +1 -0
- package/composables/useMenu.ts +2 -0
- package/composables/useScrollspy.ts +1 -0
- package/composables/useTheme.ts +2 -0
- package/layouts/default.vue +2 -0
- package/package.json +1 -1
- package/pages/[...slug].vue +2 -0
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import Clipboard from 'clipboard'
|
|
3
|
+
import { nextTick, onMounted, ref } from '#imports'
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
snippet: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
10
9
|
},
|
|
11
|
-
|
|
12
|
-
const copyInstall = ref()
|
|
13
|
-
const copied = ref(false)
|
|
10
|
+
})
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return nextTick(setupCopyInstall)
|
|
12
|
+
const copyInstall = ref()
|
|
13
|
+
const copied = ref(false)
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
const setupCopyInstall = () => {
|
|
16
|
+
if (!copyInstall.value)
|
|
17
|
+
return nextTick(setupCopyInstall)
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
copied.value = true
|
|
19
|
+
const instance = new Clipboard(copyInstall.value)
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, 1000)
|
|
27
|
-
})
|
|
28
|
-
}
|
|
21
|
+
instance.on('success', () => {
|
|
22
|
+
copied.value = true
|
|
29
23
|
|
|
30
|
-
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
copied.value = false
|
|
26
|
+
}, 1000)
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
onMounted(() => setupCopyInstall())
|
|
31
31
|
|
|
32
|
-
return {
|
|
33
|
-
copyInstall,
|
|
34
|
-
copied,
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
})
|
|
38
32
|
</script>
|
|
39
33
|
|
|
40
34
|
<template>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { useColorMode } from '#imports'
|
|
3
|
+
|
|
2
4
|
const colorMode = useColorMode()
|
|
3
5
|
|
|
4
6
|
type ColorMode = 'light' | 'dark'
|
|
@@ -12,9 +14,7 @@ const mode = computed<ColorMode>({
|
|
|
12
14
|
},
|
|
13
15
|
})
|
|
14
16
|
|
|
15
|
-
const onClick = () =>
|
|
16
|
-
mode.value === 'light' ? (mode.value = 'dark') : (mode.value = 'light')
|
|
17
|
-
}
|
|
17
|
+
const onClick = () => (mode.value === 'light' ? (mode.value = 'dark') : (mode.value = 'light'))
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
default: '',
|
|
7
|
-
},
|
|
8
|
-
alt: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: '',
|
|
11
|
-
},
|
|
12
|
-
width: {
|
|
13
|
-
type: [String, Number],
|
|
14
|
-
default: undefined,
|
|
15
|
-
},
|
|
16
|
-
height: {
|
|
17
|
-
type: [String, Number],
|
|
18
|
-
default: undefined,
|
|
19
|
-
},
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps({
|
|
3
|
+
src: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: '',
|
|
20
6
|
},
|
|
21
|
-
|
|
7
|
+
alt: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: '',
|
|
10
|
+
},
|
|
11
|
+
width: {
|
|
12
|
+
type: [String, Number],
|
|
13
|
+
default: undefined,
|
|
14
|
+
},
|
|
15
|
+
height: {
|
|
16
|
+
type: [String, Number],
|
|
17
|
+
default: undefined,
|
|
18
|
+
},
|
|
19
|
+
})
|
|
22
20
|
</script>
|
|
23
21
|
|
|
24
22
|
<template>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { withoutTrailingSlash } from 'ufo'
|
|
2
2
|
import type { NavItem, ParsedContent } from '@nuxt/content/dist/runtime/types'
|
|
3
|
+
import { computed, fetchContentNavigation, onBeforeUnmount, onMounted, queryContent, useNuxtApp, useRoute, useState } from '#imports'
|
|
3
4
|
|
|
4
5
|
let closeHook
|
|
5
6
|
|
package/composables/useMenu.ts
CHANGED
package/composables/useTheme.ts
CHANGED
package/layouts/default.vue
CHANGED
package/package.json
CHANGED