vitepress 1.4.5 → 1.6.0

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.
Files changed (40) hide show
  1. package/README.md +1 -0
  2. package/dist/client/app/components/ClientOnly.js +1 -1
  3. package/dist/client/app/components/Content.js +1 -1
  4. package/dist/client/app/composables/preFetch.js +1 -1
  5. package/dist/client/app/router.js +5 -5
  6. package/dist/client/app/ssr.js +2 -2
  7. package/dist/client/app/utils.js +3 -3
  8. package/dist/client/index.d.ts +4 -0
  9. package/dist/client/index.js +2 -2
  10. package/dist/client/shared.js +1 -1
  11. package/dist/client/theme-default/components/VPHero.vue +4 -3
  12. package/dist/client/theme-default/components/VPHome.vue +6 -2
  13. package/dist/client/theme-default/components/VPLocalNavOutlineDropdown.vue +2 -1
  14. package/dist/client/theme-default/components/VPSidebarItem.vue +2 -1
  15. package/dist/client/theme-default/components/VPSkipLink.vue +3 -1
  16. package/dist/client/theme-default/components/VPSocialLink.vue +27 -2
  17. package/dist/client/theme-default/composables/flyout.js +1 -1
  18. package/dist/client/theme-default/composables/nav.js +1 -1
  19. package/dist/client/theme-default/composables/outline.js +2 -4
  20. package/dist/client/theme-default/composables/prev-next.js +2 -2
  21. package/dist/client/theme-default/styles/components/vp-doc.css +4 -2
  22. package/dist/client/theme-default/styles/fonts.css +6 -6
  23. package/dist/client/theme-default/styles/icons.css +3 -33
  24. package/dist/client/theme-default/styles/vars.css +23 -6
  25. package/dist/client/theme-default/support/sidebar.js +1 -1
  26. package/dist/client/theme-default/support/utils.js +2 -2
  27. package/dist/client/theme-default/without-fonts.js +8 -6
  28. package/dist/node/{chunk-D0czDMtb.js → chunk-BZEQqoFe.js} +12775 -11939
  29. package/dist/node/{chunk-DQlKmeN_.js → chunk-C-d2RJOW.js} +12 -12
  30. package/dist/node/cli.js +17 -14
  31. package/dist/node/index.d.ts +8 -7
  32. package/dist/node/index.js +13 -14
  33. package/dist/node/worker_shikiResolveLang.js +1 -1
  34. package/package.json +42 -44
  35. package/template/.vitepress/theme/style.css +2 -2
  36. package/theme.d.ts +2 -0
  37. package/types/default-theme.d.ts +6 -13
  38. package/types/index.d.ts +1 -1
  39. package/types/shared.d.ts +2 -0
  40. package/lib/vue-demi.mjs +0 -34
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![test](https://github.com/vuejs/vitepress/workflows/Test/badge.svg)](https://github.com/vuejs/vitepress/actions)
4
4
  [![npm](https://img.shields.io/npm/v/vitepress)](https://www.npmjs.com/package/vitepress)
5
+ [![nightly releases](https://img.shields.io/badge/nightly-releases-orange)](https://nightly.akryum.dev/vuejs/vitepress)
5
6
  [![chat](https://img.shields.io/badge/chat-discord-blue?logo=discord)](https://chat.vuejs.org)
6
7
 
7
8
  ---
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, onMounted } from 'vue';
1
+ import { defineComponent, onMounted, ref } from 'vue';
2
2
  export const ClientOnly = defineComponent({
3
3
  setup(_, { slots }) {
4
4
  const show = ref(false);
@@ -1,5 +1,5 @@
1
- import { defineComponent, h, watch } from 'vue';
2
1
  import { useData, useRoute } from 'vitepress';
2
+ import { defineComponent, h, watch } from 'vue';
3
3
  import { contentUpdatedCallbacks } from '../utils';
4
4
  const runCbs = () => contentUpdatedCallbacks.forEach((fn) => fn());
5
5
  export const Content = defineComponent({
@@ -1,7 +1,7 @@
1
1
  // Customized pre-fetch for page chunks based on
2
2
  // https://github.com/GoogleChromeLabs/quicklink
3
- import { useRoute } from '../router';
4
3
  import { onMounted, onUnmounted, watch } from 'vue';
4
+ import { useRoute } from '../router';
5
5
  import { inBrowser, pathToFile } from '../utils';
6
6
  const hasFetched = new Set();
7
7
  const createLink = () => document.createElement('link');
@@ -27,7 +27,7 @@ export function createRouter(loadPageModule, fallbackComponent) {
27
27
  history.pushState({}, '', href);
28
28
  }
29
29
  await loadPage(href);
30
- await router.onAfterRouteChanged?.(href);
30
+ await (router.onAfterRouteChange ?? router.onAfterRouteChanged)?.(href);
31
31
  }
32
32
  let latestPendingPath = null;
33
33
  async function loadPage(href, scrollPosition = 0, isRetry = false) {
@@ -168,11 +168,11 @@ export function createRouter(loadPageModule, fallbackComponent) {
168
168
  }
169
169
  }, { capture: true });
170
170
  window.addEventListener('popstate', async (e) => {
171
- if (e.state === null) {
171
+ if (e.state === null)
172
172
  return;
173
- }
174
- await loadPage(normalizeHref(location.href), (e.state && e.state.scrollPosition) || 0);
175
- router.onAfterRouteChanged?.(location.href);
173
+ const href = normalizeHref(location.href);
174
+ await loadPage(href, (e.state && e.state.scrollPosition) || 0);
175
+ await (router.onAfterRouteChange ?? router.onAfterRouteChanged)?.(href);
176
176
  });
177
177
  window.addEventListener('hashchange', (e) => {
178
178
  e.preventDefault();
@@ -1,10 +1,10 @@
1
1
  // entry for SSR
2
- import { createApp } from './index';
3
2
  import { renderToString } from 'vue/server-renderer';
3
+ import { createApp } from './index';
4
4
  export async function render(path) {
5
5
  const { app, router } = await createApp();
6
6
  await router.go(path);
7
- const ctx = { content: '' };
7
+ const ctx = { content: '', vpSocialIcons: new Set() };
8
8
  ctx.content = await renderToString(app, ctx);
9
9
  return ctx;
10
10
  }
@@ -1,7 +1,7 @@
1
- import { siteDataRef } from './data';
2
- import { inBrowser, EXTERNAL_URL_RE, sanitizeFileName } from '../shared';
3
1
  import { h, onMounted, onUnmounted, shallowRef } from 'vue';
4
- export { inBrowser, escapeHtml as _escapeHtml } from '../shared';
2
+ import { EXTERNAL_URL_RE, inBrowser, sanitizeFileName } from '../shared';
3
+ import { siteDataRef } from './data';
4
+ export { escapeHtml as _escapeHtml, inBrowser } from '../shared';
5
5
  /**
6
6
  * Join two paths by resolving the slash collision.
7
7
  */
@@ -39,6 +39,10 @@ interface Router {
39
39
  /**
40
40
  * Called after the route changes.
41
41
  */
42
+ onAfterRouteChange?: (to: string) => Awaitable<void>;
43
+ /**
44
+ * @deprecated use `onAfterRouteChange` instead
45
+ */
42
46
  onAfterRouteChanged?: (to: string) => Awaitable<void>;
43
47
  }
44
48
  declare function useRouter(): Router;
@@ -1,9 +1,9 @@
1
1
  // exports in this file are exposed to themes and md files via 'vitepress'
2
2
  // so the user can do `import { useRoute, useData } from 'vitepress'`
3
3
  // composables
4
- export { useData, dataSymbol } from './app/data';
4
+ export { dataSymbol, useData } from './app/data';
5
5
  export { useRoute, useRouter } from './app/router';
6
6
  // utilities
7
- export { inBrowser, onContentUpdated, defineClientComponent, withBase, getScrollOffset, _escapeHtml } from './app/utils';
7
+ export { _escapeHtml, defineClientComponent, getScrollOffset, inBrowser, onContentUpdated, withBase } from './app/utils';
8
8
  // components
9
9
  export { Content } from './app/components/Content';
@@ -31,7 +31,7 @@ export function isActive(currentPath, matchPath, asRegex = false) {
31
31
  }
32
32
  return true;
33
33
  }
34
- function normalize(path) {
34
+ export function normalize(path) {
35
35
  return decodeURI(path)
36
36
  .replace(HASH_OR_QUERY_RE, '')
37
37
  .replace(INDEX_OR_EXT_RE, '$1');
@@ -29,10 +29,10 @@ const heroImageSlotExists = inject('hero-image-slot-exists') as Ref<boolean>
29
29
  <div class="main">
30
30
  <slot name="home-hero-info-before" />
31
31
  <slot name="home-hero-info">
32
- <h1 v-if="name" class="name">
33
- <span v-html="name" class="clip"></span>
32
+ <h1>
33
+ <span v-if="name" v-html="name" class="name clip"></span>
34
+ <span v-if="text" v-html="text" class="text"></span>
34
35
  </h1>
35
- <p v-if="text" v-html="text" class="text"></p>
36
36
  <p v-if="tagline" v-html="tagline" class="tagline"></p>
37
37
  </slot>
38
38
  <slot name="home-hero-info-after" />
@@ -127,6 +127,7 @@ const heroImageSlotExists = inject('hero-image-slot-exists') as Ref<boolean>
127
127
 
128
128
  .name,
129
129
  .text {
130
+ display: inline-block;
130
131
  max-width: 392px;
131
132
  letter-spacing: -0.4px;
132
133
  line-height: 40px;
@@ -4,11 +4,15 @@ import VPHomeFeatures from './VPHomeFeatures.vue'
4
4
  import VPHomeContent from './VPHomeContent.vue'
5
5
  import { useData } from '../composables/data'
6
6
 
7
- const { frontmatter } = useData()
7
+ const { frontmatter, theme } = useData()
8
8
  </script>
9
9
 
10
10
  <template>
11
- <div class="VPHome">
11
+ <div
12
+ class="VPHome"
13
+ :class="{
14
+ 'external-link-icon-enabled': theme.externalLinkIcon
15
+ }">
12
16
  <slot name="home-hero-before" />
13
17
  <VPHomeHero>
14
18
  <template #home-hero-info-before><slot name="home-hero-info-before" /></template>
@@ -125,7 +125,7 @@ function scrollToTop() {
125
125
  vertical-align: middle;
126
126
  margin-left: 2px;
127
127
  font-size: 14px;
128
- transform: rotate(0deg);
128
+ transform: rotate(0)/*rtl:rotate(180deg)*/;
129
129
  transition: transform 0.25s;
130
130
  }
131
131
 
@@ -140,6 +140,7 @@ function scrollToTop() {
140
140
  }
141
141
 
142
142
  .open > .icon {
143
+ /*rtl:ignore*/
143
144
  transform: rotate(90deg);
144
145
  }
145
146
 
@@ -227,12 +227,13 @@ function onCaretClick() {
227
227
 
228
228
  .caret-icon {
229
229
  font-size: 18px;
230
+ /*rtl:ignore*/
230
231
  transform: rotate(90deg);
231
232
  transition: transform 0.25s;
232
233
  }
233
234
 
234
235
  .VPSidebarItem.collapsed .caret-icon {
235
- transform: rotate(0);
236
+ transform: rotate(0)/*rtl:rotate(180deg)*/;
236
237
  }
237
238
 
238
239
  .VPSidebarItem.level-1 .items,
@@ -1,7 +1,9 @@
1
1
  <script lang="ts" setup>
2
2
  import { ref, watch } from 'vue'
3
3
  import { useRoute } from 'vitepress'
4
+ import { useData } from '../composables/data'
4
5
 
6
+ const { theme } = useData()
5
7
  const route = useRoute()
6
8
  const backToTop = ref()
7
9
 
@@ -33,7 +35,7 @@ function focusOnTargetAnchor({ target }: Event) {
33
35
  class="VPSkipLink visually-hidden"
34
36
  @click="focusOnTargetAnchor"
35
37
  >
36
- Skip to content
38
+ {{ theme.skipToContentLabel || 'Skip to content' }}
37
39
  </a>
38
40
  </template>
39
41
 
@@ -1,6 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { DefaultTheme } from 'vitepress/theme'
3
- import { computed } from 'vue'
3
+ import { computed, nextTick, onMounted, ref, useSSRContext } from 'vue'
4
+ import type { SSGContext } from '../../shared'
4
5
 
5
6
  const props = defineProps<{
6
7
  icon: DefaultTheme.SocialLinkIcon
@@ -8,14 +9,38 @@ const props = defineProps<{
8
9
  ariaLabel?: string
9
10
  }>()
10
11
 
12
+ const el = ref<HTMLAnchorElement>()
13
+
14
+ onMounted(async () => {
15
+ await nextTick()
16
+ const span = el.value?.children[0]
17
+ if (
18
+ span instanceof HTMLElement &&
19
+ span.className.startsWith('vpi-social-') &&
20
+ (getComputedStyle(span).maskImage ||
21
+ getComputedStyle(span).webkitMaskImage) === 'none'
22
+ ) {
23
+ span.style.setProperty(
24
+ '--icon',
25
+ `url('https://api.iconify.design/simple-icons/${props.icon}.svg')`
26
+ )
27
+ }
28
+ })
29
+
11
30
  const svg = computed(() => {
12
31
  if (typeof props.icon === 'object') return props.icon.svg
13
- return `<span class="vpi-social-${props.icon}" />`
32
+ return `<span class="vpi-social-${props.icon}"></span>`
14
33
  })
34
+
35
+ if (import.meta.env.SSR) {
36
+ typeof props.icon === 'string' &&
37
+ useSSRContext<SSGContext>()?.vpSocialIcons.add(props.icon)
38
+ }
15
39
  </script>
16
40
 
17
41
  <template>
18
42
  <a
43
+ ref="el"
19
44
  class="VPSocialLink no-icon"
20
45
  :href="link"
21
46
  :aria-label="ariaLabel ?? (typeof icon === 'string' ? icon : '')"
@@ -1,4 +1,4 @@
1
- import { ref, watch, readonly, onUnmounted } from 'vue';
1
+ import { onUnmounted, readonly, ref, watch } from 'vue';
2
2
  import { inBrowser } from '../../shared';
3
3
  export const focusedElement = ref();
4
4
  let active = false;
@@ -1,5 +1,5 @@
1
- import { ref, watch } from 'vue';
2
1
  import { useRoute } from 'vitepress';
2
+ import { ref, watch } from 'vue';
3
3
  export function useNav() {
4
4
  const isScreenOpen = ref(false);
5
5
  function openScreen() {
@@ -2,6 +2,7 @@ import { getScrollOffset } from 'vitepress';
2
2
  import { onMounted, onUnmounted, onUpdated } from 'vue';
3
3
  import { throttleAndDebounce } from '../support/utils';
4
4
  import { useAside } from './aside';
5
+ const ignoreRE = /\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/;
5
6
  // cached list of anchor elements from resolveHeaders
6
7
  const resolvedHeaders = [];
7
8
  export function resolveTitle(theme) {
@@ -31,11 +32,8 @@ function serializeHeader(h) {
31
32
  let ret = '';
32
33
  for (const node of h.childNodes) {
33
34
  if (node.nodeType === 1) {
34
- if (node.classList.contains('VPBadge') ||
35
- node.classList.contains('header-anchor') ||
36
- node.classList.contains('ignore-header')) {
35
+ if (ignoreRE.test(node.className))
37
36
  continue;
38
- }
39
37
  ret += node.textContent;
40
38
  }
41
39
  else if (node.nodeType === 3) {
@@ -1,7 +1,7 @@
1
1
  import { computed } from 'vue';
2
- import { useData } from './data';
3
2
  import { isActive } from '../../shared';
4
- import { getSidebar, getFlatSideBarLinks } from '../support/sidebar';
3
+ import { getFlatSideBarLinks, getSidebar } from '../support/sidebar';
4
+ import { useData } from './data';
5
5
  export function usePrevNext() {
6
6
  const { page, theme, frontmatter } = useData();
7
7
  return computed(() => {
@@ -493,6 +493,7 @@
493
493
  border: 1px solid var(--vp-code-copy-code-hover-border-color);
494
494
  /*rtl:ignore*/
495
495
  border-right: 0;
496
+ /*rtl:ignore*/
496
497
  border-radius: 4px 0 0 4px;
497
498
  padding: 0 10px;
498
499
  width: fit-content;
@@ -554,7 +555,7 @@
554
555
  * -------------------------------------------------------------------------- */
555
556
 
556
557
  /* prettier-ignore */
557
- :is(.vp-external-link-icon, .vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(.no-icon)::after {
558
+ :is(.vp-external-link-icon, .vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after {
558
559
  display: inline-block;
559
560
  margin-top: -1px;
560
561
  margin-left: 4px;
@@ -566,6 +567,7 @@
566
567
  --icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");
567
568
  -webkit-mask-image: var(--icon);
568
569
  mask-image: var(--icon);
570
+ /*rtl:raw:transform: scaleX(-1);*/
569
571
  }
570
572
 
571
573
  .vp-external-link-icon::after {
@@ -573,7 +575,7 @@
573
575
  }
574
576
 
575
577
  /* prettier-ignore */
576
- .external-link-icon-enabled :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank'])::after {
578
+ .external-link-icon-enabled :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after {
577
579
  content: '';
578
580
  color: currentColor;
579
581
  }
@@ -46,9 +46,9 @@
46
46
  font-weight: 100 900;
47
47
  font-display: swap;
48
48
  src: url('../fonts/inter-roman-vietnamese.woff2') format('woff2');
49
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
50
- U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
51
- U+1EA0-1EF9, U+20AB;
49
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
50
+ U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
51
+ U+0329, U+1EA0-1EF9, U+20AB;
52
52
  }
53
53
 
54
54
  @font-face {
@@ -116,9 +116,9 @@
116
116
  font-weight: 100 900;
117
117
  font-display: swap;
118
118
  src: url('../fonts/inter-italic-vietnamese.woff2') format('woff2');
119
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
120
- U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
121
- U+1EA0-1EF9, U+20AB;
119
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
120
+ U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
121
+ U+0329, U+1EA0-1EF9, U+20AB;
122
122
  }
123
123
 
124
124
  @font-face {
@@ -39,14 +39,17 @@
39
39
  }
40
40
  .vpi-chevron-down,
41
41
  .vpi-arrow-down {
42
+ /*rtl:ignore*/
42
43
  transform: rotate(90deg);
43
44
  }
44
45
  .vpi-chevron-left,
45
46
  .vpi-arrow-left {
47
+ /*rtl:ignore*/
46
48
  transform: rotate(180deg);
47
49
  }
48
50
  .vpi-chevron-up,
49
51
  .vpi-arrow-up {
52
+ /*rtl:ignore*/
50
53
  transform: rotate(-90deg);
51
54
  }
52
55
  .vpi-square-pen {
@@ -88,36 +91,3 @@
88
91
  /* clipboard-copy */
89
92
  --vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");
90
93
  }
91
-
92
- /* social icons - used under CC0 1.0 from https://simpleicons.org/ */
93
- .vpi-social-discord {
94
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z'/%3E%3C/svg%3E");
95
- }
96
- .vpi-social-facebook {
97
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z'/%3E%3C/svg%3E");
98
- }
99
- .vpi-social-github {
100
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
101
- }
102
- .vpi-social-instagram {
103
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.874 5.874 0 0 0-2.124 1.388 5.878 5.878 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076.008 8.354-.005 8.764.001 12.023c.007 3.259.021 3.667.083 4.947.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.872 5.872 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063 3.257-.007 3.668-.021 4.947-.082 1.28-.06 2.147-.265 2.91-.563a5.881 5.881 0 0 0 2.123-1.388 5.881 5.881 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.892 5.892 0 0 0-1.387-2.123 5.857 5.857 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0 8.718.008 8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.736 3.736 0 0 1-1.382-.895 3.695 3.695 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.705 3.705 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895.421.42.681.817.9 1.378.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.705 3.705 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079-3.204.007-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008'/%3E%3C/svg%3E");
104
- }
105
- .vpi-social-linkedin {
106
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
107
- }
108
- .vpi-social-mastodon {
109
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E");
110
- }
111
- .vpi-social-npm {
112
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z'/%3E%3C/svg%3E");
113
- }
114
- .vpi-social-slack {
115
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E");
116
- }
117
- .vpi-social-twitter,
118
- .vpi-social-x {
119
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E");
120
- }
121
- .vpi-social-youtube {
122
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E");
123
- }
@@ -174,15 +174,15 @@
174
174
  * -------------------------------------------------------------------------- */
175
175
 
176
176
  :root {
177
- --vp-c-text-1: rgba(60, 60, 67);
178
- --vp-c-text-2: rgba(60, 60, 67, 0.78);
179
- --vp-c-text-3: rgba(60, 60, 67, 0.56);
177
+ --vp-c-text-1: #3c3c43;
178
+ --vp-c-text-2: #67676c;
179
+ --vp-c-text-3: #929295;
180
180
  }
181
181
 
182
182
  .dark {
183
- --vp-c-text-1: rgba(255, 255, 245, 0.86);
184
- --vp-c-text-2: rgba(235, 235, 245, 0.6);
185
- --vp-c-text-3: rgba(235, 235, 245, 0.38);
183
+ --vp-c-text-1: #dfdfd6;
184
+ --vp-c-text-2: #98989f;
185
+ --vp-c-text-3: #6a6a71;
186
186
  }
187
187
 
188
188
  /**
@@ -366,6 +366,23 @@
366
366
  --vp-code-tab-active-bar-color: var(--vp-c-brand-1);
367
367
  }
368
368
 
369
+ :lang(es),
370
+ :lang(pt) {
371
+ --vp-code-copy-copied-text-content: 'Copiado';
372
+ }
373
+ :lang(fa) {
374
+ --vp-code-copy-copied-text-content: 'کپی شد';
375
+ }
376
+ :lang(ko) {
377
+ --vp-code-copy-copied-text-content: '복사됨';
378
+ }
379
+ :lang(ru) {
380
+ --vp-code-copy-copied-text-content: 'Скопировано';
381
+ }
382
+ :lang(zh) {
383
+ --vp-code-copy-copied-text-content: '已复制';
384
+ }
385
+
369
386
  /**
370
387
  * Component: Button
371
388
  * -------------------------------------------------------------------------- */
@@ -1,5 +1,5 @@
1
- import { ensureStartingSlash } from './utils';
2
1
  import { isActive } from '../../shared';
2
+ import { ensureStartingSlash } from './utils';
3
3
  /**
4
4
  * Get the `Sidebar` from sidebar option. This method will ensure to get correct
5
5
  * sidebar config from `MultiSideBarConfig` with various path combinations such
@@ -1,6 +1,6 @@
1
1
  import { withBase } from 'vitepress';
2
- import { useData } from '../composables/data';
3
2
  import { isExternal, treatAsHtml } from '../../shared';
3
+ import { useData } from '../composables/data';
4
4
  export function throttleAndDebounce(fn, delay) {
5
5
  let timeoutId;
6
6
  let called = false;
@@ -16,7 +16,7 @@ export function throttleAndDebounce(fn, delay) {
16
16
  };
17
17
  }
18
18
  export function ensureStartingSlash(path) {
19
- return /^\//.test(path) ? path : `/${path}`;
19
+ return path.startsWith('/') ? path : `/${path}`;
20
20
  }
21
21
  export function normalizeLink(url) {
22
22
  const { pathname, search, hash, protocol } = new URL(url, 'http://a.com');
@@ -10,23 +10,25 @@ import './styles/components/vp-sponsor.css';
10
10
  import VPBadge from './components/VPBadge.vue';
11
11
  import Layout from './Layout.vue';
12
12
  export { default as VPBadge } from './components/VPBadge.vue';
13
- export { default as VPImage } from './components/VPImage.vue';
14
13
  export { default as VPButton } from './components/VPButton.vue';
14
+ export { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';
15
+ export { default as VPFeatures } from './components/VPFeatures.vue';
15
16
  export { default as VPHomeContent } from './components/VPHomeContent.vue';
16
- export { default as VPHomeHero } from './components/VPHomeHero.vue';
17
17
  export { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';
18
+ export { default as VPHomeHero } from './components/VPHomeHero.vue';
18
19
  export { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';
20
+ export { default as VPImage } from './components/VPImage.vue';
19
21
  export { default as VPLink } from './components/VPLink.vue';
20
- export { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';
22
+ export { default as VPNavBarSearch } from './components/VPNavBarSearch.vue';
21
23
  export { default as VPSocialLink } from './components/VPSocialLink.vue';
22
24
  export { default as VPSocialLinks } from './components/VPSocialLinks.vue';
23
25
  export { default as VPSponsors } from './components/VPSponsors.vue';
26
+ export { default as VPTeamMembers } from './components/VPTeamMembers.vue';
24
27
  export { default as VPTeamPage } from './components/VPTeamPage.vue';
25
- export { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';
26
28
  export { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';
27
- export { default as VPTeamMembers } from './components/VPTeamMembers.vue';
28
- export { useSidebar } from './composables/sidebar';
29
+ export { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';
29
30
  export { useLocalNav } from './composables/local-nav';
31
+ export { useSidebar } from './composables/sidebar';
30
32
  const theme = {
31
33
  Layout,
32
34
  enhanceApp: ({ app }) => {