@vuepress/theme-default 2.0.0-beta.64 → 2.0.0-beta.65

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.
@@ -36,7 +36,7 @@ const { item } = toRefs(props)
36
36
  const hasHttpProtocol = computed(() => isLinkHttp(item.value.link))
37
37
  // if the link has non-http protocol
38
38
  const hasNonHttpProtocol = computed(
39
- () => isLinkMailto(item.value.link) || isLinkTel(item.value.link)
39
+ () => isLinkMailto(item.value.link) || isLinkTel(item.value.link),
40
40
  )
41
41
  // resolve the `target` attr
42
42
  const linkTarget = computed(() => {
@@ -50,7 +50,7 @@ const isBlankTarget = computed(() => linkTarget.value === '_blank')
50
50
  // is `<RouterLink>` or not
51
51
  const isRouterLink = computed(
52
52
  () =>
53
- !hasHttpProtocol.value && !hasNonHttpProtocol.value && !isBlankTarget.value
53
+ !hasHttpProtocol.value && !hasNonHttpProtocol.value && !isBlankTarget.value,
54
54
  )
55
55
  // resolve the `rel` attr
56
56
  const linkRel = computed(() => {
@@ -23,7 +23,7 @@ const heroImage = computed(() => {
23
23
  return frontmatter.value.heroImage
24
24
  })
25
25
  const heroAlt = computed(
26
- () => frontmatter.value.heroAlt || heroText.value || 'hero'
26
+ () => frontmatter.value.heroAlt || heroText.value || 'hero',
27
27
  )
28
28
  const heroHeight = computed(() => frontmatter.value.heroHeight || 280)
29
29
 
@@ -49,7 +49,7 @@ useUpdateDeviceStatus(
49
49
  navbarHorizontalPadding -
50
50
  (navbarBrand.value?.offsetWidth || 0)
51
51
  }
52
- }
52
+ },
53
53
  )
54
54
 
55
55
  function getCssValue(el: HTMLElement | null, property: string): number {
@@ -15,7 +15,7 @@ const themeLocale = useThemeLocaleData()
15
15
  const isDarkMode = useDarkMode()
16
16
 
17
17
  const navbarBrandLink = computed(
18
- () => themeLocale.value.home || routeLocale.value
18
+ () => themeLocale.value.home || routeLocale.value,
19
19
  )
20
20
  const navbarBrandTitle = computed(() => siteLocale.value.title)
21
21
  const navbarBrandLogo = computed(() => {
@@ -16,7 +16,7 @@ const props = defineProps({
16
16
  const { item } = toRefs(props)
17
17
 
18
18
  const dropdownAriaLabel = computed(
19
- () => item.value.ariaLabel || item.value.text
19
+ () => item.value.ariaLabel || item.value.text,
20
20
  )
21
21
 
22
22
  const open = ref(false)
@@ -25,7 +25,7 @@ watch(
25
25
  () => route.path,
26
26
  () => {
27
27
  open.value = false
28
- }
28
+ },
29
29
  )
30
30
 
31
31
  /**
@@ -69,7 +69,7 @@ const useNavbarSelectLanguage = (): ComputedRef<ResolvedNavbarItem[]> => {
69
69
  // or fallback to homepage
70
70
  const targetLocalePage = currentPath.replace(
71
71
  routeLocale.value,
72
- targetLocalePath
72
+ targetLocalePath,
73
73
  )
74
74
  if (
75
75
  router.getRoutes().some((item) => item.path === targetLocalePage)
@@ -100,7 +100,7 @@ const useNavbarRepo = (): ComputedRef<ResolvedNavbarItem[]> => {
100
100
 
101
101
  const repo = computed(() => themeLocale.value.repo)
102
102
  const repoType = computed(() =>
103
- repo.value ? resolveRepoType(repo.value) : null
103
+ repo.value ? resolveRepoType(repo.value) : null,
104
104
  )
105
105
 
106
106
  const repoLink = computed(() => {
@@ -133,7 +133,7 @@ const useNavbarRepo = (): ComputedRef<ResolvedNavbarItem[]> => {
133
133
  }
134
134
 
135
135
  const resolveNavbarItem = (
136
- item: NavbarItem | NavbarGroup | string
136
+ item: NavbarItem | NavbarGroup | string,
137
137
  ): ResolvedNavbarItem => {
138
138
  if (isString(item)) {
139
139
  return useNavLink(item)
@@ -171,7 +171,7 @@ useUpdateDeviceStatus(
171
171
  } else {
172
172
  isMobile.value = false
173
173
  }
174
- }
174
+ },
175
175
  )
176
176
  </script>
177
177
 
@@ -15,7 +15,7 @@ import { useNavLink, useSidebarItems } from '../composables/index.js'
15
15
  * Resolve `prev` or `next` config from frontmatter
16
16
  */
17
17
  const resolveFromFrontmatterConfig = (
18
- conf: unknown
18
+ conf: unknown,
19
19
  ): null | false | NavLink => {
20
20
  if (conf === false) {
21
21
  return null
@@ -38,7 +38,7 @@ const resolveFromFrontmatterConfig = (
38
38
  const resolveFromSidebarItems = (
39
39
  sidebarItems: ResolvedSidebarItem[],
40
40
  currentPath: string,
41
- offset: number
41
+ offset: number,
42
42
  ): null | NavLink => {
43
43
  const index = sidebarItems.findIndex((item) => item.link === currentPath)
44
44
  if (index !== -1) {
@@ -54,7 +54,7 @@ const resolveFromSidebarItems = (
54
54
  const childResult = resolveFromSidebarItems(
55
55
  item.children,
56
56
  currentPath,
57
- offset
57
+ offset,
58
58
  )
59
59
  if (childResult) {
60
60
  return childResult
@@ -33,7 +33,7 @@ const itemClass = computed(() => ({
33
33
  }))
34
34
 
35
35
  const isOpenDefault = computed(() =>
36
- item.value.collapsible ? isActive.value : true
36
+ item.value.collapsible ? isActive.value : true,
37
37
  )
38
38
  const [isOpen, toggleIsOpen] = useToggle(isOpenDefault.value)
39
39
  const onClick = (e: Event): void => {
@@ -17,7 +17,7 @@ onMounted(() => {
17
17
 
18
18
  // get the active sidebar item DOM, whose href equals to the current route
19
19
  const activeSidebarItem = document.querySelector(
20
- `.sidebar a.sidebar-item[href="${route.path}${hash}"]`
20
+ `.sidebar a.sidebar-item[href="${route.path}${hash}"]`,
21
21
  )
22
22
  if (!activeSidebarItem) return
23
23
 
@@ -41,7 +41,7 @@ onMounted(() => {
41
41
  // scroll to the bottom edge of sidebar
42
42
  activeSidebarItem.scrollIntoView(false)
43
43
  }
44
- }
44
+ },
45
45
  )
46
46
  })
47
47
  </script>
@@ -33,7 +33,8 @@ const themeLocale = useThemeLocaleData()
33
33
 
34
34
  // navbar
35
35
  const shouldShowNavbar = computed(
36
- () => frontmatter.value.navbar !== false && themeLocale.value.navbar !== false
36
+ () =>
37
+ frontmatter.value.navbar !== false && themeLocale.value.navbar !== false,
37
38
  )
38
39
 
39
40
  // sidebar
@@ -8,7 +8,9 @@
8
8
  padding: 0 6px;
9
9
  color: var(--c-bg);
10
10
  vertical-align: top;
11
- transition: color var(--t-color), background-color var(--t-color);
11
+ transition:
12
+ color var(--t-color),
13
+ background-color var(--t-color);
12
14
 
13
15
  &.tip {
14
16
  background-color: var(--c-badge-tip);
@@ -1,5 +1,7 @@
1
1
  .custom-container {
2
- transition: color var(--t-color), border-color var(--t-color),
2
+ transition:
3
+ color var(--t-color),
4
+ border-color var(--t-color),
3
5
  background-color var(--t-color);
4
6
 
5
7
  .custom-container-title {
@@ -16,7 +16,9 @@
16
16
  box-sizing: border-box;
17
17
  border-bottom: 1px solid var(--c-border);
18
18
  background-color: var(--c-bg-navbar);
19
- transition: background-color var(--t-color), border-color var(--t-color);
19
+ transition:
20
+ background-color var(--t-color),
21
+ border-color var(--t-color);
20
22
  }
21
23
 
22
24
  .sidebar {
@@ -34,7 +36,9 @@
34
36
  scrollbar-width: thin;
35
37
  scrollbar-color: var(--c-brand) var(--c-border);
36
38
  background-color: var(--c-bg-sidebar);
37
- transition: transform var(--t-transform), background-color var(--t-color),
39
+ transition:
40
+ transform var(--t-transform),
41
+ background-color var(--t-color),
38
42
  border-color var(--t-color);
39
43
  &::-webkit-scrollbar {
40
44
  width: 7px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/theme-default",
3
- "version": "2.0.0-beta.64",
3
+ "version": "2.0.0-beta.65",
4
4
  "description": "Default theme of VuePress",
5
5
  "keywords": [
6
6
  "vuepress-theme",
@@ -40,21 +40,21 @@
40
40
  "sass": "^1.63.6",
41
41
  "sass-loader": "^13.3.2",
42
42
  "vue": "^3.3.4",
43
- "vue-router": "^4.2.2",
44
- "@vuepress/core": "2.0.0-beta.64",
45
- "@vuepress/plugin-back-to-top": "2.0.0-beta.64",
46
- "@vuepress/client": "2.0.0-beta.64",
47
- "@vuepress/plugin-container": "2.0.0-beta.64",
48
- "@vuepress/plugin-git": "2.0.0-beta.64",
49
- "@vuepress/plugin-external-link-icon": "2.0.0-beta.64",
50
- "@vuepress/plugin-nprogress": "2.0.0-beta.64",
51
- "@vuepress/plugin-active-header-links": "2.0.0-beta.64",
52
- "@vuepress/plugin-palette": "2.0.0-beta.64",
53
- "@vuepress/plugin-medium-zoom": "2.0.0-beta.64",
54
- "@vuepress/plugin-prismjs": "2.0.0-beta.64",
55
- "@vuepress/plugin-theme-data": "2.0.0-beta.64",
56
- "@vuepress/shared": "2.0.0-beta.64",
57
- "@vuepress/utils": "2.0.0-beta.64"
43
+ "vue-router": "^4.2.4",
44
+ "@vuepress/core": "2.0.0-beta.65",
45
+ "@vuepress/client": "2.0.0-beta.65",
46
+ "@vuepress/plugin-container": "2.0.0-beta.65",
47
+ "@vuepress/plugin-external-link-icon": "2.0.0-beta.65",
48
+ "@vuepress/plugin-prismjs": "2.0.0-beta.65",
49
+ "@vuepress/plugin-nprogress": "2.0.0-beta.65",
50
+ "@vuepress/plugin-medium-zoom": "2.0.0-beta.65",
51
+ "@vuepress/plugin-back-to-top": "2.0.0-beta.65",
52
+ "@vuepress/utils": "2.0.0-beta.65",
53
+ "@vuepress/plugin-active-header-links": "2.0.0-beta.65",
54
+ "@vuepress/plugin-git": "2.0.0-beta.65",
55
+ "@vuepress/plugin-palette": "2.0.0-beta.65",
56
+ "@vuepress/plugin-theme-data": "2.0.0-beta.65",
57
+ "@vuepress/shared": "2.0.0-beta.65"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "sass-loader": "^13.2.1"