@tnotesjs/core 0.5.0 → 0.6.0
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-3R7QSABB.cjs +502 -0
- package/dist/chunk-CZXRQPFJ.js +11 -0
- package/dist/{chunk-XCWFZLER.js → chunk-DUTS75WQ.js} +27 -493
- package/dist/chunk-HXED7KVT.cjs +11 -0
- package/dist/chunk-IHFUHB4J.cjs +176 -0
- package/dist/chunk-MZIXIY2Y.cjs +216 -0
- package/dist/chunk-TJ4527KA.cjs +5264 -0
- package/dist/chunk-U6IBLREL.js +502 -0
- package/dist/chunk-UNFSW5C2.js +176 -0
- package/dist/cli/index.cjs +936 -0
- package/dist/cli/index.d.cts +2 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +9 -6
- package/dist/index.cjs +8 -0
- package/dist/index.d.cts +56 -0
- package/dist/index.d.ts +56 -0
- package/dist/markdown/index.cjs +82 -0
- package/dist/markdown/index.d.cts +36 -0
- package/dist/markdown/index.d.ts +36 -0
- package/dist/markdown/index.js +82 -0
- package/dist/note-oGm44Rw8.d.cts +84 -0
- package/dist/note-oGm44Rw8.d.ts +84 -0
- package/dist/types-CpsEy8lA.d.cts +221 -0
- package/dist/types-CwBWwNVv.d.ts +221 -0
- package/dist/vitepress/config/index.cjs +1669 -0
- package/dist/vitepress/config/index.d.cts +12 -0
- package/dist/vitepress/config/index.d.ts +12 -0
- package/dist/vitepress/config/index.js +10 -4
- package/dist/workspace/index.cjs +1207 -0
- package/dist/workspace/index.d.cts +14 -0
- package/dist/workspace/index.d.ts +14 -0
- package/dist/workspace/index.js +1207 -0
- package/package.json +14 -1
- package/vitepress/components/Settings/Settings.vue +3 -3
- package/vitepress/components/SidebarCard/SidebarCard.vue +3 -3
- package/vitepress/plugins/localSearchReindexLogic.ts +11 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as vitepress from 'vitepress';
|
|
2
|
+
import { UserConfig } from 'vitepress';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 创建 VitePress 站点配置
|
|
6
|
+
*
|
|
7
|
+
* @param overrides - 可选的覆盖配置,会与默认配置合并
|
|
8
|
+
* @returns VitePress 配置对象
|
|
9
|
+
*/
|
|
10
|
+
declare function defineNotesConfig(overrides?: UserConfig): UserConfig<vitepress.DefaultTheme.Config>;
|
|
11
|
+
|
|
12
|
+
export { defineNotesConfig };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as vitepress from 'vitepress';
|
|
2
|
+
import { UserConfig } from 'vitepress';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 创建 VitePress 站点配置
|
|
6
|
+
*
|
|
7
|
+
* @param overrides - 可选的覆盖配置,会与默认配置合并
|
|
8
|
+
* @returns VitePress 配置对象
|
|
9
|
+
*/
|
|
10
|
+
declare function defineNotesConfig(overrides?: UserConfig): UserConfig<vitepress.DefaultTheme.Config>;
|
|
11
|
+
|
|
12
|
+
export { defineNotesConfig };
|
|
@@ -5,12 +5,15 @@ import {
|
|
|
5
5
|
RenameNoteCommand,
|
|
6
6
|
TocService,
|
|
7
7
|
UpdateNoteConfigCommand,
|
|
8
|
-
generateAnchor,
|
|
9
8
|
logger
|
|
10
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-DUTS75WQ.js";
|
|
11
10
|
import {
|
|
12
11
|
ConfigManager
|
|
13
12
|
} from "../../chunk-UJG3UU5X.js";
|
|
13
|
+
import "../../chunk-U6IBLREL.js";
|
|
14
|
+
import {
|
|
15
|
+
generateAnchor
|
|
16
|
+
} from "../../chunk-CZXRQPFJ.js";
|
|
14
17
|
|
|
15
18
|
// vitepress/config/index.ts
|
|
16
19
|
import fs3 from "fs";
|
|
@@ -775,8 +778,11 @@ function isNoteReadmePath(filePath, ignoreDirNames = []) {
|
|
|
775
778
|
return !ignoreDirNames.some((dir) => folderName === dir);
|
|
776
779
|
}
|
|
777
780
|
function getDocIdFromFile(input) {
|
|
778
|
-
const
|
|
779
|
-
|
|
781
|
+
const pathApi = /^[a-zA-Z]:[\\/]/.test(
|
|
782
|
+
input.absoluteOrRelativeFile || input.srcDir
|
|
783
|
+
) ? path2.win32 : path2;
|
|
784
|
+
const absoluteFile = pathApi.isAbsolute(input.absoluteOrRelativeFile) ? input.absoluteOrRelativeFile : pathApi.join(input.srcDir, input.absoluteOrRelativeFile);
|
|
785
|
+
let relFile = slash(pathApi.relative(input.srcDir, absoluteFile));
|
|
780
786
|
if (input.rewrites?.[relFile]) {
|
|
781
787
|
relFile = input.rewrites[relFile];
|
|
782
788
|
}
|