@tnotesjs/core 0.5.0 → 0.6.1
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-56PKXCOX.js +176 -0
- package/dist/chunk-5F5RJ2HV.cjs +176 -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-MZIXIY2Y.cjs +216 -0
- package/dist/chunk-TJ4527KA.cjs +5264 -0
- package/dist/chunk-U6IBLREL.js +502 -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 +15 -2
- 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,221 @@
|
|
|
1
|
+
import { N as NoteConfig, T as TNotesConfig } from './note-oGm44Rw8.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* utils/tocHelpers.ts
|
|
5
|
+
*
|
|
6
|
+
* 根目录 TOC.md 解析、序列化与 sidebar 树构建
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** 目录节点 */
|
|
10
|
+
interface TocFolderNode {
|
|
11
|
+
kind: 'folder';
|
|
12
|
+
title: string;
|
|
13
|
+
indent: number;
|
|
14
|
+
tocLineIndex: number;
|
|
15
|
+
children: TocTreeNode[];
|
|
16
|
+
}
|
|
17
|
+
/** 笔记节点(可有 children,语雀式父笔记) */
|
|
18
|
+
interface TocNoteNode {
|
|
19
|
+
kind: 'note';
|
|
20
|
+
noteIndex: string;
|
|
21
|
+
indent: number;
|
|
22
|
+
tocLineIndex: number;
|
|
23
|
+
children: TocTreeNode[];
|
|
24
|
+
}
|
|
25
|
+
type TocTreeNode = TocFolderNode | TocNoteNode;
|
|
26
|
+
/** Sidebar 项(与 VitePress sidebar 结构一致) */
|
|
27
|
+
interface TocSidebarItem {
|
|
28
|
+
text: string;
|
|
29
|
+
link?: string;
|
|
30
|
+
collapsed?: boolean;
|
|
31
|
+
items?: TocSidebarItem[];
|
|
32
|
+
/** 纯目录节点路径(从根到当前目录的标题链,仅 UI 展示) */
|
|
33
|
+
folderPath?: string[];
|
|
34
|
+
/** TOC.md 中对应行的 0-based 行号(CRUD/拖拽主键) */
|
|
35
|
+
tocLineIndex?: number;
|
|
36
|
+
/** dev 拖拽用确定性 nodeId(不写 TOC.md) */
|
|
37
|
+
nodeId?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type WorkspaceDiagnosticSeverity = 'error' | 'warning' | 'info';
|
|
41
|
+
interface WorkspaceDiagnostic {
|
|
42
|
+
code: string;
|
|
43
|
+
message: string;
|
|
44
|
+
severity: WorkspaceDiagnosticSeverity;
|
|
45
|
+
path?: string;
|
|
46
|
+
}
|
|
47
|
+
type WorkspaceHealth = {
|
|
48
|
+
status: 'ready';
|
|
49
|
+
diagnostics: WorkspaceDiagnostic[];
|
|
50
|
+
} | {
|
|
51
|
+
status: 'invalid';
|
|
52
|
+
diagnostics: WorkspaceDiagnostic[];
|
|
53
|
+
} | {
|
|
54
|
+
status: 'future-schema';
|
|
55
|
+
diagnostics: WorkspaceDiagnostic[];
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Core only edits known fields, but it must retain fields introduced by a
|
|
59
|
+
* knowledge base or by a newer Core release.
|
|
60
|
+
*/
|
|
61
|
+
type WorkspaceNoteConfig = NoteConfig & Record<string, unknown>;
|
|
62
|
+
type WorkspaceKnowledgeBaseConfig = TNotesConfig & Record<string, unknown>;
|
|
63
|
+
interface WorkspaceNoteSummary {
|
|
64
|
+
uuid: string;
|
|
65
|
+
index: string;
|
|
66
|
+
title: string;
|
|
67
|
+
dirName: string;
|
|
68
|
+
directoryPath: string;
|
|
69
|
+
readmePath: string;
|
|
70
|
+
configPath: string;
|
|
71
|
+
config: WorkspaceNoteConfig;
|
|
72
|
+
revision: string;
|
|
73
|
+
}
|
|
74
|
+
interface KnowledgeBaseSnapshot {
|
|
75
|
+
id: string;
|
|
76
|
+
rootPath: string;
|
|
77
|
+
config: WorkspaceKnowledgeBaseConfig | null;
|
|
78
|
+
health: WorkspaceHealth;
|
|
79
|
+
toc: TocTreeNode[];
|
|
80
|
+
sidebar: TocSidebarItem[];
|
|
81
|
+
notes: WorkspaceNoteSummary[];
|
|
82
|
+
revision: string;
|
|
83
|
+
}
|
|
84
|
+
interface NoteDocument extends WorkspaceNoteSummary {
|
|
85
|
+
content: string;
|
|
86
|
+
}
|
|
87
|
+
interface ChangedFile {
|
|
88
|
+
path: string;
|
|
89
|
+
kind: 'created' | 'updated' | 'deleted' | 'renamed';
|
|
90
|
+
previousPath?: string;
|
|
91
|
+
}
|
|
92
|
+
interface MutationResult<T> {
|
|
93
|
+
value: T;
|
|
94
|
+
changedFiles: ChangedFile[];
|
|
95
|
+
snapshotRevision: string;
|
|
96
|
+
}
|
|
97
|
+
interface WorkspaceLogger {
|
|
98
|
+
debug?(message: string, details?: unknown): void;
|
|
99
|
+
info?(message: string, details?: unknown): void;
|
|
100
|
+
warn?(message: string, details?: unknown): void;
|
|
101
|
+
error?(message: string, details?: unknown): void;
|
|
102
|
+
}
|
|
103
|
+
interface CreateWorkspaceOptions {
|
|
104
|
+
rootPath: string;
|
|
105
|
+
logger?: WorkspaceLogger;
|
|
106
|
+
format?: {
|
|
107
|
+
prettier?: boolean;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
interface SaveNoteInput {
|
|
111
|
+
noteUuid: string;
|
|
112
|
+
content: string;
|
|
113
|
+
expectedRevision: string;
|
|
114
|
+
prettier?: boolean;
|
|
115
|
+
}
|
|
116
|
+
type NotePlacement = {
|
|
117
|
+
type: 'root';
|
|
118
|
+
placement?: 'start' | 'end';
|
|
119
|
+
} | {
|
|
120
|
+
type: 'note';
|
|
121
|
+
targetNoteUuid: string;
|
|
122
|
+
placement: 'before' | 'after' | 'inside';
|
|
123
|
+
} | {
|
|
124
|
+
type: 'folder';
|
|
125
|
+
folderPath: string[];
|
|
126
|
+
placement: 'before' | 'after' | 'inside';
|
|
127
|
+
};
|
|
128
|
+
interface CreateNoteInput {
|
|
129
|
+
title: string;
|
|
130
|
+
placement?: NotePlacement;
|
|
131
|
+
config?: Partial<Pick<WorkspaceNoteConfig, 'description' | 'enableDiscussions'>>;
|
|
132
|
+
expectedSnapshotRevision?: string;
|
|
133
|
+
}
|
|
134
|
+
interface RenameNoteInput {
|
|
135
|
+
noteUuid: string;
|
|
136
|
+
title: string;
|
|
137
|
+
expectedRevision: string;
|
|
138
|
+
}
|
|
139
|
+
interface UpdateNoteConfigInput {
|
|
140
|
+
noteUuid: string;
|
|
141
|
+
updates: Partial<Pick<WorkspaceNoteConfig, 'done' | 'description' | 'enableDiscussions'>>;
|
|
142
|
+
expectedRevision: string;
|
|
143
|
+
}
|
|
144
|
+
type TocEntryRef = {
|
|
145
|
+
type: 'note';
|
|
146
|
+
noteUuid: string;
|
|
147
|
+
} | {
|
|
148
|
+
type: 'folder';
|
|
149
|
+
folderPath: string[];
|
|
150
|
+
} | {
|
|
151
|
+
type: 'line';
|
|
152
|
+
tocLineIndex: number;
|
|
153
|
+
};
|
|
154
|
+
interface MoveTocEntryInput {
|
|
155
|
+
source: TocEntryRef;
|
|
156
|
+
target: TocEntryRef;
|
|
157
|
+
placement: 'before' | 'after' | 'inside';
|
|
158
|
+
expectedSnapshotRevision: string;
|
|
159
|
+
}
|
|
160
|
+
interface CreateTocGroupInput {
|
|
161
|
+
title: string;
|
|
162
|
+
placement?: NotePlacement;
|
|
163
|
+
expectedSnapshotRevision: string;
|
|
164
|
+
}
|
|
165
|
+
interface RenameTocGroupInput {
|
|
166
|
+
folderPath: string[];
|
|
167
|
+
title: string;
|
|
168
|
+
expectedSnapshotRevision: string;
|
|
169
|
+
}
|
|
170
|
+
interface DeletePreviewItem {
|
|
171
|
+
noteUuid: string;
|
|
172
|
+
index: string;
|
|
173
|
+
title: string;
|
|
174
|
+
directoryPath: string;
|
|
175
|
+
}
|
|
176
|
+
interface DeleteTocEntryPreview {
|
|
177
|
+
entry: TocEntryRef;
|
|
178
|
+
notes: DeletePreviewItem[];
|
|
179
|
+
filePaths: string[];
|
|
180
|
+
directoryPaths: string[];
|
|
181
|
+
snapshotRevision: string;
|
|
182
|
+
}
|
|
183
|
+
interface DeleteTocEntryInput {
|
|
184
|
+
entry: TocEntryRef;
|
|
185
|
+
expectedSnapshotRevision: string;
|
|
186
|
+
}
|
|
187
|
+
interface WriteAttachmentInput {
|
|
188
|
+
noteUuid: string;
|
|
189
|
+
fileName: string;
|
|
190
|
+
data: Uint8Array;
|
|
191
|
+
}
|
|
192
|
+
interface AttachmentResult {
|
|
193
|
+
absolutePath: string;
|
|
194
|
+
markdownPath: string;
|
|
195
|
+
}
|
|
196
|
+
interface TNotesWorkspace {
|
|
197
|
+
inspect(): Promise<KnowledgeBaseSnapshot>;
|
|
198
|
+
refresh(): Promise<KnowledgeBaseSnapshot>;
|
|
199
|
+
reconcileTocCompletion(): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
200
|
+
notes: {
|
|
201
|
+
read(noteUuid: string): Promise<NoteDocument>;
|
|
202
|
+
save(input: SaveNoteInput): Promise<MutationResult<NoteDocument>>;
|
|
203
|
+
create(input: CreateNoteInput): Promise<MutationResult<NoteDocument>>;
|
|
204
|
+
rename(input: RenameNoteInput): Promise<MutationResult<NoteDocument>>;
|
|
205
|
+
updateConfig(input: UpdateNoteConfigInput): Promise<MutationResult<NoteDocument>>;
|
|
206
|
+
};
|
|
207
|
+
toc: {
|
|
208
|
+
move(input: MoveTocEntryInput): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
209
|
+
createGroup(input: CreateTocGroupInput): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
210
|
+
renameGroup(input: RenameTocGroupInput): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
211
|
+
previewDelete(entry: TocEntryRef): Promise<DeleteTocEntryPreview>;
|
|
212
|
+
deleteEntry(input: DeleteTocEntryInput): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
213
|
+
setDone(input: UpdateNoteConfigInput): Promise<MutationResult<NoteDocument>>;
|
|
214
|
+
};
|
|
215
|
+
attachments: {
|
|
216
|
+
writeLocal(input: WriteAttachmentInput): Promise<MutationResult<AttachmentResult>>;
|
|
217
|
+
};
|
|
218
|
+
dispose(): Promise<void>;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type { AttachmentResult as A, CreateWorkspaceOptions as C, DeletePreviewItem as D, KnowledgeBaseSnapshot as K, MoveTocEntryInput as M, NoteDocument as N, RenameNoteInput as R, SaveNoteInput as S, TNotesWorkspace as T, UpdateNoteConfigInput as U, WorkspaceDiagnostic as W, ChangedFile as a, CreateNoteInput as b, CreateTocGroupInput as c, DeleteTocEntryInput as d, DeleteTocEntryPreview as e, MutationResult as f, NotePlacement as g, RenameTocGroupInput as h, TocEntryRef as i, WorkspaceHealth as j, WorkspaceKnowledgeBaseConfig as k, WorkspaceLogger as l, WorkspaceNoteConfig as m, WorkspaceNoteSummary as n, WriteAttachmentInput as o };
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { N as NoteConfig, T as TNotesConfig } from './note-oGm44Rw8.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* utils/tocHelpers.ts
|
|
5
|
+
*
|
|
6
|
+
* 根目录 TOC.md 解析、序列化与 sidebar 树构建
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** 目录节点 */
|
|
10
|
+
interface TocFolderNode {
|
|
11
|
+
kind: 'folder';
|
|
12
|
+
title: string;
|
|
13
|
+
indent: number;
|
|
14
|
+
tocLineIndex: number;
|
|
15
|
+
children: TocTreeNode[];
|
|
16
|
+
}
|
|
17
|
+
/** 笔记节点(可有 children,语雀式父笔记) */
|
|
18
|
+
interface TocNoteNode {
|
|
19
|
+
kind: 'note';
|
|
20
|
+
noteIndex: string;
|
|
21
|
+
indent: number;
|
|
22
|
+
tocLineIndex: number;
|
|
23
|
+
children: TocTreeNode[];
|
|
24
|
+
}
|
|
25
|
+
type TocTreeNode = TocFolderNode | TocNoteNode;
|
|
26
|
+
/** Sidebar 项(与 VitePress sidebar 结构一致) */
|
|
27
|
+
interface TocSidebarItem {
|
|
28
|
+
text: string;
|
|
29
|
+
link?: string;
|
|
30
|
+
collapsed?: boolean;
|
|
31
|
+
items?: TocSidebarItem[];
|
|
32
|
+
/** 纯目录节点路径(从根到当前目录的标题链,仅 UI 展示) */
|
|
33
|
+
folderPath?: string[];
|
|
34
|
+
/** TOC.md 中对应行的 0-based 行号(CRUD/拖拽主键) */
|
|
35
|
+
tocLineIndex?: number;
|
|
36
|
+
/** dev 拖拽用确定性 nodeId(不写 TOC.md) */
|
|
37
|
+
nodeId?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type WorkspaceDiagnosticSeverity = 'error' | 'warning' | 'info';
|
|
41
|
+
interface WorkspaceDiagnostic {
|
|
42
|
+
code: string;
|
|
43
|
+
message: string;
|
|
44
|
+
severity: WorkspaceDiagnosticSeverity;
|
|
45
|
+
path?: string;
|
|
46
|
+
}
|
|
47
|
+
type WorkspaceHealth = {
|
|
48
|
+
status: 'ready';
|
|
49
|
+
diagnostics: WorkspaceDiagnostic[];
|
|
50
|
+
} | {
|
|
51
|
+
status: 'invalid';
|
|
52
|
+
diagnostics: WorkspaceDiagnostic[];
|
|
53
|
+
} | {
|
|
54
|
+
status: 'future-schema';
|
|
55
|
+
diagnostics: WorkspaceDiagnostic[];
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Core only edits known fields, but it must retain fields introduced by a
|
|
59
|
+
* knowledge base or by a newer Core release.
|
|
60
|
+
*/
|
|
61
|
+
type WorkspaceNoteConfig = NoteConfig & Record<string, unknown>;
|
|
62
|
+
type WorkspaceKnowledgeBaseConfig = TNotesConfig & Record<string, unknown>;
|
|
63
|
+
interface WorkspaceNoteSummary {
|
|
64
|
+
uuid: string;
|
|
65
|
+
index: string;
|
|
66
|
+
title: string;
|
|
67
|
+
dirName: string;
|
|
68
|
+
directoryPath: string;
|
|
69
|
+
readmePath: string;
|
|
70
|
+
configPath: string;
|
|
71
|
+
config: WorkspaceNoteConfig;
|
|
72
|
+
revision: string;
|
|
73
|
+
}
|
|
74
|
+
interface KnowledgeBaseSnapshot {
|
|
75
|
+
id: string;
|
|
76
|
+
rootPath: string;
|
|
77
|
+
config: WorkspaceKnowledgeBaseConfig | null;
|
|
78
|
+
health: WorkspaceHealth;
|
|
79
|
+
toc: TocTreeNode[];
|
|
80
|
+
sidebar: TocSidebarItem[];
|
|
81
|
+
notes: WorkspaceNoteSummary[];
|
|
82
|
+
revision: string;
|
|
83
|
+
}
|
|
84
|
+
interface NoteDocument extends WorkspaceNoteSummary {
|
|
85
|
+
content: string;
|
|
86
|
+
}
|
|
87
|
+
interface ChangedFile {
|
|
88
|
+
path: string;
|
|
89
|
+
kind: 'created' | 'updated' | 'deleted' | 'renamed';
|
|
90
|
+
previousPath?: string;
|
|
91
|
+
}
|
|
92
|
+
interface MutationResult<T> {
|
|
93
|
+
value: T;
|
|
94
|
+
changedFiles: ChangedFile[];
|
|
95
|
+
snapshotRevision: string;
|
|
96
|
+
}
|
|
97
|
+
interface WorkspaceLogger {
|
|
98
|
+
debug?(message: string, details?: unknown): void;
|
|
99
|
+
info?(message: string, details?: unknown): void;
|
|
100
|
+
warn?(message: string, details?: unknown): void;
|
|
101
|
+
error?(message: string, details?: unknown): void;
|
|
102
|
+
}
|
|
103
|
+
interface CreateWorkspaceOptions {
|
|
104
|
+
rootPath: string;
|
|
105
|
+
logger?: WorkspaceLogger;
|
|
106
|
+
format?: {
|
|
107
|
+
prettier?: boolean;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
interface SaveNoteInput {
|
|
111
|
+
noteUuid: string;
|
|
112
|
+
content: string;
|
|
113
|
+
expectedRevision: string;
|
|
114
|
+
prettier?: boolean;
|
|
115
|
+
}
|
|
116
|
+
type NotePlacement = {
|
|
117
|
+
type: 'root';
|
|
118
|
+
placement?: 'start' | 'end';
|
|
119
|
+
} | {
|
|
120
|
+
type: 'note';
|
|
121
|
+
targetNoteUuid: string;
|
|
122
|
+
placement: 'before' | 'after' | 'inside';
|
|
123
|
+
} | {
|
|
124
|
+
type: 'folder';
|
|
125
|
+
folderPath: string[];
|
|
126
|
+
placement: 'before' | 'after' | 'inside';
|
|
127
|
+
};
|
|
128
|
+
interface CreateNoteInput {
|
|
129
|
+
title: string;
|
|
130
|
+
placement?: NotePlacement;
|
|
131
|
+
config?: Partial<Pick<WorkspaceNoteConfig, 'description' | 'enableDiscussions'>>;
|
|
132
|
+
expectedSnapshotRevision?: string;
|
|
133
|
+
}
|
|
134
|
+
interface RenameNoteInput {
|
|
135
|
+
noteUuid: string;
|
|
136
|
+
title: string;
|
|
137
|
+
expectedRevision: string;
|
|
138
|
+
}
|
|
139
|
+
interface UpdateNoteConfigInput {
|
|
140
|
+
noteUuid: string;
|
|
141
|
+
updates: Partial<Pick<WorkspaceNoteConfig, 'done' | 'description' | 'enableDiscussions'>>;
|
|
142
|
+
expectedRevision: string;
|
|
143
|
+
}
|
|
144
|
+
type TocEntryRef = {
|
|
145
|
+
type: 'note';
|
|
146
|
+
noteUuid: string;
|
|
147
|
+
} | {
|
|
148
|
+
type: 'folder';
|
|
149
|
+
folderPath: string[];
|
|
150
|
+
} | {
|
|
151
|
+
type: 'line';
|
|
152
|
+
tocLineIndex: number;
|
|
153
|
+
};
|
|
154
|
+
interface MoveTocEntryInput {
|
|
155
|
+
source: TocEntryRef;
|
|
156
|
+
target: TocEntryRef;
|
|
157
|
+
placement: 'before' | 'after' | 'inside';
|
|
158
|
+
expectedSnapshotRevision: string;
|
|
159
|
+
}
|
|
160
|
+
interface CreateTocGroupInput {
|
|
161
|
+
title: string;
|
|
162
|
+
placement?: NotePlacement;
|
|
163
|
+
expectedSnapshotRevision: string;
|
|
164
|
+
}
|
|
165
|
+
interface RenameTocGroupInput {
|
|
166
|
+
folderPath: string[];
|
|
167
|
+
title: string;
|
|
168
|
+
expectedSnapshotRevision: string;
|
|
169
|
+
}
|
|
170
|
+
interface DeletePreviewItem {
|
|
171
|
+
noteUuid: string;
|
|
172
|
+
index: string;
|
|
173
|
+
title: string;
|
|
174
|
+
directoryPath: string;
|
|
175
|
+
}
|
|
176
|
+
interface DeleteTocEntryPreview {
|
|
177
|
+
entry: TocEntryRef;
|
|
178
|
+
notes: DeletePreviewItem[];
|
|
179
|
+
filePaths: string[];
|
|
180
|
+
directoryPaths: string[];
|
|
181
|
+
snapshotRevision: string;
|
|
182
|
+
}
|
|
183
|
+
interface DeleteTocEntryInput {
|
|
184
|
+
entry: TocEntryRef;
|
|
185
|
+
expectedSnapshotRevision: string;
|
|
186
|
+
}
|
|
187
|
+
interface WriteAttachmentInput {
|
|
188
|
+
noteUuid: string;
|
|
189
|
+
fileName: string;
|
|
190
|
+
data: Uint8Array;
|
|
191
|
+
}
|
|
192
|
+
interface AttachmentResult {
|
|
193
|
+
absolutePath: string;
|
|
194
|
+
markdownPath: string;
|
|
195
|
+
}
|
|
196
|
+
interface TNotesWorkspace {
|
|
197
|
+
inspect(): Promise<KnowledgeBaseSnapshot>;
|
|
198
|
+
refresh(): Promise<KnowledgeBaseSnapshot>;
|
|
199
|
+
reconcileTocCompletion(): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
200
|
+
notes: {
|
|
201
|
+
read(noteUuid: string): Promise<NoteDocument>;
|
|
202
|
+
save(input: SaveNoteInput): Promise<MutationResult<NoteDocument>>;
|
|
203
|
+
create(input: CreateNoteInput): Promise<MutationResult<NoteDocument>>;
|
|
204
|
+
rename(input: RenameNoteInput): Promise<MutationResult<NoteDocument>>;
|
|
205
|
+
updateConfig(input: UpdateNoteConfigInput): Promise<MutationResult<NoteDocument>>;
|
|
206
|
+
};
|
|
207
|
+
toc: {
|
|
208
|
+
move(input: MoveTocEntryInput): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
209
|
+
createGroup(input: CreateTocGroupInput): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
210
|
+
renameGroup(input: RenameTocGroupInput): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
211
|
+
previewDelete(entry: TocEntryRef): Promise<DeleteTocEntryPreview>;
|
|
212
|
+
deleteEntry(input: DeleteTocEntryInput): Promise<MutationResult<KnowledgeBaseSnapshot>>;
|
|
213
|
+
setDone(input: UpdateNoteConfigInput): Promise<MutationResult<NoteDocument>>;
|
|
214
|
+
};
|
|
215
|
+
attachments: {
|
|
216
|
+
writeLocal(input: WriteAttachmentInput): Promise<MutationResult<AttachmentResult>>;
|
|
217
|
+
};
|
|
218
|
+
dispose(): Promise<void>;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type { AttachmentResult as A, CreateWorkspaceOptions as C, DeletePreviewItem as D, KnowledgeBaseSnapshot as K, MoveTocEntryInput as M, NoteDocument as N, RenameNoteInput as R, SaveNoteInput as S, TNotesWorkspace as T, UpdateNoteConfigInput as U, WorkspaceDiagnostic as W, ChangedFile as a, CreateNoteInput as b, CreateTocGroupInput as c, DeleteTocEntryInput as d, DeleteTocEntryPreview as e, MutationResult as f, NotePlacement as g, RenameTocGroupInput as h, TocEntryRef as i, WorkspaceHealth as j, WorkspaceKnowledgeBaseConfig as k, WorkspaceLogger as l, WorkspaceNoteConfig as m, WorkspaceNoteSummary as n, WriteAttachmentInput as o };
|