@tnotesjs/core 0.1.24 → 0.1.25

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.
Files changed (73) hide show
  1. package/dist/{chunk-BSTQOJVE.js → chunk-4KG6RXFS.js} +113 -130
  2. package/dist/{chunk-O4DCXHOV.js → chunk-AGSL3VZE.js} +1 -4
  3. package/dist/cli/index.js +162 -173
  4. package/dist/index.js +1 -1
  5. package/dist/vitepress/config/index.js +6 -8
  6. package/package.json +4 -1
  7. package/types/config.ts +1 -1
  8. package/types/index.ts +1 -1
  9. package/types/note.ts +1 -1
  10. package/vitepress/assets/icons/index.ts +1 -1
  11. package/vitepress/components/BilibiliOutsidePlayer/BilibiliOutsidePlayer.vue +4 -0
  12. package/vitepress/components/CodeBlockFullscreen/CodeBlockFullscreen.vue +4 -0
  13. package/vitepress/components/CodeBlockFullscreen/index.ts +8 -0
  14. package/vitepress/components/CodeBlockFullscreen/styles.css +4 -0
  15. package/vitepress/components/Discussions/Discussions.vue +4 -0
  16. package/vitepress/components/EnWordList/EnWordList.vue +4 -0
  17. package/vitepress/components/EnWordList/RightClickMenu.vue +4 -0
  18. package/vitepress/components/Footprints/Footprints.vue +4 -0
  19. package/vitepress/components/Layout/AboutModal.vue +4 -0
  20. package/vitepress/components/Layout/AboutPanel.vue +4 -0
  21. package/vitepress/components/Layout/ContentCollapse.vue +4 -0
  22. package/vitepress/components/Layout/CustomSidebar.vue +4 -0
  23. package/vitepress/components/Layout/DocBeforeControls.vue +4 -0
  24. package/vitepress/components/Layout/DocFooter.vue +4 -0
  25. package/vitepress/components/Layout/ImagePreview.vue +4 -0
  26. package/vitepress/components/Layout/Layout.vue +4 -0
  27. package/vitepress/components/Layout/NavBarSettingsTrigger.vue +4 -0
  28. package/vitepress/components/Layout/NoteStatus.vue +4 -0
  29. package/vitepress/components/Layout/SidebarItems.vue +4 -0
  30. package/vitepress/components/Layout/SidebarNavBefore.vue +4 -0
  31. package/vitepress/components/Layout/SidebarResizeHandle.vue +5 -1
  32. package/vitepress/components/Layout/Swiper.vue +4 -0
  33. package/vitepress/components/Layout/ToggleFullContent.vue +4 -0
  34. package/vitepress/components/Layout/ToggleSidebar.vue +4 -1
  35. package/vitepress/components/Layout/composables/useCollapseControl.ts +6 -0
  36. package/vitepress/components/Layout/composables/useNoteConfig.ts +7 -0
  37. package/vitepress/components/Layout/composables/useNoteSave.ts +4 -0
  38. package/vitepress/components/Layout/composables/useNoteValidation.ts +8 -0
  39. package/vitepress/components/Layout/composables/useRedirect.ts +7 -0
  40. package/vitepress/components/Layout/composables/useRenameOverlay.ts +3 -0
  41. package/vitepress/components/Layout/composables/useRenameRedirect.ts +3 -0
  42. package/vitepress/components/Layout/composables/useSidebarLayout.ts +6 -0
  43. package/vitepress/components/Layout/composables/useVSCodeIntegration.ts +6 -0
  44. package/vitepress/components/Layout/homeReadme.data.ts +3 -1
  45. package/vitepress/components/LoadingPage/LoadingPage.vue +4 -0
  46. package/vitepress/components/MarkMap/MarkMap.vue +4 -0
  47. package/vitepress/components/Mermaid/Mermaid.vue +6 -0
  48. package/vitepress/components/NotesTable/NotesTable.vue +4 -0
  49. package/vitepress/components/Settings/Settings.vue +6 -0
  50. package/vitepress/components/Settings/SettingsDialog.vue +6 -0
  51. package/vitepress/components/Settings/composables/useSettingsDialog.ts +3 -0
  52. package/vitepress/components/SidebarCard/MindMapView.vue +4 -0
  53. package/vitepress/components/SidebarCard/NotesTrendChart.vue +4 -0
  54. package/vitepress/components/SidebarCard/SidebarCard.vue +4 -0
  55. package/vitepress/components/Tooltip/Tooltip.vue +6 -0
  56. package/vitepress/components/constants.ts +3 -0
  57. package/vitepress/components/notesConfig.data.ts +7 -1
  58. package/vitepress/components/sidebar.data.ts +1 -1
  59. package/vitepress/components/tnotes-config.data.ts +13 -8
  60. package/vitepress/components/utils.ts +6 -0
  61. package/vitepress/config/index.ts +5 -13
  62. package/vitepress/configs/constants.ts +1 -0
  63. package/vitepress/configs/head.config.ts +1 -0
  64. package/vitepress/configs/index.ts +1 -0
  65. package/vitepress/configs/markdown.config.ts +1 -0
  66. package/vitepress/configs/theme.config.ts +1 -0
  67. package/vitepress/plugins/buildProgressPlugin.ts +1 -1
  68. package/vitepress/plugins/fileWatcherBridgePlugin.ts +2 -1
  69. package/vitepress/plugins/getNoteByConfigIdPlugin.ts +2 -1
  70. package/vitepress/plugins/renameNotePlugin.ts +2 -1
  71. package/vitepress/plugins/sidebarStructurePlugin.ts +3 -2
  72. package/vitepress/plugins/updateConfigPlugin.ts +2 -1
  73. package/vitepress/theme/index.ts +1 -4
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/Layout/Layout.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <Layout>
3
7
  <template v-if="showNotFound" #not-found>
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/Layout/NavBarSettingsTrigger.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <button
3
7
  type="button"
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/Layout/NoteStatus.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <h1 v-if="shouldShow" class="note-status-title">
3
7
  <span v-if="statusEmoji" class="status-emoji">{{ statusEmoji }}</span>
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/Layout/SidebarItems.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <template v-for="item in items" :key="getItemKey(item)">
3
7
  <!-- 只有在不超过最大层级时才渲染组 -->
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/Layout/SidebarNavBefore.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <div class="sidebar-toggle-wrapper">
3
7
  <div class="toolbar-row">
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/Layout/SidebarResizeHandle.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <div
3
7
  v-if="isSidebarAvailable"
