crossnote 0.9.22 → 0.9.24
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/README.md +24 -0
- package/out/cjs/index.cjs +274 -265
- package/out/esm/index.mjs +284 -275
- package/out/styles/style-template.css +1 -1
- package/out/types/src/custom-markdown-it-features/colon-fenced-code-blocks.d.ts +1 -0
- package/out/types/src/custom-markdown-it-features/tag.d.ts +4 -0
- package/out/types/src/custom-markdown-it-features/wikilink.d.ts +1 -0
- package/out/types/src/notebook/index.d.ts +23 -2
- package/out/types/src/notebook/note-fragments.d.ts +10 -0
- package/out/types/src/notebook/note.d.ts +0 -1
- package/out/types/src/notebook/reference.d.ts +11 -3
- package/out/types/src/notebook/types.d.ts +3 -0
- package/out/types/src/render-enhancers/embedded-wikilinks.d.ts +3 -0
- package/out/types/src/webview/components/ContextMenu.d.ts +1 -0
- package/out/types/src/webview/containers/preview.d.ts +3 -0
- package/out/types/src/webview/lib/anchor-routing.d.ts +11 -0
- package/out/types/test/anchor-routing.test.d.ts +1 -0
- package/out/types/test/colon-fence.test.d.ts +1 -0
- package/out/types/test/math.test.d.ts +1 -0
- package/out/types/test/note-fragments.test.d.ts +1 -0
- package/out/types/test/notebook-memory-safety.test.d.ts +1 -0
- package/out/types/test/tag-references.test.d.ts +1 -0
- package/out/types/test/tag.test.d.ts +1 -0
- package/out/types/test/toc.test.d.ts +1 -0
- package/out/types/test/wikilink-embed.test.d.ts +1 -0
- package/out/types/test/wikilink-indexing.test.d.ts +1 -0
- package/out/types/test/wikilink.test.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/out/webview/preview.css +1 -1
- package/out/webview/preview.js +197 -197
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview ul{list-style:disc}.markdown-preview ul ul{list-style:circle}.markdown-preview ul ul ul{list-style:square}.markdown-preview ol{list-style:decimal}.markdown-preview ol ol,.markdown-preview ul ol{list-style-type:lower-roman}.markdown-preview ol ol ol,.markdown-preview ol ul ol,.markdown-preview ul ol ol,.markdown-preview ul ul ol{list-style-type:lower-alpha}.markdown-preview .newpage,.markdown-preview .pagebreak{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center!important}.markdown-preview:not([data-for=preview]) .code-chunk .code-chunk-btn-group{display:none}.markdown-preview:not([data-for=preview]) .code-chunk .status{display:none}.markdown-preview:not([data-for=preview]) .code-chunk .output-div{margin-bottom:16px}.markdown-preview .md-toc{padding:0}.markdown-preview .md-toc .md-toc-details{margin:0;padding:0;border:none}.markdown-preview .md-toc summary.md-toc-link-wrapper{cursor:pointer;list-style-position:outside}.markdown-preview .md-toc summary.md-toc-link-wrapper::marker{font-size:.85em}.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link{display:inline;padding:.25rem 0}.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link div,.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link p{display:inline}.markdown-preview .md-toc .md-toc-link-wrapper.highlighted .md-toc-link{font-weight:800}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='0']{margin-left:12px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='1']{margin-left:28px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='2']{margin-left:44px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='3']{margin-left:60px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='4']{margin-left:76px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='5']{margin-left:80px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,.66);border:4px solid rgba(150,150,150,.66);background-clip:content-box}html body[for=html-export]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0;min-height:100vh}@media screen and (min-width:914px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{font-size:14px!important;padding:1em}}@media print{html body[for=html-export]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for=html-export]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,.66);border:4px solid rgba(150,150,150,.66);background-clip:content-box}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc{padding:0 16px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-details{margin:0;padding:0;border:none}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link{display:inline;padding:.25rem 0}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link div,html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link p{display:inline}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper.highlighted .md-toc-link{font-weight:800}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='0']{padding-left:0}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='1']{padding-left:16px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='2']{padding-left:32px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='3']{padding-left:48px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='4']{padding-left:64px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='5']{padding-left:80px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% - 300px);padding:2em calc(50% - 457px - 300px / 2);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for=html-export]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for=html-export]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
|
|
1
|
+
.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview ul{list-style:disc}.markdown-preview ul ul{list-style:circle}.markdown-preview ul ul ul{list-style:square}.markdown-preview ol{list-style:decimal}.markdown-preview ol ol,.markdown-preview ul ol{list-style-type:lower-roman}.markdown-preview ol ol ol,.markdown-preview ol ul ol,.markdown-preview ul ol ol,.markdown-preview ul ul ol{list-style-type:lower-alpha}.markdown-preview .newpage,.markdown-preview .pagebreak{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center!important}.markdown-preview:not([data-for=preview]) .code-chunk .code-chunk-btn-group{display:none}.markdown-preview:not([data-for=preview]) .code-chunk .status{display:none}.markdown-preview:not([data-for=preview]) .code-chunk .output-div{margin-bottom:16px}.markdown-preview .md-toc{padding:0}.markdown-preview .md-toc .md-toc-details{margin:0;padding:0;border:none}.markdown-preview .md-toc summary.md-toc-link-wrapper{cursor:pointer;list-style-position:outside}.markdown-preview .md-toc summary.md-toc-link-wrapper::marker{font-size:.85em}.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link{display:inline;padding:.25rem 0}.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link div,.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link p{display:inline}.markdown-preview .md-toc .md-toc-link-wrapper.highlighted .md-toc-link{font-weight:800}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='0']{margin-left:12px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='1']{margin-left:28px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='2']{margin-left:44px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='3']{margin-left:60px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='4']{margin-left:76px}.markdown-preview .md-toc .md-toc-link-wrapper[data-level='5']{margin-left:80px}.markdown-preview a.tag,.markdown-preview a.tag:active,.markdown-preview a.tag:link,.markdown-preview a.tag:visited,.markdown-preview span.tag{display:inline-block;background-color:var(--vscode-badge-background,rgba(127,127,127,.18));color:var(--vscode-badge-foreground,currentColor);border-radius:2em;font-size:.85em;font-weight:500;padding:.05em .55em;line-height:1.5;white-space:nowrap;text-decoration:none;text-shadow:none;box-shadow:none;transition:background-color .12s ease,opacity .12s ease}.markdown-preview a.tag{cursor:pointer}.markdown-preview a.tag:focus,.markdown-preview a.tag:hover{background-color:var(--vscode-badge-background,rgba(127,127,127,.32));color:var(--vscode-badge-foreground,currentColor);opacity:.85;text-decoration:none;outline:0}.markdown-preview .wikilink-embed-content{border-left:3px solid var(--vscode-textBlockQuote-border,rgba(128,128,128,.3));background:var(--vscode-textBlockQuote-background,rgba(128,128,128,.05));margin:.5em 0;padding:.5em .75em;border-radius:0 3px 3px 0}.markdown-preview .wikilink-embed-content.wikilink-embed-error{border-left-color:var(--vscode-errorForeground,#cf222e);color:var(--vscode-errorForeground,#cf222e);font-style:italic;opacity:.8}.markdown-preview .wikilink-embed-content h1:first-child,.markdown-preview .wikilink-embed-content h2:first-child,.markdown-preview .wikilink-embed-content h3:first-child,.markdown-preview .wikilink-embed-content h4:first-child,.markdown-preview .wikilink-embed-content h5:first-child,.markdown-preview .wikilink-embed-content h6:first-child{margin-top:.25em}.markdown-preview .wikilink-embed-content .wikilink-embed-content{margin:.25em 0;padding:.25em .5em}.markdown-preview .block-id{display:none}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,.66);border:4px solid rgba(150,150,150,.66);background-clip:content-box}html body[for=html-export]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0;min-height:100vh}@media screen and (min-width:914px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{font-size:14px!important;padding:1em}}@media print{html body[for=html-export]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for=html-export]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,.66);border:4px solid rgba(150,150,150,.66);background-clip:content-box}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc{padding:0 16px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-details{margin:0;padding:0;border:none}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link{display:inline;padding:.25rem 0}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link div,html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link p{display:inline}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper.highlighted .md-toc-link{font-weight:800}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='0']{padding-left:0}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='1']{padding-left:16px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='2']{padding-left:32px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='3']{padding-left:48px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='4']{padding-left:64px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper[data-level='5']{padding-left:80px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% - 300px);padding:2em calc(50% - 457px - 300px / 2);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for=html-export]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for=html-export]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
|
|
@@ -3,11 +3,17 @@ import { URI } from 'vscode-uri';
|
|
|
3
3
|
import type { MarkdownRenderer, RenderOptions } from 'markdown_yo';
|
|
4
4
|
import { MarkdownEngine } from '../markdown-engine';
|
|
5
5
|
import { Note, Notes } from './note';
|
|
6
|
-
import { Reference, ReferenceMap } from './reference';
|
|
6
|
+
import { Reference, ReferenceMap, TagReferenceMap } from './reference';
|
|
7
7
|
import { Backlink, ExtendedMarkdownItOptions, FileSystemApi, NotebookConfig } from './types';
|
|
8
8
|
export * from './types';
|
|
9
9
|
export { constructGraphView } from './graph-view';
|
|
10
10
|
export type { GraphViewData, GraphViewLink, GraphViewNode } from './graph-view';
|
|
11
|
+
export { ReferenceMap, TagReferenceMap } from './reference';
|
|
12
|
+
export type { Reference, ReferenceKind } from './reference';
|
|
13
|
+
export { extractBlockIds, extractHeadings, findFragmentTargetLine, } from './note-fragments';
|
|
14
|
+
export type { Note, Notes, NoteConfig, Mentions } from './note';
|
|
15
|
+
export { matter, matterStringify } from './markdown';
|
|
16
|
+
export type { MatterOutput } from './markdown';
|
|
11
17
|
interface NotebookConstructorArgs {
|
|
12
18
|
notebookPath: string;
|
|
13
19
|
config: Partial<NotebookConfig>;
|
|
@@ -27,7 +33,10 @@ export declare class Notebook {
|
|
|
27
33
|
notes: Notes;
|
|
28
34
|
hasLoadedNotes: boolean;
|
|
29
35
|
referenceMap: ReferenceMap;
|
|
36
|
+
tagReferenceMap: TagReferenceMap;
|
|
30
37
|
private refreshNotesIfNotLoadedMutex;
|
|
38
|
+
private refreshNotesMutex;
|
|
39
|
+
private processedMtimes;
|
|
31
40
|
private search;
|
|
32
41
|
md: MarkdownIt;
|
|
33
42
|
markdownYoRenderer: MarkdownRenderer | null;
|
|
@@ -51,13 +60,23 @@ export declare class Notebook {
|
|
|
51
60
|
updateConfig(config: Partial<NotebookConfig>): void;
|
|
52
61
|
private interpolateConfig;
|
|
53
62
|
getBacklinkedNotes(filePath: string): Promise<Notes>;
|
|
63
|
+
getAllTags(): string[];
|
|
64
|
+
getNotesReferringToTag(tag: string): Promise<Notes>;
|
|
65
|
+
getTagBacklinks(tag: string): Promise<Backlink[]>;
|
|
54
66
|
getNoteBacklinks(filePath: string): Promise<Backlink[]>;
|
|
55
67
|
getReferences(noteFilePath: string, backlinkedNoteFilePath: string): Promise<Reference[]>;
|
|
56
|
-
|
|
68
|
+
private renderReferenceHtml;
|
|
69
|
+
private referenceSourceLine;
|
|
70
|
+
processNoteMentionsAndMentionedBy(filePath: string, markdownOverride?: string): Promise<void>;
|
|
57
71
|
getNote(filePath: string, refreshNoteRelations?: boolean): Promise<Note | null>;
|
|
72
|
+
getNoteMarkdown(filePath: string): Promise<string | null>;
|
|
73
|
+
private loadNoteFromDisk;
|
|
58
74
|
refreshNotesIfNotLoaded({ dir, includeSubdirectories, }: RefreshNotesIfNotLoaded): Promise<Notes>;
|
|
59
75
|
private loadGitignoreForDir;
|
|
60
76
|
refreshNotes(args: RefreshNotesArgs): Promise<Notes>;
|
|
77
|
+
refreshNotesIncremental(args: RefreshNotesArgs): Promise<Notes>;
|
|
78
|
+
private _walkNotebookDir;
|
|
79
|
+
private _collectOnDiskMtimes;
|
|
61
80
|
private _refreshNotesInternal;
|
|
62
81
|
removeNoteRelations(filePath: string): Promise<void>;
|
|
63
82
|
deleteNote(filePath: string, alreadyDeleted?: boolean): Promise<void>;
|
|
@@ -71,5 +90,7 @@ export declare class Notebook {
|
|
|
71
90
|
processWikilink(content: string): {
|
|
72
91
|
text: string;
|
|
73
92
|
link: string;
|
|
93
|
+
hash?: string;
|
|
94
|
+
blockRef?: string;
|
|
74
95
|
};
|
|
75
96
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function extractBlockIds(text: string): Array<{
|
|
2
|
+
id: string;
|
|
3
|
+
body: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function extractHeadings(text: string): Array<{
|
|
6
|
+
level: number;
|
|
7
|
+
text: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function findFragmentTargetLine(text: string, fragment: string): number;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
export type ReferenceKind = 'wikilink' | 'link' | 'tag';
|
|
2
2
|
export interface Reference {
|
|
3
3
|
elementId: string;
|
|
4
|
-
parentToken: Token | null;
|
|
5
|
-
token: Token;
|
|
6
4
|
text: string;
|
|
7
5
|
link: string;
|
|
6
|
+
kind?: ReferenceKind;
|
|
7
|
+
html: string;
|
|
8
|
+
sourceLine?: number;
|
|
8
9
|
}
|
|
9
10
|
export declare class ReferenceMap {
|
|
10
11
|
map: {
|
|
@@ -20,3 +21,10 @@ export declare class ReferenceMap {
|
|
|
20
21
|
noteHasReferences(filePath: string): boolean;
|
|
21
22
|
getReferredByNotesCount(noteFilePath: string): number;
|
|
22
23
|
}
|
|
24
|
+
export declare class TagReferenceMap {
|
|
25
|
+
map: Map<string, Map<string, Reference[]>>;
|
|
26
|
+
addReference(tag: string, referrerFilePath: string, ref: Reference): void;
|
|
27
|
+
deleteReferencesFrom(referrerFilePath: string): void;
|
|
28
|
+
getReferrers(tag: string): Map<string, Reference[]>;
|
|
29
|
+
getAllTags(): string[];
|
|
30
|
+
}
|
|
@@ -60,6 +60,7 @@ export interface NotebookConfig {
|
|
|
60
60
|
enableEmojiSyntax: boolean;
|
|
61
61
|
enableExtendedTableSyntax: boolean;
|
|
62
62
|
enableCriticMarkupSyntax: boolean;
|
|
63
|
+
enableTagSyntax: boolean;
|
|
63
64
|
protocolsWhiteList: string;
|
|
64
65
|
mathRenderingOption: MathRenderingOption;
|
|
65
66
|
mathInlineDelimiters: string[][];
|
|
@@ -99,7 +100,9 @@ export interface NotebookConfig {
|
|
|
99
100
|
d2Theme: number;
|
|
100
101
|
d2Sketch: boolean;
|
|
101
102
|
isVSCode: boolean;
|
|
103
|
+
useVSCodeThemeForContextMenu: boolean;
|
|
102
104
|
alwaysShowBacklinksInPreview: boolean;
|
|
105
|
+
maxNoteFileSize: number;
|
|
103
106
|
}
|
|
104
107
|
export declare function getDefaultMermaidConfig(): MermaidConfig;
|
|
105
108
|
export declare function getDefaultMathjaxConfig(): JsonObject;
|
|
@@ -40,6 +40,9 @@ declare const PreviewContainer: import("unstated-next").Container<{
|
|
|
40
40
|
sourceScheme: import("react").MutableRefObject<string>;
|
|
41
41
|
sourceUri: import("react").MutableRefObject<string | undefined>;
|
|
42
42
|
theme: "dark" | "light";
|
|
43
|
+
zoomIn: () => void;
|
|
43
44
|
zoomLevel: number;
|
|
45
|
+
zoomOut: () => void;
|
|
46
|
+
resetZoom: () => void;
|
|
44
47
|
}, void>;
|
|
45
48
|
export default PreviewContainer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type AnchorClickAction = {
|
|
2
|
+
kind: 'tag';
|
|
3
|
+
tag: string;
|
|
4
|
+
} | {
|
|
5
|
+
kind: 'in-page-anchor';
|
|
6
|
+
targetId: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'external';
|
|
9
|
+
href: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function classifyAnchorClick(a: HTMLAnchorElement, hrefAttr: string): AnchorClickAction | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|