@vuepress/theme-default 2.0.0-beta.48 → 2.0.0-beta.50-pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/package.json +30 -23
  2. package/lib/client/components/AutoLink.vue +0 -114
  3. package/lib/client/components/DropdownTransition.vue +0 -21
  4. package/lib/client/components/Home.vue +0 -15
  5. package/lib/client/components/HomeContent.vue +0 -5
  6. package/lib/client/components/HomeFeatures.vue +0 -23
  7. package/lib/client/components/HomeFooter.vue +0 -17
  8. package/lib/client/components/HomeHero.vue +0 -97
  9. package/lib/client/components/Navbar.vue +0 -75
  10. package/lib/client/components/NavbarBrand.vue +0 -55
  11. package/lib/client/components/NavbarDropdown.vue +0 -126
  12. package/lib/client/components/NavbarItems.vue +0 -154
  13. package/lib/client/components/Page.vue +0 -24
  14. package/lib/client/components/PageMeta.vue +0 -124
  15. package/lib/client/components/PageNav.vue +0 -103
  16. package/lib/client/components/Sidebar.vue +0 -13
  17. package/lib/client/components/SidebarItem.vue +0 -80
  18. package/lib/client/components/SidebarItems.vue +0 -57
  19. package/lib/client/components/ToggleColorModeButton.vue +0 -57
  20. package/lib/client/components/ToggleSidebarButton.vue +0 -24
  21. package/lib/client/components/global/Badge.vue +0 -31
  22. package/lib/client/components/global/CodeGroup.d.ts +0 -4
  23. package/lib/client/components/global/CodeGroup.js +0 -106
  24. package/lib/client/components/global/CodeGroupItem.vue +0 -31
  25. package/lib/client/components/global/index.d.ts +0 -4
  26. package/lib/client/components/global/index.js +0 -4
  27. package/lib/client/composables/index.d.ts +0 -6
  28. package/lib/client/composables/index.js +0 -6
  29. package/lib/client/composables/useDarkMode.d.ts +0 -12
  30. package/lib/client/composables/useDarkMode.js +0 -57
  31. package/lib/client/composables/useNavLink.d.ts +0 -14
  32. package/lib/client/composables/useNavLink.js +0 -18
  33. package/lib/client/composables/useResolveRouteWithRedirect.d.ts +0 -5
  34. package/lib/client/composables/useResolveRouteWithRedirect.js +0 -24
  35. package/lib/client/composables/useScrollPromise.d.ts +0 -6
  36. package/lib/client/composables/useScrollPromise.js +0 -14
  37. package/lib/client/composables/useSidebarItems.d.ts +0 -36
  38. package/lib/client/composables/useSidebarItems.js +0 -117
  39. package/lib/client/composables/useThemeData.d.ts +0 -4
  40. package/lib/client/composables/useThemeData.js +0 -3
  41. package/lib/client/config.d.ts +0 -3
  42. package/lib/client/config.js +0 -38
  43. package/lib/client/index.d.ts +0 -4
  44. package/lib/client/index.js +0 -2
  45. package/lib/client/layouts/404.vue +0 -25
  46. package/lib/client/layouts/Layout.vue +0 -134
  47. package/lib/client/shim.d.ts +0 -5
  48. package/lib/client/styles/_mixins.scss +0 -20
  49. package/lib/client/styles/_variables.scss +0 -11
  50. package/lib/client/styles/arrow.scss +0 -37
  51. package/lib/client/styles/badge.scss +0 -31
  52. package/lib/client/styles/code-group.scss +0 -69
  53. package/lib/client/styles/code.scss +0 -266
  54. package/lib/client/styles/custom-container.scss +0 -88
  55. package/lib/client/styles/home.scss +0 -168
  56. package/lib/client/styles/index.scss +0 -19
  57. package/lib/client/styles/layout.scss +0 -198
  58. package/lib/client/styles/navbar-dropdown.scss +0 -187
  59. package/lib/client/styles/navbar.scss +0 -177
  60. package/lib/client/styles/normalize.scss +0 -176
  61. package/lib/client/styles/page.scss +0 -83
  62. package/lib/client/styles/sidebar.scss +0 -134
  63. package/lib/client/styles/toc.scss +0 -5
  64. package/lib/client/styles/transitions.scss +0 -22
  65. package/lib/client/styles/vars-dark.scss +0 -46
  66. package/lib/client/styles/vars.scss +0 -133
  67. package/lib/client/utils/index.d.ts +0 -3
  68. package/lib/client/utils/index.js +0 -3
  69. package/lib/client/utils/isActiveSidebarItem.d.ts +0 -3
  70. package/lib/client/utils/isActiveSidebarItem.js +0 -20
  71. package/lib/client/utils/resolveEditLink.d.ts +0 -9
  72. package/lib/client/utils/resolveEditLink.js +0 -29
  73. package/lib/client/utils/resolveRepoType.d.ts +0 -2
  74. package/lib/client/utils/resolveRepoType.js +0 -12
  75. package/lib/node/defaultTheme.d.ts +0 -10
  76. package/lib/node/defaultTheme.js +0 -119
  77. package/lib/node/index.d.ts +0 -5
  78. package/lib/node/index.js +0 -21
  79. package/lib/node/utils/assignDefaultLocaleOptions.d.ts +0 -7
  80. package/lib/node/utils/assignDefaultLocaleOptions.js +0 -60
  81. package/lib/node/utils/index.d.ts +0 -2
  82. package/lib/node/utils/index.js +0 -18
  83. package/lib/node/utils/resolveContainerPluginOptions.d.ts +0 -8
  84. package/lib/node/utils/resolveContainerPluginOptions.js +0 -21
  85. package/lib/shared/index.d.ts +0 -3
  86. package/lib/shared/index.js +0 -19
  87. package/lib/shared/nav.d.ts +0 -43
  88. package/lib/shared/nav.js +0 -2
  89. package/lib/shared/options.d.ts +0 -243
  90. package/lib/shared/options.js +0 -2
  91. package/lib/shared/page.d.ts +0 -40
  92. package/lib/shared/page.js +0 -2
  93. package/templates/build.html +0 -33
