@vuepress/theme-default 2.0.0-rc.102 → 2.0.0-rc.103

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.
@@ -1,8 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type {
3
- NonNullableSlotContent,
4
- SlotContent,
5
- } from '@vuepress/helper/client'
2
+ import type { RequiredSlot, Slot } from '@vuepress/helper/client'
6
3
  import type { AutoLinkConfig } from 'vuepress/client'
7
4
  import { AutoLink } from 'vuepress/client'
8
5
 
@@ -14,9 +11,9 @@ defineProps<{
14
11
  }>()
15
12
 
16
13
  defineSlots<{
17
- default?: (config: AutoLinkConfig) => NonNullableSlotContent
18
- before?: (config: AutoLinkConfig) => SlotContent
19
- after?: (config: AutoLinkConfig) => SlotContent
14
+ default?: RequiredSlot<AutoLinkConfig>
15
+ before?: Slot<AutoLinkConfig>
16
+ after?: Slot<AutoLinkConfig>
20
17
  }>()
21
18
  </script>
22
19
 
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { SingleSlotContent } from '@vuepress/helper/client'
2
+ import type { SingleSlot } from '@vuepress/helper/client'
3
3
  import '@vuepress/helper/transition/fade-in-down.css'
4
4
 
5
5
  defineEmits<{
@@ -7,7 +7,7 @@ defineEmits<{
7
7
  beforeLeave: []
8
8
  }>()
9
9
  defineSlots<{
10
- default: () => SingleSlotContent
10
+ default: SingleSlot
11
11
  }>()
12
12
  </script>
13
13
 
@@ -19,7 +19,7 @@ defineSlots<{
19
19
  <div vp-content>
20
20
  <slot name="content-top" />
21
21
 
22
- <Content />
22
+ <Content id="content" />
23
23
 
24
24
  <slot name="content-bottom" />
25
25
  </div>
@@ -1,23 +1,43 @@
1
1
  @use '../variables' as *;
2
2
 
3
- // code block additional styles
4
- div[class*='language-'] {
5
- margin: 0.75rem 0;
6
- transition:
7
- background-color var(--vp-t-color),
8
- color var(--vp-t-color);
9
-
3
+ #content {
10
4
  @media (max-width: $MQMobileNarrow) {
11
5
  --code-border-radius: 0;
6
+ --tab-border-radius: 0;
12
7
 
13
- margin: 0.75rem -1.5rem;
14
- }
8
+ // code block
9
+ > div[class*='language-'],
10
+ > .code-block-with-title > div[class*='language-'] {
11
+ margin-inline: -1.5rem;
12
+ }
13
+
14
+ // code block title bar
15
+ .code-block-title-bar {
16
+ margin-inline: -1.5rem;
17
+ }
18
+
19
+ // code tabs
20
+ > .vp-code-tabs {
21
+ .vp-code-tabs-nav {
22
+ margin-inline: -1.5rem;
23
+ border-radius: 0;
24
+ }
25
+
26
+ div[class*='language-'] {
27
+ margin-inline: -1.5rem;
28
+ }
29
+ }
30
+
31
+ // tabs
32
+ > .vp-tabs {
33
+ margin-inline: -1.5rem;
34
+ border-inline: none;
35
+ }
15
36
 
16
- // transitions for code notation highlighting
17
- .line {
18
- &.diff,
19
- &.highlighted {
20
- transition: background-color var(--vp-t-color);
37
+ // reveal.js
38
+ .vp-reveal {
39
+ width: calc(100% + 3rem);
40
+ margin: 0 -1.5rem;
21
41
  }
22
42
  }
23
43
  }
@@ -36,7 +36,7 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
36
36
  .readdirSync(path.resolve(__dirname, '../client/composables'))
37
37
  .filter((file) => file.endsWith('.js'))
38
38
  .map((file) => [
39
- `@theme/${file.substring(0, file.length - 3)}`,
39
+ `@theme/${file.slice(0, -3)}`,
40
40
  path.resolve(__dirname, '../client/composables', file),
41
41
  ])),
42
42
  // use alias to make all utils replaceable
@@ -44,7 +44,7 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
44
44
  .readdirSync(path.resolve(__dirname, '../client/utils'))
45
45
  .filter((file) => file.endsWith('.js'))
46
46
  .map((file) => [
47
- `@theme/${file.substring(0, file.length - 3)}`,
47
+ `@theme/${file.slice(0, -3)}`,
48
48
  path.resolve(__dirname, '../client/utils', file),
49
49
  ])),
50
50
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/theme-default",
3
- "version": "2.0.0-rc.102",
3
+ "version": "2.0.0-rc.103",
4
4
  "description": "Default theme of VuePress",
5
5
  "keywords": [
6
6
  "vuepress-theme",
@@ -42,21 +42,21 @@
42
42
  "templates"
43
43
  ],
44
44
  "dependencies": {
45
- "@vuepress/helper": "2.0.0-rc.102",
46
- "@vuepress/plugin-active-header-links": "2.0.0-rc.98",
47
- "@vuepress/plugin-back-to-top": "2.0.0-rc.102",
48
- "@vuepress/plugin-copy-code": "2.0.0-rc.102",
49
- "@vuepress/plugin-git": "2.0.0-rc.102",
50
- "@vuepress/plugin-links-check": "2.0.0-rc.102",
51
- "@vuepress/plugin-markdown-hint": "2.0.0-rc.102",
52
- "@vuepress/plugin-markdown-tab": "2.0.0-rc.102",
53
- "@vuepress/plugin-medium-zoom": "2.0.0-rc.102",
54
- "@vuepress/plugin-nprogress": "2.0.0-rc.102",
55
- "@vuepress/plugin-palette": "2.0.0-rc.102",
56
- "@vuepress/plugin-prismjs": "2.0.0-rc.102",
57
- "@vuepress/plugin-seo": "2.0.0-rc.102",
58
- "@vuepress/plugin-sitemap": "2.0.0-rc.102",
59
- "@vuepress/plugin-theme-data": "2.0.0-rc.102",
45
+ "@vuepress/helper": "2.0.0-rc.103",
46
+ "@vuepress/plugin-active-header-links": "2.0.0-rc.103",
47
+ "@vuepress/plugin-back-to-top": "2.0.0-rc.103",
48
+ "@vuepress/plugin-copy-code": "2.0.0-rc.103",
49
+ "@vuepress/plugin-git": "2.0.0-rc.103",
50
+ "@vuepress/plugin-links-check": "2.0.0-rc.103",
51
+ "@vuepress/plugin-markdown-hint": "2.0.0-rc.103",
52
+ "@vuepress/plugin-markdown-tab": "2.0.0-rc.103",
53
+ "@vuepress/plugin-medium-zoom": "2.0.0-rc.103",
54
+ "@vuepress/plugin-nprogress": "2.0.0-rc.103",
55
+ "@vuepress/plugin-palette": "2.0.0-rc.103",
56
+ "@vuepress/plugin-prismjs": "2.0.0-rc.103",
57
+ "@vuepress/plugin-seo": "2.0.0-rc.103",
58
+ "@vuepress/plugin-sitemap": "2.0.0-rc.103",
59
+ "@vuepress/plugin-theme-data": "2.0.0-rc.103",
60
60
  "@vueuse/core": "^13.1.0",
61
61
  "vue": "^3.5.13"
62
62
  },
@@ -64,7 +64,7 @@
64
64
  "sass": "^1.86.3",
65
65
  "sass-embedded": "^1.86.3",
66
66
  "sass-loader": "^16.0.5",
67
- "vuepress": "2.0.0-rc.22"
67
+ "vuepress": "2.0.0-rc.23"
68
68
  },
69
69
  "peerDependenciesMeta": {
70
70
  "sass": {
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "f5eea8cc78924696580c659e738d7f4b6409faee"
83
+ "gitHead": "b730bbcfea25d3b41390e137f086884149e2399e"
84
84
  }