mirror of https://github.com/YunYouJun/valaxy
chore: fix lint
This commit is contained in:
parent
0e8c3898b4
commit
984110ee4e
|
@ -1,7 +1,7 @@
|
|||
// https://vitepress.dev/guide/custom-theme
|
||||
import { h } from 'vue'
|
||||
import type { Theme } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
// https://vitepress.dev/guide/custom-theme
|
||||
import { h } from 'vue'
|
||||
import './style.css'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"typedoc": "typedoc --options ./typedoc.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typedoc": "^0.26.11",
|
||||
"typedoc": "^0.27.0",
|
||||
"typedoc-plugin-markdown": "^4.2.10",
|
||||
"typedoc-vitepress-theme": "^1.0.2",
|
||||
"vitepress": "^1.5.0"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import { useFrontmatter, usePostList } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const frontmatter = useFrontmatter()
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { capitalize, computed } from 'vue'
|
||||
import { useSiteConfig, useValaxyConfig } from 'valaxy'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import pkg from 'valaxy/package.json'
|
||||
import { capitalize, computed } from 'vue'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useThemeConfig } from '../composables'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import type { Post } from 'valaxy'
|
||||
import { usePostList } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
type?: string
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useLocale } from 'valaxy'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
const { toggleLocales } = useLocale()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { computed } from 'vue'
|
||||
import { useConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from '../types'
|
||||
import { useConfig } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* getThemeConfig
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { Plugin } from 'vite'
|
||||
import type { ResolvedValaxyOptions } from 'valaxy'
|
||||
import type { Plugin } from 'vite'
|
||||
import type { ThemeConfig } from '../types'
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { ThemeConfig } from './types'
|
||||
import { defineTheme } from 'valaxy'
|
||||
import { defaultThemeConfig, generateSafelist, themePlugin } from './node'
|
||||
import type { ThemeConfig } from './types'
|
||||
|
||||
export default defineTheme<ThemeConfig>((options) => {
|
||||
return {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { UserThemeConfig } from 'valaxy-theme-yun'
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
|
||||
// add icons what you will need
|
||||
const safelist = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { formatDate } from 'valaxy'
|
||||
import type { FormatOptionsWithTZ } from 'date-fns-tz'
|
||||
import { formatDate } from 'valaxy'
|
||||
|
||||
defineProps<{ date?: string | number | Date, format?: string, timezone?: string, options?: FormatOptionsWithTZ }>()
|
||||
</script>
|
||||
|
|
|
@ -15,8 +15,8 @@ ffmpeg -i input.avi -b:v 64k -bufsize 64k output.mp4
|
|||
```
|
||||
|
||||
```ts
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
|
||||
const safelist = [
|
||||
'i-ri-home-line',
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
|
||||
import { addonAlgolia } from 'valaxy-addon-algolia'
|
||||
import { addonBangumi } from 'valaxy-addon-bangumi'
|
||||
import { addonComponents } from 'valaxy-addon-components'
|
||||
import { addonLightGallery } from 'valaxy-addon-lightgallery'
|
||||
import { addonTest } from 'valaxy-addon-test'
|
||||
import { addonWaline } from 'valaxy-addon-waline'
|
||||
import { addonTwikoo } from 'valaxy-addon-twikoo'
|
||||
import { addonWaline } from 'valaxy-addon-waline'
|
||||
|
||||
// import { addonMeting } from 'valaxy-addon-meting'
|
||||
|
||||
|
@ -69,7 +69,7 @@ export default defineValaxyConfig<ThemeConfig>({
|
|||
// We use `[!!code` in demo to prevent transformation, here we revert it back.
|
||||
{
|
||||
postprocess(code) {
|
||||
return code.replace(/\[\!\!code/g, '[!code')
|
||||
return code.replace(/\[!!code/g, '[!code')
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -42,8 +42,8 @@ pnpm create valaxy
|
|||
> 请参考 [生命周期钩子](/guide/custom/hooks) 了解更多。
|
||||
|
||||
```ts {11-14}
|
||||
import { defineValaxyAddon } from 'valaxy'
|
||||
import consola from 'consola'
|
||||
import { defineValaxyAddon } from 'valaxy'
|
||||
import pkg from '../package.json'
|
||||
|
||||
export const addonTest = defineValaxyAddon(options => ({
|
||||
|
|
|
@ -30,8 +30,8 @@ Rendering result
|
|||
:::
|
||||
|
||||
```ts
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
|
||||
const safelist = [
|
||||
'i-ri-home-line',
|
||||
|
|
|
@ -24,9 +24,9 @@ So you can use it like this:
|
|||
:::
|
||||
|
||||
```ts
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
// valaxy.config.ts
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
import { addonComponents } from 'valaxy-addon-components'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
|
|
|
@ -37,9 +37,9 @@ For example:
|
|||
:::
|
||||
|
||||
```ts
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
// valaxy.config.ts
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
import { addonComponents } from 'valaxy-addon-components'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
|
|
|
@ -227,8 +227,8 @@ export default defineAppSetup((ctx) => {
|
|||
- 新建 `setup/gtag.ts`:
|
||||
|
||||
```ts
|
||||
import VueGtag, { trackRouter } from 'vue-gtag-next'
|
||||
import type { UserModule } from 'valaxy'
|
||||
import VueGtag, { trackRouter } from 'vue-gtag-next'
|
||||
|
||||
export const install: UserModule = ({ isClient, app, router }) => {
|
||||
if (isClient) {
|
||||
|
@ -266,8 +266,8 @@ export default defineAppSetup((ctx) => {
|
|||
- Create `setup/gtag.ts`
|
||||
|
||||
```ts
|
||||
import VueGtag, { trackRouter } from 'vue-gtag-next'
|
||||
import type { UserModule } from 'valaxy'
|
||||
import VueGtag, { trackRouter } from 'vue-gtag-next'
|
||||
|
||||
export const install: UserModule = ({ isClient, app, router }) => {
|
||||
if (isClient) {
|
||||
|
|
|
@ -14,8 +14,8 @@ Valaxy 兼容 Vite/Vue 插件,你可以参考以下示例进行使用。
|
|||
在 `vite.config.ts` 中添加以下配置:
|
||||
|
||||
```ts
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
export default defineValaxyConfig<ThemeConfig>({
|
||||
|
@ -57,9 +57,9 @@ Valaxy 默认集成了 [`@vitejs/plugin-vue`](https://github.com/vitejs/vite-plu
|
|||
譬如使用 Element Plus,你可以在 `setup/main.ts` 中添加以下配置:
|
||||
|
||||
```ts
|
||||
import { defineAppSetup } from 'valaxy'
|
||||
|
||||
import ElementPlus from 'element-plus'
|
||||
|
||||
import { defineAppSetup } from 'valaxy'
|
||||
import 'element-plus/lib/theme-chalk/index.css'
|
||||
|
||||
export default defineAppSetup(({ app }) => {
|
||||
|
|
|
@ -79,8 +79,8 @@ Config Vite Vue-i18n plugin [@intlify/unplugin-vue-i18n](https://github.com/intl
|
|||
|
||||
```ts
|
||||
import path from 'node:path'
|
||||
import { defineConfig } from 'vite'
|
||||
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
|
@ -122,17 +122,17 @@ and initialized in the main entry file (e.g. `main.ts`).
|
|||
:::
|
||||
|
||||
```ts
|
||||
import { createI18n } from 'vue-i18n'
|
||||
|
||||
// import { createApp } from 'vue'
|
||||
// import App from './App.vue'
|
||||
|
||||
/*
|
||||
* All i18n resources specified in the plugin `include` option can be loaded
|
||||
* at once using the import syntax
|
||||
*/
|
||||
import messages from '@intlify/unplugin-vue-i18n/messages'
|
||||
|
||||
// import { createApp } from 'vue'
|
||||
// import App from './App.vue'
|
||||
|
||||
import { createI18n } from 'vue-i18n'
|
||||
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
locale: 'en',
|
||||
|
|
|
@ -354,10 +354,10 @@ const themeConfig = useThemeConfig()
|
|||
你可以提供一个主题的 `useThemeConfig` 函数,以便自己/用户获得带有类型约束的配置。
|
||||
|
||||
```ts
|
||||
// composables/config.ts
|
||||
import { useValaxyConfig } from 'valaxy'
|
||||
// custom your theme type
|
||||
import type { YunTheme } from '../types'
|
||||
// composables/config.ts
|
||||
import { useValaxyConfig } from 'valaxy'
|
||||
/**
|
||||
* getThemeConfig
|
||||
*/
|
||||
|
@ -552,7 +552,48 @@ Valaxy 决定通过插件中心化地提供各类封装好的评论组件和辅
|
|||
|
||||
> 集成参见 [valaxy-addon-waline](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy-addon-waline/README.md)。
|
||||
|
||||
## FAQ
|
||||
## 性能优化 {lang="zh-CN"}
|
||||
|
||||
## Performance Optimization {lang="en"}
|
||||
|
||||
### 添加依赖预构建 `optimizeDeps` {lang="zh-CN"}
|
||||
|
||||
### Add Dep Pre-bundling `optimizeDeps` {lang="en"}
|
||||
|
||||
::: zh-CN
|
||||
|
||||
- [原因|依赖预构建](https://cn.vite.dev/guide/dep-pre-bundling.html#the-why)
|
||||
|
||||
为了提高后续页面的加载性能,Vite 将那些具有许多内部模块的 ESM 依赖项转换为单个模块。
|
||||
如果你的主题依赖了一些大型的 ESM 包,你可以通过添加 `optimizeDeps` 选项来预构建这些依赖项。
|
||||
|
||||
> `date-fns` 已被默认预构建,您无需再次添加。
|
||||
|
||||
:::
|
||||
|
||||
::: en
|
||||
|
||||
- [Why|Dep Pre-bundling](https://vitejs.dev/guide/dep-pre-bundling.html#the-why)
|
||||
|
||||
To improve the loading performance of subsequent pages, Vite bundles ESM dependencies with many internal modules into a single module.
|
||||
If your theme depends on some large ESM packages, you can pre-build these dependencies by adding the `optimizeDeps` option.
|
||||
|
||||
> `date-fns` has been pre-built by default, you don't need to add it again.
|
||||
|
||||
:::
|
||||
|
||||
```ts
|
||||
// valaxy.config.ts
|
||||
import { defineTheme } from 'valaxy'
|
||||
|
||||
export default defineTheme({
|
||||
vite: {
|
||||
optimizeDeps: {
|
||||
include: ['lodash-es'],
|
||||
},
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### 提醒特殊需求的用户安装第三方插件
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { PressTheme } from 'valaxy-theme-press'
|
||||
import process from 'node:process'
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { PressTheme } from 'valaxy-theme-press'
|
||||
import { addonAlgolia } from 'valaxy-addon-algolia'
|
||||
import { addonComponents } from 'valaxy-addon-components'
|
||||
import { addonGitLog } from 'valaxy-addon-git-log'
|
||||
|
@ -202,7 +202,7 @@ export default defineValaxyConfig<PressTheme.Config>({
|
|||
// We use `[!!code` in demo to prevent transformation, here we revert it back.
|
||||
{
|
||||
postprocess(code) {
|
||||
return code.replace(/\[\!\!code/g, '[!code')
|
||||
return code.replace(/\[!!code/g, '[!code')
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -1,18 +1,33 @@
|
|||
import antfu from '@antfu/eslint-config'
|
||||
|
||||
export default antfu({
|
||||
ignores: [
|
||||
'cache',
|
||||
'dist',
|
||||
'public',
|
||||
'packages/valaxy/index.d.ts',
|
||||
'packages/valaxy/client.d.ts',
|
||||
// generated
|
||||
'api/typedoc',
|
||||
],
|
||||
}, {
|
||||
files: ['**/*.md'],
|
||||
rules: {
|
||||
'style/no-trailing-spaces': 'off',
|
||||
export default antfu(
|
||||
{
|
||||
ignores: [
|
||||
'cache',
|
||||
'dist',
|
||||
'public',
|
||||
'packages/valaxy/index.d.ts',
|
||||
'packages/valaxy/client.d.ts',
|
||||
// generated
|
||||
'api/typedoc',
|
||||
],
|
||||
rules: {
|
||||
'no-dupe-keys': 'warn',
|
||||
},
|
||||
},
|
||||
})
|
||||
{
|
||||
files: ['**/*.md'],
|
||||
rules: {
|
||||
'style/no-trailing-spaces': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
rules: {
|
||||
'regexp/no-super-linear-backtracking': 'warn',
|
||||
'regexp/no-unused-capturing-group': 'warn',
|
||||
'regexp/no-dupe-disjunctions': 'warn',
|
||||
'regexp/optimal-quantifier-concatenation': 'warn',
|
||||
},
|
||||
},
|
||||
)
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
"valaxy-theme-yun": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "2.17.0",
|
||||
"@antfu/eslint-config": "^3.10.0",
|
||||
"@iconify-json/logos": "^1.2.3",
|
||||
"@iconify-json/vscode-icons": "^1.2.2",
|
||||
"@microsoft/api-extractor": "^7.48.0",
|
||||
|
|
|
@ -102,8 +102,9 @@ export function serializeHeader(h: Element): string {
|
|||
if (
|
||||
(node as Element).classList.contains('VABadge')
|
||||
|| (node as Element).classList.contains('header-anchor')
|
||||
)
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
ret += node.textContent
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable no-console */
|
||||
import prompts from 'prompts'
|
||||
import { execa } from 'execa'
|
||||
import { blue, bold, cyan, dim, gray, green, yellow } from 'kolorist'
|
||||
import prompts from 'prompts'
|
||||
|
||||
const starterTheme = {
|
||||
name: 'starter',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable no-console */
|
||||
import process from 'node:process'
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import process from 'node:process'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { execa } from 'execa'
|
||||
|
||||
|
@ -10,8 +10,8 @@ import { blue, bold, cyan, dim, green, red, reset } from 'kolorist'
|
|||
import minimist from 'minimist'
|
||||
import prompts from 'prompts'
|
||||
import { version } from '../package.json'
|
||||
import { renameFiles, TEMPLATE_CHOICES, TEMPLATES } from './config'
|
||||
import { copy, emptyDir, formatTargetDir, isEmpty, isValidPackageName, pkgFromUserAgent, toValidPackageName } from './utils'
|
||||
import { TEMPLATES, TEMPLATE_CHOICES, renameFiles } from './config'
|
||||
|
||||
const argv = minimist(process.argv.slice(2))
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { UserThemeConfig } from 'valaxy-theme-yun'
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
|
||||
// add icons what you will need
|
||||
const safelist = [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { initDevtoolsClient } from './utils'
|
||||
import VDHeader from './components/VDHeader.vue'
|
||||
import { initDevtoolsClient } from './utils'
|
||||
|
||||
onMounted(() => {
|
||||
initDevtoolsClient()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref, toRaw } from 'vue'
|
||||
import type { PostFrontMatter } from 'valaxy'
|
||||
|
||||
import axios from 'axios'
|
||||
|
||||
import consola from 'consola'
|
||||
import { ref, toRaw } from 'vue'
|
||||
import { pageData } from '../composables/app'
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { getWindowProperty, openInEditor } from '../utils'
|
||||
import { frontmatter } from '../composables/app'
|
||||
import { getWindowProperty, openInEditor } from '../utils'
|
||||
|
||||
function launchEditor() {
|
||||
openInEditor({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { getGlobalValaxyProperty } from '../utils'
|
||||
import { activePath, devtoolsRouter } from '../composables/app'
|
||||
import { getGlobalValaxyProperty } from '../utils'
|
||||
|
||||
const postList = ref()
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import type { PageData, PostFrontMatter } from 'valaxy'
|
||||
import { ref } from 'vue'
|
||||
|
||||
import type { Router } from 'vue-router'
|
||||
|
||||
import { ref } from 'vue'
|
||||
|
||||
export const devtoolsRouter = ref<Router>()
|
||||
export const activePath = ref('')
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { Pane, Splitpanes } from 'splitpanes'
|
||||
import axios from 'axios'
|
||||
import { Pane, Splitpanes } from 'splitpanes'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { getGlobalValaxyProperty } from '../utils'
|
||||
|
||||
interface frontmatter {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export * from './init'
|
||||
export * from './api'
|
||||
export * from './get'
|
||||
export * from './init'
|
||||
|
||||
export const isStaticMode = document.body.getAttribute('data-valaxy-devtools-mode') === 'BUILD'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { nextTick, onMounted } from 'vue'
|
||||
import type { Router } from 'vue-router'
|
||||
import { nextTick, onMounted } from 'vue'
|
||||
import { activePath, devtoolsRouter, frontmatter, pageData } from '../composables/app'
|
||||
import { getWindowProperty } from './get'
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { join, resolve } from 'node:path'
|
||||
import { defineConfig } from 'vite'
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import VueRouter from 'unplugin-vue-router/vite'
|
||||
import VueComponents from 'unplugin-vue-components/vite'
|
||||
import Unocss from 'unocss/vite'
|
||||
import { componentsDir } from '@advjs/gui/node'
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import Unocss from 'unocss/vite'
|
||||
import VueComponents from 'unplugin-vue-components/vite'
|
||||
import VueRouter from 'unplugin-vue-router/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import { unoConfig } from '../../../../uno.config'
|
||||
|
||||
export default defineConfig({
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { ResolvedConfig, ViteDevServer } from 'vite'
|
||||
import bodyParser from 'body-parser'
|
||||
|
||||
import fs from 'fs-extra'
|
||||
import matter from 'gray-matter'
|
||||
import { JSON_SCHEMA } from 'js-yaml'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const prefix = '/valaxy-devtools-api'
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { Plugin, ResolvedConfig, ViteDevServer } from 'vite'
|
||||
import type { ValaxyDevtoolsOptions } from './types'
|
||||
import { createProxyMiddleware } from 'http-proxy-middleware'
|
||||
import c from 'picocolors'
|
||||
import sirv from 'sirv'
|
||||
import { createProxyMiddleware } from 'http-proxy-middleware'
|
||||
import { DIR_CLIENT } from '../dir'
|
||||
import type { ValaxyDevtoolsOptions } from './types'
|
||||
import { registerApi } from './api'
|
||||
|
||||
const NAME = 'valaxy:devtools'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { computed, ref } from 'vue'
|
||||
import { useSiteConfig } from 'valaxy'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
/**
|
||||
* init algolia watch
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { computed } from 'vue'
|
||||
import type { ValaxyAddon } from 'valaxy'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import type { AlgoliaSearchOptions } from '../types'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
import pkg from '../package.json'
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import '@docsearch/css'
|
||||
import docsearch from '@docsearch/js'
|
||||
import type { DocSearchHit } from '@docsearch/react/dist/esm/types'
|
||||
import { onMounted } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { AlgoliaSearchOptions } from '../types'
|
||||
import docsearch from '@docsearch/js'
|
||||
import { onMounted } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useAddonAlgoliaConfig } from '../client'
|
||||
import '@docsearch/css'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export * from './client'
|
||||
export * from './types'
|
||||
export * from './node'
|
||||
export * from './types'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineValaxyAddon } from 'valaxy'
|
||||
import type { AlgoliaSearchOptions } from '../types'
|
||||
import { defineValaxyAddon } from 'valaxy'
|
||||
|
||||
export const name = 'valaxy-addon-algolia'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { computed } from 'vue'
|
||||
import type { ValaxyAddon } from 'valaxy'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import type { BangumiOptions } from '../types'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* get addon config
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { isClient } from '@vueuse/core'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useAddonBangumi } from '../client'
|
||||
|
||||
const bangumiRef = ref<HTMLElement>()
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export * from './client'
|
||||
export * from './types'
|
||||
export * from './node'
|
||||
export * from './types'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { BangumiOptions } from '../types'
|
||||
import { defineValaxyAddon } from 'valaxy'
|
||||
import pkg from '../package.json'
|
||||
import type { BangumiOptions } from '../types'
|
||||
|
||||
export const addonBangumi = defineValaxyAddon<BangumiOptions>(options => ({
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { differenceInSeconds } from 'date-fns/differenceInSeconds'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { differenceInSeconds } from 'date-fns/differenceInSeconds'
|
||||
|
||||
const props = defineProps<{
|
||||
startTime: string
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { promises as fs } from 'node:fs'
|
||||
import type { ComponentResolver } from 'unplugin-vue-components'
|
||||
import { promises as fs } from 'node:fs'
|
||||
import { resolveModule } from 'local-pkg'
|
||||
|
||||
export interface ValaxyThemesResolverOptions {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export * from './node'
|
||||
export * from './core/resolvers'
|
||||
export * from './node'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { onMounted } from 'vue'
|
||||
import type { MetingOptions } from '../node/index'
|
||||
import { animationIn, autoHidden, handleOptions, useAPlayerMiniSwitcherEventListener } from './utils'
|
||||
import { onMounted } from 'vue'
|
||||
import { setupHiddenLyricHidingObserver } from './observer'
|
||||
import { animationIn, autoHidden, handleOptions, useAPlayerMiniSwitcherEventListener } from './utils'
|
||||
|
||||
export enum Hook {
|
||||
metingInit = 'metingInit',
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { useScriptTag } from '@vueuse/core'
|
||||
import { useHead } from '@unhead/vue'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { useScriptTag } from '@vueuse/core'
|
||||
import { useFrontmatter, useSiteConfig } from 'valaxy'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { onMetingInit } from './hook'
|
||||
import { useMetingLoadObserver } from './observer'
|
||||
import { useAddonMeting } from './options'
|
||||
import { onMetingInit } from './hook'
|
||||
|
||||
/**
|
||||
* use MetingJS and Aplayer
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { onMounted, onUnmounted } from 'vue'
|
||||
import type { MetingOptions } from '../node/index'
|
||||
import { onMounted, onUnmounted } from 'vue'
|
||||
import { onMetingLoad, onMetingLoadBefore } from './hook'
|
||||
|
||||
export function setupHiddenLyricHidingObserver() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { computed } from 'vue'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import type { MetingOptions } from '../node/index'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* get addon config
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { useEventListener } from '@vueuse/core'
|
||||
import type { MetingOptions } from '../node/index'
|
||||
import { useEventListener } from '@vueuse/core'
|
||||
import { Hook } from './hook'
|
||||
|
||||
type Rules = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineValaxyAddon } from 'valaxy'
|
||||
import consola from 'consola'
|
||||
import { defineValaxyAddon } from 'valaxy'
|
||||
import pkg from '../package.json'
|
||||
|
||||
export const addonTest = defineValaxyAddon(options => ({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { computed } from 'vue'
|
||||
import type { ValaxyAddon } from 'valaxy'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import type { TwikooOptions } from '../types'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* get addon config
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { isClient, useScriptTag } from '@vueuse/core'
|
||||
import type { ComputedRef } from 'vue'
|
||||
import type { TwikooOptions } from '../types'
|
||||
import { isClient, useScriptTag } from '@vueuse/core'
|
||||
import { useSiteConfig } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useSiteConfig } from 'valaxy'
|
||||
import type { TwikooOptions } from '../types'
|
||||
import { useAddonTwikoo } from './options'
|
||||
|
||||
declare global {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export * from './client'
|
||||
export * from './types'
|
||||
export * from './node'
|
||||
export * from './types'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineValaxyAddon } from 'valaxy'
|
||||
import type { TwikooOptions } from '../types'
|
||||
import { defineValaxyAddon } from 'valaxy'
|
||||
|
||||
export const name = 'valaxy-addon-twikoo'
|
||||
export const addonTwikoo = defineValaxyAddon<TwikooOptions>(options => ({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { computed } from 'vue'
|
||||
import type { ValaxyAddon } from 'valaxy'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import type { WalineOptions } from '../types'
|
||||
import { useRuntimeConfig } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* get addon config
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<script lang="ts" setup>
|
||||
import type { WalineOptions } from '../types'
|
||||
import { commentCount, pageviewCount } from '@waline/client'
|
||||
// @ts-expect-error vue waline component type
|
||||
import { Waline } from '@waline/client/component'
|
||||
import { useAppStore } from 'valaxy'
|
||||
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
// @ts-expect-error vue waline component type
|
||||
import { Waline } from '@waline/client/component'
|
||||
import { commentCount, pageviewCount } from '@waline/client'
|
||||
import { getEmojis } from '../utils'
|
||||
|
||||
import '@waline/client/style'
|
||||
import type { WalineOptions } from '../types'
|
||||
|
||||
const props = defineProps<{
|
||||
options: WalineOptions
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export * from './client'
|
||||
export * from './types'
|
||||
export * from './node'
|
||||
export * from './types'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineValaxyAddon } from 'valaxy'
|
||||
import type { WalineOptions } from '../types'
|
||||
import { defineValaxyAddon } from 'valaxy'
|
||||
|
||||
export const addonWaline = defineValaxyAddon<WalineOptions>(options => ({
|
||||
name: 'valaxy-addon-waline',
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export * from './config'
|
||||
|
||||
export * from '../composables'
|
||||
|
||||
export * from './config'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useAddonAlgolia } from 'valaxy-addon-algolia'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import { useFrontmatter, useSiteStore } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { getLocaleTitle } from '../utils'
|
||||
|
||||
const frontmatter = useFrontmatter()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import type { Category, Post } from 'valaxy'
|
||||
import { isCategoryList } from 'valaxy'
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref, watchEffect } from 'vue'
|
||||
import { useData } from 'valaxy'
|
||||
import { computed, onMounted, ref, watchEffect } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const data = useData()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { Feature } from '../types'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
defineProps<{
|
||||
feature: Feature
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import type { Feature } from '../types'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
features: Feature[]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import { useOutline, useSidebar } from 'valaxy'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
defineProps<{
|
||||
open: boolean
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { nextTick, ref } from 'vue'
|
||||
import type { MenuItem } from 'valaxy'
|
||||
import { onContentUpdated } from 'valaxy'
|
||||
import { nextTick, ref } from 'vue'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { computed, provide } from 'vue'
|
||||
import { useWindowScroll } from '@vueuse/core'
|
||||
import { useSidebar } from 'valaxy'
|
||||
import { computed, provide } from 'vue'
|
||||
import { useNav } from '../composables/nav'
|
||||
|
||||
const { y } = useWindowScroll()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import type { NavItemGroup } from '../types'
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { NavItemGroup } from '../types'
|
||||
|
||||
defineProps<{
|
||||
item: NavItemGroup
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { NavItemLink } from '../types'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
defineProps<{
|
||||
item: NavItemLink
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { isClient, useScrollLock } from '@vueuse/core'
|
||||
import { ref } from 'vue'
|
||||
|
||||
defineProps<{
|
||||
open: boolean
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import {
|
||||
useActiveAnchor,
|
||||
useOutline,
|
||||
} from 'valaxy'
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import type { Post } from 'valaxy'
|
||||
import { useSiteStore } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
type?: string
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { removeItemFromCategory, useCategories, usePageList, useSidebar } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
import { useThemeConfig } from '../composables'
|
||||
|
||||
defineProps<{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import type { DefaultTheme } from 'vitepress/theme'
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useSidebarControl } from '../composables/sidebar'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useLocale } from 'valaxy'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
const { toggleLocales } = useLocale()
|
||||
|
|
|
@ -4,8 +4,8 @@ import { onClickHref, onContentUpdated, scrollTo, useFrontmatter, useLayout, use
|
|||
import { computed, nextTick } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { getLocaleTitle } from '../utils'
|
||||
import { targetPadding } from '../client'
|
||||
import { getLocaleTitle } from '../utils'
|
||||
|
||||
defineProps<{
|
||||
frontmatter: Post
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { computed } from 'vue'
|
||||
import { useConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from '../types'
|
||||
import { useConfig } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* getThemeConfig
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import { isClient } from '@vueuse/core'
|
||||
import type { DefaultTheme } from 'vitepress/theme'
|
||||
import type { PressTheme } from '../types'
|
||||
import { isClient } from '@vueuse/core'
|
||||
|
||||
import {
|
||||
type ComputedRef,
|
||||
type Ref,
|
||||
computed,
|
||||
type ComputedRef,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
type Ref,
|
||||
ref,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
} from 'vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
import type { PressTheme } from '../types'
|
||||
|
||||
export interface SidebarControl {
|
||||
collapsed: Ref<boolean>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { acceptHMRUpdate, defineStore } from 'pinia'
|
||||
import { useToggle } from '@vueuse/core'
|
||||
import { acceptHMRUpdate, defineStore } from 'pinia'
|
||||
|
||||
export const usePressAppStore = defineStore('press-app', () => {
|
||||
// 右侧边栏
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import type { ResolvedValaxyOptions } from 'valaxy'
|
||||
import { defineTheme } from 'valaxy'
|
||||
import type { Plugin } from 'vite'
|
||||
import { defaultThemeConfig } from './config'
|
||||
import type { ThemeConfig } from './types'
|
||||
import { defineTheme } from 'valaxy'
|
||||
import { defaultThemeConfig } from './config'
|
||||
|
||||
function ThemeVitePlugin(options: ResolvedValaxyOptions<ThemeConfig>): Plugin {
|
||||
const themeConfig = options.config.themeConfig!
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, nextTick } from 'vue'
|
||||
import type { PageData, Post } from 'valaxy'
|
||||
import { onClickHref, onContentUpdated, scrollTo, usePostTitle, useSiteConfig } from 'valaxy'
|
||||
import type { StyleValue } from 'vue'
|
||||
import { onClickHref, onContentUpdated, scrollTo, usePostTitle, useSiteConfig } from 'valaxy'
|
||||
import { computed, nextTick } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { usePostProperty } from '../composables'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useFrontmatter } from 'valaxy'
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useYunAppStore } from '../stores'
|
||||
|
||||
const fm = useFrontmatter()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { useBackToTop } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const { show, percentage, backToTop } = useBackToTop({ offset: 100 })
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
*/
|
||||
|
||||
import type { CSSProperties } from 'vue'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { sleep } from 'valaxy'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useThemeConfig } from '../composables'
|
||||
import { useYunAppStore } from '../stores'
|
||||
import { useYunBanner } from '../composables/useYunBanner'
|
||||
import { useYunAppStore } from '../stores'
|
||||
|
||||
const yun = useYunAppStore()
|
||||
const themeConfig = useThemeConfig()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, watch } from 'vue'
|
||||
import { useCssVar } from '@vueuse/core'
|
||||
import { useAppStore } from 'valaxy'
|
||||
import { computed, watch } from 'vue'
|
||||
import { useThemeConfig } from '../composables'
|
||||
|
||||
const appStore = useAppStore()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import type { CategoryList, Post } from 'valaxy'
|
||||
import { useInvisibleElement } from 'valaxy'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useYunSpringAnimation } from '../composables/animation'
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
import type { Post } from 'valaxy'
|
||||
import { isCategoryList } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
defineProps<{
|
||||
i?: number
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import type { ComponentInstance } from 'vue'
|
||||
import { useMotion } from '@vueuse/motion'
|
||||
import Popover from 'primevue/popover'
|
||||
import type { ComponentInstance } from 'vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const op = ref<ComponentInstance<typeof Popover>>()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script setup>
|
||||
import { onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import { useToast } from 'primevue/usetoast'
|
||||
import TerminalService from 'primevue/terminalservice'
|
||||
import Dock from 'primevue/dock'
|
||||
import TerminalService from 'primevue/terminalservice'
|
||||
import Toast from 'primevue/toast'
|
||||
import { useToast } from 'primevue/usetoast'
|
||||
import { onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import { useYunAppStore } from '../stores'
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import type { YunTheme } from '../types'
|
||||
import { createFireworks } from '@explosions/fireworks'
|
||||
import { useThemeConfig } from 'valaxy'
|
||||
import { onMounted } from 'vue'
|
||||
import { createFireworks } from '@explosions/fireworks'
|
||||
import type { YunTheme } from '../types'
|
||||
|
||||
const themeConfig = useThemeConfig<YunTheme.Config>()
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue