@vuepress/theme-default 2.0.0-rc.36 → 2.0.0-rc.38

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.
@@ -23,8 +23,8 @@ const features = computed(() => frontmatter.value.features ?? [])
23
23
  .vp-features {
24
24
  display: flex;
25
25
  flex-wrap: wrap;
26
- align-items: flex-start;
27
26
  place-content: stretch space-between;
27
+ align-items: flex-start;
28
28
 
29
29
  margin-top: 2.5rem;
30
30
  padding: 1.2rem 0;
@@ -160,7 +160,6 @@ const HomeHeroImage: FunctionalComponent = () => {
160
160
  display: inline-block;
161
161
 
162
162
  box-sizing: border-box;
163
-
164
163
  padding: 0.8rem 1.6rem;
165
164
  border-width: 2px;
166
165
  border-style: solid;
@@ -91,7 +91,6 @@ useUpdateDeviceStatus(
91
91
  z-index: 20;
92
92
 
93
93
  box-sizing: border-box;
94
-
95
94
  height: var(--navbar-height);
96
95
  padding: var(--navbar-padding-v) var(--navbar-padding-h);
97
96
  border-bottom: 1px solid var(--c-border);
@@ -117,7 +116,6 @@ useUpdateDeviceStatus(
117
116
  display: flex;
118
117
 
119
118
  box-sizing: border-box;
120
-
121
119
  height: var(--navbar-line-height);
122
120
  padding-left: var(--navbar-padding-h);
123
121
 
@@ -153,6 +153,7 @@ watch(
153
153
  display: none;
154
154
 
155
155
  overflow-y: auto;
156
+
156
157
  box-sizing: border-box;
157
158
 
158
159
  // Avoid height shake by clicking
@@ -30,8 +30,8 @@ defineSlots<{
30
30
  z-index: 10;
31
31
 
32
32
  overflow-y: auto;
33
- box-sizing: border-box;
34
33
 
34
+ box-sizing: border-box;
35
35
  width: var(--sidebar-width);
36
36
  margin: 0;
37
37
  border-right: 1px solid var(--c-border);
@@ -99,7 +99,6 @@ onBeforeUnmount(() => {
99
99
 
100
100
  &.vp-sidebar-heading {
101
101
  box-sizing: border-box;
102
-
103
102
  width: 100%;
104
103
  margin: 0;
105
104
  padding: 0.35rem 1.5rem 0.35rem 1.25rem;
@@ -124,7 +123,6 @@ onBeforeUnmount(() => {
124
123
  display: inline-block;
125
124
 
126
125
  box-sizing: border-box;
127
-
128
126
  width: 100%;
129
127
  margin: 0;
130
128
  padding: 0.35rem 1rem 0.35rem 2rem;
@@ -1,3 +1,3 @@
1
1
  import type { ComputedRef } from 'vue';
2
2
  import type { DefaultThemePageData } from '../../shared/index.js';
3
- export declare const useContributors: () => ComputedRef<null | Required<DefaultThemePageData['git']>['contributors']>;
3
+ export declare const useContributors: () => ComputedRef<null | Required<DefaultThemePageData["git"]>["contributors"]>;
@@ -49,7 +49,7 @@ export const useNavbarSelectLanguage = () => {
49
49
  // try to keep current hash and params across languages
50
50
  link: routePaths.value.some((item) => item === targetLocalePage)
51
51
  ? currentFullPath.replace(currentPath, targetLocalePage)
52
- : targetThemeLocale.home ?? targetLocalePath,
52
+ : (targetThemeLocale.home ?? targetLocalePath),
53
53
  };
54
54
  }),
55
55
  };
@@ -70,19 +70,19 @@ export const useRelatedLinks = () => {
70
70
  const prevConfig = resolveFromFrontmatterConfig(frontmatter.value.prev, route.path);
71
71
  return prevConfig === false
72
72
  ? null
73
- : prevConfig ??
73
+ : (prevConfig ??
74
74
  (themeLocale.value.prev === false
75
75
  ? null
76
- : resolveFromSidebarItems(sidebarItems.value, route.path, -1));
76
+ : resolveFromSidebarItems(sidebarItems.value, route.path, -1)));
77
77
  });
78
78
  const nextLink = computed(() => {
79
79
  const nextConfig = resolveFromFrontmatterConfig(frontmatter.value.next, route.path);
80
80
  return nextConfig === false
81
81
  ? null
82
- : nextConfig ??
82
+ : (nextConfig ??
83
83
  (themeLocale.value.next === false
84
84
  ? null
85
- : resolveFromSidebarItems(sidebarItems.value, route.path, 1));
85
+ : resolveFromSidebarItems(sidebarItems.value, route.path, 1)));
86
86
  });
87
87
  return {
88
88
  prevLink,
@@ -55,7 +55,7 @@ export const setupSidebarItems = () => {
55
55
  const headers = useHeaders();
56
56
  const sidebarConfig = computed(() => frontmatter.value.home
57
57
  ? false
58
- : frontmatter.value.sidebar ?? themeLocale.value.sidebar ?? 'heading');
58
+ : (frontmatter.value.sidebar ?? themeLocale.value.sidebar ?? 'heading'));
59
59
  const sidebarItems = computed(() => resolveSidebarItems(sidebarConfig.value, page.value, route.path, routeLocale.value, headers.value));
60
60
  provide(sidebarItemsSymbol, sidebarItems);
61
61
  };
@@ -1,5 +1,4 @@
1
- import type { ClientConfig } from 'vuepress/client';
2
1
  import '@vuepress/helper/normalize.css';
3
2
  import './styles/index.scss';
4
- declare const _default: ClientConfig;
3
+ declare const _default: import("vuepress/client").ClientConfig;
5
4
  export default _default;
@@ -13,7 +13,7 @@ const homeText = themeLocale.value.backToHome ?? 'Back to home'
13
13
  </script>
14
14
 
15
15
  <template>
16
- <div class="theme-container">
16
+ <div class="vp-theme-container">
17
17
  <main class="page">
18
18
  <div class="theme-default-content">
19
19
  <h1>404</h1>
@@ -25,3 +25,17 @@ const homeText = themeLocale.value.backToHome ?? 'Back to home'
25
25
  </main>
26
26
  </div>
27
27
  </template>
28
+
29
+ <style scoped lang="scss">
30
+ .vp-theme-container {
31
+ max-width: 740px;
32
+ margin: 0 auto;
33
+ padding: 2rem 2.5rem;
34
+ }
35
+
36
+ @media (max-width: 959px) {
37
+ .vp-theme-container {
38
+ padding: 2rem;
39
+ }
40
+ }
41
+ </style>
@@ -71,6 +71,10 @@ div[class*='language-'] {
71
71
  }
72
72
  }
73
73
 
74
+ &.line-numbers-mode .line.diff::before {
75
+ left: 4px;
76
+ }
77
+
74
78
  // notation focused lines
75
79
  // - `// [\!code focus]`
76
80
  // - `// [\!code focus:3]`
@@ -112,7 +112,6 @@ pre[class*='language-'] {
112
112
  display: block;
113
113
 
114
114
  box-sizing: border-box;
115
-
116
115
  width: fit-content;
117
116
  min-width: 100%;
118
117
  padding: 1.3rem 1.5rem;
@@ -177,6 +176,8 @@ div[class*='language-'] {
177
176
  }
178
177
 
179
178
  .line-numbers {
179
+ counter-reset: line-number;
180
+
180
181
  position: absolute;
181
182
  top: 0;
182
183
 
@@ -187,7 +188,6 @@ div[class*='language-'] {
187
188
 
188
189
  font-size: 0.875em;
189
190
  line-height: $line-height;
190
- counter-reset: line-number;
191
191
  text-align: center;
192
192
 
193
193
  .line-number {
@@ -1,4 +1,4 @@
1
- import { addViteOptimizeDepsExclude } from '@vuepress/helper';
1
+ import { addViteOptimizeDepsExclude, chainWebpack } from '@vuepress/helper';
2
2
  import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links';
3
3
  import { backToTopPlugin } from '@vuepress/plugin-back-to-top';
4
4
  import { copyCodePlugin } from '@vuepress/plugin-copy-code';
@@ -41,6 +41,19 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
41
41
  },
42
42
  clientConfigFile: path.resolve(__dirname, '../client/config.js'),
43
43
  extendsBundlerOptions: (bundlerOptions, app) => {
44
+ chainWebpack(bundlerOptions, app, (config) => {
45
+ config.module
46
+ .rule('scss')
47
+ .use('sass-loader')
48
+ .tap((options) => ({
49
+ api: 'modern-compiler',
50
+ ...options,
51
+ sassOptions: {
52
+ silenceDeprecations: ['mixed-decls'],
53
+ ...options.sassOptions,
54
+ },
55
+ }));
56
+ });
44
57
  addViteOptimizeDepsExclude(bundlerOptions, app, '@theme');
45
58
  },
46
59
  extendsPage: (page) => {
@@ -5,4 +5,4 @@ import type { DefaultThemeData } from '../../shared/index.js';
5
5
  *
6
6
  * For custom containers default title
7
7
  */
8
- export declare const resolveMarkdownContainerPluginOptions: (localeOptions: DefaultThemeData, type: 'tip' | 'warning' | 'danger') => MarkdownContainerPluginOptions;
8
+ export declare const resolveMarkdownContainerPluginOptions: (localeOptions: DefaultThemeData, type: "tip" | "warning" | "danger") => MarkdownContainerPluginOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/theme-default",
3
- "version": "2.0.0-rc.36",
3
+ "version": "2.0.0-rc.38",
4
4
  "description": "Default theme of VuePress",
5
5
  "keywords": [
6
6
  "vuepress-theme",
@@ -37,27 +37,27 @@
37
37
  "templates"
38
38
  ],
39
39
  "dependencies": {
40
- "@vuepress/helper": "2.0.0-rc.36",
41
- "@vuepress/plugin-active-header-links": "2.0.0-rc.36",
42
- "@vuepress/plugin-back-to-top": "2.0.0-rc.36",
43
- "@vuepress/plugin-copy-code": "2.0.0-rc.36",
44
- "@vuepress/plugin-git": "2.0.0-rc.36",
45
- "@vuepress/plugin-links-check": "2.0.0-rc.36",
46
- "@vuepress/plugin-markdown-container": "2.0.0-rc.34",
47
- "@vuepress/plugin-medium-zoom": "2.0.0-rc.36",
48
- "@vuepress/plugin-nprogress": "2.0.0-rc.36",
49
- "@vuepress/plugin-palette": "2.0.0-rc.34",
50
- "@vuepress/plugin-prismjs": "2.0.0-rc.36",
51
- "@vuepress/plugin-seo": "2.0.0-rc.36",
52
- "@vuepress/plugin-sitemap": "2.0.0-rc.36",
53
- "@vuepress/plugin-theme-data": "2.0.0-rc.36",
40
+ "@vuepress/helper": "2.0.0-rc.38",
41
+ "@vuepress/plugin-active-header-links": "2.0.0-rc.38",
42
+ "@vuepress/plugin-back-to-top": "2.0.0-rc.38",
43
+ "@vuepress/plugin-copy-code": "2.0.0-rc.38",
44
+ "@vuepress/plugin-git": "2.0.0-rc.38",
45
+ "@vuepress/plugin-links-check": "2.0.0-rc.38",
46
+ "@vuepress/plugin-markdown-container": "2.0.0-rc.37",
47
+ "@vuepress/plugin-medium-zoom": "2.0.0-rc.38",
48
+ "@vuepress/plugin-nprogress": "2.0.0-rc.38",
49
+ "@vuepress/plugin-palette": "2.0.0-rc.37",
50
+ "@vuepress/plugin-prismjs": "2.0.0-rc.37",
51
+ "@vuepress/plugin-seo": "2.0.0-rc.38",
52
+ "@vuepress/plugin-sitemap": "2.0.0-rc.38",
53
+ "@vuepress/plugin-theme-data": "2.0.0-rc.38",
54
54
  "@vueuse/core": "^10.11.0",
55
- "sass": "^1.77.6",
56
- "vue": "^3.4.29"
55
+ "sass": "^1.77.8",
56
+ "vue": "^3.4.31"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "sass-loader": "^14.0.0",
60
- "vuepress": "2.0.0-rc.13"
60
+ "vuepress": "2.0.0-rc.14"
61
61
  },
62
62
  "peerDependenciesMeta": {
63
63
  "sass-loader": {
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "7f283f7243f9f9b86a9621f6ebc00d8d335d5f94"
70
+ "gitHead": "4345344b92c788c8f0c4a78b2cd022bc31ef5108"
71
71
  }