vitepress 1.0.0-alpha.21 → 1.0.0-alpha.22
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 +1 -0
- package/dist/client/app/data.js +3 -2
- package/dist/client/index.d.ts +1 -0
- package/dist/client/theme-default/components/VPSidebarGroup.vue +1 -1
- package/dist/client/theme-default/components/VPSidebarLink.vue +1 -1
- package/dist/client/theme-default/components/VPSwitchAppearance.vue +13 -5
- package/dist/node/cli.js +2 -2
- package/dist/node/index.d.ts +8 -2
- package/dist/node/index.js +1 -1
- package/dist/node/{serve-ce51a050.js → serve-ed2c66fa.js} +19 -7
- package/dist/node-cjs/cli.cjs +2 -2
- package/dist/node-cjs/index.cjs +1 -1
- package/dist/node-cjs/{serve-a3f7cc3d.cjs → serve-01943a5f.cjs} +22 -10
- package/package.json +1 -1
- package/theme.d.ts +12 -11
- package/types/shared.d.ts +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/vuejs/vitepress/actions)
|
|
4
4
|
[](https://www.npmjs.com/package/vitepress)
|
|
5
|
+
[](https://chat.vuejs.org)
|
|
5
6
|
|
|
6
7
|
---
|
|
7
8
|
|
package/dist/client/app/data.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, inject, readonly, ref, shallowRef } from 'vue';
|
|
2
2
|
import siteData from '@siteData';
|
|
3
3
|
import { resolveSiteDataByRoute, createTitle } from '../shared.js';
|
|
4
4
|
import { withBase } from './utils.js';
|
|
@@ -32,7 +32,8 @@ export function initData(route) {
|
|
|
32
32
|
}),
|
|
33
33
|
description: computed(() => {
|
|
34
34
|
return route.data.description || site.value.description;
|
|
35
|
-
})
|
|
35
|
+
}),
|
|
36
|
+
isDark: ref(false)
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
export function useData() {
|
package/dist/client/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ function toggle() {
|
|
|
41
41
|
:role="collapsible ? 'button' : undefined"
|
|
42
42
|
@click="toggle"
|
|
43
43
|
>
|
|
44
|
-
<h2 class="title-text"
|
|
44
|
+
<h2 v-html="text" class="title-text"></h2>
|
|
45
45
|
<div class="action">
|
|
46
46
|
<VPIconMinusSquare class="icon minus" />
|
|
47
47
|
<VPIconPlusSquare class="icon plus" />
|
|
@@ -25,7 +25,7 @@ const closeSideBar = inject('close-sidebar') as () => void
|
|
|
25
25
|
:href="item.link"
|
|
26
26
|
@click="closeSideBar"
|
|
27
27
|
>
|
|
28
|
-
<span class="link-text" :class="{ light: depth > 1 }"
|
|
28
|
+
<span v-html="item.text" class="link-text" :class="{ light: depth > 1 }"></span>
|
|
29
29
|
</VPLink>
|
|
30
30
|
<template
|
|
31
31
|
v-if="'items' in item && depth < maxDepth"
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { ref, onMounted } from 'vue'
|
|
2
|
+
import { ref, onMounted, watch } from 'vue'
|
|
3
|
+
import { useData } from 'vitepress'
|
|
3
4
|
import { APPEARANCE_KEY } from '../../shared.js'
|
|
4
5
|
import VPSwitch from './VPSwitch.vue'
|
|
5
6
|
import VPIconSun from './icons/VPIconSun.vue'
|
|
6
7
|
import VPIconMoon from './icons/VPIconMoon.vue'
|
|
7
8
|
|
|
9
|
+
const { site, isDark } = useData()
|
|
8
10
|
const checked = ref(false)
|
|
9
11
|
const toggle = typeof localStorage !== 'undefined' ? useAppearance() : () => {}
|
|
10
12
|
|
|
@@ -16,11 +18,13 @@ function useAppearance() {
|
|
|
16
18
|
const query = window.matchMedia('(prefers-color-scheme: dark)')
|
|
17
19
|
const classList = document.documentElement.classList
|
|
18
20
|
|
|
19
|
-
let userPreference =
|
|
21
|
+
let userPreference =
|
|
22
|
+
localStorage.getItem(APPEARANCE_KEY) || site.value.appearance !== true
|
|
23
|
+
? site.value.appearance
|
|
24
|
+
: 'auto'
|
|
20
25
|
|
|
21
|
-
let isDark =
|
|
22
|
-
? query.matches
|
|
23
|
-
: userPreference === 'dark'
|
|
26
|
+
let isDark =
|
|
27
|
+
userPreference === 'auto' ? query.matches : userPreference === 'dark'
|
|
24
28
|
|
|
25
29
|
query.onchange = (e) => {
|
|
26
30
|
if (userPreference === 'auto') {
|
|
@@ -64,6 +68,10 @@ function useAppearance() {
|
|
|
64
68
|
|
|
65
69
|
return toggle
|
|
66
70
|
}
|
|
71
|
+
|
|
72
|
+
watch(checked, (newIsDark) => {
|
|
73
|
+
isDark.value = newIsDark
|
|
74
|
+
})
|
|
67
75
|
</script>
|
|
68
76
|
|
|
69
77
|
<template>
|
package/dist/node/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as picocolors, g as build, s as serve, e as createServer } from './serve-
|
|
1
|
+
import { p as picocolors, g as build, s as serve, e as createServer } from './serve-ed2c66fa.js';
|
|
2
2
|
import 'shiki';
|
|
3
3
|
import 'fs';
|
|
4
4
|
import 'path';
|
|
@@ -271,7 +271,7 @@ function isConstructorOrProto (obj, key) {
|
|
|
271
271
|
return key === 'constructor' && typeof obj[key] === 'function' || key === '__proto__';
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
var version = "1.0.0-alpha.
|
|
274
|
+
var version = "1.0.0-alpha.22";
|
|
275
275
|
|
|
276
276
|
const argv = minimist(process.argv.slice(2));
|
|
277
277
|
console.log(picocolors.exports.cyan(`vitepress v${version}`));
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1729,7 +1729,7 @@ interface UserConfig<ThemeConfig = any> {
|
|
|
1729
1729
|
titleTemplate?: string | boolean;
|
|
1730
1730
|
description?: string;
|
|
1731
1731
|
head?: HeadConfig[];
|
|
1732
|
-
appearance?: boolean;
|
|
1732
|
+
appearance?: boolean | 'dark';
|
|
1733
1733
|
themeConfig?: ThemeConfig;
|
|
1734
1734
|
locales?: Record<string, LocaleConfig>;
|
|
1735
1735
|
markdown?: MarkdownOptions;
|
|
@@ -1789,6 +1789,12 @@ interface UserConfig<ThemeConfig = any> {
|
|
|
1789
1789
|
* HTML transform hook: runs before writing HTML to dist.
|
|
1790
1790
|
*/
|
|
1791
1791
|
transformHtml?: (code: string, id: string, ctx: TransformContext) => Awaitable<string | void>;
|
|
1792
|
+
/**
|
|
1793
|
+
* PageData transform hook: runs when rendering markdown to vue
|
|
1794
|
+
*/
|
|
1795
|
+
transformPageData?: (pageData: PageData) => Awaitable<Partial<PageData> | {
|
|
1796
|
+
[key: string]: any;
|
|
1797
|
+
} | void>;
|
|
1792
1798
|
}
|
|
1793
1799
|
interface TransformContext {
|
|
1794
1800
|
siteConfig: SiteConfig;
|
|
@@ -1800,7 +1806,7 @@ interface TransformContext {
|
|
|
1800
1806
|
content: string;
|
|
1801
1807
|
}
|
|
1802
1808
|
declare type RawConfigExports<ThemeConfig = any> = Awaitable<UserConfig<ThemeConfig>> | (() => Awaitable<UserConfig<ThemeConfig>>);
|
|
1803
|
-
interface SiteConfig<ThemeConfig = any> extends Pick<UserConfig, 'markdown' | 'vue' | 'vite' | 'shouldPreload' | 'mpa' | 'lastUpdated' | 'ignoreDeadLinks' | 'cleanUrls' | 'buildEnd' | 'transformHead' | 'transformHtml'> {
|
|
1809
|
+
interface SiteConfig<ThemeConfig = any> extends Pick<UserConfig, 'markdown' | 'vue' | 'vite' | 'shouldPreload' | 'mpa' | 'lastUpdated' | 'ignoreDeadLinks' | 'cleanUrls' | 'buildEnd' | 'transformHead' | 'transformHtml' | 'transformPageData'> {
|
|
1804
1810
|
root: string;
|
|
1805
1811
|
srcDir: string;
|
|
1806
1812
|
site: SiteData<ThemeConfig>;
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as build, f as createMarkdownRenderer, e as createServer, d as defineConfig, a as defineConfigWithTheme, r as resolveConfig, b as resolveSiteData, c as resolveSiteDataByRoute, s as serve } from './serve-
|
|
1
|
+
export { g as build, f as createMarkdownRenderer, e as createServer, d as defineConfig, a as defineConfigWithTheme, r as resolveConfig, b as resolveSiteData, c as resolveSiteDataByRoute, s as serve } from './serve-ed2c66fa.js';
|
|
2
2
|
import 'dns';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'path';
|
|
@@ -10776,7 +10776,8 @@ async function resolveConfig(root = process.cwd(), command = "serve", mode = "de
|
|
|
10776
10776
|
cleanUrls: userConfig.cleanUrls || "disabled",
|
|
10777
10777
|
buildEnd: userConfig.buildEnd,
|
|
10778
10778
|
transformHead: userConfig.transformHead,
|
|
10779
|
-
transformHtml: userConfig.transformHtml
|
|
10779
|
+
transformHtml: userConfig.transformHtml,
|
|
10780
|
+
transformPageData: userConfig.transformPageData
|
|
10780
10781
|
};
|
|
10781
10782
|
return config;
|
|
10782
10783
|
}
|
|
@@ -10858,14 +10859,15 @@ async function resolveSiteData(root, userConfig, command = "serve", mode = "deve
|
|
|
10858
10859
|
function resolveSiteDataHead(userConfig) {
|
|
10859
10860
|
const head = (userConfig == null ? void 0 : userConfig.head) ?? [];
|
|
10860
10861
|
if ((userConfig == null ? void 0 : userConfig.appearance) ?? true) {
|
|
10862
|
+
const fallbackPreference = (userConfig == null ? void 0 : userConfig.appearance) !== true ? (userConfig == null ? void 0 : userConfig.appearance) ?? "" : "auto";
|
|
10861
10863
|
head.push([
|
|
10862
10864
|
"script",
|
|
10863
10865
|
{ id: "check-dark-light" },
|
|
10864
10866
|
`
|
|
10865
10867
|
;(() => {
|
|
10866
|
-
const
|
|
10867
|
-
const
|
|
10868
|
-
if (!
|
|
10868
|
+
const preference = localStorage.getItem('${APPEARANCE_KEY}') || '${fallbackPreference}'
|
|
10869
|
+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
10870
|
+
if (!preference || preference === 'auto' ? prefersDark : preference === 'dark') {
|
|
10869
10871
|
document.documentElement.classList.add('dark')
|
|
10870
10872
|
}
|
|
10871
10873
|
})()
|
|
@@ -35575,7 +35577,7 @@ const includesRE = /<!--\s*@include:\s*(.*?)\s*-->/g;
|
|
|
35575
35577
|
function clearCache() {
|
|
35576
35578
|
cache$1.clear();
|
|
35577
35579
|
}
|
|
35578
|
-
async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, isBuild = false, base = "/", includeLastUpdatedData = false, cleanUrls = "disabled") {
|
|
35580
|
+
async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, isBuild = false, base = "/", includeLastUpdatedData = false, cleanUrls = "disabled", siteConfig = null) {
|
|
35579
35581
|
const md = await createMarkdownRenderer(srcDir, options, base);
|
|
35580
35582
|
pages = pages.map((p) => slash(p.replace(/\.md$/, "")));
|
|
35581
35583
|
const replaceRegex = genReplaceRegexp(userDefines, isBuild);
|
|
@@ -35651,7 +35653,7 @@ If it is intended, you can use:
|
|
|
35651
35653
|
}
|
|
35652
35654
|
}
|
|
35653
35655
|
}
|
|
35654
|
-
|
|
35656
|
+
let pageData = {
|
|
35655
35657
|
title: inferTitle(md, frontmatter, title),
|
|
35656
35658
|
titleTemplate: frontmatter.titleTemplate,
|
|
35657
35659
|
description: inferDescription(frontmatter),
|
|
@@ -35662,6 +35664,15 @@ If it is intended, you can use:
|
|
|
35662
35664
|
if (includeLastUpdatedData) {
|
|
35663
35665
|
pageData.lastUpdated = await getGitTimestamp(file);
|
|
35664
35666
|
}
|
|
35667
|
+
if (siteConfig == null ? void 0 : siteConfig.transformPageData) {
|
|
35668
|
+
const dataToMerge = await siteConfig.transformPageData(pageData);
|
|
35669
|
+
if (dataToMerge) {
|
|
35670
|
+
pageData = {
|
|
35671
|
+
...pageData,
|
|
35672
|
+
...dataToMerge
|
|
35673
|
+
};
|
|
35674
|
+
}
|
|
35675
|
+
}
|
|
35665
35676
|
const vueSrc = [
|
|
35666
35677
|
...injectPageDataCode(
|
|
35667
35678
|
(sfcBlocks == null ? void 0 : sfcBlocks.scripts.map((item) => item.content)) ?? [],
|
|
@@ -35888,7 +35899,8 @@ async function createVitePressPlugin(siteConfig, ssr = false, pageToHashMap, cli
|
|
|
35888
35899
|
config.command === "build",
|
|
35889
35900
|
config.base,
|
|
35890
35901
|
lastUpdated,
|
|
35891
|
-
cleanUrls
|
|
35902
|
+
cleanUrls,
|
|
35903
|
+
siteConfig
|
|
35892
35904
|
);
|
|
35893
35905
|
},
|
|
35894
35906
|
config() {
|
package/dist/node-cjs/cli.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var serve = require('./serve-
|
|
3
|
+
var serve = require('./serve-01943a5f.cjs');
|
|
4
4
|
require('shiki');
|
|
5
5
|
require('fs');
|
|
6
6
|
require('path');
|
|
@@ -273,7 +273,7 @@ function isConstructorOrProto (obj, key) {
|
|
|
273
273
|
return key === 'constructor' && typeof obj[key] === 'function' || key === '__proto__';
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
var version = "1.0.0-alpha.
|
|
276
|
+
var version = "1.0.0-alpha.22";
|
|
277
277
|
|
|
278
278
|
const argv = minimist(process.argv.slice(2));
|
|
279
279
|
console.log(serve.picocolors.exports.cyan(`vitepress v${version}`));
|
package/dist/node-cjs/index.cjs
CHANGED
|
@@ -9681,8 +9681,8 @@ function sanitizeFileName(name) {
|
|
|
9681
9681
|
return driveLetter + name.slice(driveLetter.length).replace(INVALID_CHAR_REGEX, "_").replace(/(^|\/)_+(?=[^/]*$)/, "$1");
|
|
9682
9682
|
}
|
|
9683
9683
|
|
|
9684
|
-
const require$1 = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-
|
|
9685
|
-
const PKG_ROOT = path$s.resolve(url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-
|
|
9684
|
+
const require$1 = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-01943a5f.cjs', document.baseURI).href)));
|
|
9685
|
+
const PKG_ROOT = path$s.resolve(url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-01943a5f.cjs', document.baseURI).href))), "../..");
|
|
9686
9686
|
const DIST_CLIENT_PATH = path$s.resolve(PKG_ROOT, "client");
|
|
9687
9687
|
const APP_PATH = path$s.join(DIST_CLIENT_PATH, "app");
|
|
9688
9688
|
path$s.join(DIST_CLIENT_PATH, "shared");
|
|
@@ -10816,7 +10816,8 @@ async function resolveConfig(root = process.cwd(), command = "serve", mode = "de
|
|
|
10816
10816
|
cleanUrls: userConfig.cleanUrls || "disabled",
|
|
10817
10817
|
buildEnd: userConfig.buildEnd,
|
|
10818
10818
|
transformHead: userConfig.transformHead,
|
|
10819
|
-
transformHtml: userConfig.transformHtml
|
|
10819
|
+
transformHtml: userConfig.transformHtml,
|
|
10820
|
+
transformPageData: userConfig.transformPageData
|
|
10820
10821
|
};
|
|
10821
10822
|
return config;
|
|
10822
10823
|
}
|
|
@@ -10898,14 +10899,15 @@ async function resolveSiteData(root, userConfig, command = "serve", mode = "deve
|
|
|
10898
10899
|
function resolveSiteDataHead(userConfig) {
|
|
10899
10900
|
const head = (userConfig == null ? void 0 : userConfig.head) ?? [];
|
|
10900
10901
|
if ((userConfig == null ? void 0 : userConfig.appearance) ?? true) {
|
|
10902
|
+
const fallbackPreference = (userConfig == null ? void 0 : userConfig.appearance) !== true ? (userConfig == null ? void 0 : userConfig.appearance) ?? "" : "auto";
|
|
10901
10903
|
head.push([
|
|
10902
10904
|
"script",
|
|
10903
10905
|
{ id: "check-dark-light" },
|
|
10904
10906
|
`
|
|
10905
10907
|
;(() => {
|
|
10906
|
-
const
|
|
10907
|
-
const
|
|
10908
|
-
if (!
|
|
10908
|
+
const preference = localStorage.getItem('${APPEARANCE_KEY}') || '${fallbackPreference}'
|
|
10909
|
+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
10910
|
+
if (!preference || preference === 'auto' ? prefersDark : preference === 'dark') {
|
|
10909
10911
|
document.documentElement.classList.add('dark')
|
|
10910
10912
|
}
|
|
10911
10913
|
})()
|
|
@@ -35615,7 +35617,7 @@ const includesRE = /<!--\s*@include:\s*(.*?)\s*-->/g;
|
|
|
35615
35617
|
function clearCache() {
|
|
35616
35618
|
cache$1.clear();
|
|
35617
35619
|
}
|
|
35618
|
-
async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, isBuild = false, base = "/", includeLastUpdatedData = false, cleanUrls = "disabled") {
|
|
35620
|
+
async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, isBuild = false, base = "/", includeLastUpdatedData = false, cleanUrls = "disabled", siteConfig = null) {
|
|
35619
35621
|
const md = await createMarkdownRenderer(srcDir, options, base);
|
|
35620
35622
|
pages = pages.map((p) => slash(p.replace(/\.md$/, "")));
|
|
35621
35623
|
const replaceRegex = genReplaceRegexp(userDefines, isBuild);
|
|
@@ -35691,7 +35693,7 @@ If it is intended, you can use:
|
|
|
35691
35693
|
}
|
|
35692
35694
|
}
|
|
35693
35695
|
}
|
|
35694
|
-
|
|
35696
|
+
let pageData = {
|
|
35695
35697
|
title: inferTitle(md, frontmatter, title),
|
|
35696
35698
|
titleTemplate: frontmatter.titleTemplate,
|
|
35697
35699
|
description: inferDescription(frontmatter),
|
|
@@ -35702,6 +35704,15 @@ If it is intended, you can use:
|
|
|
35702
35704
|
if (includeLastUpdatedData) {
|
|
35703
35705
|
pageData.lastUpdated = await getGitTimestamp(file);
|
|
35704
35706
|
}
|
|
35707
|
+
if (siteConfig == null ? void 0 : siteConfig.transformPageData) {
|
|
35708
|
+
const dataToMerge = await siteConfig.transformPageData(pageData);
|
|
35709
|
+
if (dataToMerge) {
|
|
35710
|
+
pageData = {
|
|
35711
|
+
...pageData,
|
|
35712
|
+
...dataToMerge
|
|
35713
|
+
};
|
|
35714
|
+
}
|
|
35715
|
+
}
|
|
35705
35716
|
const vueSrc = [
|
|
35706
35717
|
...injectPageDataCode(
|
|
35707
35718
|
(sfcBlocks == null ? void 0 : sfcBlocks.scripts.map((item) => item.content)) ?? [],
|
|
@@ -35928,7 +35939,8 @@ async function createVitePressPlugin(siteConfig, ssr = false, pageToHashMap, cli
|
|
|
35928
35939
|
config.command === "build",
|
|
35929
35940
|
config.base,
|
|
35930
35941
|
lastUpdated,
|
|
35931
|
-
cleanUrls
|
|
35942
|
+
cleanUrls,
|
|
35943
|
+
siteConfig
|
|
35932
35944
|
);
|
|
35933
35945
|
},
|
|
35934
35946
|
config() {
|
|
@@ -42188,7 +42200,7 @@ function linkVue() {
|
|
|
42188
42200
|
if (root) {
|
|
42189
42201
|
const dest = path__default["default"].resolve(root, "node_modules/vue");
|
|
42190
42202
|
if (!fs$c.existsSync(dest)) {
|
|
42191
|
-
const src = path__default["default"].dirname(module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-
|
|
42203
|
+
const src = path__default["default"].dirname(module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-01943a5f.cjs', document.baseURI).href))).resolve("vue"));
|
|
42192
42204
|
fs$c.ensureSymlinkSync(src, dest, "junction");
|
|
42193
42205
|
return () => {
|
|
42194
42206
|
fs$c.unlinkSync(dest);
|
package/package.json
CHANGED
package/theme.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
// so that users can do `import DefaultTheme from 'vitepress/theme'`
|
|
2
|
-
import type {
|
|
2
|
+
import type { DefineComponent } from 'vue'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
4
|
+
// TODO: add props for these
|
|
5
|
+
export const VPHomeHero: DefineComponent
|
|
6
|
+
export const VPHomeFeatures: DefineComponent
|
|
7
|
+
export const VPHomeSponsors: DefineComponent
|
|
8
|
+
export const VPDocAsideSponsors: DefineComponent
|
|
9
|
+
export const VPTeamPage: DefineComponent
|
|
10
|
+
export const VPTeamPageTitle: DefineComponent
|
|
11
|
+
export const VPTeamPageSection: DefineComponent
|
|
12
|
+
export const VPTeamMembers: DefineComponent
|
|
12
13
|
|
|
13
14
|
declare const theme: {
|
|
14
|
-
Layout:
|
|
15
|
-
NotFound:
|
|
15
|
+
Layout: DefineComponent
|
|
16
|
+
NotFound: DefineComponent
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export default theme
|
package/types/shared.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export interface SiteData<ThemeConfig = any> {
|
|
|
62
62
|
titleTemplate?: string | boolean
|
|
63
63
|
description: string
|
|
64
64
|
head: HeadConfig[]
|
|
65
|
-
appearance: boolean
|
|
65
|
+
appearance: boolean | 'dark'
|
|
66
66
|
themeConfig: ThemeConfig
|
|
67
67
|
scrollOffset: number | string
|
|
68
68
|
locales: Record<string, LocaleConfig>
|