@vuepress/theme-default 2.0.0-rc.101 → 2.0.0-rc.103
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/lib/client/components/VPAutoLink.vue +4 -4
- package/lib/client/components/VPDropdownTransition.vue +2 -2
- package/lib/client/components/VPFadeSlideYTransition.vue +2 -2
- package/lib/client/components/VPNavbar.vue +3 -3
- package/lib/client/components/VPPage.vue +6 -6
- package/lib/client/components/VPSidebar.vue +3 -3
- package/lib/client/components/global/Badge.vue +2 -2
- package/lib/client/layouts/Layout.vue +12 -14
- package/lib/client/styles/content/code.scss +34 -14
- package/lib/node/defaultTheme.js +2 -2
- package/package.json +23 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { RequiredSlot, Slot } from '@vuepress/helper/client'
|
|
3
3
|
import type { AutoLinkConfig } from 'vuepress/client'
|
|
4
4
|
import { AutoLink } from 'vuepress/client'
|
|
5
5
|
|
|
@@ -11,9 +11,9 @@ defineProps<{
|
|
|
11
11
|
}>()
|
|
12
12
|
|
|
13
13
|
defineSlots<{
|
|
14
|
-
default?:
|
|
15
|
-
before?:
|
|
16
|
-
after?:
|
|
14
|
+
default?: RequiredSlot<AutoLinkConfig>
|
|
15
|
+
before?: Slot<AutoLinkConfig>
|
|
16
|
+
after?: Slot<AutoLinkConfig>
|
|
17
17
|
}>()
|
|
18
18
|
</script>
|
|
19
19
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { Slot } from '@vuepress/helper/client'
|
|
3
3
|
|
|
4
4
|
defineSlots<{
|
|
5
|
-
default?:
|
|
5
|
+
default?: Slot
|
|
6
6
|
}>()
|
|
7
7
|
|
|
8
8
|
const setHeight = (item: Element): void => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { SingleSlot } from '@vuepress/helper/client'
|
|
3
3
|
import '@vuepress/helper/transition/fade-in-down.css'
|
|
4
4
|
|
|
5
5
|
defineEmits<{
|
|
@@ -7,7 +7,7 @@ defineEmits<{
|
|
|
7
7
|
beforeLeave: []
|
|
8
8
|
}>()
|
|
9
9
|
defineSlots<{
|
|
10
|
-
default:
|
|
10
|
+
default: SingleSlot
|
|
11
11
|
}>()
|
|
12
12
|
</script>
|
|
13
13
|
|
|
@@ -5,8 +5,8 @@ import VPToggleColorModeButton from '@theme/VPToggleColorModeButton.vue'
|
|
|
5
5
|
import VPToggleSidebarButton from '@theme/VPToggleSidebarButton.vue'
|
|
6
6
|
import { useData } from '@theme/useData'
|
|
7
7
|
import { DeviceType, useUpdateDeviceStatus } from '@theme/useUpdateDeviceStatus'
|
|
8
|
+
import type { Slot } from '@vuepress/helper/client'
|
|
8
9
|
import { hasGlobalComponent } from '@vuepress/helper/client'
|
|
9
|
-
import type { VNode } from 'vue'
|
|
10
10
|
import { computed, ref, resolveComponent, useTemplateRef } from 'vue'
|
|
11
11
|
|
|
12
12
|
defineEmits<{
|
|
@@ -14,8 +14,8 @@ defineEmits<{
|
|
|
14
14
|
}>()
|
|
15
15
|
|
|
16
16
|
defineSlots<{
|
|
17
|
-
before?:
|
|
18
|
-
after?:
|
|
17
|
+
before?: Slot
|
|
18
|
+
after?: Slot
|
|
19
19
|
}>()
|
|
20
20
|
|
|
21
21
|
const SearchBox = hasGlobalComponent('SearchBox')
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import VPPageMeta from '@theme/VPPageMeta.vue'
|
|
3
3
|
import VPPageNav from '@theme/VPPageNav.vue'
|
|
4
|
-
import type {
|
|
4
|
+
import type { Slot } from '@vuepress/helper/client'
|
|
5
5
|
import { Content } from 'vuepress/client'
|
|
6
6
|
|
|
7
7
|
defineSlots<{
|
|
8
|
-
'top'?:
|
|
9
|
-
'bottom'?:
|
|
10
|
-
'content-top'?:
|
|
11
|
-
'content-bottom'?:
|
|
8
|
+
'top'?: Slot
|
|
9
|
+
'bottom'?: Slot
|
|
10
|
+
'content-top'?: Slot
|
|
11
|
+
'content-bottom'?: Slot
|
|
12
12
|
}>()
|
|
13
13
|
</script>
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ defineSlots<{
|
|
|
19
19
|
<div vp-content>
|
|
20
20
|
<slot name="content-top" />
|
|
21
21
|
|
|
22
|
-
<Content />
|
|
22
|
+
<Content id="content" />
|
|
23
23
|
|
|
24
24
|
<slot name="content-bottom" />
|
|
25
25
|
</div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import VPNavbarItems from '@theme/VPNavbarItems.vue'
|
|
3
3
|
import VPSidebarItems from '@theme/VPSidebarItems.vue'
|
|
4
|
-
import type {
|
|
4
|
+
import type { Slot } from '@vuepress/helper/client'
|
|
5
5
|
|
|
6
6
|
defineSlots<{
|
|
7
|
-
top?:
|
|
8
|
-
bottom?:
|
|
7
|
+
top?: Slot
|
|
8
|
+
bottom?: Slot
|
|
9
9
|
}>()
|
|
10
10
|
</script>
|
|
11
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { Slot } from '@vuepress/helper/client'
|
|
3
3
|
|
|
4
4
|
withDefaults(
|
|
5
5
|
defineProps<{
|
|
@@ -24,7 +24,7 @@ withDefaults(
|
|
|
24
24
|
)
|
|
25
25
|
|
|
26
26
|
defineSlots<{
|
|
27
|
-
default?:
|
|
27
|
+
default?: Slot
|
|
28
28
|
}>()
|
|
29
29
|
</script>
|
|
30
30
|
|
|
@@ -7,24 +7,22 @@ import VPSidebar from '@theme/VPSidebar.vue'
|
|
|
7
7
|
import { useData } from '@theme/useData'
|
|
8
8
|
import { useScrollPromise } from '@theme/useScrollPromise'
|
|
9
9
|
import { useSidebarItems } from '@theme/useSidebarItems'
|
|
10
|
-
import type {
|
|
10
|
+
import type { Slot } from '@vuepress/helper/client'
|
|
11
11
|
import { computed, ref } from 'vue'
|
|
12
12
|
import { onContentUpdated } from 'vuepress/client'
|
|
13
13
|
|
|
14
14
|
defineSlots<{
|
|
15
|
-
'navbar'?:
|
|
16
|
-
'navbar-before'?:
|
|
17
|
-
'navbar-after'?:
|
|
18
|
-
'sidebar'?:
|
|
19
|
-
'sidebar-top'?:
|
|
20
|
-
'sidebar-bottom'?:
|
|
21
|
-
'page'?:
|
|
22
|
-
'page-top'?:
|
|
23
|
-
'page-bottom'?:
|
|
24
|
-
'page-content-top'?:
|
|
25
|
-
'page-content-bottom'?:
|
|
26
|
-
props: Record<never, never>,
|
|
27
|
-
) => VNode | VNode[] | null
|
|
15
|
+
'navbar'?: Slot
|
|
16
|
+
'navbar-before'?: Slot
|
|
17
|
+
'navbar-after'?: Slot
|
|
18
|
+
'sidebar'?: Slot
|
|
19
|
+
'sidebar-top'?: Slot
|
|
20
|
+
'sidebar-bottom'?: Slot
|
|
21
|
+
'page'?: Slot
|
|
22
|
+
'page-top'?: Slot
|
|
23
|
+
'page-bottom'?: Slot
|
|
24
|
+
'page-content-top'?: Slot
|
|
25
|
+
'page-content-bottom'?: Slot
|
|
28
26
|
}>()
|
|
29
27
|
|
|
30
28
|
const { frontmatter, page, themeLocale } = useData()
|
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
@use '../variables' as *;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
div[class*='language-'] {
|
|
5
|
-
margin: 0.75rem 0;
|
|
6
|
-
transition:
|
|
7
|
-
background-color var(--vp-t-color),
|
|
8
|
-
color var(--vp-t-color);
|
|
9
|
-
|
|
3
|
+
#content {
|
|
10
4
|
@media (max-width: $MQMobileNarrow) {
|
|
11
5
|
--code-border-radius: 0;
|
|
6
|
+
--tab-border-radius: 0;
|
|
12
7
|
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
// code block
|
|
9
|
+
> div[class*='language-'],
|
|
10
|
+
> .code-block-with-title > div[class*='language-'] {
|
|
11
|
+
margin-inline: -1.5rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// code block title bar
|
|
15
|
+
.code-block-title-bar {
|
|
16
|
+
margin-inline: -1.5rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// code tabs
|
|
20
|
+
> .vp-code-tabs {
|
|
21
|
+
.vp-code-tabs-nav {
|
|
22
|
+
margin-inline: -1.5rem;
|
|
23
|
+
border-radius: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
div[class*='language-'] {
|
|
27
|
+
margin-inline: -1.5rem;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// tabs
|
|
32
|
+
> .vp-tabs {
|
|
33
|
+
margin-inline: -1.5rem;
|
|
34
|
+
border-inline: none;
|
|
35
|
+
}
|
|
15
36
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
transition: background-color var(--vp-t-color);
|
|
37
|
+
// reveal.js
|
|
38
|
+
.vp-reveal {
|
|
39
|
+
width: calc(100% + 3rem);
|
|
40
|
+
margin: 0 -1.5rem;
|
|
21
41
|
}
|
|
22
42
|
}
|
|
23
43
|
}
|
package/lib/node/defaultTheme.js
CHANGED
|
@@ -36,7 +36,7 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
|
|
|
36
36
|
.readdirSync(path.resolve(__dirname, '../client/composables'))
|
|
37
37
|
.filter((file) => file.endsWith('.js'))
|
|
38
38
|
.map((file) => [
|
|
39
|
-
`@theme/${file.
|
|
39
|
+
`@theme/${file.slice(0, -3)}`,
|
|
40
40
|
path.resolve(__dirname, '../client/composables', file),
|
|
41
41
|
])),
|
|
42
42
|
// use alias to make all utils replaceable
|
|
@@ -44,7 +44,7 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
|
|
|
44
44
|
.readdirSync(path.resolve(__dirname, '../client/utils'))
|
|
45
45
|
.filter((file) => file.endsWith('.js'))
|
|
46
46
|
.map((file) => [
|
|
47
|
-
`@theme/${file.
|
|
47
|
+
`@theme/${file.slice(0, -3)}`,
|
|
48
48
|
path.resolve(__dirname, '../client/utils', file),
|
|
49
49
|
])),
|
|
50
50
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/theme-default",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.103",
|
|
4
4
|
"description": "Default theme of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-theme",
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"author": "meteorlxy",
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"./lib/client/components/**/*.vue",
|
|
24
|
+
"./lib/client/layouts/*.vue",
|
|
25
|
+
"./lib/client/styles/*.scss"
|
|
26
|
+
],
|
|
22
27
|
"type": "module",
|
|
23
28
|
"exports": {
|
|
24
29
|
".": "./lib/node/index.js",
|
|
@@ -37,21 +42,21 @@
|
|
|
37
42
|
"templates"
|
|
38
43
|
],
|
|
39
44
|
"dependencies": {
|
|
40
|
-
"@vuepress/helper": "2.0.0-rc.
|
|
41
|
-
"@vuepress/plugin-active-header-links": "2.0.0-rc.
|
|
42
|
-
"@vuepress/plugin-back-to-top": "2.0.0-rc.
|
|
43
|
-
"@vuepress/plugin-copy-code": "2.0.0-rc.
|
|
44
|
-
"@vuepress/plugin-git": "2.0.0-rc.
|
|
45
|
-
"@vuepress/plugin-links-check": "2.0.0-rc.
|
|
46
|
-
"@vuepress/plugin-markdown-hint": "2.0.0-rc.
|
|
47
|
-
"@vuepress/plugin-markdown-tab": "2.0.0-rc.
|
|
48
|
-
"@vuepress/plugin-medium-zoom": "2.0.0-rc.
|
|
49
|
-
"@vuepress/plugin-nprogress": "2.0.0-rc.
|
|
50
|
-
"@vuepress/plugin-palette": "2.0.0-rc.
|
|
51
|
-
"@vuepress/plugin-prismjs": "2.0.0-rc.
|
|
52
|
-
"@vuepress/plugin-seo": "2.0.0-rc.
|
|
53
|
-
"@vuepress/plugin-sitemap": "2.0.0-rc.
|
|
54
|
-
"@vuepress/plugin-theme-data": "2.0.0-rc.
|
|
45
|
+
"@vuepress/helper": "2.0.0-rc.103",
|
|
46
|
+
"@vuepress/plugin-active-header-links": "2.0.0-rc.103",
|
|
47
|
+
"@vuepress/plugin-back-to-top": "2.0.0-rc.103",
|
|
48
|
+
"@vuepress/plugin-copy-code": "2.0.0-rc.103",
|
|
49
|
+
"@vuepress/plugin-git": "2.0.0-rc.103",
|
|
50
|
+
"@vuepress/plugin-links-check": "2.0.0-rc.103",
|
|
51
|
+
"@vuepress/plugin-markdown-hint": "2.0.0-rc.103",
|
|
52
|
+
"@vuepress/plugin-markdown-tab": "2.0.0-rc.103",
|
|
53
|
+
"@vuepress/plugin-medium-zoom": "2.0.0-rc.103",
|
|
54
|
+
"@vuepress/plugin-nprogress": "2.0.0-rc.103",
|
|
55
|
+
"@vuepress/plugin-palette": "2.0.0-rc.103",
|
|
56
|
+
"@vuepress/plugin-prismjs": "2.0.0-rc.103",
|
|
57
|
+
"@vuepress/plugin-seo": "2.0.0-rc.103",
|
|
58
|
+
"@vuepress/plugin-sitemap": "2.0.0-rc.103",
|
|
59
|
+
"@vuepress/plugin-theme-data": "2.0.0-rc.103",
|
|
55
60
|
"@vueuse/core": "^13.1.0",
|
|
56
61
|
"vue": "^3.5.13"
|
|
57
62
|
},
|
|
@@ -59,7 +64,7 @@
|
|
|
59
64
|
"sass": "^1.86.3",
|
|
60
65
|
"sass-embedded": "^1.86.3",
|
|
61
66
|
"sass-loader": "^16.0.5",
|
|
62
|
-
"vuepress": "2.0.0-rc.
|
|
67
|
+
"vuepress": "2.0.0-rc.23"
|
|
63
68
|
},
|
|
64
69
|
"peerDependenciesMeta": {
|
|
65
70
|
"sass": {
|
|
@@ -75,5 +80,5 @@
|
|
|
75
80
|
"publishConfig": {
|
|
76
81
|
"access": "public"
|
|
77
82
|
},
|
|
78
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "b730bbcfea25d3b41390e137f086884149e2399e"
|
|
79
84
|
}
|