@@ -31,8 +35,8 @@
31
35
  </template>
32
36
 
33
37
  <script setup lang="ts">
34
- import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
35
38
  import { useRoute } from 'vitepress'
39
+ import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
36
40
 
37
41
  import { useSidebarLayout } from './composables/useSidebarLayout'
38
42
  import { icon__next, icon__prev } from '../../assets/icons'
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/Layout/Swiper.vue
3
+ -->
4
+
1
5
  <template></template>
2
6
 
3
7
  <script setup>
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/Layout/ToggleFullContent.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <img @click="toggle" class="contentToggleBtn" :title="full ? '退出全屏内容区' : '全屏显示内容区'" :src="full ? icon__fullscreen_exit : icon__fullscreen" alt="" />
3
7
  </template>
@@ -1,4 +1,7 @@
1
- <!-- .vitepress\components\Layout\ToggleSidebar.vue -->
1
+ <!--
2
+ vitepress/components/Layout/ToggleSidebar.vue
3
+ -->
4
+
2
5
  <template>
3
6
  <img
4
7
  @click="toggleSidebar"
@@ -1,3 +1,9 @@
1
+ /**
2
+ * vitepress/components/Layout/composables/useCollapseControl.ts
3
+ *
4
+ * 全局折叠/展开功能的组合式函数
5
+ */
6
+
1
7
  import { useRoute } from 'vitepress'
2
8
  import { ref, watch } from 'vue'
3
9
 
@@ -1,3 +1,10 @@
1
+ /**
2
+ * vitepress/components/Layout/composables/useNoteConfig.ts
3
+ *
4
+ * 管理笔记配置状态
5
+ * 包括可编辑字段、原始值、变更检测等
6
+ */
7
+
1
8
  import { ref, computed, watch } from 'vue'
2
9
 
3
10
  import type { NoteConfig } from '../../../../types'
@@ -1,3 +1,7 @@
1
+ /**
2
+ * vitepress/components/Layout/composables/useNoteSave.ts
3
+ */
4
+
1
5
  import { useData } from 'vitepress'
2
6
  import { ref, computed } from 'vue'
3
7
 
