@vuepress/theme-default 2.0.0-beta.9 → 2.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/lib/client/components/AutoLink.vue +119 -0
  2. package/lib/client/components/DropdownTransition.vue +15 -24
  3. package/lib/client/components/Home.vue +12 -130
  4. package/lib/client/components/HomeContent.vue +5 -0
  5. package/lib/client/components/HomeFeatures.vue +23 -0
  6. package/lib/client/components/HomeFooter.vue +17 -0
  7. package/lib/client/components/HomeHero.vue +98 -0
  8. package/lib/client/components/Navbar.vue +60 -95
  9. package/lib/client/components/NavbarBrand.vue +55 -0
  10. package/lib/client/components/NavbarDropdown.vue +126 -0
  11. package/lib/client/components/{NavbarLinks.vue → NavbarItems.vue} +73 -58
  12. package/lib/client/components/Page.vue +16 -15
  13. package/lib/client/components/PageMeta.vue +51 -66
  14. package/lib/client/components/PageNav.vue +47 -60
  15. package/lib/client/components/Sidebar.vue +12 -32
  16. package/lib/client/components/SidebarItem.vue +87 -0
  17. package/lib/client/components/SidebarItems.vue +57 -0
  18. package/lib/client/components/ToggleColorModeButton.vue +57 -0
  19. package/lib/client/components/ToggleSidebarButton.vue +21 -24
  20. package/lib/client/components/global/Badge.vue +24 -26
  21. package/lib/client/components/global/CodeGroup.d.ts +5 -4
  22. package/lib/client/components/global/CodeGroup.js +85 -17
  23. package/lib/client/components/global/CodeGroupItem.vue +23 -17
  24. package/lib/client/components/global/index.d.ts +4 -0
  25. package/lib/client/components/global/index.js +4 -0
  26. package/lib/client/composables/index.d.ts +7 -5
  27. package/lib/client/composables/index.js +7 -5
  28. package/lib/client/composables/useDarkMode.d.ts +12 -0
  29. package/lib/client/composables/useDarkMode.js +57 -0
  30. package/lib/client/composables/useNavLink.d.ts +6 -1
  31. package/lib/client/composables/useNavLink.js +5 -2
  32. package/lib/client/composables/useResolveRouteWithRedirect.js +2 -2
  33. package/lib/client/composables/useScrollPromise.js +1 -1
  34. package/lib/client/composables/useSidebarItems.d.ts +13 -8
  35. package/lib/client/composables/useSidebarItems.js +42 -38
  36. package/lib/client/composables/useThemeData.d.ts +2 -2
  37. package/lib/client/composables/useThemeData.js +1 -1
  38. package/lib/client/composables/useUpdateDeviceStatus.d.ts +7 -0
  39. package/lib/client/composables/useUpdateDeviceStatus.js +25 -0
  40. package/lib/client/config.d.ts +3 -0
  41. package/lib/client/config.js +44 -0
  42. package/lib/client/index.d.ts +3 -4
  43. package/lib/client/index.js +3 -2
  44. package/lib/client/layouts/Layout.vue +133 -136
  45. package/lib/client/layouts/NotFound.vue +27 -0
  46. package/lib/client/shim.d.ts +5 -0
  47. package/lib/client/styles/{_wrapper.scss → _mixins.scss} +7 -2
  48. package/lib/client/styles/_variables.module.scss +5 -0
  49. package/lib/client/styles/_variables.scss +0 -34
  50. package/lib/client/styles/arrow.scss +4 -6
  51. package/lib/client/styles/badge.scss +14 -11
  52. package/lib/client/styles/code-group.scss +9 -2
  53. package/lib/client/styles/code.scss +33 -46
  54. package/lib/client/styles/custom-container.scss +82 -18
  55. package/lib/client/styles/home.scss +32 -24
  56. package/lib/client/styles/index.scss +4 -4
  57. package/lib/client/styles/layout.scss +82 -73
  58. package/lib/client/styles/{dropdown.scss → navbar-dropdown.scss} +36 -50
  59. package/lib/client/styles/navbar.scss +106 -50
  60. package/lib/client/styles/normalize.scss +200 -0
  61. package/lib/client/styles/page.scss +24 -8
  62. package/lib/client/styles/sidebar.scss +69 -87
  63. package/lib/client/styles/transitions.scss +13 -4
  64. package/lib/client/styles/vars-dark.scss +68 -0
  65. package/lib/client/styles/vars.scss +149 -0
  66. package/lib/client/utils/index.d.ts +3 -2
  67. package/lib/client/utils/index.js +3 -2
  68. package/lib/client/utils/isActiveSidebarItem.d.ts +3 -0
  69. package/lib/client/utils/isActiveSidebarItem.js +20 -0
  70. package/lib/client/utils/resolveEditLink.d.ts +2 -2
  71. package/lib/client/utils/resolveEditLink.js +15 -9
  72. package/lib/client/utils/resolveRepoType.d.ts +1 -1
  73. package/lib/client/utils/resolveRepoType.js +3 -1
  74. package/lib/node/defaultTheme.d.ts +4 -4
  75. package/lib/node/defaultTheme.js +111 -48
  76. package/lib/node/index.d.ts +4 -4
  77. package/lib/node/index.js +5 -17
  78. package/lib/node/utils/assignDefaultLocaleOptions.d.ts +4 -2
  79. package/lib/node/utils/assignDefaultLocaleOptions.js +13 -13
  80. package/lib/node/utils/index.d.ts +2 -5
  81. package/lib/node/utils/index.js +2 -17
  82. package/lib/node/utils/resolveContainerPluginOptions.d.ts +2 -20
  83. package/lib/node/utils/resolveContainerPluginOptions.js +4 -66
  84. package/lib/shared/index.d.ts +3 -3
  85. package/lib/shared/index.js +3 -15
  86. package/lib/shared/nav.d.ts +16 -18
  87. package/lib/shared/nav.js +1 -2
  88. package/lib/shared/options.d.ts +51 -6
  89. package/lib/shared/options.js +1 -2
  90. package/lib/shared/page.d.ts +15 -6
  91. package/lib/shared/page.js +1 -2
  92. package/package.json +49 -29
  93. package/templates/build.html +34 -0
  94. package/CHANGELOG.md +0 -419
  95. package/lib/client/clientAppEnhance.d.ts +0 -3
  96. package/lib/client/clientAppEnhance.js +0 -28
  97. package/lib/client/clientAppSetup.d.ts +0 -2
  98. package/lib/client/clientAppSetup.js +0 -11
  99. package/lib/client/components/DropdownLink.vue +0 -141
  100. package/lib/client/components/NavLink.vue +0 -115
  101. package/lib/client/components/SidebarChild.d.ts +0 -6
  102. package/lib/client/components/SidebarChild.js +0 -91
  103. package/lib/client/components/global/OutboundLink.vue +0 -30
  104. package/lib/client/layouts/404.vue +0 -38
  105. package/lib/client/styles/_normalize.scss +0 -148
  106. package/lib/client/styles/plugins.scss +0 -18
  107. package/lib/client/styles/sr-only.scss +0 -12
  108. package/lib/node/utils/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
  109. package/lib/node/utils/resolveActiveHeaderLinksPluginOptions.js +0 -16
  110. package/lib/node/utils/resolveGitPluginOptions.d.ts +0 -6
  111. package/lib/node/utils/resolveGitPluginOptions.js +0 -22
  112. package/lib/node/utils/resolveMediumZoomPluginOptions.d.ts +0 -6
  113. package/lib/node/utils/resolveMediumZoomPluginOptions.js +0 -17
