feat(plugin-md-power): update @mdi/* deps to latest (#612)

This commit is contained in:
pengzhanbo 2025-06-02 02:57:51 +08:00 committed by GitHub
parent 3c2a34729e
commit 8f9eb1666f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 307 additions and 283 deletions

View File

@ -41,7 +41,7 @@ export const codeTabs: PluginWithOptions<CodeTabsOptions> = (md, options: CodeTa
tab(md, {
name: 'code-tabs',
tabsOpenRenderer: ({ active, data }, tokens, index, _, env) => {
openRender: ({ active, data }, tokens, index, _, env) => {
const { meta } = tokens[index]
const titles = data.map(({ title }) => md.renderInline(title, cleanMarkdownEnv(env)))
const tabsData = data.map((item, dataIndex) => {
@ -58,9 +58,9 @@ export const codeTabs: PluginWithOptions<CodeTabsOptions> = (md, options: CodeTa
return `<CodeTabs id="${index}" :data='${stringifyProp(tabsData)}'${active === -1 ? '' : ` :active="${active}"`}${meta.id ? ` tab-id="${meta.id as string}"` : ''}>${titlesContent}`
},
tabsCloseRenderer: () => `</CodeTabs>`,
closeRender: () => `</CodeTabs>`,
tabOpenRenderer: ({ index }, tokens, tokenIndex) => {
tabOpenRender: ({ index }, tokens, tokenIndex) => {
let foundFence = false
// Hide all elements excerpt the first fence
@ -82,6 +82,6 @@ export const codeTabs: PluginWithOptions<CodeTabsOptions> = (md, options: CodeTa
return `<template #tab${index}="{ value, isActive }">`
},
tabCloseRenderer: () => `</template>`,
tabCloseRender: () => `</template>`,
})
}

View File

@ -7,7 +7,7 @@ export const tabs: PluginSimple = (md) => {
tab(md, {
name: 'tabs',
tabsOpenRenderer: ({ active, data }, tokens, index, _, env) => {
openRender: ({ active, data }, tokens, index, _, env) => {
const { meta } = tokens[index]
const titles = data.map(({ title }) => md.renderInline(title, cleanMarkdownEnv(env)))
const tabsData = data.map((item, dataIndex) => {
@ -22,11 +22,11 @@ ${titles.map((title, titleIndex) =>
).join('')}`
},
tabsCloseRenderer: () => `</Tabs>`,
closeRender: () => `</Tabs>`,
tabOpenRenderer: ({ index }) =>
tabOpenRender: ({ index }) =>
`<template #tab${index}="{ value, isActive }">`,
tabCloseRenderer: () => `</template>`,
tabCloseRender: () => `</template>`,
})
}

558
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -69,13 +69,13 @@ catalogs:
'@clack/prompts': ^0.11.0
'@iconify/utils': ^2.3.0
'@iconify/vue': ^5.0.0
'@mdit/plugin-attrs': ^0.19.0
'@mdit/plugin-footnote': ^0.19.0
'@mdit/plugin-mark': ^0.19.0
'@mdit/plugin-sub': ^0.19.0
'@mdit/plugin-sup': ^0.19.0
'@mdit/plugin-tab': ^0.19.0
'@mdit/plugin-tasklist': ^0.19.0
'@mdit/plugin-attrs': ^0.21.0
'@mdit/plugin-footnote': ^0.21.0
'@mdit/plugin-mark': ^0.21.0
'@mdit/plugin-sub': ^0.21.0
'@mdit/plugin-sup': ^0.21.0
'@mdit/plugin-tab': ^0.21.0
'@mdit/plugin-tasklist': ^0.21.0
'@pengzhanbo/utils': ^2.1.0
'@vueuse/core': ^13.3.0
'@vueuse/integrations': ^13.3.0
@ -115,7 +115,7 @@ catalogs:
tm-grammars: ^1.23.24
tm-themes: ^1.10.6
unplugin: ^2.3.4
vue: ^3.5.15
vue: ^3.5.16
vuepress:
'@vuepress/bundler-vite': 2.0.0-rc.23
'@vuepress/helper': 2.0.0-rc.106