@tnotesjs/core 0.1.23 → 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.
- package/dist/{chunk-BSTQOJVE.js → chunk-4KG6RXFS.js} +113 -130
- package/dist/{chunk-O4DCXHOV.js → chunk-AGSL3VZE.js} +1 -4
- package/dist/cli/index.js +162 -173
- package/dist/index.js +1 -1
- package/dist/vitepress/config/index.js +6 -8
- package/package.json +4 -1
- package/types/config.ts +1 -1
- package/types/index.ts +1 -1
- package/types/note.ts +1 -1
- package/vitepress/assets/icons/index.ts +1 -1
- package/vitepress/components/BilibiliOutsidePlayer/BilibiliOutsidePlayer.vue +4 -0
- package/vitepress/components/CodeBlockFullscreen/CodeBlockFullscreen.vue +4 -0
- package/vitepress/components/CodeBlockFullscreen/index.ts +8 -0
- package/vitepress/components/CodeBlockFullscreen/styles.css +4 -0
- package/vitepress/components/Discussions/Discussions.vue +4 -0
- package/vitepress/components/EnWordList/EnWordList.vue +4 -0
- package/vitepress/components/EnWordList/RightClickMenu.vue +4 -0
- package/vitepress/components/Footprints/Footprints.vue +4 -0
- package/vitepress/components/Layout/AboutModal.vue +4 -0
- package/vitepress/components/Layout/AboutPanel.vue +4 -0
- package/vitepress/components/Layout/ContentCollapse.vue +4 -0
- package/vitepress/components/Layout/CustomSidebar.vue +4 -0
- package/vitepress/components/Layout/DocBeforeControls.vue +4 -0
- package/vitepress/components/Layout/DocFooter.vue +4 -0
- package/vitepress/components/Layout/ImagePreview.vue +4 -0
- package/vitepress/components/Layout/Layout.vue +4 -0
- package/vitepress/components/Layout/NavBarSettingsTrigger.vue +4 -0
- package/vitepress/components/Layout/NoteStatus.vue +4 -0
- package/vitepress/components/Layout/SidebarItems.vue +4 -0
- package/vitepress/components/Layout/SidebarNavBefore.vue +4 -0
- package/vitepress/components/Layout/SidebarResizeHandle.vue +65 -4
- package/vitepress/components/Layout/Swiper.vue +4 -0
- package/vitepress/components/Layout/ToggleFullContent.vue +4 -0
- package/vitepress/components/Layout/ToggleSidebar.vue +4 -1
- package/vitepress/components/Layout/composables/useCollapseControl.ts +6 -0
- package/vitepress/components/Layout/composables/useNoteConfig.ts +7 -0
- package/vitepress/components/Layout/composables/useNoteSave.ts +4 -0
- package/vitepress/components/Layout/composables/useNoteValidation.ts +8 -0
- package/vitepress/components/Layout/composables/useRedirect.ts +7 -0
- package/vitepress/components/Layout/composables/useRenameOverlay.ts +3 -0
- package/vitepress/components/Layout/composables/useRenameRedirect.ts +3 -0
- package/vitepress/components/Layout/composables/useSidebarLayout.ts +6 -0
- package/vitepress/components/Layout/composables/useVSCodeIntegration.ts +6 -0
- package/vitepress/components/Layout/homeReadme.data.ts +3 -1
- package/vitepress/components/LoadingPage/LoadingPage.vue +4 -0
- package/vitepress/components/MarkMap/MarkMap.vue +4 -0
- package/vitepress/components/Mermaid/Mermaid.vue +6 -0
- package/vitepress/components/NotesTable/NotesTable.vue +4 -0
- package/vitepress/components/Settings/Settings.vue +6 -0
- package/vitepress/components/Settings/SettingsDialog.vue +6 -0
- package/vitepress/components/Settings/composables/useSettingsDialog.ts +3 -0
- package/vitepress/components/SidebarCard/MindMapView.vue +4 -0
- package/vitepress/components/SidebarCard/NotesTrendChart.vue +4 -0
- package/vitepress/components/SidebarCard/SidebarCard.vue +4 -0
- package/vitepress/components/Tooltip/Tooltip.vue +6 -0
- package/vitepress/components/constants.ts +3 -0
- package/vitepress/components/notesConfig.data.ts +7 -1
- package/vitepress/components/sidebar.data.ts +1 -1
- package/vitepress/components/tnotes-config.data.ts +13 -8
- package/vitepress/components/utils.ts +6 -0
- package/vitepress/config/index.ts +5 -13
- package/vitepress/configs/constants.ts +1 -0
- package/vitepress/configs/head.config.ts +1 -0
- package/vitepress/configs/index.ts +1 -0
- package/vitepress/configs/markdown.config.ts +1 -0
- package/vitepress/configs/theme.config.ts +1 -0
- package/vitepress/plugins/buildProgressPlugin.ts +1 -1
- package/vitepress/plugins/fileWatcherBridgePlugin.ts +2 -1
- package/vitepress/plugins/getNoteByConfigIdPlugin.ts +2 -1
- package/vitepress/plugins/renameNotePlugin.ts +2 -1
- package/vitepress/plugins/sidebarStructurePlugin.ts +3 -2
- package/vitepress/plugins/updateConfigPlugin.ts +2 -1
- package/vitepress/theme/index.ts +1 -4
- package/vitepress/theme/styles/layout.scss +8 -7
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
-
*
|
|
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'
|
package/vitepress/theme/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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)
|
|
@@ -11,12 +11,9 @@
|
|
|
11
11
|
--vp-sidebar-width: var(--tn-sidebar-width);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// 保留 VitePress 对侧边栏宽屏居中的 left/width/padding-left 计算。
|
|
15
15
|
.VPSidebar {
|
|
16
|
-
width: var(--tn-sidebar-layout-width, var(--tn-sidebar-width)) !important;
|
|
17
16
|
padding-top: var(--vp-nav-height) !important;
|
|
18
|
-
padding-left: 1rem !important;
|
|
19
|
-
padding-right: 1rem !important;
|
|
20
17
|
padding-bottom: 1rem !important;
|
|
21
18
|
}
|
|
22
19
|
|
|
@@ -33,16 +30,20 @@
|
|
|
33
30
|
transition: transform 0.25s ease, opacity 0.25s ease;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
.hide-sidebar .VPNavBarTitle {
|
|
33
|
+
.hide-sidebar .VPNavBar.has-sidebar .VPNavBarTitle {
|
|
37
34
|
display: none !important;
|
|
38
35
|
}
|
|
39
36
|
|
|
40
|
-
.hide-sidebar .VPNavBar {
|
|
37
|
+
.hide-sidebar .VPNavBar.has-sidebar {
|
|
41
38
|
background-color: var(--vp-nav-bg-color) !important;
|
|
42
39
|
}
|
|
43
40
|
|
|
41
|
+
.hide-sidebar .VPNavBar.has-sidebar .divider {
|
|
42
|
+
padding-left: 0 !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
44
45
|
/* 主体内容往左补齐,与导航栏标题左对齐 */
|
|
45
|
-
.hide-sidebar .VPContent {
|
|
46
|
+
.hide-sidebar .VPContent.has-sidebar {
|
|
46
47
|
margin-left: 0 !important;
|
|
47
48
|
padding-left: calc((100vw - var(--vp-layout-max-width)) / 2) !important;
|
|
48
49
|
}
|