@vuepress/theme-default 2.0.0-rc.127 → 2.0.0-rc.130
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/dist/client/components/VPAutoLink.vue +1 -3
- package/dist/client/components/VPNavbarDropdown.vue +4 -5
- package/dist/client/components/VPSidebarItem.vue +2 -6
- package/dist/client/components/global/Badge.vue +3 -9
- package/dist/client/composables/index.d.ts +11 -11
- package/dist/client/composables/useDarkMode.d.ts +1 -1
- package/dist/client/composables/useDarkMode.js.map +1 -1
- package/dist/client/composables/useData.d.ts +1 -1
- package/dist/client/composables/useData.js.map +1 -1
- package/dist/client/composables/useEditLink.d.ts +1 -1
- package/dist/client/composables/useEditLink.js.map +1 -1
- package/dist/client/composables/useHeaders.js.map +1 -1
- package/dist/client/composables/useNavbarConfig.d.ts +1 -1
- package/dist/client/composables/useNavbarConfig.js.map +1 -1
- package/dist/client/composables/useNavbarRepo.d.ts +1 -1
- package/dist/client/composables/useNavbarRepo.js.map +1 -1
- package/dist/client/composables/useNavbarSelectLanguage.d.ts +1 -1
- package/dist/client/composables/useNavbarSelectLanguage.js.map +1 -1
- package/dist/client/composables/useNavigate.d.ts +1 -1
- package/dist/client/composables/useNavigate.js.map +1 -1
- package/dist/client/composables/useRelatedLinks.d.ts +1 -1
- package/dist/client/composables/useRelatedLinks.js.map +1 -1
- package/dist/client/composables/useScrollPromise.d.ts +1 -1
- package/dist/client/composables/useScrollPromise.js.map +1 -1
- package/dist/client/composables/useSidebarItems.d.ts +1 -1
- package/dist/client/composables/useSidebarItems.js.map +1 -1
- package/dist/client/composables/useUpdateDeviceStatus.d.ts +1 -1
- package/dist/client/composables/useUpdateDeviceStatus.js +1 -1
- package/dist/client/composables/useUpdateDeviceStatus.js.map +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/index.d.ts +18 -20
- package/dist/client/styles/index.scss +0 -1
- package/dist/client/utils/index.d.ts +5 -5
- package/dist/client/utils/isActiveSidebarItem.d.ts +1 -1
- package/dist/client/utils/isActiveSidebarItem.js +1 -1
- package/dist/client/utils/isActiveSidebarItem.js.map +1 -1
- package/dist/client/utils/resolveAutoLink.d.ts +1 -1
- package/dist/client/utils/resolveAutoLink.js.map +1 -1
- package/dist/client/utils/resolveEditLink.d.ts +1 -1
- package/dist/client/utils/resolveEditLink.js +1 -1
- package/dist/client/utils/resolveEditLink.js.map +1 -1
- package/dist/client/utils/resolvePrefix.d.ts +1 -1
- package/dist/client/utils/resolvePrefix.js.map +1 -1
- package/dist/client/utils/resolveRepoType.d.ts +1 -1
- package/dist/client/utils/resolveRepoType.js +1 -1
- package/dist/client/utils/resolveRepoType.js.map +1 -1
- package/dist/{page-FWcDnzJp.d.ts → index-BNjRb2Mr.d.ts} +73 -34
- package/dist/{isActiveSidebarItem-aythFTeC.d.ts → isActiveSidebarItem-DE0Ymo1m.d.ts} +2 -2
- package/dist/node/index.d.ts +15 -46
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/{resolveAutoLink-BR2Z05MD.d.ts → resolveAutoLink-bQLxrWMd.d.ts} +6 -6
- package/dist/{resolveEditLink-DazcWeGf.d.ts → resolveEditLink-DRtLIWXz.d.ts} +1 -1
- package/dist/{resolvePrefix-BN9K9RA5.d.ts → resolvePrefix-DEl0CDB0.d.ts} +1 -1
- package/dist/{resolveRepoType-Wcj35_rs.d.ts → resolveRepoType-DefRTDOt.d.ts} +1 -1
- package/dist/{typings-NbQSzbOn.d.ts → typings-D-rXvaET.d.ts} +2 -3
- package/dist/{useDarkMode-DLor2cV7.d.ts → useDarkMode-Zrmg4e6i.d.ts} +2 -4
- package/dist/{useData-JDen_Bxm.d.ts → useData-BFB4h32K.d.ts} +2 -2
- package/dist/{useEditLink-DPCTvXmM.d.ts → useEditLink-m723nvlZ.d.ts} +1 -1
- package/dist/{useNavbarConfig-C19TGFg7.d.ts → useNavbarConfig-BnkOLDyM.d.ts} +2 -2
- package/dist/{useNavbarRepo-DxhSIAFq.d.ts → useNavbarRepo-BT8z2mBp.d.ts} +2 -2
- package/dist/{useNavbarSelectLanguage-4GkrPvc2.d.ts → useNavbarSelectLanguage-DMcyeLfA.d.ts} +2 -2
- package/dist/{useNavigate-lH4xyHOV.d.ts → useNavigate-D__eeZa2.d.ts} +1 -1
- package/dist/{useRelatedLinks-ChTW2RRU.d.ts → useRelatedLinks-CoqxjiuJ.d.ts} +2 -2
- package/dist/{useScrollPromise-BAl732Uv.d.ts → useScrollPromise-DtXkT3fi.d.ts} +1 -1
- package/dist/{useSidebarItems-CdpB96Ta.d.ts → useSidebarItems-nMm3AAZ3.d.ts} +33 -37
- package/dist/{useUpdateDeviceStatus-SBnOZx8J.d.ts → useUpdateDeviceStatus-B3bXVdPs.d.ts} +4 -3
- package/package.json +23 -23
- package/dist/nav-DikslSJ_.d.ts +0 -36
- package/dist/sidebar-CF1YPYLN.d.ts +0 -53
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveRepoType.js","names":[],"sources":["../../../src/client/utils/resolveRepoType.ts"],"sourcesContent":["import { isLinkHttp } from 'vuepress/shared'\n\nexport type RepoType = 'Bitbucket' | 'Gitee' | 'GitHub' | 'GitLab' | null\n\nexport const resolveRepoType = (repo: string): RepoType => {\n if (!isLinkHttp(repo) ||
|
|
1
|
+
{"version":3,"file":"resolveRepoType.js","names":[],"sources":["../../../src/client/utils/resolveRepoType.ts"],"sourcesContent":["import { isLinkHttp } from 'vuepress/shared'\n\nexport type RepoType = 'Bitbucket' | 'Gitee' | 'GitHub' | 'GitLab' | null\n\nexport const resolveRepoType = (repo: string): RepoType => {\n if (!isLinkHttp(repo) || /^(https?:)?\\/\\/github\\.com\\//u.test(repo))\n return 'GitHub'\n\n if (/^(https?:)?\\/\\/bitbucket\\.org\\//u.test(repo)) return 'Bitbucket'\n if (/^(https?:)?\\/\\/gitlab\\.com\\//u.test(repo)) return 'GitLab'\n if (/^(https?:)?\\/\\/gitee\\.com\\//u.test(repo)) return 'Gitee'\n\n return null\n}\n"],"mappings":"6CAIA,MAAa,EAAmB,GAC1B,CAAC,EAAW,CAAI,GAAK,gCAAgC,KAAK,CAAI,EACzD,SAEL,mCAAmC,KAAK,CAAI,EAAU,YACtD,gCAAgC,KAAK,CAAI,EAAU,SACnD,+BAA+B,KAAK,CAAI,EAAU,QAE/C"}
|
|
@@ -1,9 +1,62 @@
|
|
|
1
|
-
import { t as AutoLinkOptions } from "./nav-DikslSJ_.js";
|
|
2
|
-
import { o as SidebarOptions, t as SidebarArrayOptions, u as NavbarOptions } from "./sidebar-CF1YPYLN.js";
|
|
3
1
|
import { GitPluginPageData } from "@vuepress/plugin-git";
|
|
4
2
|
import { ThemeData } from "@vuepress/plugin-theme-data";
|
|
5
3
|
import { LocaleData, PageFrontmatter } from "vuepress/shared";
|
|
6
4
|
|
|
5
|
+
//#region src/shared/nav.d.ts
|
|
6
|
+
/** Base nav item, displayed as text */
|
|
7
|
+
interface NavItemOptions {
|
|
8
|
+
text: string;
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Options for `<AutoLink>` */
|
|
12
|
+
interface AutoLinkOptions extends NavItemOptions {
|
|
13
|
+
/** Link of item */
|
|
14
|
+
link: string;
|
|
15
|
+
/** Rel of `<a>` tag */
|
|
16
|
+
rel?: string;
|
|
17
|
+
/** Target of `<a>` tag */
|
|
18
|
+
target?: string;
|
|
19
|
+
/** Regexp mode to be active */
|
|
20
|
+
activeMatch?: string;
|
|
21
|
+
/** Whether it's active only when exact match */
|
|
22
|
+
exact?: boolean;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/shared/navbar.d.ts
|
|
26
|
+
/** Base nav group, has nav items children */
|
|
27
|
+
interface NavGroup<T> extends NavItemOptions {
|
|
28
|
+
/** Link prefix of current group */
|
|
29
|
+
prefix?: string;
|
|
30
|
+
/** Link of current group */
|
|
31
|
+
link?: string;
|
|
32
|
+
/** Children of current group */
|
|
33
|
+
children: T[];
|
|
34
|
+
}
|
|
35
|
+
type NavbarLinkOptions = AutoLinkOptions | string;
|
|
36
|
+
type NavbarGroupOptions = NavGroup<NavbarLinkOptions | NavGroup<NavbarLinkOptions>>;
|
|
37
|
+
type NavbarOptions = (NavbarGroupOptions | NavbarLinkOptions)[] | false;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/shared/sidebar.d.ts
|
|
40
|
+
type SidebarLinkOptions = AutoLinkOptions;
|
|
41
|
+
interface SidebarGroupOptions extends NavItemOptions {
|
|
42
|
+
/** Link prefix of current group */
|
|
43
|
+
prefix?: string;
|
|
44
|
+
/** Link of current group */
|
|
45
|
+
link?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether current group is collapsible
|
|
48
|
+
*
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
collapsible?: boolean;
|
|
52
|
+
/** Children of current group */
|
|
53
|
+
children: SidebarItemOptions[];
|
|
54
|
+
}
|
|
55
|
+
type SidebarItemOptions = SidebarGroupOptions | SidebarLinkOptions | string;
|
|
56
|
+
type SidebarArrayOptions = SidebarItemOptions[];
|
|
57
|
+
type SidebarObjectOptions = Record<string, SidebarArrayOptions | 'heading' | false>;
|
|
58
|
+
type SidebarOptions = SidebarArrayOptions | SidebarObjectOptions | 'heading';
|
|
59
|
+
//#endregion
|
|
7
60
|
//#region src/shared/options.d.ts
|
|
8
61
|
type DefaultThemeLocaleOptions = DefaultThemeData;
|
|
9
62
|
type DefaultThemeData = ThemeData<DefaultThemeLocaleData>;
|
|
@@ -38,13 +91,9 @@ interface DefaultThemeLocaleData extends LocaleData {
|
|
|
38
91
|
* Set to `false` to disable navbar in current locale
|
|
39
92
|
*/
|
|
40
93
|
navbar?: NavbarOptions;
|
|
41
|
-
/**
|
|
42
|
-
* Navbar label used for screen readers using the `aria-label` attribute
|
|
43
|
-
*/
|
|
94
|
+
/** Navbar label used for screen readers using the `aria-label` attribute */
|
|
44
95
|
navbarLabel?: string | null;
|
|
45
|
-
/**
|
|
46
|
-
* Page navbar label used for screen readers using the `aria-label` attribute
|
|
47
|
-
*/
|
|
96
|
+
/** Page navbar label used for screen readers using the `aria-label` attribute */
|
|
48
97
|
pageNavbarLabel?: string | null;
|
|
49
98
|
/**
|
|
50
99
|
* Navbar logo config
|
|
@@ -59,10 +108,9 @@ interface DefaultThemeLocaleData extends LocaleData {
|
|
|
59
108
|
*/
|
|
60
109
|
logoDark?: string | null;
|
|
61
110
|
/**
|
|
62
|
-
* The alt text of navbar logo.
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* hidden from screen readers to avoid duplication.
|
|
111
|
+
* The alt text of navbar logo. Defaults to the site title if not specified.
|
|
112
|
+
* If the value is the same as the site title, the site title rendered in the
|
|
113
|
+
* navbar will be hidden from screen readers to avoid duplication.
|
|
66
114
|
*/
|
|
67
115
|
logoAlt?: string | null;
|
|
68
116
|
/**
|
|
@@ -111,11 +159,11 @@ interface DefaultThemeLocaleData extends LocaleData {
|
|
|
111
159
|
* - Set to `2` to include `<h2>` and `<h3>`
|
|
112
160
|
* - ...
|
|
113
161
|
*
|
|
114
|
-
* The max value depends on which headers you have extracted
|
|
115
|
-
*
|
|
162
|
+
* The max value depends on which headers you have extracted via
|
|
163
|
+
* `markdown.headers.level`.
|
|
116
164
|
*
|
|
117
|
-
* The default value of `markdown.headers.level` is `[2, 3]`,
|
|
118
|
-
*
|
|
165
|
+
* The default value of `markdown.headers.level` is `[2, 3]`, so the default
|
|
166
|
+
* max value of `sidebarDepth` is `2`
|
|
119
167
|
*/
|
|
120
168
|
sidebarDepth?: number;
|
|
121
169
|
/**
|
|
@@ -135,7 +183,8 @@ interface DefaultThemeLocaleData extends LocaleData {
|
|
|
135
183
|
*
|
|
136
184
|
* Pattern of edit link
|
|
137
185
|
*
|
|
138
|
-
* @example
|
|
186
|
+
* @example
|
|
187
|
+
* ':repo/edit/:branch/:path'
|
|
139
188
|
*/
|
|
140
189
|
editLinkPattern?: string;
|
|
141
190
|
/**
|
|
@@ -224,25 +273,15 @@ interface DefaultThemeLocaleData extends LocaleData {
|
|
|
224
273
|
* Text of back-to-home link in 404 page
|
|
225
274
|
*/
|
|
226
275
|
backToHome?: string;
|
|
227
|
-
/**
|
|
228
|
-
* A11y text for external link icon
|
|
229
|
-
*/
|
|
276
|
+
/** A11y text for external link icon */
|
|
230
277
|
openInNewWindow?: string;
|
|
231
|
-
/**
|
|
232
|
-
* A11y text for color mode toggle button
|
|
233
|
-
*/
|
|
278
|
+
/** A11y text for color mode toggle button */
|
|
234
279
|
toggleColorMode?: string;
|
|
235
|
-
/**
|
|
236
|
-
* A11y text for sidebar toggle button
|
|
237
|
-
*/
|
|
280
|
+
/** A11y text for sidebar toggle button */
|
|
238
281
|
toggleSidebar?: string;
|
|
239
|
-
/**
|
|
240
|
-
* text for prev link
|
|
241
|
-
*/
|
|
282
|
+
/** Text for prev link */
|
|
242
283
|
prev?: string | false;
|
|
243
|
-
/**
|
|
244
|
-
* text for next link
|
|
245
|
-
*/
|
|
284
|
+
/** Text for next link */
|
|
246
285
|
next?: string | false;
|
|
247
286
|
}
|
|
248
287
|
//#endregion
|
|
@@ -288,5 +327,5 @@ interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter
|
|
|
288
327
|
next?: AutoLinkOptions | string;
|
|
289
328
|
}
|
|
290
329
|
//#endregion
|
|
291
|
-
export { DefaultThemeData as a, DefaultThemePageFrontmatter as i, DefaultThemeNormalPageFrontmatter as n, DefaultThemeLocaleData as o, DefaultThemePageData as r, DefaultThemeLocaleOptions as s, DefaultThemeHomePageFrontmatter as t };
|
|
292
|
-
//# sourceMappingURL=
|
|
330
|
+
export { NavbarOptions as _, DefaultThemeData as a, SidebarArrayOptions as c, SidebarLinkOptions as d, SidebarObjectOptions as f, NavbarLinkOptions as g, NavbarGroupOptions as h, DefaultThemePageFrontmatter as i, SidebarGroupOptions as l, NavGroup as m, DefaultThemeNormalPageFrontmatter as n, DefaultThemeLocaleData as o, SidebarOptions as p, DefaultThemePageData as r, DefaultThemeLocaleOptions as s, DefaultThemeHomePageFrontmatter as t, SidebarItemOptions as u, AutoLinkOptions as v, NavItemOptions as y };
|
|
331
|
+
//# sourceMappingURL=index-BNjRb2Mr.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as SidebarItem } from "./typings-
|
|
1
|
+
import { i as SidebarItem } from "./typings-D-rXvaET.js";
|
|
2
2
|
import { RouteLocationNormalizedLoaded } from "vuepress/client";
|
|
3
3
|
|
|
4
4
|
//#region src/client/utils/isActiveSidebarItem.d.ts
|
|
5
5
|
declare const isActiveSidebarItem: (item: SidebarItem, route: RouteLocationNormalizedLoaded) => boolean;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { isActiveSidebarItem as t };
|
|
8
|
-
//# sourceMappingURL=isActiveSidebarItem-
|
|
8
|
+
//# sourceMappingURL=isActiveSidebarItem-DE0Ymo1m.d.ts.map
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { a as SidebarObjectOptions, c as NavbarGroupOptions, i as SidebarLinkOptions, l as NavbarLinkOptions, n as SidebarGroupOptions, o as SidebarOptions, r as SidebarItemOptions, s as NavGroup, t as SidebarArrayOptions, u as NavbarOptions } from "../sidebar-CF1YPYLN.js";
|
|
3
|
-
import { a as DefaultThemeData, i as DefaultThemePageFrontmatter, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter } from "../page-FWcDnzJp.js";
|
|
1
|
+
import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-BNjRb2Mr.js";
|
|
4
2
|
import { BackToTopPluginOptions } from "@vuepress/plugin-back-to-top";
|
|
5
3
|
import { CopyCodePluginOptions } from "@vuepress/plugin-copy-code";
|
|
6
4
|
import { GitPluginOptions } from "@vuepress/plugin-git";
|
|
@@ -15,66 +13,37 @@ import { Theme } from "vuepress/core";
|
|
|
15
13
|
|
|
16
14
|
//#region src/node/typings.d.ts
|
|
17
15
|
interface DefaultThemePluginsOptions {
|
|
18
|
-
/**
|
|
19
|
-
* Enable `@vuepress/plugin-active-header-links` or not
|
|
20
|
-
*/
|
|
16
|
+
/** Enable `@vuepress/plugin-active-header-links` or not */
|
|
21
17
|
activeHeaderLinks?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Enable `@vuepress/plugin-back-to-top` or not
|
|
24
|
-
*/
|
|
18
|
+
/** Enable `@vuepress/plugin-back-to-top` or not */
|
|
25
19
|
backToTop?: BackToTopPluginOptions | boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Enable `@vuepress/plugin-copy-code` or not
|
|
28
|
-
*/
|
|
20
|
+
/** Enable `@vuepress/plugin-copy-code` or not */
|
|
29
21
|
copyCode?: CopyCodePluginOptions | boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Enable `@vuepress/plugin-git` or not
|
|
32
|
-
*/
|
|
22
|
+
/** Enable `@vuepress/plugin-git` or not */
|
|
33
23
|
git?: GitPluginOptions | boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Enable `@vuepress/plugin-markdown-hint` or not
|
|
36
|
-
*/
|
|
24
|
+
/** Enable `@vuepress/plugin-markdown-hint` or not */
|
|
37
25
|
hint?: MarkdownHintPluginOptions | boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Enable `@vuepress/plugin-links-check` or not
|
|
40
|
-
*/
|
|
26
|
+
/** Enable `@vuepress/plugin-links-check` or not */
|
|
41
27
|
linksCheck?: LinksCheckPluginOptions | boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Enable `@vuepress/plugin-medium-zoom` or not
|
|
44
|
-
*/
|
|
28
|
+
/** Enable `@vuepress/plugin-medium-zoom` or not */
|
|
45
29
|
mediumZoom?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Enable `@vuepress/plugin-nprogress` or not
|
|
48
|
-
*/
|
|
30
|
+
/** Enable `@vuepress/plugin-nprogress` or not */
|
|
49
31
|
nprogress?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Enable `@vuepress/plugin-prismjs` or not
|
|
52
|
-
*/
|
|
32
|
+
/** Enable `@vuepress/plugin-prismjs` or not */
|
|
53
33
|
prismjs?: PrismjsPluginOptions | boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Enable `@vuepress/plugin-seo` or not
|
|
56
|
-
*/
|
|
34
|
+
/** Enable `@vuepress/plugin-seo` or not */
|
|
57
35
|
seo?: Partial<SeoPluginOptions> | boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Enable `@vuepress/plugin-sitemap` or not
|
|
60
|
-
*/
|
|
36
|
+
/** Enable `@vuepress/plugin-sitemap` or not */
|
|
61
37
|
sitemap?: Partial<SitemapPluginOptions> | boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Enable `@vuepress/plugin-markdown-tab` or not
|
|
64
|
-
*/
|
|
38
|
+
/** Enable `@vuepress/plugin-markdown-tab` or not */
|
|
65
39
|
tab?: MarkdownTabPluginOptions | boolean;
|
|
66
40
|
}
|
|
67
41
|
//#endregion
|
|
68
42
|
//#region src/node/defaultTheme.d.ts
|
|
69
43
|
interface DefaultThemeOptions extends DefaultThemeLocaleOptions {
|
|
70
|
-
/**
|
|
71
|
-
* deployed hostname
|
|
72
|
-
*/
|
|
44
|
+
/** Deployed hostname */
|
|
73
45
|
hostname?: string;
|
|
74
|
-
/**
|
|
75
|
-
* To avoid confusion with the root `plugins` option,
|
|
76
|
-
* we use `themePlugins`
|
|
77
|
-
*/
|
|
46
|
+
/** To avoid confusion with the root `plugins` option, we use `themePlugins` */
|
|
78
47
|
themePlugins?: DefaultThemePluginsOptions;
|
|
79
48
|
}
|
|
80
49
|
declare const defaultTheme: ({
|
package/dist/node/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{addViteOptimizeDepsExclude as e}from"@vuepress/helper";import{activeHeaderLinksPlugin as t}from"@vuepress/plugin-active-header-links";import{backToTopPlugin as n}from"@vuepress/plugin-back-to-top";import{copyCodePlugin as r}from"@vuepress/plugin-copy-code";import{gitPlugin as i}from"@vuepress/plugin-git";import{linksCheckPlugin as a}from"@vuepress/plugin-links-check";import{markdownHintPlugin as o}from"@vuepress/plugin-markdown-hint";import{markdownTabPlugin as s}from"@vuepress/plugin-markdown-tab";import{mediumZoomPlugin as c}from"@vuepress/plugin-medium-zoom";import{nprogressPlugin as l}from"@vuepress/plugin-nprogress";import{palettePlugin as u}from"@vuepress/plugin-palette";import{prismjsPlugin as d}from"@vuepress/plugin-prismjs";import{seoPlugin as f}from"@vuepress/plugin-seo";import{sitemapPlugin as p}from"@vuepress/plugin-sitemap";import{themeDataPlugin as m}from"@vuepress/plugin-theme-data";import{isPlainObject as h}from"vuepress/shared";import{fs as g,getDirname as _,path as v}from"vuepress/utils";const y={colorMode:`auto`,colorModeSwitch:!0,navbar:[],logo:null,repo:null,selectLanguageText:`Languages`,selectLanguageAriaLabel:`Select language`,sidebar:`heading`,sidebarDepth:2,editLink:!0,editLinkText:`Edit this page`,lastUpdated:!0,contributors:!0,contributorsText:`Contributors`,notFound:[`There's nothing here.`,`How did we get here?`,`That's a Four-Oh-Four.`,`Looks like we've got some broken links.`],backToHome:`Take me home`,openInNewWindow:`open in new window`,toggleColorMode:`toggle color mode`,toggleSidebar:`toggle sidebar`},b={selectLanguageName:`English`},x=e=>{e.locales??={},Object.assign(e,{...y,...e}),e.locales[`/`]??={},Object.assign(e.locales[`/`],{...b,...e.locales[`/`]})},S=e=>Object.entries(e.locales??{}).reduce((e,[t,n])=>(e[t]={},n.tip&&(e[t].tip=n.tip),n.warning&&(e[t].warning=n.warning),n.danger&&(e[t].caution=n.danger),n.important&&(e[t].important=n.important),n.note&&(e[t].note=n.note),e),{}),C=import.meta.dirname||_(import.meta.url),w=({hostname:_,themePlugins:y={},...b}={})=>(x(b),{name:`@vuepress/theme-default`,templateBuild:v.resolve(C,`../../templates/build.html`),alias:{...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/components`)).filter(e=>e.endsWith(`.vue`)).map(e=>[`@theme/${e}`,v.resolve(C,`../client/components`,e)])),...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/composables`)).filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/composables`,e)])),...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/utils`)).filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/utils`,e)]))},clientConfigFile:v.resolve(C,`../client/config.js`),extendsBundlerOptions:(t,n)=>{e(t,n,`@theme`)},extendsPage:e=>{e.data.filePathRelative=e.filePathRelative,e.routeMeta.title=e.title},plugins:[y.activeHeaderLinks??!0?t({delay:300}):[],y.backToTop??!0?n(h(y.backToTop)?y.backToTop:{}):[],y.copyCode??!0?r({...h(y.copyCode)?y.copyCode:{}}):[],y.hint??!0?o({locales:S(b),...h(y.hint)?y.hint:{}}):[],y.git??!0?i({createdTime:!1,updatedTime:b.lastUpdated??!0,changelog:{repoUrl:b.repo||``},...h(y.git)?y.git:{}}):[],y.linksCheck??!0?a(h(y.linksCheck)?y.linksCheck:{}):[],y.mediumZoom??!0?c():[],y.nprogress??!0?l():[],u({preset:`sass`}),y.prismjs??!0?d(h(y.prismjs)?y.prismjs:{}):[],_&&(y.seo??!0)?f({hostname:_,...h(y.seo)?y.seo:{}}):[],_&&(y.sitemap??!0)?p({hostname:_,...h(y.sitemap)?y.sitemap:{}}):[],y.tab??!0?s(h(y.tab)?y.tab:{codeTabs:!0,tabs:!0}):[],m({themeData:b})]});export{b as DEFAULT_LOCALE_DATA,y as DEFAULT_LOCALE_OPTIONS,x as assignDefaultLocaleOptions,w as defaultTheme,S as resolveMarkdownHintLocales};
|
|
1
|
+
import{addViteOptimizeDepsExclude as e}from"@vuepress/helper";import{activeHeaderLinksPlugin as t}from"@vuepress/plugin-active-header-links";import{backToTopPlugin as n}from"@vuepress/plugin-back-to-top";import{copyCodePlugin as r}from"@vuepress/plugin-copy-code";import{gitPlugin as i}from"@vuepress/plugin-git";import{linksCheckPlugin as a}from"@vuepress/plugin-links-check";import{markdownHintPlugin as o}from"@vuepress/plugin-markdown-hint";import{markdownTabPlugin as s}from"@vuepress/plugin-markdown-tab";import{mediumZoomPlugin as c}from"@vuepress/plugin-medium-zoom";import{nprogressPlugin as l}from"@vuepress/plugin-nprogress";import{palettePlugin as u}from"@vuepress/plugin-palette";import{prismjsPlugin as d}from"@vuepress/plugin-prismjs";import{seoPlugin as f}from"@vuepress/plugin-seo";import{sitemapPlugin as p}from"@vuepress/plugin-sitemap";import{themeDataPlugin as m}from"@vuepress/plugin-theme-data";import{isPlainObject as h}from"vuepress/shared";import{fs as g,getDirname as _,path as v}from"vuepress/utils";const y={colorMode:`auto`,colorModeSwitch:!0,navbar:[],logo:null,repo:null,selectLanguageText:`Languages`,selectLanguageAriaLabel:`Select language`,sidebar:`heading`,sidebarDepth:2,editLink:!0,editLinkText:`Edit this page`,lastUpdated:!0,contributors:!0,contributorsText:`Contributors`,notFound:[`There's nothing here.`,`How did we get here?`,`That's a Four-Oh-Four.`,`Looks like we've got some broken links.`],backToHome:`Take me home`,openInNewWindow:`open in new window`,toggleColorMode:`toggle color mode`,toggleSidebar:`toggle sidebar`},b={selectLanguageName:`English`},x=e=>{e.locales??={},Object.assign(e,{...y,...e}),e.locales[`/`]??={},Object.assign(e.locales[`/`],{...b,...e.locales[`/`]})},S=e=>Object.entries(e.locales??{}).reduce((e,[t,n])=>(e[t]={},n.tip&&(e[t].tip=n.tip),n.warning&&(e[t].warning=n.warning),n.danger&&(e[t].caution=n.danger),n.important&&(e[t].important=n.important),n.note&&(e[t].note=n.note),e),{}),C=import.meta.dirname||_(import.meta.url),w=({hostname:_,themePlugins:y={},...b}={})=>(x(b),{name:`@vuepress/theme-default`,userStyle:`.vuepress/styles/index.scss`,templateBuild:v.resolve(C,`../../templates/build.html`),alias:{...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/components`)).filter(e=>e.endsWith(`.vue`)).map(e=>[`@theme/${e}`,v.resolve(C,`../client/components`,e)])),...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/composables`)).filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/composables`,e)])),...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/utils`)).filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/utils`,e)]))},clientConfigFile:v.resolve(C,`../client/config.js`),extendsBundlerOptions:(t,n)=>{e(t,n,`@theme`)},extendsPage:e=>{e.data.filePathRelative=e.filePathRelative,e.routeMeta.title=e.title},plugins:[y.activeHeaderLinks??!0?t({delay:300}):[],y.backToTop??!0?n(h(y.backToTop)?y.backToTop:{}):[],y.copyCode??!0?r({...h(y.copyCode)?y.copyCode:{}}):[],y.hint??!0?o({locales:S(b),...h(y.hint)?y.hint:{}}):[],y.git??!0?i({createdTime:!1,updatedTime:b.lastUpdated??!0,changelog:{repoUrl:b.repo||``},...h(y.git)?y.git:{}}):[],y.linksCheck??!0?a(h(y.linksCheck)?y.linksCheck:{}):[],y.mediumZoom??!0?c():[],y.nprogress??!0?l():[],u({preset:`sass`}),y.prismjs??!0?d(h(y.prismjs)?y.prismjs:{}):[],_&&(y.seo??!0)?f({hostname:_,...h(y.seo)?y.seo:{}}):[],_&&(y.sitemap??!0)?p({hostname:_,...h(y.sitemap)?y.sitemap:{}}):[],y.tab??!0?s(h(y.tab)?y.tab:{codeTabs:!0,tabs:!0}):[],m({themeData:b})]});export{b as DEFAULT_LOCALE_DATA,y as DEFAULT_LOCALE_OPTIONS,x as assignDefaultLocaleOptions,w as defaultTheme,S as resolveMarkdownHintLocales};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/node/utils/assignDefaultLocaleOptions.ts","../../src/node/utils/resolveMarkdownHintLocales.ts","../../src/node/defaultTheme.ts"],"sourcesContent":["import type {\n DefaultThemeLocaleData,\n DefaultThemeLocaleOptions,\n} from '../../shared/index.js'\n\nexport const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions = {\n // color mode\n colorMode: 'auto',\n colorModeSwitch: true,\n\n // navbar\n navbar: [],\n logo: null,\n repo: null,\n selectLanguageText: 'Languages',\n selectLanguageAriaLabel: 'Select language',\n\n // sidebar\n sidebar: 'heading',\n sidebarDepth: 2,\n\n // page meta\n editLink: true,\n editLinkText: 'Edit this page',\n lastUpdated: true,\n contributors: true,\n contributorsText: 'Contributors',\n\n // 404 page messages\n notFound: [\n `There's nothing here.`,\n `How did we get here?`,\n `That's a Four-Oh-Four.`,\n `Looks like we've got some broken links.`,\n ],\n backToHome: 'Take me home',\n\n // a11y\n openInNewWindow: 'open in new window',\n toggleColorMode: 'toggle color mode',\n toggleSidebar: 'toggle sidebar',\n}\n\nexport const DEFAULT_LOCALE_DATA: DefaultThemeLocaleData = {\n // navbar\n selectLanguageName: 'English',\n}\n\n/**\n * Assign default options\n *\n * @param localeOptions - Locale options to assign default options\n */\nexport const assignDefaultLocaleOptions = (\n localeOptions: DefaultThemeLocaleOptions,\n): void => {\n localeOptions.locales ??= {}\n Object.assign(localeOptions, {\n ...DEFAULT_LOCALE_OPTIONS,\n ...localeOptions,\n })\n localeOptions.locales['/'] ??= {}\n Object.assign(localeOptions.locales['/'], {\n ...DEFAULT_LOCALE_DATA,\n ...localeOptions.locales['/'],\n })\n}\n","import type { MarkdownHintPluginLocaleData } from '@vuepress/plugin-markdown-hint'\nimport type { LocaleConfig } from 'vuepress/shared'\n\nimport type { DefaultThemeData } from '../../shared/index.js'\n\n/**\n * Resolve options for `@vuepress/plugin-markdown-container`\n *\n * For custom containers default title\n *\n * @param localeOptions - Locales config from theme options\n * @returns Locales config for `@vuepress/plugin-markdown-container`\n */\nexport const resolveMarkdownHintLocales = (\n localeOptions: DefaultThemeData,\n): LocaleConfig<MarkdownHintPluginLocaleData> =>\n Object.entries(localeOptions.locales ?? {}).reduce<\n LocaleConfig<MarkdownHintPluginLocaleData>\n >((result, [key, value]) => {\n result[key] = {}\n\n if (value.tip) result[key].tip = value.tip\n if (value.warning) result[key].warning = value.warning\n if (value.danger) result[key].caution = value.danger\n if (value.important) result[key].important = value.important\n if (value.note) result[key].note = value.note\n\n return result\n }, {})\n","import { addViteOptimizeDepsExclude } from '@vuepress/helper'\nimport { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'\nimport { backToTopPlugin } from '@vuepress/plugin-back-to-top'\nimport { copyCodePlugin } from '@vuepress/plugin-copy-code'\nimport { gitPlugin } from '@vuepress/plugin-git'\nimport { linksCheckPlugin } from '@vuepress/plugin-links-check'\nimport { markdownHintPlugin } from '@vuepress/plugin-markdown-hint'\nimport { markdownTabPlugin } from '@vuepress/plugin-markdown-tab'\nimport { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom'\nimport { nprogressPlugin } from '@vuepress/plugin-nprogress'\nimport { palettePlugin } from '@vuepress/plugin-palette'\nimport { prismjsPlugin } from '@vuepress/plugin-prismjs'\nimport { seoPlugin } from '@vuepress/plugin-seo'\nimport { sitemapPlugin } from '@vuepress/plugin-sitemap'\nimport { themeDataPlugin } from '@vuepress/plugin-theme-data'\nimport type { Page, Theme } from 'vuepress/core'\nimport { isPlainObject } from 'vuepress/shared'\nimport { fs, getDirname, path } from 'vuepress/utils'\n\nimport type {\n DefaultThemeLocaleOptions,\n DefaultThemePageData,\n} from '../shared/index.js'\nimport type { DefaultThemePluginsOptions } from './typings.js'\nimport {\n assignDefaultLocaleOptions,\n resolveMarkdownHintLocales,\n} from './utils/index.js'\n\nconst __dirname = import.meta.dirname || getDirname(import.meta.url)\n\nexport interface DefaultThemeOptions extends DefaultThemeLocaleOptions {\n /**\n * deployed hostname\n */\n hostname?: string\n\n /**\n * To avoid confusion with the root `plugins` option,\n * we use `themePlugins`\n */\n themePlugins?: DefaultThemePluginsOptions\n}\n\nexport const defaultTheme = ({\n hostname,\n themePlugins = {},\n ...localeOptions\n}: DefaultThemeOptions = {}): Theme => {\n assignDefaultLocaleOptions(localeOptions)\n\n return {\n name: '@vuepress/theme-default',\n\n templateBuild: path.resolve(__dirname, '../../templates/build.html'),\n\n alias: {\n // use alias to make all components replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/components'))\n .filter((file) => file.endsWith('.vue'))\n .map((file) => [\n `@theme/${file}`,\n path.resolve(__dirname, '../client/components', file),\n ]),\n ),\n // use alias to make all composables replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/composables'))\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/composables', file),\n ]),\n ),\n // use alias to make all utils replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/utils'))\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/utils', file),\n ]),\n ),\n },\n\n clientConfigFile: path.resolve(__dirname, '../client/config.js'),\n\n extendsBundlerOptions: (bundlerOptions, app) => {\n // ensure theme alias is not optimized by Vite\n addViteOptimizeDepsExclude(bundlerOptions, app, '@theme')\n },\n\n extendsPage: (page: Page<Partial<DefaultThemePageData>>) => {\n // save relative file path into page data to generate edit link\n page.data.filePathRelative = page.filePathRelative\n // save title into route meta to generate navbar and sidebar\n page.routeMeta.title = page.title\n },\n\n plugins: [\n // @vuepress/plugin-active-header-link\n (themePlugins.activeHeaderLinks ?? true)\n ? activeHeaderLinksPlugin({\n // should greater than page transition duration\n delay: 300,\n })\n : [],\n\n // @vuepress/plugin-back-to-top\n (themePlugins.backToTop ?? true)\n ? backToTopPlugin(\n isPlainObject(themePlugins.backToTop) ? themePlugins.backToTop : {},\n )\n : [],\n\n // @vuepress/plugin-copy-code\n (themePlugins.copyCode ?? true)\n ? copyCodePlugin({\n ...(isPlainObject(themePlugins.copyCode)\n ? themePlugins.copyCode\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-container\n (themePlugins.hint ?? true)\n ? markdownHintPlugin({\n locales: resolveMarkdownHintLocales(localeOptions),\n ...(isPlainObject(themePlugins.hint) ? themePlugins.hint : {}),\n })\n : [],\n\n // @vuepress/plugin-git\n (themePlugins.git ?? true)\n ? gitPlugin({\n createdTime: false,\n updatedTime: localeOptions.lastUpdated ?? true,\n changelog: { repoUrl: localeOptions.repo || '' },\n ...(isPlainObject(themePlugins.git) ? themePlugins.git : {}),\n })\n : [],\n\n // @vuepress/plugin-links-check\n (themePlugins.linksCheck ?? true)\n ? linksCheckPlugin(\n isPlainObject(themePlugins.linksCheck)\n ? themePlugins.linksCheck\n : {},\n )\n : [],\n\n // @vuepress/plugin-medium-zoom\n (themePlugins.mediumZoom ?? true) ? mediumZoomPlugin() : [],\n\n // @vuepress/plugin-nprogress\n (themePlugins.nprogress ?? true) ? nprogressPlugin() : [],\n\n // @vuepress/plugin-palette\n palettePlugin({ preset: 'sass' }),\n\n // @vuepress/plugin-prismjs\n (themePlugins.prismjs ?? true)\n ? prismjsPlugin(\n isPlainObject(themePlugins.prismjs) ? themePlugins.prismjs : {},\n )\n : [],\n\n // @vuepress/plugin-seo\n hostname && (themePlugins.seo ?? true)\n ? seoPlugin({\n hostname,\n ...(isPlainObject(themePlugins.seo) ? themePlugins.seo : {}),\n })\n : [],\n\n // @vuepress/plugin-sitemap\n hostname && (themePlugins.sitemap ?? true)\n ? sitemapPlugin({\n hostname,\n ...(isPlainObject(themePlugins.sitemap)\n ? themePlugins.sitemap\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-tab\n (themePlugins.tab ?? true)\n ? markdownTabPlugin(\n isPlainObject(themePlugins.tab)\n ? themePlugins.tab\n : { codeTabs: true, tabs: true },\n )\n : [],\n\n // @vuepress/plugin-theme-data\n themeDataPlugin({ themeData: localeOptions }),\n ],\n }\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/node/utils/assignDefaultLocaleOptions.ts","../../src/node/utils/resolveMarkdownHintLocales.ts","../../src/node/defaultTheme.ts"],"sourcesContent":["import type {\n DefaultThemeLocaleData,\n DefaultThemeLocaleOptions,\n} from '../../shared/index.js'\n\nexport const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions = {\n // color mode\n colorMode: 'auto',\n colorModeSwitch: true,\n\n // navbar\n navbar: [],\n logo: null,\n repo: null,\n selectLanguageText: 'Languages',\n selectLanguageAriaLabel: 'Select language',\n\n // sidebar\n sidebar: 'heading',\n sidebarDepth: 2,\n\n // page meta\n editLink: true,\n editLinkText: 'Edit this page',\n lastUpdated: true,\n contributors: true,\n contributorsText: 'Contributors',\n\n // 404 page messages\n notFound: [\n `There's nothing here.`,\n `How did we get here?`,\n `That's a Four-Oh-Four.`,\n `Looks like we've got some broken links.`,\n ],\n backToHome: 'Take me home',\n\n // a11y\n openInNewWindow: 'open in new window',\n toggleColorMode: 'toggle color mode',\n toggleSidebar: 'toggle sidebar',\n}\n\nexport const DEFAULT_LOCALE_DATA: DefaultThemeLocaleData = {\n // navbar\n selectLanguageName: 'English',\n}\n\n/**\n * Assign default options\n *\n * @param localeOptions - Locale options to assign default options\n */\nexport const assignDefaultLocaleOptions = (\n localeOptions: DefaultThemeLocaleOptions,\n): void => {\n localeOptions.locales ??= {}\n Object.assign(localeOptions, {\n ...DEFAULT_LOCALE_OPTIONS,\n ...localeOptions,\n })\n localeOptions.locales['/'] ??= {}\n Object.assign(localeOptions.locales['/'], {\n ...DEFAULT_LOCALE_DATA,\n ...localeOptions.locales['/'],\n })\n}\n","import type { MarkdownHintPluginLocaleData } from '@vuepress/plugin-markdown-hint'\nimport type { LocaleConfig } from 'vuepress/shared'\n\nimport type { DefaultThemeData } from '../../shared/index.js'\n\n/**\n * Resolve options for `@vuepress/plugin-markdown-container`\n *\n * For custom containers default title\n *\n * @param localeOptions - Locales config from theme options\n * @returns Locales config for `@vuepress/plugin-markdown-container`\n */\nexport const resolveMarkdownHintLocales = (\n localeOptions: DefaultThemeData,\n): LocaleConfig<MarkdownHintPluginLocaleData> =>\n Object.entries(localeOptions.locales ?? {}).reduce<\n LocaleConfig<MarkdownHintPluginLocaleData>\n >((result, [key, value]) => {\n result[key] = {}\n\n if (value.tip) result[key].tip = value.tip\n if (value.warning) result[key].warning = value.warning\n if (value.danger) result[key].caution = value.danger\n if (value.important) result[key].important = value.important\n if (value.note) result[key].note = value.note\n\n return result\n }, {})\n","import { addViteOptimizeDepsExclude } from '@vuepress/helper'\nimport { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'\nimport { backToTopPlugin } from '@vuepress/plugin-back-to-top'\nimport { copyCodePlugin } from '@vuepress/plugin-copy-code'\nimport { gitPlugin } from '@vuepress/plugin-git'\nimport { linksCheckPlugin } from '@vuepress/plugin-links-check'\nimport { markdownHintPlugin } from '@vuepress/plugin-markdown-hint'\nimport { markdownTabPlugin } from '@vuepress/plugin-markdown-tab'\nimport { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom'\nimport { nprogressPlugin } from '@vuepress/plugin-nprogress'\nimport { palettePlugin } from '@vuepress/plugin-palette'\nimport { prismjsPlugin } from '@vuepress/plugin-prismjs'\nimport { seoPlugin } from '@vuepress/plugin-seo'\nimport { sitemapPlugin } from '@vuepress/plugin-sitemap'\nimport { themeDataPlugin } from '@vuepress/plugin-theme-data'\nimport type { Page, Theme } from 'vuepress/core'\nimport { isPlainObject } from 'vuepress/shared'\nimport { fs, getDirname, path } from 'vuepress/utils'\n\nimport type { DefaultThemeLocaleOptions } from '../shared/index.js'\nimport type { DefaultThemePluginsOptions } from './typings.js'\nimport {\n assignDefaultLocaleOptions,\n resolveMarkdownHintLocales,\n} from './utils/index.js'\n\nconst __dirname = import.meta.dirname || getDirname(import.meta.url)\n\nexport interface DefaultThemeOptions extends DefaultThemeLocaleOptions {\n /** Deployed hostname */\n hostname?: string\n\n /** To avoid confusion with the root `plugins` option, we use `themePlugins` */\n themePlugins?: DefaultThemePluginsOptions\n}\n\nexport const defaultTheme = ({\n hostname,\n themePlugins = {},\n ...localeOptions\n}: DefaultThemeOptions = {}): Theme => {\n assignDefaultLocaleOptions(localeOptions)\n\n return {\n name: '@vuepress/theme-default',\n\n userStyle: '.vuepress/styles/index.scss',\n\n templateBuild: path.resolve(__dirname, '../../templates/build.html'),\n\n alias: {\n // use alias to make all components replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/components'))\n .filter((file) => file.endsWith('.vue'))\n .map((file) => [\n `@theme/${file}`,\n path.resolve(__dirname, '../client/components', file),\n ]),\n ),\n // use alias to make all composables replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/composables'))\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/composables', file),\n ]),\n ),\n // use alias to make all utils replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/utils'))\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/utils', file),\n ]),\n ),\n },\n\n clientConfigFile: path.resolve(__dirname, '../client/config.js'),\n\n extendsBundlerOptions: (bundlerOptions, app) => {\n // ensure theme alias is not optimized by Vite\n addViteOptimizeDepsExclude(bundlerOptions, app, '@theme')\n },\n\n extendsPage: (page: Page) => {\n // save relative file path into page data to generate edit link\n page.data.filePathRelative = page.filePathRelative\n // save title into route meta to generate navbar and sidebar\n page.routeMeta.title = page.title\n },\n\n plugins: [\n // @vuepress/plugin-active-header-link\n (themePlugins.activeHeaderLinks ?? true)\n ? activeHeaderLinksPlugin({\n // should greater than page transition duration\n delay: 300,\n })\n : [],\n\n // @vuepress/plugin-back-to-top\n (themePlugins.backToTop ?? true)\n ? backToTopPlugin(\n isPlainObject(themePlugins.backToTop) ? themePlugins.backToTop : {},\n )\n : [],\n\n // @vuepress/plugin-copy-code\n (themePlugins.copyCode ?? true)\n ? copyCodePlugin({\n ...(isPlainObject(themePlugins.copyCode)\n ? themePlugins.copyCode\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-container\n (themePlugins.hint ?? true)\n ? markdownHintPlugin({\n locales: resolveMarkdownHintLocales(localeOptions),\n ...(isPlainObject(themePlugins.hint) ? themePlugins.hint : {}),\n })\n : [],\n\n // @vuepress/plugin-git\n (themePlugins.git ?? true)\n ? gitPlugin({\n createdTime: false,\n updatedTime: localeOptions.lastUpdated ?? true,\n changelog: { repoUrl: localeOptions.repo || '' },\n ...(isPlainObject(themePlugins.git) ? themePlugins.git : {}),\n })\n : [],\n\n // @vuepress/plugin-links-check\n (themePlugins.linksCheck ?? true)\n ? linksCheckPlugin(\n isPlainObject(themePlugins.linksCheck)\n ? themePlugins.linksCheck\n : {},\n )\n : [],\n\n // @vuepress/plugin-medium-zoom\n (themePlugins.mediumZoom ?? true) ? mediumZoomPlugin() : [],\n\n // @vuepress/plugin-nprogress\n (themePlugins.nprogress ?? true) ? nprogressPlugin() : [],\n\n // @vuepress/plugin-palette\n palettePlugin({ preset: 'sass' }),\n\n // @vuepress/plugin-prismjs\n (themePlugins.prismjs ?? true)\n ? prismjsPlugin(\n isPlainObject(themePlugins.prismjs) ? themePlugins.prismjs : {},\n )\n : [],\n\n // @vuepress/plugin-seo\n hostname && (themePlugins.seo ?? true)\n ? seoPlugin({\n hostname,\n ...(isPlainObject(themePlugins.seo) ? themePlugins.seo : {}),\n })\n : [],\n\n // @vuepress/plugin-sitemap\n hostname && (themePlugins.sitemap ?? true)\n ? sitemapPlugin({\n hostname,\n ...(isPlainObject(themePlugins.sitemap)\n ? themePlugins.sitemap\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-tab\n (themePlugins.tab ?? true)\n ? markdownTabPlugin(\n isPlainObject(themePlugins.tab)\n ? themePlugins.tab\n : { codeTabs: true, tabs: true },\n )\n : [],\n\n // @vuepress/plugin-theme-data\n themeDataPlugin({ themeData: localeOptions }),\n ],\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as AutoLinkOptions } from "./index-BNjRb2Mr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/client/utils/resolveAutoLink.d.ts
|
|
4
4
|
/**
|
|
@@ -6,15 +6,15 @@ import { t as AutoLinkOptions } from "./nav-DikslSJ_.js";
|
|
|
6
6
|
*
|
|
7
7
|
* 从字符串解析 AutoLink 属性
|
|
8
8
|
*
|
|
9
|
+
* @example
|
|
10
|
+
* - Input: '/README.md'
|
|
11
|
+
* - Output: { text: 'Home', link: '/' }
|
|
12
|
+
*
|
|
9
13
|
* @param config - The string to resolve / 要解析的字符串
|
|
10
14
|
* @param currentPath - The current route path / 当前路由路径
|
|
11
15
|
* @returns Resolved AutoLink options / 解析后的 AutoLink 选项
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* - Input: '/README.md'
|
|
15
|
-
* - Output: { text: 'Home', link: '/' }
|
|
16
16
|
*/
|
|
17
17
|
declare const resolveAutoLink: (config: string, currentPath?: string) => AutoLinkOptions;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { resolveAutoLink as t };
|
|
20
|
-
//# sourceMappingURL=resolveAutoLink-
|
|
20
|
+
//# sourceMappingURL=resolveAutoLink-bQLxrWMd.d.ts.map
|
|
@@ -3,4 +3,4 @@ type RepoType = 'Bitbucket' | 'Gitee' | 'GitHub' | 'GitLab' | null;
|
|
|
3
3
|
declare const resolveRepoType: (repo: string) => RepoType;
|
|
4
4
|
//#endregion
|
|
5
5
|
export { resolveRepoType as n, RepoType as t };
|
|
6
|
-
//# sourceMappingURL=resolveRepoType-
|
|
6
|
+
//# sourceMappingURL=resolveRepoType-DefRTDOt.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as SidebarLinkOptions, n as SidebarGroupOptions, s as NavGroup } from "./sidebar-CF1YPYLN.js";
|
|
1
|
+
import { d as SidebarLinkOptions, l as SidebarGroupOptions, m as NavGroup, v as AutoLinkOptions } from "./index-BNjRb2Mr.js";
|
|
3
2
|
|
|
4
3
|
//#region src/client/typings.d.ts
|
|
5
4
|
type NavbarItem = AutoLinkOptions | NavGroup<NavbarItem>;
|
|
@@ -16,4 +15,4 @@ interface SidebarGroupItem extends SidebarGroupOptions {
|
|
|
16
15
|
type SidebarItem = SidebarGroupItem | SidebarLinkItem;
|
|
17
16
|
//#endregion
|
|
18
17
|
export { SidebarLinkItem as a, SidebarItem as i, SidebarGroupItem as n, SidebarHeaderItem as r, NavbarItem as t };
|
|
19
|
-
//# sourceMappingURL=typings-
|
|
18
|
+
//# sourceMappingURL=typings-D-rXvaET.d.ts.map
|
|
@@ -10,10 +10,8 @@ type DarkModeRef = WritableComputedRef<boolean>;
|
|
|
10
10
|
* @returns Dark mode ref / 暗色模式引用
|
|
11
11
|
*/
|
|
12
12
|
declare const useDarkMode: () => DarkModeRef;
|
|
13
|
-
/**
|
|
14
|
-
* Create dark mode ref and provide as global computed in setup
|
|
15
|
-
*/
|
|
13
|
+
/** Create dark mode ref and provide as global computed in setup */
|
|
16
14
|
declare const setupDarkMode: () => void;
|
|
17
15
|
//#endregion
|
|
18
16
|
export { setupDarkMode as n, useDarkMode as r, DarkModeRef as t };
|
|
19
|
-
//# sourceMappingURL=useDarkMode-
|
|
17
|
+
//# sourceMappingURL=useDarkMode-Zrmg4e6i.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DefaultThemeData, n as DefaultThemeNormalPageFrontmatter, r as DefaultThemePageData } from "./
|
|
1
|
+
import { a as DefaultThemeData, n as DefaultThemeNormalPageFrontmatter, r as DefaultThemePageData } from "./index-BNjRb2Mr.js";
|
|
2
2
|
import { ClientData } from "vuepress/client";
|
|
3
3
|
import { ThemeDataRef, ThemeLocaleDataRef } from "@vuepress/plugin-theme-data/client";
|
|
4
4
|
|
|
@@ -10,4 +10,4 @@ interface Data<PageFrontmatter extends Record<string, unknown> = DefaultThemeNor
|
|
|
10
10
|
declare const useData$1: <PageFrontmatter extends Record<string, unknown> = DefaultThemeNormalPageFrontmatter, PageData extends Record<string, unknown> = DefaultThemePageData>() => Data<PageFrontmatter, PageData>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { useData$1 as n, Data as t };
|
|
13
|
-
//# sourceMappingURL=useData-
|
|
13
|
+
//# sourceMappingURL=useData-BFB4h32K.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as NavbarItem } from "./typings-
|
|
1
|
+
import { t as NavbarItem } from "./typings-D-rXvaET.js";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/client/composables/useNavbarConfig.d.ts
|
|
5
5
|
declare const useNavbarConfig: () => ComputedRef<NavbarItem[]>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { useNavbarConfig as t };
|
|
8
|
-
//# sourceMappingURL=useNavbarConfig-
|
|
8
|
+
//# sourceMappingURL=useNavbarConfig-BnkOLDyM.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NavbarItem } from "./typings-
|
|
1
|
+
import { t as NavbarItem } from "./typings-D-rXvaET.js";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/client/composables/useNavbarRepo.d.ts
|
|
@@ -10,4 +10,4 @@ import { ComputedRef } from "vue";
|
|
|
10
10
|
declare const useNavbarRepo: () => ComputedRef<NavbarItem[]>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { useNavbarRepo as t };
|
|
13
|
-
//# sourceMappingURL=useNavbarRepo-
|
|
13
|
+
//# sourceMappingURL=useNavbarRepo-BT8z2mBp.d.ts.map
|
package/dist/{useNavbarSelectLanguage-4GkrPvc2.d.ts → useNavbarSelectLanguage-DMcyeLfA.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NavbarItem } from "./typings-
|
|
1
|
+
import { t as NavbarItem } from "./typings-D-rXvaET.js";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/client/composables/useNavbarSelectLanguage.d.ts
|
|
@@ -10,4 +10,4 @@ import { ComputedRef } from "vue";
|
|
|
10
10
|
declare const useNavbarSelectLanguage: () => ComputedRef<NavbarItem[]>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { useNavbarSelectLanguage as t };
|
|
13
|
-
//# sourceMappingURL=useNavbarSelectLanguage-
|
|
13
|
+
//# sourceMappingURL=useNavbarSelectLanguage-DMcyeLfA.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as AutoLinkOptions } from "./index-BNjRb2Mr.js";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/client/composables/useRelatedLinks.d.ts
|
|
@@ -9,4 +9,4 @@ interface RelatedLinks {
|
|
|
9
9
|
declare const useRelatedLinks: () => RelatedLinks;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { useRelatedLinks as t };
|
|
12
|
-
//# sourceMappingURL=useRelatedLinks-
|
|
12
|
+
//# sourceMappingURL=useRelatedLinks-CoqxjiuJ.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as SidebarItem, r as SidebarHeaderItem } from "./typings-
|
|
1
|
+
import { c as SidebarArrayOptions, f as SidebarObjectOptions, p as SidebarOptions } from "./index-BNjRb2Mr.js";
|
|
2
|
+
import { i as SidebarItem, r as SidebarHeaderItem } from "./typings-D-rXvaET.js";
|
|
3
3
|
import { PageData, PageHeader } from "vuepress/client";
|
|
4
4
|
import { ComputedRef, InjectionKey } from "vue";
|
|
5
5
|
|
|
@@ -7,46 +7,45 @@ import { ComputedRef, InjectionKey } from "vue";
|
|
|
7
7
|
/**
|
|
8
8
|
* Util to transform page header to sidebar item
|
|
9
9
|
*
|
|
10
|
-
* @param header
|
|
11
|
-
* @returns
|
|
10
|
+
* @param header Page header
|
|
11
|
+
* @returns Sidebar item from header
|
|
12
12
|
*/
|
|
13
13
|
declare const resolveSidebarPageHeader: (header: PageHeader) => SidebarHeaderItem;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Get sidebar header items from page headers
|
|
16
16
|
*
|
|
17
|
-
* @param headers
|
|
18
|
-
* @returns
|
|
17
|
+
* @param headers Page headers
|
|
18
|
+
* @returns Sidebar header items
|
|
19
19
|
*/
|
|
20
20
|
declare const resolveSidebarPageHeaders: (headers?: PageHeader[]) => SidebarHeaderItem[];
|
|
21
21
|
/**
|
|
22
|
-
* Resolve current page and its header to sidebar items if the config is
|
|
22
|
+
* Resolve current page and its header to sidebar items if the config is
|
|
23
|
+
* `heading`
|
|
23
24
|
*
|
|
24
|
-
* @param page
|
|
25
|
-
* @param headers
|
|
26
|
-
*
|
|
27
|
-
* @returns sidebar items
|
|
25
|
+
* @param page Current page data
|
|
26
|
+
* @param headers Current page headers
|
|
27
|
+
* @returns Sidebar items
|
|
28
28
|
*/
|
|
29
29
|
declare const resolveSidebarHeadingItem: (page: PageData, headers: PageHeader[]) => SidebarItem[];
|
|
30
30
|
/**
|
|
31
31
|
* Resolve sidebar items if the config is an array
|
|
32
32
|
*
|
|
33
|
-
* @param sidebarConfig
|
|
34
|
-
* @param headers
|
|
35
|
-
* @param path
|
|
36
|
-
* @param prefix
|
|
37
|
-
*
|
|
38
|
-
* @returns resolved sidebar items
|
|
33
|
+
* @param sidebarConfig Sidebar config array
|
|
34
|
+
* @param headers Current page headers
|
|
35
|
+
* @param path Current page path
|
|
36
|
+
* @param prefix Path prefix
|
|
37
|
+
* @returns Resolved sidebar items
|
|
39
38
|
*/
|
|
40
39
|
declare const resolveArraySidebarItems: (sidebarConfig: SidebarArrayOptions, headers: PageHeader[], path: string, prefix?: string) => SidebarItem[];
|
|
41
40
|
/**
|
|
42
|
-
* Resolve sidebar items if the config is a key -> value (path-prefix -> array)
|
|
43
|
-
*
|
|
44
|
-
* @param sidebarConfig sidebar config object
|
|
45
|
-
* @param page current page data
|
|
46
|
-
* @param headers current page headers
|
|
47
|
-
* @param path current page path
|
|
41
|
+
* Resolve sidebar items if the config is a key -> value (path-prefix -> array)
|
|
42
|
+
* object
|
|
48
43
|
*
|
|
49
|
-
* @
|
|
44
|
+
* @param sidebarConfig Sidebar config object
|
|
45
|
+
* @param page Current page data
|
|
46
|
+
* @param headers Current page headers
|
|
47
|
+
* @param path Current page path
|
|
48
|
+
* @returns Resolved sidebar items
|
|
50
49
|
*/
|
|
51
50
|
declare const resolveMultiSidebarItems: (sidebarConfig: SidebarObjectOptions, page: PageData, headers: PageHeader[], path: string) => SidebarItem[];
|
|
52
51
|
type SidebarItemsRef = ComputedRef<SidebarItem[]>;
|
|
@@ -54,7 +53,7 @@ declare const sidebarItemsSymbol: InjectionKey<SidebarItemsRef>;
|
|
|
54
53
|
/**
|
|
55
54
|
* Inject sidebar items global computed
|
|
56
55
|
*
|
|
57
|
-
* @returns
|
|
56
|
+
* @returns Sidebar items global computed
|
|
58
57
|
*/
|
|
59
58
|
declare const useSidebarItems: () => SidebarItemsRef;
|
|
60
59
|
/**
|
|
@@ -62,19 +61,16 @@ declare const useSidebarItems: () => SidebarItemsRef;
|
|
|
62
61
|
*
|
|
63
62
|
* It should only be resolved and provided once
|
|
64
63
|
*
|
|
65
|
-
* @param sidebarConfig
|
|
66
|
-
* @param page
|
|
67
|
-
* @param path
|
|
68
|
-
* @param routeLocale
|
|
69
|
-
* @param headers
|
|
70
|
-
*
|
|
71
|
-
* @returns resolved sidebar items
|
|
64
|
+
* @param sidebarConfig Sidebar config
|
|
65
|
+
* @param page Current page data
|
|
66
|
+
* @param path Current page path
|
|
67
|
+
* @param routeLocale Current route locale
|
|
68
|
+
* @param headers Current page headers
|
|
69
|
+
* @returns Resolved sidebar items
|
|
72
70
|
*/
|
|
73
71
|
declare const resolveSidebarItems: (sidebarConfig: SidebarOptions | false, page: PageData, path: string, routeLocale: string, headers: PageHeader[]) => SidebarItem[];
|
|
74
|
-
/**
|
|
75
|
-
* Create sidebar items ref and provide as global computed in setup
|
|
76
|
-
*/
|
|
72
|
+
/** Create sidebar items ref and provide as global computed in setup */
|
|
77
73
|
declare const setupSidebarItems: () => void;
|
|
78
74
|
//#endregion
|
|
79
75
|
export { resolveSidebarItems as a, setupSidebarItems as c, resolveSidebarHeadingItem as i, sidebarItemsSymbol as l, resolveArraySidebarItems as n, resolveSidebarPageHeader as o, resolveMultiSidebarItems as r, resolveSidebarPageHeaders as s, SidebarItemsRef as t, useSidebarItems as u };
|
|
80
|
-
//# sourceMappingURL=useSidebarItems-
|
|
76
|
+
//# sourceMappingURL=useSidebarItems-nMm3AAZ3.d.ts.map
|