@@ -1,3 +1,11 @@
1
+ /**
2
+ * vitepress/components/Layout/composables/useNoteValidation.ts
3
+ *
4
+ * 笔记标题验证组合式函数
5
+ * 包含标题验证逻辑和输入事件处理器
6
+ * 用于确保笔记标题合法,避免文件系统错误和用户困惑
7
+ */
8
+
1
9
  import type { Ref } from 'vue'
2
10
 
3
11
  /**
@@ -1,3 +1,10 @@
1
+ /**
2
+ * vitepress/components/Layout/composables/useRedirect.ts
3
+ *
4
+ * 处理 404 重定向逻辑
5
+ * 当用户访问旧的笔记 URL 时,自动重定向到新的 URL
6
+ */
7
+
1
8
  import { useRoute, useData } from 'vitepress'
2
9
  import { ref, watch } from 'vue'
3
10
 
@@ -1,9 +1,12 @@
1
1
  /**
2
+ * vitepress/components/Layout/composables/useRenameOverlay.ts
3
+ *
2
4
  * 全局「重命名遮罩」状态。
3
5
  *
4
6
  * Layout 顶层渲染 `<LoadingPage />`,由本 store 控制 visible/message/tip,
5
7
  * `useRenameRedirect` 调用 show/hide 即可。
6
8
  */
9
+
7
10
  import { reactive } from 'vue'
8
11
 
