Skip to content

Commit

Permalink
chore(deps): 升级 vth 及依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
FuckDoctors committed Oct 10, 2024
1 parent 231a655 commit 1aab9d7
Show file tree
Hide file tree
Showing 27 changed files with 5,673 additions and 5,207 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# . "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@
"cSpell.words": [
"antfu",
"demi",
"docsearch",
"evernote",
"giscus",
"iconify",
"intlify",
"lazyload",
"mathjax",
"pinia",
"pnpm",
"qrcode",
"revealjs",
"sandpack",
"shiki",
"twoslash",
"unocss",
"unplugin",
Expand All @@ -15,7 +24,9 @@
"vitest",
"vnode",
"vueuse",
"waline",
"weakmap",
"weibo",
"Zhao",
"zhaobc"
],
Expand Down
18 changes: 9 additions & 9 deletions docs/.vuepress/client.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { defineClientConfig } from 'vuepress/client'

// import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import '@shikijs/vitepress-twoslash/style.css'
import TwoslashFloatingVue from './theme/components/twoslash/client'
import './theme/components/twoslash/style.css'

import AutoArticleListLayout from './theme/layouts/AutoArticleListLayout'
import AutoArticleList from './theme/components/AutoArticleList'
import Hanzi from './theme/components/hanzi/Hanzi.vue'
import Chazi from './theme/components/hanzi/Chazi.vue'
import FlippyCard from './theme/components/flippy-card/components/card.vue'
import HanziCard from './theme/components/hanzi/HanziCard.vue'
import Chazi from './theme/components/hanzi/Chazi.vue'

import Hanzi from './theme/components/hanzi/Hanzi.vue'
import HanziCard from './theme/components/hanzi/HanziCard.vue'
import PlaygroundIcon from './theme/components/icons/PlaygroundIcon'
import TwoslashFloatingVue from './theme/components/twoslash/client'
import AutoArticleListLayout from './theme/layouts/AutoArticleListLayout'
// import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import '@shikijs/vitepress-twoslash/style.css'

import './theme/components/twoslash/style.css'

// 为项目主页的特性添加闪光效果
import 'vuepress-theme-hope/presets/shinning-feature-panel.scss'
Expand Down
18 changes: 11 additions & 7 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import type { PluginOption } from 'vite'
import process from 'node:process'
import { defineUserConfig } from 'vuepress'
import { viteBundler } from '@vuepress/bundler-vite'
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
import { seoPlugin } from '@vuepress/plugin-seo'
import { linksCheckPlugin } from '@vuepress/plugin-links-check'
import { pwaPlugin } from '@vuepress/plugin-pwa'

import { revealJsPlugin } from '@vuepress/plugin-revealjs'
import { seoPlugin } from '@vuepress/plugin-seo'
import { sitemapPlugin } from '@vuepress/plugin-sitemap'

import { viteBundler } from '@vuepress/bundler-vite'
import type { PluginOption } from 'vite'
import { visualizer } from 'rollup-plugin-visualizer'
import { defineUserConfig } from 'vuepress'

import { docSearch, linksCheck, pwa, revealjs, seo } from './plugin-config'
import { themeOptions } from './theme.js'
import themeZhaobc from './theme/index'

import { docsearch, pwa, seo } from './plugin-config'

const base = (process.env.BASE as '/' | `/${string}/`) || '/'