@@ -1,23 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveContainerPluginOptionsForCodeGroupItem = exports.resolveContainerPluginOptionsForCodeGroup = exports.resolveContainerPluginOptionsForDetails = exports.resolveContainerPluginOptions = void 0;
4
1
  /**
5
2
  * Resolve options for @vuepress/plugin-container
6
3
  *
7
4
  * For custom containers default title
8
5
  */
9
- const resolveContainerPluginOptions = (themePlugins, localeOptions, type) => {
10
- var _a;
11
- if (((_a = themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.container) === null || _a === void 0 ? void 0 : _a[type]) === false) {
12
- return false;
13
- }
6
+ export const resolveContainerPluginOptions = (localeOptions, type) => {
14
7
  const locales = Object.entries(localeOptions.locales || {}).reduce((result, [key, value]) => {
15
- const defaultInfo = value === null || value === void 0 ? void 0 : value[type];
16
- if (defaultInfo) {
17
- result[key] = {
18
- defaultInfo,
19
- };
20
- }
8
+ result[key] = {
9
+ defaultInfo: value?.[type] ?? localeOptions[type],
10
+ };
21
11
  return result;
22
12
  }, {});
23
13
  return {
@@ -25,55 +15,3 @@ const resolveContainerPluginOptions = (themePlugins, localeOptions, type) => {
25
15
  locales,
26
16
  };
27
17
  };
28
- exports.resolveContainerPluginOptions = resolveContainerPluginOptions;
29
- /**
30
- * Resolve options for @vuepress/plugin-container
31
- *
32
- * For details container
33
- */
34
- const resolveContainerPluginOptionsForDetails = (themePlugins) => {
35
- var _a;
36
- if (((_a = themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.container) === null || _a === void 0 ? void 0 : _a.details) === false) {
37
- return false;
38
- }
39
- return {
40
- type: 'details',
41
- before: (info) => `<details class="custom-container details">${info ? `<summary>${info}</summary>` : ''}\n`,
42
- after: () => '</details>\n',
43
- };
44
- };
45
- exports.resolveContainerPluginOptionsForDetails = resolveContainerPluginOptionsForDetails;
46
- /**
47
- * Resolve options for @vuepress/plugin-container
48
- *
49
- * For code-group container
50
- */
51
- const resolveContainerPluginOptionsForCodeGroup = (themePlugins) => {
52
- var _a;
53
- if (((_a = themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.container) === null || _a === void 0 ? void 0 : _a.codeGroup) === false) {
54
- return false;
55
- }
56
- return {
57
- type: 'code-group',
58
- before: () => `<CodeGroup>\n`,
59
- after: () => '</CodeGroup>\n',
60
- };
61
- };
62
- exports.resolveContainerPluginOptionsForCodeGroup = resolveContainerPluginOptionsForCodeGroup;
63
- /**
64
- * Resolve options for @vuepress/plugin-container
65
- *
66
- * For code-group-item block
67
- */
68
- const resolveContainerPluginOptionsForCodeGroupItem = (themePlugins) => {
69
- var _a;
70
- if (((_a = themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.container) === null || _a === void 0 ? void 0 : _a.codeGroupItem) === false) {
71
- return false;
72
- }
73
- return {
74
- type: 'code-group-item',
75
- before: (info) => `<CodeGroupItem title="${info}">\n`,
76
- after: () => '</CodeGroupItem>\n',
77
- };
78
- };
79
- exports.resolveContainerPluginOptionsForCodeGroupItem = resolveContainerPluginOptionsForCodeGroupItem;
@@ -1,3 +1,3 @@
1
- export * from './nav';
2
- export * from './options';
3
- export * from './page';
1
+ export * from './nav.js';
2
+ export * from './options.js';
3
+ export * from './page.js';
@@ -1,15 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./nav"), exports);
14
- __exportStar(require("./options"), exports);
15
- __exportStar(require("./page"), exports);
1
+ export * from './nav.js';
2
+ export * from './options.js';
3
+ export * from './page.js';
@@ -12,33 +12,31 @@ export interface NavGroup<T> extends NavItem {
12
12
  children: T[];
13
13
  }
14
14
  /**
15
- * Props for `<NavLink>`
15
+ * Props for `<AutoLink>`
16
16
  */
17
17
  export interface NavLink extends NavItem {
18
18
  link: string;
19
19
  rel?: string;
20
20
  target?: string;
21
+ activeMatch?: string;
21
22
  }
22
23
  /**
23
24
  * Navbar types
24
25
  */
25
- export declare type NavbarItem = NavLink;
26
- export declare type NavbarGroup = NavGroup<NavbarGroup | NavbarItem | string>;
27
- export declare type NavbarConfig = (NavbarItem | NavbarGroup | string)[];
28
- export declare type ResolvedNavbarItem = NavbarItem | NavGroup<ResolvedNavbarItem>;
26
+ export type NavbarItem = NavLink;
27
+ export type NavbarGroup = NavGroup<NavbarGroup | NavbarItem | string>;
28
+ export type NavbarConfig = (NavbarItem | NavbarGroup | string)[];
29
+ export type ResolvedNavbarItem = NavbarItem | NavGroup<ResolvedNavbarItem>;
29
30
  /**
30
31
  * Sidebar types
31
32
  */
32
- export interface SidebarItem extends NavLink, NavGroup<NavLink | SidebarItem | string> {
33
- isGroup?: false;
34
- }
35
- export interface SidebarGroup extends NavGroup<SidebarGroup | NavLink | SidebarItem | string> {
36
- isGroup: true;
37
- }
38
- export declare type SidebarConfigArray = (SidebarGroup | SidebarItem | string)[];
39
- export declare type SidebarConfigObject = Record<string, SidebarConfigArray>;
40
- export declare type SidebarConfig = SidebarConfigArray | SidebarConfigObject;
41
- export interface ResolvedSidebarItem extends Partial<NavLink> {
42
- isGroup?: boolean;
43
- children?: ResolvedSidebarItem[];
44
- }
33
+ export type SidebarItem = NavItem & Partial<NavLink>;
34
+ export type SidebarGroup = SidebarItem & NavGroup<SidebarItem | SidebarGroup | string> & {
35
+ collapsible?: boolean;
36
+ };
37
+ export type SidebarConfigArray = (SidebarItem | SidebarGroup | string)[];
38
+ export type SidebarConfigObject = Record<string, SidebarConfigArray>;
39
+ export type SidebarConfig = SidebarConfigArray | SidebarConfigObject;
40
+ export type ResolvedSidebarItem = SidebarItem & Partial<NavGroup<ResolvedSidebarItem>> & {
41
+ collapsible?: boolean;
42
+ };
package/lib/shared/nav.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,6 +1,6 @@
1
- import type { LocaleData } from '@vuepress/shared';
2
1
  import type { ThemeData } from '@vuepress/plugin-theme-data';
3
- import type { NavbarConfig, SidebarConfig } from './nav';
2
+ import type { LocaleData } from '@vuepress/shared';
3
+ import type { NavbarConfig, SidebarConfig } from './nav.js';
4
4
  export interface DefaultThemePluginsOptions {
5
5
  /**
6
6
  * Enable @vuepress/plugin-active-header-links or not
@@ -21,6 +21,10 @@ export interface DefaultThemePluginsOptions {
21
21
  codeGroup?: boolean;
22
22
  codeGroupItem?: boolean;
23
23
  };
24
+ /**
25
+ * Enable @vuepress/plugin-external-link-icon or not
26
+ */
27
+ externalLinkIcon?: boolean;
24
28
  /**
25
29
  * Enable @vuepress/plugin-git or not
26
30
  */
@@ -38,9 +42,21 @@ export interface DefaultThemePluginsOptions {
38
42
  */
39
43
  prismjs?: boolean;
40
44
  }
41
- export declare type DefaultThemeLocaleOptions = DefaultThemeData;
42
- export declare type DefaultThemeData = ThemeData<DefaultThemeLocaleData>;
45
+ export type DefaultThemeLocaleOptions = DefaultThemeData;
46
+ export type DefaultThemeData = ThemeData<DefaultThemeLocaleData>;
43
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;
44
60
  /**
45
61
  * Home path of current locale
46
62
  *
@@ -59,6 +75,12 @@ export interface DefaultThemeLocaleData extends LocaleData {
59
75
  * Logo to display in navbar
60
76
  */
61
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;
62
84
  /**
63
85
  * Navbar repository config
64
86
  *
@@ -97,6 +119,21 @@ export interface DefaultThemeLocaleData extends LocaleData {
97
119
  * Set to `false` to disable sidebar in current locale
98
120
  */
99
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.headers.level`.
132
+ *
133
+ * The default value of `markdown.headers.level` is `[2, 3]`,
134
+ * so the default max value of `sidebarDepth` is `2`
135
+ */
136
+ sidebarDepth?: number;
100
137
  /**
101
138
  * Page meta - edit link config
102
139
  *
@@ -128,7 +165,7 @@ export interface DefaultThemeLocaleData extends LocaleData {
128
165
  /**
129
166
  * Page meta - edit link config
130
167
  *
131
- * Set this config if the branch of your docs is not 'master'
168
+ * Set this config if the branch of your docs is not 'main'
132
169
  */
133
170
  docsBranch?: string;
134
171
  /**
@@ -192,7 +229,15 @@ export interface DefaultThemeLocaleData extends LocaleData {
192
229
  */
193
230
  backToHome?: string;
194
231
  /**
195
- * sr-only message in `<OutboundLink>`
232
+ * A11y text for external link icon
196
233
  */
197
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;
198
243
  }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,12 +1,19 @@
1
1
  import type { GitPluginPageData } from '@vuepress/plugin-git';
2
- import type { NavLink, SidebarConfig } from './nav';
2
+ import type { NavLink, SidebarConfig } from './nav.js';
3
3
  export interface DefaultThemePageData extends GitPluginPageData {
4
- filePathRelative: string;
4
+ filePathRelative: string | null;
5
5
  }
6
- export interface DefaultThemeHomePageFrontmatter {
6
+ export interface DefaultThemePageFrontmatter {
7
+ home?: boolean;
8
+ navbar?: boolean;
9
+ pageClass?: string;
10
+ }
11
+ export interface DefaultThemeHomePageFrontmatter extends DefaultThemePageFrontmatter {
7
12
  home: true;
8
13
  heroImage?: string;
14
+ heroImageDark?: string;
9
15
  heroAlt?: string;
16
+ heroHeight?: number;
10
17
  heroText?: string | null;
11
18
  tagline?: string | null;
12
19
  actions?: {
@@ -21,12 +28,14 @@ export interface DefaultThemeHomePageFrontmatter {
21
28
  footer?: string;
22
29
  footerHtml?: boolean;
23
30
  }
24
- export interface DefaultThemePageFrontmatter {
25
- home?: boolean;
31
+ export interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter {
32
+ home?: false;
26
33
  editLink?: boolean;
34
+ editLinkPattern?: string;
27
35
  lastUpdated?: boolean;
28
36
  contributors?: boolean;
37
+ sidebar?: 'auto' | false | SidebarConfig;
38
+ sidebarDepth?: number;
29
39
  prev?: string | NavLink;
30
40
  next?: string | NavLink;
31
- sidebar?: 'auto' | false | SidebarConfig;
32
41
  }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/theme-default",
3
- "version": "2.0.0-beta.9",
3
+ "version": "2.0.0-rc.0",
4
4
  "description": "Default theme of VuePress",
5
5
  "keywords": [
6
6
  "vuepress-theme",
@@ -17,38 +17,58 @@
17
17
  "url": "git+https://github.com/vuepress/vuepress-next.git"
18
18
  },
19
19
  "license": "MIT",
20
- "author": "Evan You",
21
- "main": "lib/node/index.js",
22
- "types": "lib/node/index.d.ts",
20
+ "author": "meteorlxy",
21
+ "type": "module",
22
+ "exports": {
23
+ ".": "./lib/node/index.js",
24
+ "./client": "./lib/client/index.js",
25
+ "./components/*": "./lib/client/components/*",
26
+ "./layouts/*": "./lib/client/layouts/*",
27
+ "./styles/*": "./lib/client/styles/*",
28
+ "./templates/*": "./templates/*",
29
+ "./lib/*": "./lib/*",
30
+ "./package.json": "./package.json"
31
+ },
32
+ "main": "./lib/node/index.js",
33
+ "types": "./lib/node/index.d.ts",
23
34
  "files": [
24
- "lib"
35
+ "lib",
36
+ "templates"
25
37
  ],
26
- "scripts": {
27
- "build": "tsc -b tsconfig.build.json",
28
- "clean": "rimraf lib *.tsbuildinfo",
29
- "copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
30
- },
31
38
  "dependencies": {
32
- "@vuepress/client": "2.0.0-beta.9",
33
- "@vuepress/core": "2.0.0-beta.9",
34
- "@vuepress/plugin-active-header-links": "2.0.0-beta.9",
35
- "@vuepress/plugin-back-to-top": "2.0.0-beta.9",
36
- "@vuepress/plugin-container": "2.0.0-beta.9",
37
- "@vuepress/plugin-git": "2.0.0-beta.9",
38
- "@vuepress/plugin-medium-zoom": "2.0.0-beta.9",
39
- "@vuepress/plugin-nprogress": "2.0.0-beta.9",
40
- "@vuepress/plugin-palette": "2.0.0-beta.9",
41
- "@vuepress/plugin-prismjs": "2.0.0-beta.9",
42
- "@vuepress/plugin-theme-data": "2.0.0-beta.9",
43
- "@vuepress/shared": "2.0.0-beta.7",
44
- "@vuepress/utils": "2.0.0-beta.8",
45
- "sass": "^1.32.8",
46
- "sass-loader": "^11.0.1",
47
- "vue": "^3.0.11",
48
- "vue-router": "^4.0.6"
39
+ "@vueuse/core": "^10.6.1",
40
+ "sass": "^1.69.5",
41
+ "vue": "^3.3.8",
42
+ "vue-router": "^4.2.5",
43
+ "@vuepress/core": "2.0.0-rc.0",
44
+ "@vuepress/client": "2.0.0-rc.0",
45
+ "@vuepress/plugin-active-header-links": "2.0.0-rc.0",
46
+ "@vuepress/plugin-container": "2.0.0-rc.0",
47
+ "@vuepress/plugin-external-link-icon": "2.0.0-rc.0",
48
+ "@vuepress/plugin-nprogress": "2.0.0-rc.0",
49
+ "@vuepress/plugin-back-to-top": "2.0.0-rc.0",
50
+ "@vuepress/plugin-medium-zoom": "2.0.0-rc.0",
51
+ "@vuepress/plugin-theme-data": "2.0.0-rc.0",
52
+ "@vuepress/plugin-git": "2.0.0-rc.0",
53
+ "@vuepress/plugin-palette": "2.0.0-rc.0",
54
+ "@vuepress/utils": "2.0.0-rc.0",
55
+ "@vuepress/shared": "2.0.0-rc.0",
56
+ "@vuepress/plugin-prismjs": "2.0.0-rc.0"
57
+ },
58
+ "peerDependencies": {
59
+ "sass-loader": "^13.3.2"
60
+ },
61
+ "peerDependenciesMeta": {
62
+ "sass-loader": {
63
+ "optional": true
64
+ }
49
65
  },
50
66
  "publishConfig": {
51
67
  "access": "public"
52
68
  },
53
- "gitHead": "edccb16372fabcf160d45ae6207a871e66c81974"
54
- }
69
+ "scripts": {
70
+ "build": "tsc -b tsconfig.build.json",
71
+ "clean": "rimraf lib *.tsbuildinfo",
72
+ "copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
73
+ }
74
+ }
@@ -0,0 +1,34 @@
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-styles-->
27
+ <!--vuepress-ssr-preload-->
28
+ <!--vuepress-ssr-prefetch-->
29
+ </head>
30
+ <body>
31
+ <div id="app"><!--vuepress-ssr-content--></div>
32
+ <!--vuepress-ssr-scripts-->
33
+ </body>
34
+ </html>