9
12
  export interface RenameOverlayState {
@@ -1,8 +1,11 @@
1
1
  /**
2
+ * vitepress/components/Layout/composables/useRenameRedirect.ts
3
+ *
2
4
  * 重命名后跳转工具:显示遮罩 → 等 Vite HMR 重建路由 → 整页跳到新 URL。
3
5
  *
4
6
  * 关于面板保存与文件系统直接重命名两条入口共用此函数,确保行为一致。
5
7
  */
8
+
6
9
  import { useRenameOverlay } from './useRenameOverlay'
7
10
 
8
11
  export interface RedirectAfterRenameOptions {
@@ -1,3 +1,9 @@
1
+ /**
2
+ * vitepress/components/Layout/composables/useSidebarLayout.ts
3
+ *
4
+ * 侧边栏布局管理的组合式函数
5
+ */
6
+
1
7
  import { ref } from 'vue'
2
8
 
3
9
  const SIDEBAR_HIDDEN_KEY = 'vp:sidebar:hidden'
@@ -1,3 +1,9 @@
1
+ /**
2
+ * vitepress/components/Layout/composables/useVSCodeIntegration.ts
3
+ *
4
+ * VSCode 集成和 GitHub 链接拦截
5
+ */
6
+
1
7
  import { useData } from 'vitepress'
2
8
  import { ref } from 'vue'
3
9
 
@@ -1,4 +1,6 @@
1
- // .vitepress/components/Layout/homeReadme.data.ts
1
+ /**
2
+ * vitepress/components/Layout/homeReadme.data.ts
3
+ */
2
4
  import { execSync } from 'node:child_process'
3
5
  import fs from 'node:fs'
4
6
  import path from 'node:path'
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/LoadingPage.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <ClientOnly>
3
7
  <Teleport to="body">
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/MarkMap/MarkMap.vue
3
+ -->
4
+
1
5
  <script setup lang="ts">
2
6
  import { scaleOrdinal, schemePastel2, schemeSet3, schemeTableau10 } from 'd3'
3
7
  import { Transformer } from 'markmap-lib'
@@ -1,3 +1,9 @@
1
+ <!--
2
+ vitepress/components/Mermaid/Mermaid.vue
3
+
4
+ Mermaid 图表组件,用于在页面中渲染 Mermaid 图表
5
+ -->
6
+
1
7
  <template>
2
8
  <div
3
9
  ref="mermaidRef"
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/NotesTable/NotesTable.vue
3
+ -->
4
+
1
5
  <template>
2
6
  <div v-if="errorMessage" class="error">
3
7
  {{ errorMessage }}
@@ -1,3 +1,9 @@
1
+ <!--
2
+ vitepress/components/Settings/Settings.vue
3
+
4
+ 设置组件,用于显示和修改应用设置
5
+ -->
6
+
1
7
  <template>
2
8
  <div class="settingsWrapper">
3
9
  <section class="settingsSection">
@@ -1,3 +1,9 @@
1
+ <!--
2
+ vitepress/components/Settings/SettingsDialog.vue
3
+
4
+ 设置对话框组件,用于显示和修改应用设置
5
+ -->
6
+
1
7
  <template>
2
8
  <ClientOnly>
3
9
  <Teleport to="body">
@@ -1,10 +1,13 @@
1
1
  /**
2
+ * vitepress/components/Settings/composables/useSettingsDialog.ts
3
+ *
2
4
  * 全局「设置 Dialog」状态。
3
5
  *
4
6
  * Layout 顶层渲染 `<SettingsDialog />`,本 store 控制 visible/fullscreen,
5
7
  * 任何位置(导航入口、SidebarCard 提示等)调 `open()` 即可弹出,
6
8
  * 关闭后停留在当前路由与滚动位置。
7
9
  */
10
+
8
11
  import { reactive } from 'vue'
9
12
 
10
13
  export interface SettingsDialogState {
@@ -1,3 +1,7 @@
1
+ <!--
2
+ vitepress/components/SidebarCard/MindMapView.vue
3
+ -->
4
+
1
5
  <script setup>
2
6
  import { scaleOrdinal, schemePastel2, schemeSet3, schemeTableau10 } from 'd3'
3
7
  import { Transformer } from 'markmap-lib'
@@ -1,3 +1,7 @@
1
+ <!--
2
+ .vitepress/components/SidebarCard/NotesTrendChart.vue
3
+ -->
4
+
1
5
  <script setup>
2
6
  import { BarChart, LineChart } from 'echarts/charts'
3
7
  import { GridComponent, TooltipComponent } from 'echarts/components'
@@ -1,3 +1,7 @@
1
+ <!--
2
+ .vitepress/components/SidebarCard/SidebarCard.vue
3
+ -->
4
+
1
5
  <script setup>
2
6
  import { useData } from 'vitepress'
3
7
  import { ref, computed, watch } from 'vue'
@@ -1,3 +1,9 @@
1
+ <!--
2
+ vitepress/components/Tooltip/Tooltip.vue
3
+
4
+ 提供一个简单的 Tooltip 组件,用于在鼠标悬停时显示提示信息
5
+ -->
6
+
1
7
  <template>
2
8
  <span
3
9
  class="tooltip-wrapper"
@@ -1,7 +1,10 @@
1
1
  /**
2
+ * vitepress/components/constants.ts
3
+ *
2
4
  * 以下常量由 defineNotesConfig() 通过 vite.define 注入
3
5
  * 见 vitepress/config/index.ts 中的 define 配置
4
6
  */
7
+
5
8
  declare const __TNOTES_REPO_NAME__: string
6
9
  declare const __TNOTES_AUTHOR__: string
7
10
  declare const __TNOTES_IGNORE_DIRS__: string[]
@@ -1,4 +1,10 @@
1
- // .vitepress/components/notesConfig.data.ts
1
+ /**
2
+ * .vitepress/components/notesConfig.data.ts
3
+ *
4
+ * 负责加载和监视 notes 目录下的 .tnotes.json 配置文件变化
5
+ * 供 VitePress 组件使用,确保组件能够实时响应配置变更
6
+ */
7
+
2
8
  import fs from 'node:fs'
3
9
  import path from 'node:path'
4
10
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * .vitepress/tnotes/vitepress/components/sidebar.data.ts
2
+ * vitepress/components/sidebar.data.ts
3
3
  */
4
4
 
5
5
  import fs from 'node:fs'
@@ -1,21 +1,26 @@
1
+ /**
2
+ * vitepress/components/tnotes-config.data.ts
3
+ *
4
+ * 负责加载和监视 .tnotes.json 配置文件的变化
5
+ * 供 VitePress 组件使用,确保组件能够实时响应配置变更
6
+ */
7
+
1
8
  import fs from 'node:fs'
2
9
  import path from 'node:path'
3
10
 
4
- const rootPath = process.cwd()
11
+ import { validateAndCompleteConfig } from '../../config/defaultConfig'
5
12
 
6
- export interface TNotesConfig {
7
- sidebarShowNoteId: boolean
8
- author?: string
9
- repoName?: string
10
- [key: string]: any
11
- }
13
+ import type { TNotesConfig } from '../../types'
14
+
15
+ const rootPath = process.cwd()
12
16
 
13
17
  export default {
14
18
  watch: [path.resolve(rootPath, '.tnotes.json')],
15
19
  load(watchedFiles: string[]): TNotesConfig {
16
20
  console.log('[tnotes-config.data.ts] Config loaded')
17
21
  const fileContent = fs.readFileSync(watchedFiles[0], 'utf-8')
18
- const config = JSON.parse(fileContent) as TNotesConfig
22
+ const rawConfig = JSON.parse(fileContent)
23
+ const { config } = validateAndCompleteConfig(rawConfig)
19
24
  return config
20
25
  },
21
26
  }
@@ -1,3 +1,9 @@
1
+ /**
2
+ * vitepress/components/utils.ts
3
+ *
4
+ * VitePress 组件的公共工具函数
5
+ */
6
+
1
7
  export const formatDate = (timestamp: number): string => {
2
8
  const date = new Date(timestamp)
3
9
  const year = date.getFullYear()
@@ -1,5 +1,5 @@
1
1
  /**
2
- * .vitepress/tnotes/vitepress/config/index.ts
2
+ * vitepress/config/index.ts
3
3
  *
4
4
  * VitePress 站点配置工厂函数
5
5
  *
@@ -7,10 +7,12 @@
7
7
  * import { defineNotesConfig } from './tnotes/vitepress/config'
8
8
  * export default defineNotesConfig()
9
9
  */
10
+
10
11
  import fs from 'fs'
11
12
  import path from 'path'
12
13
  import { defineConfig, type UserConfig } from 'vitepress'
13
14
 
15
+ import { ConfigManager } from '../../config/ConfigManager'
14
16
  import {
15
17
  getIgnoreList,
16
18
  getGithubPageUrl,
@@ -25,17 +27,6 @@ import { renameNotePlugin } from '../plugins/renameNotePlugin'
25
27
  import { sidebarStructurePlugin } from '../plugins/sidebarStructurePlugin'
26
28
  import { updateConfigPlugin } from '../plugins/updateConfigPlugin'
27
29
 
28
- import type { TNotesConfig } from '../../types'
29
-
30
- /**
31
- * 读取 .tnotes.json 配置文件
32
- */
33
- function loadTNotesConfig(rootPath: string): TNotesConfig {
34
- const configPath = path.resolve(rootPath, '.tnotes.json')
35
- const configContent = fs.readFileSync(configPath, 'utf-8')
36
- return JSON.parse(configContent) as TNotesConfig
37
- }
38
-
39
30
  /**
40
31
  * 创建 VitePress 站点配置
41
32
  *
@@ -44,7 +35,8 @@ function loadTNotesConfig(rootPath: string): TNotesConfig {
44
35
  */
45
36
  export function defineNotesConfig(overrides: UserConfig = {}) {
46
37
  const rootPath = process.cwd()
47
- const config = loadTNotesConfig(rootPath)
38
+ ConfigManager.init({ rootPath })
39
+ const config = ConfigManager.getInstance().getAll()
48
40
  const { repoName } = config
49
41
 
50
42
  const IGNORE_LIST = getIgnoreList(config)
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * 常量配置 - 从运行时配置派生,不再硬编码相对路径 import
5
5
  */
6
+
6
7
  import type { TNotesConfig } from '../../types'
7
8
 
8
9
  /**
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * HTML head 标签配置
5
5
  */
6
+
6
7
  import { HeadConfig } from 'vitepress'
7
8
 
8
9
  import type { TNotesConfig } from '../../types'
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * 配置模块统一导出
5
5
  */
6
+
6
7
  export { getIgnoreList, getGithubPageUrl } from './constants'
7
8
  export { getHeadConfig } from './head.config'
8
9
  export { getMarkdownConfig } from './markdown.config'
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * Markdown 配置
5
5
  */
6
+
6
7
  import fs from 'fs'
7
8
  import markdownItContainer from 'markdown-it-container'
8
9
  import mila from 'markdown-it-link-attributes'
@@ -6,6 +6,7 @@
6
6
  * doc:
7
7
  * https://vitepress.dev/reference/default-theme-config
8
8
  */
9
+
9
10
  import type { TNotesConfig } from '../../types'
10
11
  import type { DefaultTheme } from 'vitepress'
11
12
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * .vitepress/tnotes/vitepress/plugins/buildProgressPlugin.ts
2
+ * vitepress/plugins/buildProgressPlugin.ts
3
3
  *
4
4
  * 构建进度插件 - 仅在 build 模式下显示真实进度
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * .vitepress/tnotes/vitepress/plugins/fileWatcherBridgePlugin.ts
2
+ * vitepress/plugins/fileWatcherBridgePlugin.ts
3
3
  *
4
4
  * file-watcher 与浏览器之间的 IPC 桥。
5
5
  *
@@ -7,6 +7,7 @@
7
7
  * 两者无法共享单例。文件夹直接重命名后,file-watcher 会 fetch 本接口,
8
8
  * 本接口调 `server.ws.send` 向浏览器广播 `tnotes:note-renamed`。
9
9
  */
10
+
10
11
  import type { PluginOption } from 'vite'
11
12
 
12
13
  const RENAME_EVENT = 'tnotes:note-renamed'
@@ -1,8 +1,9 @@
1
1
  /**
2
- * .vitepress/tnotes/vitepress/plugins/getNoteByConfigIdPlugin.ts
2
+ * vitepress/plugins/getNoteByConfigIdPlugin.ts
3
3
  *
4
4
  * VitePress 插件 - 根据 configId 查询笔记信息
5
5
  */
6
+
6
7
  import { NoteIndexCache } from '../../core'
7
8
  import { logger } from '../../utils'
8
9
 
@@ -1,8 +1,9 @@
1
1
  /**
2
- * .vitepress/tnotes/vitepress/plugins/renameNotePlugin.ts
2
+ * vitepress/plugins/renameNotePlugin.ts
3
3
  *
4
4
  * Vite 插件 - 处理笔记重命名请求
5
5
  */
6
+
6
7
  import { RenameNoteCommand } from '../../commands/note/RenameNoteCommand'
7
8
 
8
9
  import type { PluginOption } from 'vite'
@@ -1,12 +1,13 @@
1
1
  /**
2
- * .vitepress/tnotes/vitepress/plugins/sidebarStructurePlugin.ts
2
+ * vitepress/plugins/sidebarStructurePlugin.ts
3
3
  *
4
4
  * VitePress dev middleware - 处理语雀风格侧边栏的目录结构操作。
5
5
  */
6
+
6
7
  import { FileWatcherService, NoteService, ReadmeService } from '../../services'
7
8
 
8
- import type { IncomingMessage, ServerResponse } from 'http'
9
9
  import type { NoteInfo } from '../../types'
10
+ import type { IncomingMessage, ServerResponse } from 'http'
10
11
  import type { PluginOption } from 'vite'
11
12
 
12
13
  interface JsonResponse {
@@ -1,8 +1,9 @@
1
1
  /**
2
- * .vitepress/tnotes/vitepress/plugins/updateConfigPlugin.ts
2
+ * vitepress/plugins/updateConfigPlugin.ts
3
3
  *
4
4
  * VitePress 插件 - 处理笔记配置更新请求
5
5
  */
6
+
6
7
  import { UpdateNoteConfigCommand } from '../../commands/note/UpdateNoteConfigCommand'
7
8
 
8
9
  import type { PluginOption } from 'vite'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * .vitepress/tnotes/theme/index.ts
2
+ * theme/index.ts
3
3
  *
4
4
  * 自定义主题
5
5
  *
@@ -24,7 +24,6 @@ import Layout from '../components/Layout/Layout.vue'
24
24
  import MarkMap from '../components/MarkMap/MarkMap.vue'
25
25
  import Mermaid from '../components/Mermaid/Mermaid.vue'
26
26
  import NotesTable from '../components/NotesTable/NotesTable.vue'
27
- import Settings from '../components/Settings/Settings.vue'
28
27
  import SidebarCard from '../components/SidebarCard/SidebarCard.vue'
29
28
  import Tooltip from '../components/Tooltip/Tooltip.vue'
30
29
 
@@ -43,8 +42,6 @@ function registerCoreComponents(ctx: EnhanceAppContext) {
43
42
  app.component('E', EnWordList)
44
43
  app.component('Footprints', Footprints)
45
44
  app.component('F', Footprints)
46
- app.component('Settings', Settings)
47
- app.component('S', Settings)
48
45
  app.component('SidebarCard', SidebarCard)
49
46
  app.component('MarkMap', MarkMap)
50
47
  app.component('Mermaid', Mermaid)