const sizeCheck = !!process.env.SIZE_CHECK
Expand Down Expand Up @@ -85,12 +87,14 @@ export default defineUserConfig({
// }),

// DocSearch
docsearchPlugin(docsearch),
docsearchPlugin(docSearch),
seoPlugin(seo),
pwaPlugin(pwa),
sitemapPlugin({
hostname: 'www.zhaobc.site',
}),
revealJsPlugin(revealjs),
linksCheckPlugin(linksCheck),
],

bundler: viteBundler({
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/plugin-config/docsearch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { DocsearchPluginOptions } from '@vuepress/plugin-docsearch'
import type { DocSearchPluginOptions } from '@vuepress/plugin-docsearch'

export const docsearch: DocsearchPluginOptions = {
export const docSearch: DocSearchPluginOptions = {
// apiKey: '42aa919526e1dad9c0e214772fe71289',
// indexName: 'prod_zhaobc',
// appId: '7MMW9TO1EI',
Expand Down
6 changes: 4 additions & 2 deletions docs/.vuepress/plugin-config/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export * from './docsearch'
export * from './docSearch'
export * from './giscus'
export * from './linksCheck'
export * from './pwa'
export * from './revealjs'
export * from './seo'
export * from './giscus'
export * from './waline'
5 changes: 5 additions & 0 deletions docs/.vuepress/plugin-config/linksCheck.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { LinksCheckPluginOptions } from '@vuepress/plugin-links-check'

export const linksCheck: LinksCheckPluginOptions = {
build: true,
}
5 changes: 5 additions & 0 deletions docs/.vuepress/plugin-config/revealjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { RevealJsPluginOptions } from '@vuepress/plugin-revealjs'

export const revealjs: RevealJsPluginOptions = {
plugins: ['highlight', 'math', 'search', 'notes', 'zoom'],
}
10 changes: 5 additions & 5 deletions docs/.vuepress/styles/column-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
display: block;
height: 1px;
margin: 1rem;
border-bottom: 1px var(--border-color) solid;
transition: border-bottom-color var(--color-transition);
border-bottom: 1px var(--vp-c-border) solid;
transition: border-bottom-color var(--vp-t-color);

&::before {
content: '·';
Expand All @@ -31,13 +31,13 @@
transform: translate(-50%) translateY(-50%);
height: 1rem;
line-height: 1rem;
color: var(--text-color);
background: var(--bg-color);
color: var(--vp-c-text);
background: var(--vp-c-bg);
width: 2rem;
text-align: center;
transition:
color,
background var(--color-transition);
background var(--vp-t-color);
}
}

Expand Down
39 changes: 22 additions & 17 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import process from 'node:process'
import type { ThemeOptions } from 'vuepress-theme-hope'
import process from 'node:process'
import { hopeTheme } from 'vuepress-theme-hope'

// import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
import { transformerTwoslash } from './theme/components/twoslash/index'

import * as navbar from './navbar'
import * as sidebar from './sidebar'

import { waline } from './plugin-config'
import * as sidebar from './sidebar'

// import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
import { transformerTwoslash } from './theme/components/twoslash/index'

const hostname = process.env.HOSTNAME || 'https://www.zhaobc.site'

Expand Down Expand Up @@ -143,7 +143,6 @@ export const themeOptions: ThemeOptions = {
components: [
'CodePen',
'StackBlitz',
'Replit',
'SiteInfo',
'Share',
'VPCard',
Expand All @@ -168,23 +167,33 @@ export const themeOptions: ThemeOptions = {
// you can also use Waline
comment: waline,

markdownHint: true,

markdownImage: {
lazyload: true,
mark: true,
size: true,
},

markdownMath: {
type: 'mathjax',
},

markdownTab: {
tabs: true,
codeTabs: true,
},

mdEnhance: {
attrs: true,
gfm: true,
tabs: true,
codetabs: true,
vPre: true,
align: true,
sup: true,
sub: true,
footnote: true,
mark: true,
imgLazyload: true,
imgMark: true,
imgSize: true,
tasklist: true,
katex: true,
mathjax: true,
include: true,
// chart: true,
echarts: true,
Expand All @@ -195,10 +204,6 @@ export const themeOptions: ThemeOptions = {
presets: ['ts', 'vue', 'unocss'],
},
vuePlayground: true,
revealJs: {
plugins: ['highlight', 'math', 'search', 'notes', 'zoom'],
},
hint: true,
sandpack: true,
},

Expand Down
6 changes: 3 additions & 3 deletions docs/.vuepress/theme/components/AutoArticleList.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { type VNode, computed, defineComponent, h } from 'vue'

import BreadCrumb from '@theme-hope/components/BreadCrumb'

import MarkdownContent from '@theme-hope/components/MarkdownContent'
import { DropTransition } from '@theme-hope/components/transitions/index'
import ArticleList from '@theme-hope/modules/blog/components/ArticleList'
import { useArticles } from '@theme-hope/modules/blog/composables/index'
import { computed, defineComponent, h, type VNode } from 'vue'

import '../styles/auto-article-list.scss'
import { useRouter } from 'vue-router'
import '../styles/auto-article-list.scss'

// import { usePageData } from '@vuepress/client'

Expand Down
8 changes: 4 additions & 4 deletions docs/.vuepress/theme/components/hanzi/Hanzi.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup>
import { computed, onMounted, ref, shallowRef } from 'vue'
import { useResizeObserver } from '@vueuse/core'
import cnchar from 'cnchar'
import draw from 'cnchar-draw'
import idiom from 'cnchar-idiom'
import order from 'cnchar-order'
import radical from 'cnchar-radical'
import words from 'cnchar-words'
import voice from 'cnchar-voice'
import idiom from 'cnchar-idiom'
import words from 'cnchar-words'
import { computed, onMounted, ref, shallowRef } from 'vue'
import {
CARD_WIDTH,
Expand Down
8 changes: 4 additions & 4 deletions docs/.vuepress/theme/components/hanzi/Hanzi2.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup>
import { computed, onMounted, ref, shallowRef } from 'vue'
import cnchar from 'cnchar'
import draw from 'cnchar-draw'
import idiom from 'cnchar-idiom'
import order from 'cnchar-order'
import radical from 'cnchar-radical'
import words from 'cnchar-words'
import voice from 'cnchar-voice'
import idiom from 'cnchar-idiom'
import words from 'cnchar-words'
import { computed, onMounted, ref, shallowRef } from 'vue'
import { LANG, SPEAK_RATE } from './constants'
Expand Down
6 changes: 3 additions & 3 deletions docs/.vuepress/theme/components/hanzi/HanziCard.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script setup>
import { onMounted, ref, watchEffect } from 'vue'
import cnchar from 'cnchar'
import draw from 'cnchar-draw'
import { onMounted, ref, watchEffect } from 'vue'
import FlippyCard from '../flippy-card/components/card.vue'
import Hanzi2 from './Hanzi2.vue'
import { LANG } from './constants'
import Hanzi2 from './Hanzi2.vue'
import './hanzi-card.scss'
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/theme/components/hanzi/Zitie.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup>
import { onMounted, ref } from 'vue'
import cnchar from 'cnchar'
import { onMounted, ref } from 'vue'
import {
BORDER_COLOR,
LINE_COLOR,
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/theme/components/icons/LinkIcon.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { FunctionalComponent } from 'vue'
import { h } from 'vue'

import HopeIcon from '@theme-hope/components/HopeIcon'

import { h } from 'vue'

export interface LinkIconProps {
link?: string | undefined
target?: string | undefined
Expand Down
8 changes: 4 additions & 4 deletions docs/.vuepress/theme/components/twoslash/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable node/prefer-global/process */
import type { TransformerTwoslashOptions } from '@shikijs/twoslash/core'
import { createTransformerFactory } from '@shikijs/twoslash/core'
import type { VueSpecificOptions } from 'twoslash-vue'
import { createTwoslasher } from 'twoslash-vue'
import type { ShikiTransformer } from 'shiki'
import type { VueSpecificOptions } from 'twoslash-vue'
import type { TwoslashFloatingVueRendererOptions } from './renderer-floating-vue'
import { createTransformerFactory } from '@shikijs/twoslash/core'
import { removeTwoslashNotations } from 'twoslash'

import type { TwoslashFloatingVueRendererOptions } from './renderer-floating-vue'
import { createTwoslasher } from 'twoslash-vue'
import { rendererFloatingVue } from './renderer-floating-vue'

export * from './renderer-floating-vue'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defaultHoverInfoProcessor, rendererRich } from '@shikijs/twoslash'
import type { RendererRichOptions, TwoslashRenderer } from '@shikijs/twoslash'
import type { Element, ElementContent, Text } from 'hast'
import type { ShikiTransformerContextCommon } from 'shiki'
import { gfmFromMarkdown } from 'mdast-util-gfm'
import { defaultHoverInfoProcessor, rendererRich } from '@shikijs/twoslash'
import { fromMarkdown } from 'mdast-util-from-markdown'
import { gfmFromMarkdown } from 'mdast-util-gfm'
import { defaultHandlers, toHast } from 'mdast-util-to-hast'

export { defaultHoverInfoProcessor }
Expand Down
18 changes: 9 additions & 9 deletions docs/.vuepress/theme/components/twoslash/style.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
:root {
--twoslash-popup-bg: var(--vp-bg, inherit);
--twoslash-popup-color: var(--vp-c);
--twoslash-docs-color: var(--vp-c);
--twoslash-docs-font: var(--font-family);
--twoslash-code-font: var(--font-family-mono);
--twoslash-popup-bg: var(--vp-c-bg, inherit);
--twoslash-popup-color: var(--vp-c-text);
--twoslash-docs-color: var(--vp-c-text);
--twoslash-docs-font: var(--vp-font);
--twoslash-code-font: var(--vp-font-heading);
--twoslash-code-size: 1rem;
--twoslash-underline-color: #8888;
--twoslash-border-color: var(--vp-brc);
--twoslash-cursor-color: var(--vp-tc);
--twoslash-matched-color: var(--vp-tc);
--twoslash-unmatched-color: var(--vp-cl);
--twoslash-border-color: var(--vp-c-border);
--twoslash-cursor-color: var(--vp-c-text);
--twoslash-matched-color: var(--vp-c-text);
--twoslash-unmatched-color: var(--vp-c-text-mute);
}

.v-popper--theme-twoslash {
Expand Down
Loading

0 comments on commit 1aab9d7

Please sign in to comment.