@vuepress/theme-default 2.0.0-rc.101 → 2.0.0-rc.102

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.
@@ -1,5 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { VNode } from 'vue'
2
+ import type {
3
+ NonNullableSlotContent,
4
+ SlotContent,
5
+ } from '@vuepress/helper/client'
3
6
  import type { AutoLinkConfig } from 'vuepress/client'
4
7
  import { AutoLink } from 'vuepress/client'
5
8
 
@@ -11,9 +14,9 @@ defineProps<{
11
14
  }>()
12
15
 
13
16
  defineSlots<{
14
- default?: (config: AutoLinkConfig) => VNode | VNode[]
15
- before?: (config: AutoLinkConfig) => VNode | VNode[] | null
16
- after?: (config: AutoLinkConfig) => VNode | VNode[] | null
17
+ default?: (config: AutoLinkConfig) => NonNullableSlotContent
18
+ before?: (config: AutoLinkConfig) => SlotContent
19
+ after?: (config: AutoLinkConfig) => SlotContent
17
20
  }>()
18
21
  </script>
19
22
 
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { VNode } from 'vue'
2
+ import type { Slot } from '@vuepress/helper/client'
3
3
 
4
4
  defineSlots<{
5
- default?: (props: Record<never, never>) => VNode | VNode[] | null
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 { VNode } from 'vue'
2
+ import type { SingleSlotContent } 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: () => VNode | string | null
10
+ default: () => SingleSlotContent
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?: (props: Record<never, never>) => VNode | VNode[] | null
18
- after?: (props: Record<never, never>) => VNode | VNode[] | null
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 { VNode } from 'vue'
4
+ import type { Slot } from '@vuepress/helper/client'
5
5
  import { Content } from 'vuepress/client'
6
6
 
7
7
  defineSlots<{
8
- 'top'?: (props: Record<never, never>) => VNode | VNode[] | null
9
- 'bottom'?: (props: Record<never, never>) => VNode | VNode[] | null
10
- 'content-top'?: (props: Record<never, never>) => VNode | VNode[] | null
11
- 'content-bottom'?: (props: Record<never, never>) => VNode | VNode[] | null
8
+ 'top'?: Slot
9
+ 'bottom'?: Slot
10
+ 'content-top'?: Slot
11
+ 'content-bottom'?: Slot
12
12
  }>()
13
13
  </script>
14
14
 
@@ -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 { VNode } from 'vue'
4
+ import type { Slot } from '@vuepress/helper/client'
5
5
 
6
6
  defineSlots<{
7
- top?: (props: Record<never, never>) => VNode | VNode[] | null
8
- bottom?: (props: Record<never, never>) => VNode | VNode[] | null
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 { VNode } from 'vue'
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?: () => VNode | VNode[] | string | null
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 { VNode } from 'vue'
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'?: (props: Record<never, never>) => VNode | VNode[] | null
16
- 'navbar-before'?: (props: Record<never, never>) => VNode | VNode[] | null
17
- 'navbar-after'?: (props: Record<never, never>) => VNode | VNode[] | null
18
- 'sidebar'?: (props: Record<never, never>) => VNode | VNode[] | null
19
- 'sidebar-top'?: (props: Record<never, never>) => VNode | VNode[] | null
20
- 'sidebar-bottom'?: (props: Record<never, never>) => VNode | VNode[] | null
21
- 'page'?: (props: Record<never, never>) => VNode | VNode[] | null
22
- 'page-top'?: (props: Record<never, never>) => VNode | VNode[] | null
23
- 'page-bottom'?: (props: Record<never, never>) => VNode | VNode[] | null
24
- 'page-content-top'?: (props: Record<never, never>) => VNode | VNode[] | null
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()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/theme-default",
3
- "version": "2.0.0-rc.101",
3
+ "version": "2.0.0-rc.102",
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.99",
45
+ "@vuepress/helper": "2.0.0-rc.102",
41
46
  "@vuepress/plugin-active-header-links": "2.0.0-rc.98",
42
- "@vuepress/plugin-back-to-top": "2.0.0-rc.99",
43
- "@vuepress/plugin-copy-code": "2.0.0-rc.99",
44
- "@vuepress/plugin-git": "2.0.0-rc.99",
45
- "@vuepress/plugin-links-check": "2.0.0-rc.99",
46
- "@vuepress/plugin-markdown-hint": "2.0.0-rc.101",
47
- "@vuepress/plugin-markdown-tab": "2.0.0-rc.101",
48
- "@vuepress/plugin-medium-zoom": "2.0.0-rc.99",
49
- "@vuepress/plugin-nprogress": "2.0.0-rc.99",
50
- "@vuepress/plugin-palette": "2.0.0-rc.99",
51
- "@vuepress/plugin-prismjs": "2.0.0-rc.99",
52
- "@vuepress/plugin-seo": "2.0.0-rc.99",
53
- "@vuepress/plugin-sitemap": "2.0.0-rc.99",
54
- "@vuepress/plugin-theme-data": "2.0.0-rc.99",
47
+ "@vuepress/plugin-back-to-top": "2.0.0-rc.102",
48
+ "@vuepress/plugin-copy-code": "2.0.0-rc.102",
49
+ "@vuepress/plugin-git": "2.0.0-rc.102",
50
+ "@vuepress/plugin-links-check": "2.0.0-rc.102",
51
+ "@vuepress/plugin-markdown-hint": "2.0.0-rc.102",
52
+ "@vuepress/plugin-markdown-tab": "2.0.0-rc.102",
53
+ "@vuepress/plugin-medium-zoom": "2.0.0-rc.102",
54
+ "@vuepress/plugin-nprogress": "2.0.0-rc.102",
55
+ "@vuepress/plugin-palette": "2.0.0-rc.102",
56
+ "@vuepress/plugin-prismjs": "2.0.0-rc.102",
57
+ "@vuepress/plugin-seo": "2.0.0-rc.102",
58
+ "@vuepress/plugin-sitemap": "2.0.0-rc.102",
59
+ "@vuepress/plugin-theme-data": "2.0.0-rc.102",
55
60
  "@vueuse/core": "^13.1.0",
56
61
  "vue": "^3.5.13"
57
62
  },
@@ -75,5 +80,5 @@
75
80
  "publishConfig": {
76
81
  "access": "public"
77
82
  },
78
- "gitHead": "3c7d17254125d130de55b13f7dca6ff574a17a4a"
83
+ "gitHead": "f5eea8cc78924696580c659e738d7f4b6409faee"
79
84
  }