vitepress 2.0.0-alpha.20 → 2.0.0-alpha.21
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/README.md +27 -7
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/client/app/components/ClientOnly.d.ts +2 -3
- package/dist/client/app/components/Content.d.ts +2 -3
- package/dist/client/app/composables/codeGroups.d.ts +2 -3
- package/dist/client/app/composables/copyCode.d.ts +2 -3
- package/dist/client/app/composables/copyCode.js +1 -1
- package/dist/client/app/composables/head.d.ts +2 -3
- package/dist/client/app/composables/icon.d.ts +2 -3
- package/dist/client/app/composables/preFetch.d.ts +2 -3
- package/dist/client/app/composables/preFetch.js +29 -28
- package/dist/client/app/data.d.ts +5 -5
- package/dist/client/app/devtools.d.ts +2 -3
- package/dist/client/app/index.d.ts +2 -3
- package/dist/client/app/index.js +4 -6
- package/dist/client/app/router.d.ts +13 -8
- package/dist/client/app/router.js +16 -7
- package/dist/client/app/ssr.d.ts +2 -3
- package/dist/client/app/theme.d.ts +3 -4
- package/dist/client/app/utils.d.ts +9 -9
- package/dist/client/app/utils.js +10 -5
- package/dist/client/shared.d.ts +48 -27
- package/dist/client/shared.js +35 -2
- package/dist/client/theme-default/NotFound.vue +6 -4
- package/dist/client/theme-default/components/VPBackdrop.vue +1 -6
- package/dist/client/theme-default/components/VPBadge.vue +4 -3
- package/dist/client/theme-default/components/VPButton.d.vue.ts +4 -4
- package/dist/client/theme-default/components/VPButton.vue +5 -3
- package/dist/client/theme-default/components/VPContent.vue +3 -3
- package/dist/client/theme-default/components/VPDoc.vue +4 -3
- package/dist/client/theme-default/components/VPDocAsideOutline.vue +3 -3
- package/dist/client/theme-default/components/VPDocFooter.vue +5 -5
- package/dist/client/theme-default/components/VPDocFooterLastUpdated.vue +2 -2
- package/dist/client/theme-default/components/VPDocOutlineItem.vue +3 -4
- package/dist/client/theme-default/components/VPFeature.vue +6 -6
- package/dist/client/theme-default/components/VPFlyout.vue +5 -5
- package/dist/client/theme-default/components/VPFooter.vue +6 -10
- package/dist/client/theme-default/components/VPHero.d.vue.ts +3 -3
- package/dist/client/theme-default/components/VPHero.vue +6 -10
- package/dist/client/theme-default/components/VPHomeContent.vue +1 -2
- package/dist/client/theme-default/components/VPHomeHero.d.vue.ts +7 -7
- package/dist/client/theme-default/components/VPImage.vue +2 -2
- package/dist/client/theme-default/components/VPLink.d.vue.ts +2 -2
- package/dist/client/theme-default/components/VPLink.vue +6 -0
- package/dist/client/theme-default/components/VPLocalNav.vue +4 -5
- package/dist/client/theme-default/components/VPLocalNavOutlineDropdown.vue +4 -7
- package/dist/client/theme-default/components/VPLocalSearchBox.vue +7 -26
- package/dist/client/theme-default/components/VPMenuGroup.vue +4 -3
- package/dist/client/theme-default/components/VPMenuLink.vue +3 -3
- package/dist/client/theme-default/components/VPNav.vue +1 -2
- package/dist/client/theme-default/components/VPNavAppearance.vue +2 -1
- package/dist/client/theme-default/components/VPNavBar.vue +15 -20
- package/dist/client/theme-default/components/VPNavBarExtra.vue +1 -1
- package/dist/client/theme-default/components/VPNavBarHamburger.vue +8 -6
- package/dist/client/theme-default/components/VPNavBarSearch.vue +2 -2
- package/dist/client/theme-default/components/VPNavBarSearchButton.vue +2 -0
- package/dist/client/theme-default/components/VPNavBarTitle.vue +2 -2
- package/dist/client/theme-default/components/VPNavMenu.vue +1 -1
- package/dist/client/theme-default/components/VPNavMenuGroup.vue +3 -3
- package/dist/client/theme-default/components/VPNavMenuLink.vue +1 -1
- package/dist/client/theme-default/components/VPNavScreen.vue +1 -6
- package/dist/client/theme-default/components/VPNavTranslations.vue +7 -5
- package/dist/client/theme-default/components/VPSidebar.vue +5 -6
- package/dist/client/theme-default/components/VPSidebarItem.vue +7 -8
- package/dist/client/theme-default/components/VPSkipLink.vue +2 -2
- package/dist/client/theme-default/components/VPSponsors.d.vue.ts +1 -1
- package/dist/client/theme-default/components/VPSwitch.vue +5 -6
- package/dist/client/theme-default/components/VPSwitchAppearance.vue +1 -2
- package/dist/client/theme-default/components/VPTeamMembersItem.vue +5 -5
- package/dist/client/theme-default/components/VPTeamPageSection.vue +3 -4
- package/dist/client/theme-default/components/VPTeamPageTitle.vue +2 -2
- package/dist/client/theme-default/composables/data.d.ts +2 -3
- package/dist/client/theme-default/composables/edit-link.d.ts +2 -3
- package/dist/client/theme-default/composables/flyout.d.ts +3 -4
- package/dist/client/theme-default/composables/langs.d.ts +4 -5
- package/dist/client/theme-default/composables/layout.d.ts +5 -6
- package/dist/client/theme-default/composables/nav-overflow.d.ts +9 -10
- package/dist/client/theme-default/composables/nav.d.ts +7 -8
- package/dist/client/theme-default/composables/outline.d.ts +5 -6
- package/dist/client/theme-default/composables/prev-next.d.ts +2 -3
- package/dist/client/theme-default/composables/scroll-lock.d.ts +2 -11
- package/dist/client/theme-default/composables/scroll-lock.js +5 -12
- package/dist/client/theme-default/composables/sidebar.d.ts +4 -5
- package/dist/client/theme-default/composables/sponsor-grid.d.ts +5 -6
- package/dist/client/theme-default/fonts/inter-italic-cyrillic-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-cyrillic.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-greek-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-greek.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-latin-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-latin.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-symbols.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-vietnamese.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-cyrillic-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-cyrillic.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-greek-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-greek.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-latin-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-latin.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-symbols.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-vietnamese.woff2 +0 -0
- package/dist/client/theme-default/styles/components/vp-code-group.css +5 -8
- package/dist/client/theme-default/styles/components/vp-doc.css +49 -45
- package/dist/client/theme-default/styles/docsearch.css +3 -2
- package/dist/client/theme-default/styles/fonts.css +22 -9
- package/dist/client/theme-default/styles/icons.css +22 -8
- package/dist/client/theme-default/styles/vars.css +15 -0
- package/dist/client/theme-default/support/docsearch.d.ts +14 -15
- package/dist/client/theme-default/support/local-search.d.ts +9 -0
- package/dist/client/theme-default/support/local-search.js +31 -0
- package/dist/client/theme-default/support/lru.d.ts +2 -3
- package/dist/client/theme-default/support/reactivity.d.ts +2 -3
- package/dist/client/theme-default/support/sidebar.d.ts +6 -7
- package/dist/client/theme-default/support/translation.d.ts +2 -3
- package/dist/client/theme-default/support/utils.d.ts +6 -7
- package/dist/node/{chunk-BYTgXTwz.js → chunk-BjrVv9r8.js} +17133 -17242
- package/dist/node/cli.js +3 -6
- package/dist/node/index.d.ts +64 -50
- package/dist/node/index.js +1 -2
- package/dist/web-types.json +1 -1
- package/package.json +56 -57
- package/types/shared.d.ts +3 -3
|
@@ -22,11 +22,11 @@ defineProps({
|
|
|
22
22
|
</figure>
|
|
23
23
|
<div class="data">
|
|
24
24
|
<h1 class="name">
|
|
25
|
-
{{ member.name }}
|
|
25
|
+
<bdi>{{ member.name }}</bdi>
|
|
26
26
|
</h1>
|
|
27
27
|
<p v-if="member.title || member.org" class="affiliation">
|
|
28
28
|
<span v-if="member.title" class="title">
|
|
29
|
-
{{ member.title }}
|
|
29
|
+
<bdi>{{ member.title }}</bdi>
|
|
30
30
|
</span>
|
|
31
31
|
<span v-if="member.title && member.org" class="at"> @ </span>
|
|
32
32
|
<VPLink
|
|
@@ -36,10 +36,10 @@ defineProps({
|
|
|
36
36
|
:href="member.orgLink"
|
|
37
37
|
no-icon
|
|
38
38
|
>
|
|
39
|
-
{{ member.org }}
|
|
39
|
+
<bdi>{{ member.org }}</bdi>
|
|
40
40
|
</VPLink>
|
|
41
41
|
</p>
|
|
42
|
-
<p v-if="member.desc" class="desc" v-html="member.desc"
|
|
42
|
+
<p v-if="member.desc" class="desc"><bdi v-html="member.desc" /></p>
|
|
43
43
|
<div v-if="member.links" class="links">
|
|
44
44
|
<VPSocialLinks :links="member.links" :me="false" />
|
|
45
45
|
</div>
|
|
@@ -223,7 +223,7 @@ defineProps({
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.sp-icon {
|
|
226
|
-
margin-
|
|
226
|
+
margin-inline-end: 0.5rem;
|
|
227
227
|
font-size: 1rem;
|
|
228
228
|
}
|
|
229
229
|
</style>
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<div class="title">
|
|
4
4
|
<div class="title-line" />
|
|
5
5
|
<h2 v-if="$slots.title" class="title-text">
|
|
6
|
-
<slot name="title"
|
|
6
|
+
<bdi><slot name="title" /></bdi>
|
|
7
7
|
</h2>
|
|
8
8
|
</div>
|
|
9
9
|
<p v-if="$slots.lead" class="lead">
|
|
10
|
-
<slot name="lead"
|
|
10
|
+
<bdi><slot name="lead" /></bdi>
|
|
11
11
|
</p>
|
|
12
12
|
<div v-if="$slots.members" class="members">
|
|
13
13
|
<slot name="members" />
|
|
@@ -43,8 +43,7 @@
|
|
|
43
43
|
.title-line {
|
|
44
44
|
position: absolute;
|
|
45
45
|
top: 1rem;
|
|
46
|
-
|
|
47
|
-
width: 100%;
|
|
46
|
+
inset-inline: 0;
|
|
48
47
|
height: 1px;
|
|
49
48
|
background-color: var(--vp-c-divider);
|
|
50
49
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="VPTeamPageTitle">
|
|
3
3
|
<h1 v-if="$slots.title" class="title">
|
|
4
|
-
<slot name="title"
|
|
4
|
+
<bdi><slot name="title" /></bdi>
|
|
5
5
|
</h1>
|
|
6
6
|
<p v-if="$slots.lead" class="lead">
|
|
7
|
-
<slot name="lead"
|
|
7
|
+
<bdi><slot name="lead" /></bdi>
|
|
8
8
|
</p>
|
|
9
9
|
</div>
|
|
10
10
|
</template>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useData as useData$1 } from "vitepress";
|
|
2
2
|
import { DefaultTheme } from "vitepress/theme";
|
|
3
3
|
//#region src/client/theme-default/composables/data.d.ts
|
|
4
|
-
declare const useData: typeof useData$1<DefaultTheme.Config>;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { useData };
|
|
4
|
+
export declare const useData: typeof useData$1<DefaultTheme.Config>;
|
|
5
|
+
//#endregion
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//#region src/client/theme-default/composables/edit-link.d.ts
|
|
2
|
-
declare function useEditLink(): import("vue").ComputedRef<{
|
|
2
|
+
export declare function useEditLink(): import("vue").ComputedRef<{
|
|
3
3
|
url: string;
|
|
4
4
|
text: string;
|
|
5
5
|
}>;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { useEditLink };
|
|
6
|
+
//#endregion
|
|
@@ -5,7 +5,6 @@ interface UseFlyoutOptions {
|
|
|
5
5
|
onFocus?(): void;
|
|
6
6
|
onBlur?(): void;
|
|
7
7
|
}
|
|
8
|
-
declare const focusedElement: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
9
|
-
declare function useFlyout(options: UseFlyoutOptions): Readonly<import("vue").Ref<boolean, boolean>>;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { focusedElement, useFlyout };
|
|
8
|
+
export declare const focusedElement: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
9
|
+
export declare function useFlyout(options: UseFlyoutOptions): Readonly<import("vue").Ref<boolean, boolean>>;
|
|
10
|
+
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Route, VitePressData } from "../../shared.js";
|
|
2
2
|
import { DefaultTheme } from "vitepress/theme";
|
|
3
3
|
//#region src/client/theme-default/composables/langs.d.ts
|
|
4
|
-
declare function useLangs({ linkToCorrespondingPage }?: {
|
|
4
|
+
export declare function useLangs({ linkToCorrespondingPage }?: {
|
|
5
5
|
/**
|
|
6
6
|
* Link each entry of the translations menu to the current page's
|
|
7
7
|
* equivalent in that locale (resolved by `resolveLocaleLink`) instead of
|
|
@@ -17,7 +17,7 @@ declare function useLangs({ linkToCorrespondingPage }?: {
|
|
|
17
17
|
text: string;
|
|
18
18
|
link: string;
|
|
19
19
|
lang: string | undefined;
|
|
20
|
-
dir:
|
|
20
|
+
dir: "ltr" | "rtl" | "auto" | undefined;
|
|
21
21
|
}[]>;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
@@ -31,7 +31,7 @@ declare function useLangs({ linkToCorrespondingPage }?: {
|
|
|
31
31
|
* The current query and hash are carried over, except when a custom
|
|
32
32
|
* `i18nRouting` function is used.
|
|
33
33
|
*/
|
|
34
|
-
declare function resolveLocaleLink(data: VitePressData<DefaultTheme.Config>, route: Route, { targetLocale, targetLocaleLink, currentLocaleLink, linkToCorrespondingPage }: {
|
|
34
|
+
export declare function resolveLocaleLink(data: VitePressData<DefaultTheme.Config>, route: Route, { targetLocale, targetLocaleLink, currentLocaleLink, linkToCorrespondingPage }: {
|
|
35
35
|
/** Key of the target locale in `site.locales`, e.g. `'fr'` or `'root'`. */
|
|
36
36
|
targetLocale: string;
|
|
37
37
|
/** Home link of the target locale, e.g. `'/fr/'`. */
|
|
@@ -41,5 +41,4 @@ declare function resolveLocaleLink(data: VitePressData<DefaultTheme.Config>, rou
|
|
|
41
41
|
/** Link to the current page's equivalent instead of the locale home. */
|
|
42
42
|
linkToCorrespondingPage: boolean;
|
|
43
43
|
}): string;
|
|
44
|
-
//#endregion
|
|
45
|
-
export { resolveLocaleLink, useLangs };
|
|
44
|
+
//#endregion
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ComputedRef, InjectionKey } from "vue";
|
|
2
2
|
import { DefaultTheme } from "vitepress/theme";
|
|
3
3
|
//#region src/client/theme-default/composables/layout.d.ts
|
|
4
|
-
declare function useLayout(): DefaultTheme.Layout;
|
|
4
|
+
export declare function useLayout(): DefaultTheme.Layout;
|
|
5
5
|
interface RegisterWatchersOptions {
|
|
6
6
|
closeSidebar: () => void;
|
|
7
7
|
}
|
|
8
|
-
declare function registerWatchers({ closeSidebar }: RegisterWatchersOptions): void;
|
|
9
|
-
interface LayoutInfo {
|
|
8
|
+
export declare function registerWatchers({ closeSidebar }: RegisterWatchersOptions): void;
|
|
9
|
+
export interface LayoutInfo {
|
|
10
10
|
heroImageSlotExists: ComputedRef<boolean>;
|
|
11
11
|
}
|
|
12
|
-
declare const layoutInfoInjectionKey: InjectionKey<LayoutInfo>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { LayoutInfo, layoutInfoInjectionKey, registerWatchers, useLayout };
|
|
12
|
+
export declare const layoutInfoInjectionKey: InjectionKey<LayoutInfo>;
|
|
13
|
+
//#endregion
|
|
@@ -13,9 +13,9 @@ import { MaybeRefOrGetter } from "vue";
|
|
|
13
13
|
* natural widths remain measurable and observed — re-expanding never works
|
|
14
14
|
* from stale data.
|
|
15
15
|
*/
|
|
16
|
-
declare const navClusterUnits: readonly ["translations", "appearance", "socialLinks"];
|
|
17
|
-
type NavClusterUnit = (typeof navClusterUnits)[number];
|
|
18
|
-
interface NavFitInput {
|
|
16
|
+
export declare const navClusterUnits: readonly ["translations", "appearance", "socialLinks"];
|
|
17
|
+
export type NavClusterUnit = (typeof navClusterUnits)[number];
|
|
18
|
+
export interface NavFitInput {
|
|
19
19
|
/** widths of the top-level menu items, in nav order (px) */
|
|
20
20
|
itemWidths: number[];
|
|
21
21
|
/** cluster unit widths; null = the unit isn't configured on this site */
|
|
@@ -27,15 +27,15 @@ interface NavFitInput {
|
|
|
27
27
|
/** px the `⋯` button occupies once anything is collapsed */
|
|
28
28
|
extraWidth: number;
|
|
29
29
|
}
|
|
30
|
-
interface NavFitResult {
|
|
30
|
+
export interface NavFitResult {
|
|
31
31
|
/** number of menu items that stay in the bar (Infinity = all) */
|
|
32
32
|
visibleItemCount: number;
|
|
33
33
|
translations: boolean;
|
|
34
34
|
appearance: boolean;
|
|
35
35
|
socialLinks: boolean;
|
|
36
36
|
}
|
|
37
|
-
declare function computeNavFit(input: NavFitInput): NavFitResult;
|
|
38
|
-
interface NavOverflow {
|
|
37
|
+
export declare function computeNavFit(input: NavFitInput): NavFitResult;
|
|
38
|
+
export interface NavOverflow {
|
|
39
39
|
/** reactive collapse state, all-visible during SSR and below 48rem */
|
|
40
40
|
state: NavFitResult;
|
|
41
41
|
/** true when anything is collapsed into the `⋯` menu */
|
|
@@ -46,10 +46,9 @@ interface NavOverflow {
|
|
|
46
46
|
setItemEl(index: number, el: HTMLElement | null): void;
|
|
47
47
|
setClusterEl(unit: NavClusterUnit, el: HTMLElement | null): void;
|
|
48
48
|
}
|
|
49
|
-
declare function useNavOverflow(): NavOverflow | null;
|
|
50
|
-
declare function provideNavOverflow(options: {
|
|
49
|
+
export declare function useNavOverflow(): NavOverflow | null;
|
|
50
|
+
export declare function provideNavOverflow(options: {
|
|
51
51
|
/** stringified nav config — collapse state resets when it changes */
|
|
52
52
|
itemsKey: MaybeRefOrGetter<string>;
|
|
53
53
|
}): NavOverflow;
|
|
54
|
-
//#endregion
|
|
55
|
-
export { NavClusterUnit, NavFitInput, NavFitResult, NavOverflow, computeNavFit, navClusterUnits, provideNavOverflow, useNavOverflow };
|
|
54
|
+
//#endregion
|
|
@@ -4,23 +4,22 @@ import { DefaultTheme } from "vitepress/theme";
|
|
|
4
4
|
declare function openScreen(): void;
|
|
5
5
|
declare function closeScreen(): void;
|
|
6
6
|
declare function toggleScreen(): void;
|
|
7
|
-
declare function useNav(): {
|
|
7
|
+
export declare function useNav(): {
|
|
8
8
|
isScreenOpen: import("vue").Ref<boolean, boolean>;
|
|
9
9
|
screenTriggerEl: import("vue").ShallowRef<HTMLButtonElement | null, HTMLButtonElement | null>;
|
|
10
10
|
openScreen: typeof openScreen;
|
|
11
11
|
closeScreen: typeof closeScreen;
|
|
12
12
|
toggleScreen: typeof toggleScreen;
|
|
13
13
|
};
|
|
14
|
-
declare function useAppearanceSwitch(): import("vue").ComputedRef<boolean>;
|
|
15
|
-
declare function useNavItemLink(item: MaybeRefOrGetter<DefaultTheme.NavItemWithLink>): {
|
|
14
|
+
export declare function useAppearanceSwitch(): import("vue").ComputedRef<boolean>;
|
|
15
|
+
export declare function useNavItemLink(item: MaybeRefOrGetter<DefaultTheme.NavItemWithLink>): {
|
|
16
16
|
href: import("vue").ComputedRef<string>;
|
|
17
17
|
isActiveLink: import("vue").ComputedRef<boolean>;
|
|
18
18
|
isCurrentLink: import("vue").ComputedRef<boolean>;
|
|
19
19
|
};
|
|
20
|
-
interface NavExposedMethods {
|
|
20
|
+
export interface NavExposedMethods {
|
|
21
21
|
closeScreen: () => void;
|
|
22
22
|
}
|
|
23
|
-
declare const navInjectionKey: InjectionKey<NavExposedMethods>;
|
|
24
|
-
declare const navScreenInjectionKey: InjectionKey<boolean>;
|
|
25
|
-
//#endregion
|
|
26
|
-
export { NavExposedMethods, navInjectionKey, navScreenInjectionKey, useAppearanceSwitch, useNav, useNavItemLink };
|
|
23
|
+
export declare const navInjectionKey: InjectionKey<NavExposedMethods>;
|
|
24
|
+
export declare const navScreenInjectionKey: InjectionKey<boolean>;
|
|
25
|
+
//#endregion
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { TemplateRef } from "vue";
|
|
2
2
|
import { DefaultTheme } from "vitepress/theme";
|
|
3
3
|
//#region src/client/theme-default/composables/outline.d.ts
|
|
4
|
-
declare function resolveTitle(theme: DefaultTheme.Config): string;
|
|
5
|
-
declare function getHeaders(range: DefaultTheme.Config['outline']): DefaultTheme.OutlineItem[];
|
|
6
|
-
declare function resolveHeaders(headers: DefaultTheme.OutlineItem[], range?: DefaultTheme.Config['outline']): DefaultTheme.OutlineItem[];
|
|
7
|
-
declare function useActiveAnchor(container: TemplateRef<HTMLElement>, marker: TemplateRef<HTMLElement>): void;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { getHeaders, resolveHeaders, resolveTitle, useActiveAnchor };
|
|
4
|
+
export declare function resolveTitle(theme: DefaultTheme.Config): string;
|
|
5
|
+
export declare function getHeaders(range: DefaultTheme.Config['outline']): DefaultTheme.OutlineItem[];
|
|
6
|
+
export declare function resolveHeaders(headers: DefaultTheme.OutlineItem[], range?: DefaultTheme.Config['outline']): DefaultTheme.OutlineItem[];
|
|
7
|
+
export declare function useActiveAnchor(container: TemplateRef<HTMLElement>, marker: TemplateRef<HTMLElement>): void;
|
|
8
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/client/theme-default/composables/prev-next.d.ts
|
|
2
|
-
declare function usePrevNext(): import("vue").ComputedRef<{
|
|
2
|
+
export declare function usePrevNext(): import("vue").ComputedRef<{
|
|
3
3
|
prev?: {
|
|
4
4
|
text?: string;
|
|
5
5
|
link?: string;
|
|
@@ -13,5 +13,4 @@ declare function usePrevNext(): import("vue").ComputedRef<{
|
|
|
13
13
|
rel?: string;
|
|
14
14
|
};
|
|
15
15
|
}>;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { usePrevNext };
|
|
16
|
+
//#endregion
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { WritableComputedRef } from "vue";
|
|
2
2
|
//#region src/client/theme-default/composables/scroll-lock.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* Prefer `scrollbar-gutter: stable` + `overflow: hidden` so layout width
|
|
7
|
-
* stays stable when the scrollbar is hidden. If unsupported, fall back to
|
|
8
|
-
* blocking scroll events while still allowing events inside scrollable
|
|
9
|
-
* elements.
|
|
10
|
-
*/
|
|
11
|
-
declare function useBodyScrollLock(): WritableComputedRef<boolean>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { useBodyScrollLock };
|
|
3
|
+
export declare function useBodyScrollLock(): WritableComputedRef<boolean>;
|
|
4
|
+
//#endregion
|
|
@@ -40,10 +40,10 @@ let overflowLockCount = 0;
|
|
|
40
40
|
let eventLockCount = 0;
|
|
41
41
|
let initialOverflow;
|
|
42
42
|
let initialGutter;
|
|
43
|
-
function lockOverflow() {
|
|
43
|
+
function lockOverflow(reserveGutter) {
|
|
44
44
|
if (++overflowLockCount > 1) return;
|
|
45
45
|
const html = document.documentElement;
|
|
46
|
-
if (!getComputedStyle(html).scrollbarGutter.includes("stable")) {
|
|
46
|
+
if (reserveGutter && !getComputedStyle(html).scrollbarGutter.includes("stable")) {
|
|
47
47
|
initialGutter = html.style.scrollbarGutter;
|
|
48
48
|
html.style.scrollbarGutter = "stable";
|
|
49
49
|
}
|
|
@@ -70,21 +70,14 @@ function unlockEvents() {
|
|
|
70
70
|
document.removeEventListener("touchmove", blockScroll, listenerOptions);
|
|
71
71
|
document.removeEventListener("keydown", blockScrollKeys, listenerOptions);
|
|
72
72
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Locks page scrolling behind an overlay.
|
|
75
|
-
*
|
|
76
|
-
* Prefer `scrollbar-gutter: stable` + `overflow: hidden` so layout width
|
|
77
|
-
* stays stable when the scrollbar is hidden. If unsupported, fall back to
|
|
78
|
-
* blocking scroll events while still allowing events inside scrollable
|
|
79
|
-
* elements.
|
|
80
|
-
*/
|
|
81
73
|
function useBodyScrollLock() {
|
|
82
74
|
const isLocked = shallowRef(false);
|
|
83
75
|
let useEvents = false;
|
|
84
76
|
function lock() {
|
|
85
77
|
if (isLocked.value) return;
|
|
86
|
-
|
|
87
|
-
useEvents
|
|
78
|
+
const scrollbarTakesSpace = window.innerWidth > document.documentElement.clientWidth;
|
|
79
|
+
useEvents = scrollbarTakesSpace && !CSS.supports("scrollbar-gutter", "stable");
|
|
80
|
+
useEvents ? lockEvents() : lockOverflow(scrollbarTakesSpace);
|
|
88
81
|
isLocked.value = true;
|
|
89
82
|
}
|
|
90
83
|
function unlock() {
|
|
@@ -5,14 +5,14 @@ import { DefaultTheme } from "vitepress/theme";
|
|
|
5
5
|
* a11y: cache the element that opened the Sidebar (the menu button) then
|
|
6
6
|
* focus that button again when Menu is closed with Escape key.
|
|
7
7
|
*/
|
|
8
|
-
declare function useCloseSidebarOnEscape(close: () => void): void;
|
|
9
|
-
declare function useSidebarControl(): {
|
|
8
|
+
export declare function useCloseSidebarOnEscape(close: () => void): void;
|
|
9
|
+
export declare function useSidebarControl(): {
|
|
10
10
|
isOpen: import("vue").Ref<boolean, boolean>;
|
|
11
11
|
open: () => void;
|
|
12
12
|
close: () => void;
|
|
13
13
|
toggle: () => void;
|
|
14
14
|
};
|
|
15
|
-
declare function useSidebarItemControl(item: ComputedRef<DefaultTheme.SidebarItem>): {
|
|
15
|
+
export declare function useSidebarItemControl(item: ComputedRef<DefaultTheme.SidebarItem>): {
|
|
16
16
|
collapsed: import("vue").Ref<boolean, boolean>;
|
|
17
17
|
collapsible: ComputedRef<boolean>;
|
|
18
18
|
isLink: ComputedRef<boolean>;
|
|
@@ -22,5 +22,4 @@ declare function useSidebarItemControl(item: ComputedRef<DefaultTheme.SidebarIte
|
|
|
22
22
|
hasChildren: ComputedRef<boolean>;
|
|
23
23
|
toggle: () => void;
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
|
-
export { useCloseSidebarOnEscape, useSidebarControl, useSidebarItemControl };
|
|
25
|
+
//#endregion
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { TemplateRef } from "vue";
|
|
2
2
|
//#region src/client/theme-default/composables/sponsor-grid.d.ts
|
|
3
|
-
type GridSetting = { [size in GridSize]: [number, number][]; };
|
|
4
|
-
type GridSize = 'xmini' | 'mini' | 'small' | 'medium' | 'big';
|
|
5
|
-
interface UseSponsorsGridOptions {
|
|
3
|
+
export type GridSetting = { [size in GridSize]: [number, number][]; };
|
|
4
|
+
export type GridSize = 'xmini' | 'mini' | 'small' | 'medium' | 'big';
|
|
5
|
+
export interface UseSponsorsGridOptions {
|
|
6
6
|
el: TemplateRef<HTMLElement>;
|
|
7
7
|
size?: GridSize;
|
|
8
8
|
}
|
|
9
|
-
declare function useSponsorsGrid({ el, size }: UseSponsorsGridOptions): void;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { GridSetting, GridSize, UseSponsorsGridOptions, useSponsorsGrid };
|
|
9
|
+
export declare function useSponsorsGrid({ el, size }: UseSponsorsGridOptions): void;
|
|
10
|
+
//#endregion
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
.vp-code-group .tabs {
|
|
6
6
|
position: relative;
|
|
7
7
|
display: flex;
|
|
8
|
-
margin-
|
|
9
|
-
margin-left: -1.5rem;
|
|
8
|
+
margin-inline: -1.5rem;
|
|
10
9
|
padding: 0 0.75rem;
|
|
11
10
|
background-color: var(--vp-code-tab-bg);
|
|
12
11
|
overflow-x: auto;
|
|
@@ -16,8 +15,7 @@
|
|
|
16
15
|
|
|
17
16
|
@media (min-width: 40rem) {
|
|
18
17
|
.vp-code-group .tabs {
|
|
19
|
-
margin-
|
|
20
|
-
margin-left: 0;
|
|
18
|
+
margin-inline: 0;
|
|
21
19
|
border-radius: 0.5rem 0.5rem 0 0;
|
|
22
20
|
}
|
|
23
21
|
}
|
|
@@ -44,9 +42,8 @@
|
|
|
44
42
|
|
|
45
43
|
.vp-code-group .tabs label::after {
|
|
46
44
|
position: absolute;
|
|
47
|
-
|
|
45
|
+
inset-inline: 0.5rem;
|
|
48
46
|
bottom: -1px;
|
|
49
|
-
left: 0.5rem;
|
|
50
47
|
z-index: 1;
|
|
51
48
|
height: 2px;
|
|
52
49
|
border-radius: 2px;
|
|
@@ -71,8 +68,8 @@
|
|
|
71
68
|
.vp-block {
|
|
72
69
|
display: none;
|
|
73
70
|
margin-top: 0 !important;
|
|
74
|
-
border-
|
|
75
|
-
border-
|
|
71
|
+
border-start-start-radius: 0 !important;
|
|
72
|
+
border-start-end-radius: 0 !important;
|
|
76
73
|
}
|
|
77
74
|
|
|
78
75
|
.vp-code-group div[class*='language-'].active,
|