Skip to content

Commit 69be15f

Browse files
committed
chore: update shiki
2 parents cbc1a70 + 321453f commit 69be15f

File tree

18 files changed

+342
-448
lines changed

18 files changed

+342
-448
lines changed

.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { defineConfigWithTheme } from 'vitepress'
44
import type { Config as ThemeConfig } from '@vue/theme'
55
import baseConfig from '@vue/theme/config'
66
import { headerPlugin } from './headerMdPlugin'
7-
import { transformerTwoslash } from 'vitepress-plugin-twoslash'
7+
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
88
// import { textAdPlugin } from './textAdMdPlugin'
99

1010
const nav: ThemeConfig['nav'] = [

.vitepress/inlined-scripts/restorePreference.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
restore('vue-docs-prefer-composition', 'prefer-composition', true)
99
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)
1010

11-
window.__VUE_BANNER_ID__ = 'herodevs-vue2-nes'
12-
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
11+
// window.__VUE_BANNER_ID__ = ''
12+
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
1313
})()

.vitepress/theme/components/Banner.vue

Lines changed: 19 additions & 336 deletions
Large diffs are not rendered by default.

.vitepress/theme/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import 'vitepress-plugin-twoslash/style.css'
1+
import '@shikijs/vitepress-twoslash/style.css'
22
import './styles/index.css'
33

44
import { h, App, Plugin } from 'vue'
55
import { VPTheme } from '@vue/theme'
6-
import twoslashFloatingVue from 'vitepress-plugin-twoslash/client'
6+
import twoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
77
import PreferenceSwitch from './components/PreferenceSwitch.vue'
88
import {
99
preferComposition,
@@ -12,14 +12,14 @@ import {
1212
} from './components/preferences'
1313
import SponsorsAside from './components/SponsorsAside.vue'
1414
import VueSchoolLink from './components/VueSchoolLink.vue'
15-
import Banner from './components/Banner.vue'
15+
// import Banner from './components/Banner.vue'
1616
// import TextAd from './components/TextAd.vue'
1717

1818
export default Object.assign({}, VPTheme, {
1919
Layout: () => {
2020
// @ts-ignore
2121
return h(VPTheme.Layout, null, {
22-
banner: () => h(Banner),
22+
// banner: () => h(Banner),
2323
'sidebar-top': () => h(PreferenceSwitch),
2424
'aside-mid': () => h(SponsorsAside)
2525
})

.vitepress/theme/styles/twoslash.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
.floating-vue-twoslash .twoslash-popup-container {
1+
:root {
2+
--twoslash-border-color: var(--vt-c-divider);
3+
--twoslash-unmatched-color: var(--vt-c-text-2);
4+
}
5+
6+
.twoslash-floating .twoslash-popup-container {
27
font-family: var(--vt-font-family-mono);
38
line-height: var(--vt-doc-code-line-height);
49
font-size: 14px;
510
color: white;
611
}
712

8-
.floating-vue-twoslash .twoslash-popup-docs {
9-
border-top: 1px solid var(--vt-c-divider);
13+
.twoslash-floating .twoslash-popup-docs {
1014
font-family: var(--vt-font-family-base) !important;
1115
font-size: 1em;
1216
}
1317

14-
.floating-vue-twoslash .twoslash-popup-docs-tag-name {
18+
.twoslash-floating .twoslash-popup-docs-tag-name {
1519
color: var(--vt-c-text-2) !important;
1620
}
1721

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@
1515
"dynamics.js": "^1.1.5",
1616
"floating-vue": "^5.2.0",
1717
"gsap": "^3.12.5",
18-
"vitepress": "1.0.0-rc.36",
18+
"vitepress": "1.0.0-rc.41",
1919
"vue": "^3.4.15"
2020
},
2121
"devDependencies": {
2222
"@types/markdown-it": "^13.0.7",
2323
"@types/node": "^20.11.5",
2424
"terser": "^5.27.0",
25-
"vitepress-plugin-twoslash": "^0.10.0-beta.8"
25+
"@shikijs/vitepress-twoslash": "^1.0.0-beta.6"
26+
},
27+
"resolutions": {
28+
"shiki": "1.0.0-beta.6",
29+
"@shikijs/core": "1.0.0-beta.6"
2630
},
2731
"pnpm": {
2832
"peerDependencyRules": {

0 commit comments

Comments
 (0)