@@ -1,243 +0,0 @@
1
- import type { ThemeData } from '@vuepress/plugin-theme-data';
2
- import type { LocaleData } from '@vuepress/shared';
3
- import type { NavbarConfig, SidebarConfig } from './nav';
4
- export interface DefaultThemePluginsOptions {
5
- /**
6
- * Enable @vuepress/plugin-active-header-links or not
7
- */
8
- activeHeaderLinks?: boolean;
9
- /**
10
- * Enable @vuepress/plugin-back-to-top or not
11
- */
12
- backToTop?: boolean;
13
- /**
14
- * Enable @vuepress/plugin-container or not
15
- */
16
- container?: {
17
- tip?: boolean;
18
- warning?: boolean;
19
- danger?: boolean;
20
- details?: boolean;
21
- codeGroup?: boolean;
22
- codeGroupItem?: boolean;
23
- };
24
- /**
25
- * Enable @vuepress/plugin-external-link-icon or not
26
- */
27
- externalLinkIcon?: boolean;
28
- /**
29
- * Enable @vuepress/plugin-git or not
30
- */
31
- git?: boolean;
32
- /**
33
- * Enable @vuepress/plugin-medium-zoom or not
34
- */
35
- mediumZoom?: boolean;
36
- /**
37
- * Enable @vuepress/plugin-nprogress or not
38
- */
39
- nprogress?: boolean;
40
- /**
41
- * Enable @vuepress/plugin-prismjs or not
42
- */
43
- prismjs?: boolean;
44
- }
45
- export declare type DefaultThemeLocaleOptions = DefaultThemeData;
46
- export declare type DefaultThemeData = ThemeData<DefaultThemeLocaleData>;
47
- export interface DefaultThemeLocaleData extends LocaleData {
48
- /**
49
- * Default color mode
50
- *
51
- * @default 'auto'
52
- */
53
- colorMode?: 'auto' | 'dark' | 'light';
54
- /**
55
- * Enable color mode switching and display a button in navbar or not
56
- *
57
- * @default true
58
- */
59
- colorModeSwitch?: boolean;
60
- /**
61
- * Home path of current locale
62
- *
63
- * Used as the link of back-to-home and navbar logo
64
- */
65
- home?: string;
66
- /**
67
- * Navbar config
68
- *
69
- * Set to `false` to disable navbar in current locale
70
- */
71
- navbar?: false | NavbarConfig;
72
- /**
73
- * Navbar logo config
74
- *
75
- * Logo to display in navbar
76
- */
77
- logo?: null | string;
78
- /**
79
- * Navbar logo config for dark mode
80
- *
81
- * Logo to display in navbar in dark mode
82
- */
83
- logoDark?: null | string;
84
- /**
85
- * Navbar repository config
86
- *
87
- * Used for the repository link of navbar
88
- */
89
- repo?: null | string;
90
- /**
91
- * Navbar repository config
92
- *
93
- * Used for the repository text of navbar
94
- */
95
- repoLabel?: string;
96
- /**
97
- * Navbar language selection config
98
- *
99
- * Text of the language selection dropdown
100
- */
101
- selectLanguageText?: string;
102
- /**
103
- * Navbar language selection config
104
- *
105
- * Aria label of of the language selection dropdown
106
- */
107
- selectLanguageAriaLabel?: string;
108
- /**
109
- * Navbar language selection config
110
- *
111
- * Language name of current locale
112
- *
113
- * Displayed inside the language selection dropdown
114
- */
115
- selectLanguageName?: string;
116
- /**
117
- * Sidebar config
118
- *
119
- * Set to `false` to disable sidebar in current locale
120
- */
121
- sidebar?: 'auto' | false | SidebarConfig;
122
- /**
123
- * Sidebar depth
124
- *
125
- * - Set to `0` to disable all levels
126
- * - Set to `1` to include `<h2>`
127
- * - Set to `2` to include `<h2>` and `<h3>`
128
- * - ...
129
- *
130
- * The max value depends on which headers you have extracted
131
- * via `markdown.extractHeaders.level`.
132
- *
133
- * The default value of `markdown.extractHeaders.level` is `[2, 3]`,
134
- * so the default max value of `sidebarDepth` is `2`
135
- */
136
- sidebarDepth?: number;
137
- /**
138
- * Page meta - edit link config
139
- *
140
- * Whether to show "Edit this page" or not
141
- */
142
- editLink?: boolean;
143
- /**
144
- * Page meta - edit link config
145
- *
146
- * The text to replace the default "Edit this page"
147
- */
148
- editLinkText?: string;
149
- /**
150
- * Page meta - edit link config
151
- *
152
- * Pattern of edit link
153
- *
154
- * @example ':repo/edit/:branch/:path'
155
- */
156
- editLinkPattern?: string;
157
- /**
158
- * Page meta - edit link config
159
- *
160
- * Use `repo` config by default
161
- *
162
- * Set this config if your docs is placed in a different repo
163
- */
164
- docsRepo?: string;
165
- /**
166
- * Page meta - edit link config
167
- *
168
- * Set this config if the branch of your docs is not 'main'
169
- */
170
- docsBranch?: string;
171
- /**
172
- * Page meta - edit link config
173
- *
174
- * Set this config if your docs is placed in sub dir of your `docsRepo`
175
- */
176
- docsDir?: string;
177
- /**
178
- * Page meta - last updated config
179
- *
180
- * Whether to show "Last Updated" or not
181
- */
182
- lastUpdated?: boolean;
183
- /**
184
- * Page meta - last updated config
185
- *
186
- * The text to replace the default "Last Updated"
187
- */
188
- lastUpdatedText?: string;
189
- /**
190
- * Page meta - contributors config
191
- *
192
- * Whether to show "Contributors" or not
193
- */
194
- contributors?: boolean;
195
- /**
196
- * Page meta - contributors config
197
- *
198
- * The text to replace the default "Contributors"
199
- */
200
- contributorsText?: string;
201
- /**
202
- * Custom block config
203
- *
204
- * Default title of TIP custom block
205
- */
206
- tip?: string;
207
- /**
208
- * Custom block config
209
- *
210
- * Default title of WARNING custom block
211
- */
212
- warning?: string;
213
- /**
214
- * Custom block config
215
- *
216
- * Default title of DANGER custom block
217
- */
218
- danger?: string;
219
- /**
220
- * 404 page config
221
- *
222
- * Not Found messages for 404 page
223
- */
224
- notFound?: string[];
225
- /**
226
- * 404 page config
227
- *
228
- * Text of back-to-home link in 404 page
229
- */
230
- backToHome?: string;
231
- /**
232
- * A11y text for external link icon
233
- */
234
- openInNewWindow?: string;
235
- /**
236
- * A11y text for color mode toggle button
237
- */
238
- toggleColorMode?: string;
239
- /**
240
- * A11y text for sidebar toggle button
241
- */
242
- toggleSidebar?: string;
243
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,40 +0,0 @@
1
- import type { GitPluginPageData } from '@vuepress/plugin-git';
2
- import type { NavLink, SidebarConfig } from './nav';
3
- export interface DefaultThemePageData extends GitPluginPageData {
4
- filePathRelative: string | null;
5
- }
6
- export interface DefaultThemePageFrontmatter {
7
- home?: boolean;
8
- navbar?: boolean;
9
- pageClass?: string;
10
- }
11
- export interface DefaultThemeHomePageFrontmatter extends DefaultThemePageFrontmatter {
12
- home: true;
13
- heroImage?: string;
14
- heroImageDark?: string;
15
- heroAlt?: string;
16
- heroText?: string | null;
17
- tagline?: string | null;
18
- actions?: {
19
- text: string;
20
- link: string;
21
- type?: 'primary' | 'secondary';
22
- }[];
23
- features?: {
24
- title: string;
25
- details: string;
26
- }[];
27
- footer?: string;
28
- footerHtml?: boolean;
29
- }
30
- export interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter {
31
- home?: false;
32
- editLink?: boolean;
33
- editLinkPattern?: string;
34
- lastUpdated?: boolean;
35
- contributors?: boolean;
36
- sidebar?: 'auto' | false | SidebarConfig;
37
- sidebarDepth?: number;
38
- prev?: string | NavLink;
39
- next?: string | NavLink;
40
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,33 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="{{ lang }}">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <meta name="generator" content="VuePress {{ version }}">
7
- <style>
8
- :root {
9
- --c-bg: #fff;
10
- }
11
- html.dark {
12
- --c-bg: #22272e;
13
- }
14
- html, body {
15
- background-color: var(--c-bg);
16
- }
17
- </style>
18
- <script>
19
- const userMode = localStorage.getItem('vuepress-color-scheme');
20
- const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
21
- if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
22
- document.documentElement.classList.toggle('dark', true);
23
- }
24
- </script>
25
- <!--vuepress-ssr-head-->
26
- <!--vuepress-ssr-resources-->
27
- <!--vuepress-ssr-styles-->
28
- </head>
29
- <body>
30
- <div id="app"><!--vuepress-ssr-app--></div>
31
- <!--vuepress-ssr-scripts-->
32
- </body>
33
- </html>