crossnote 0.8.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/LICENSE.md +17 -0
- package/README.md +289 -0
- package/out/cjs/index.cjs +595 -0
- package/out/dependencies/README.md +26 -0
- package/out/dependencies/electron-webview/preload.js +29 -0
- package/out/dependencies/font-awesome/css/font-awesome.min.css +4 -0
- package/out/dependencies/font-awesome/fonts/FontAwesome.otf +0 -0
- package/out/dependencies/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/out/dependencies/font-awesome/fonts/fontawesome-webfont.svg +2671 -0
- package/out/dependencies/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/out/dependencies/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/out/dependencies/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/out/dependencies/jquery/jquery.js +4 -0
- package/out/dependencies/jquery-contextmenu/font/context-menu-icons.eot +0 -0
- package/out/dependencies/jquery-contextmenu/font/context-menu-icons.ttf +0 -0
- package/out/dependencies/jquery-contextmenu/font/context-menu-icons.woff +0 -0
- package/out/dependencies/jquery-contextmenu/font/context-menu-icons.woff2 +0 -0
- package/out/dependencies/jquery-contextmenu/jquery.contextMenu.min.css +16 -0
- package/out/dependencies/jquery-contextmenu/jquery.contextMenu.min.js +2 -0
- package/out/dependencies/jquery-contextmenu/jquery.ui.position.min.js +6 -0
- package/out/dependencies/jquery-modal/jquery.modal.min.css +1 -0
- package/out/dependencies/jquery-modal/jquery.modal.min.js +5 -0
- package/out/dependencies/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/out/dependencies/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/out/dependencies/katex/katex.min.css +1 -0
- package/out/dependencies/mermaid/mermaid.min.js +1642 -0
- package/out/dependencies/remarkable/remarkable.js +4 -0
- package/out/dependencies/reveal/css/print/paper.css +203 -0
- package/out/dependencies/reveal/css/print/pdf.css +164 -0
- package/out/dependencies/reveal/css/reveal.css +8 -0
- package/out/dependencies/reveal/css/theme/README.md +21 -0
- package/out/dependencies/reveal/css/theme/beige.css +301 -0
- package/out/dependencies/reveal/css/theme/black.css +294 -0
- package/out/dependencies/reveal/css/theme/blood.css +323 -0
- package/out/dependencies/reveal/css/theme/league.css +303 -0
- package/out/dependencies/reveal/css/theme/moon.css +301 -0
- package/out/dependencies/reveal/css/theme/night.css +295 -0
- package/out/dependencies/reveal/css/theme/none.css +1 -0
- package/out/dependencies/reveal/css/theme/serif.css +297 -0
- package/out/dependencies/reveal/css/theme/simple.css +297 -0
- package/out/dependencies/reveal/css/theme/sky.css +304 -0
- package/out/dependencies/reveal/css/theme/solarized.css +298 -0
- package/out/dependencies/reveal/css/theme/white.css +294 -0
- package/out/dependencies/reveal/js/reveal.js +9 -0
- package/out/dependencies/reveal/lib/css/zenburn.css +80 -0
- package/out/dependencies/reveal/lib/font/league-gothic/LICENSE +2 -0
- package/out/dependencies/reveal/lib/font/league-gothic/league-gothic.css +10 -0
- package/out/dependencies/reveal/lib/font/league-gothic/league-gothic.eot +0 -0
- package/out/dependencies/reveal/lib/font/league-gothic/league-gothic.ttf +0 -0
- package/out/dependencies/reveal/lib/font/league-gothic/league-gothic.woff +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/LICENSE +45 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
- package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro.css +39 -0
- package/out/dependencies/reveal/lib/js/classList.js +2 -0
- package/out/dependencies/reveal/lib/js/head.min.js +6 -0
- package/out/dependencies/reveal/lib/js/html5shiv.js +7 -0
- package/out/dependencies/reveal/plugin/highlight/highlight.js +77 -0
- package/out/dependencies/reveal/plugin/markdown/example.html +136 -0
- package/out/dependencies/reveal/plugin/markdown/example.md +36 -0
- package/out/dependencies/reveal/plugin/markdown/markdown.js +412 -0
- package/out/dependencies/reveal/plugin/markdown/marked.js +6 -0
- package/out/dependencies/reveal/plugin/math/math.js +67 -0
- package/out/dependencies/reveal/plugin/multiplex/client.js +13 -0
- package/out/dependencies/reveal/plugin/multiplex/index.js +64 -0
- package/out/dependencies/reveal/plugin/multiplex/master.js +34 -0
- package/out/dependencies/reveal/plugin/multiplex/package.json +19 -0
- package/out/dependencies/reveal/plugin/notes/notes.html +792 -0
- package/out/dependencies/reveal/plugin/notes/notes.js +147 -0
- package/out/dependencies/reveal/plugin/notes-server/client.js +65 -0
- package/out/dependencies/reveal/plugin/notes-server/index.js +69 -0
- package/out/dependencies/reveal/plugin/notes-server/notes.html +585 -0
- package/out/dependencies/reveal/plugin/print-pdf/print-pdf.js +67 -0
- package/out/dependencies/reveal/plugin/search/search.js +206 -0
- package/out/dependencies/reveal/plugin/zoom-js/zoom.js +272 -0
- package/out/dependencies/vega-embed/vega-embed.min.js +7 -0
- package/out/dependencies/wavedrom/default.js +3 -0
- package/out/dependencies/wavedrom/wavedrom.min.js +14 -0
- package/out/esm/index.mjs +595 -0
- package/out/styles/loading.css +1 -0
- package/out/styles/markdown-it-admonition.css +1 -0
- package/out/styles/octocat-spinner-128.gif +0 -0
- package/out/styles/preview.css +1 -0
- package/out/styles/preview_theme/atom-dark.css +1 -0
- package/out/styles/preview_theme/atom-light.css +1 -0
- package/out/styles/preview_theme/atom-material.css +1 -0
- package/out/styles/preview_theme/github-dark.css +1 -0
- package/out/styles/preview_theme/github-light.css +1 -0
- package/out/styles/preview_theme/github.css +0 -0
- package/out/styles/preview_theme/gothic.css +1 -0
- package/out/styles/preview_theme/medium.css +1 -0
- package/out/styles/preview_theme/monokai.css +1 -0
- package/out/styles/preview_theme/newsprint.css +1 -0
- package/out/styles/preview_theme/night.css +1 -0
- package/out/styles/preview_theme/none.css +0 -0
- package/out/styles/preview_theme/one-dark.css +1 -0
- package/out/styles/preview_theme/one-light.css +1 -0
- package/out/styles/preview_theme/solarized-dark.css +1 -0
- package/out/styles/preview_theme/solarized-light.css +1 -0
- package/out/styles/preview_theme/vue.css +1 -0
- package/out/styles/prism_theme/atom-dark.css +1 -0
- package/out/styles/prism_theme/atom-light.css +1 -0
- package/out/styles/prism_theme/atom-material.css +1 -0
- package/out/styles/prism_theme/coy.css +1 -0
- package/out/styles/prism_theme/darcula.css +1 -0
- package/out/styles/prism_theme/dark.css +1 -0
- package/out/styles/prism_theme/default.css +1 -0
- package/out/styles/prism_theme/funky.css +1 -0
- package/out/styles/prism_theme/github.css +1 -0
- package/out/styles/prism_theme/hopscotch.css +1 -0
- package/out/styles/prism_theme/monokai.css +1 -0
- package/out/styles/prism_theme/okaidia.css +1 -0
- package/out/styles/prism_theme/one-dark.css +1 -0
- package/out/styles/prism_theme/one-light.css +1 -0
- package/out/styles/prism_theme/pen-paper-coffee.css +1 -0
- package/out/styles/prism_theme/pojoaque.css +1 -0
- package/out/styles/prism_theme/solarized-dark.css +1 -0
- package/out/styles/prism_theme/solarized-light.css +1 -0
- package/out/styles/prism_theme/twilight.css +1 -0
- package/out/styles/prism_theme/vs.css +1 -0
- package/out/styles/prism_theme/vue.css +1 -0
- package/out/styles/prism_theme/xonokai.css +1 -0
- package/out/styles/style-template.css +1 -0
- package/out/styles/twemoji.css +1 -0
- package/out/types/src/code-chunk/code-chunk-data.d.ts +14 -0
- package/out/types/src/code-chunk/code-chunk.d.ts +3 -0
- package/out/types/src/converters/ebook-convert.d.ts +1 -0
- package/out/types/src/converters/markdown-convert.d.ts +26 -0
- package/out/types/src/converters/pandoc-convert.d.ts +26 -0
- package/out/types/src/converters/prince-convert.d.ts +1 -0
- package/out/types/src/converters/process-graphs.d.ts +22 -0
- package/out/types/src/custom-markdown-it-features/admonition.d.ts +3 -0
- package/out/types/src/custom-markdown-it-features/code-fences.d.ts +3 -0
- package/out/types/src/custom-markdown-it-features/critic-markup.d.ts +4 -0
- package/out/types/src/custom-markdown-it-features/emoji.d.ts +4 -0
- package/out/types/src/custom-markdown-it-features/html5-embed.d.ts +4 -0
- package/out/types/src/custom-markdown-it-features/math.d.ts +4 -0
- package/out/types/src/custom-markdown-it-features/wikilink.d.ts +4 -0
- package/out/types/src/index.d.ts +13 -0
- package/out/types/src/lib/block-attributes/index.d.ts +4 -0
- package/out/types/src/lib/block-attributes/normalizeBlockAttributes.d.ts +2 -0
- package/out/types/src/lib/block-attributes/parseBlockAttributes.d.ts +2 -0
- package/out/types/src/lib/block-attributes/stringifyBlockAttributes.d.ts +2 -0
- package/out/types/src/lib/block-attributes/types.d.ts +3 -0
- package/out/types/src/lib/block-info/index.d.ts +3 -0
- package/out/types/src/lib/block-info/normalizeBlockInfo.d.ts +2 -0
- package/out/types/src/lib/block-info/parseBlockInfo.d.ts +2 -0
- package/out/types/src/lib/block-info/types.d.ts +6 -0
- package/out/types/src/lib/compute-checksum.d.ts +3 -0
- package/out/types/src/markdown-engine/custom-subjects.d.ts +11 -0
- package/out/types/src/markdown-engine/extension-helper.d.ts +1 -0
- package/out/types/src/markdown-engine/heading-id-generator.d.ts +5 -0
- package/out/types/src/markdown-engine/index.d.ts +108 -0
- package/out/types/src/markdown-engine/toc.d.ts +18 -0
- package/out/types/src/markdown-engine/transformer.d.ts +28 -0
- package/out/types/src/notebook/config-helper.d.ts +16 -0
- package/out/types/src/notebook/graph-view.d.ts +15 -0
- package/out/types/src/notebook/index.d.ts +53 -0
- package/out/types/src/notebook/markdown.d.ts +11 -0
- package/out/types/src/notebook/note.d.ts +25 -0
- package/out/types/src/notebook/reference.d.ts +22 -0
- package/out/types/src/notebook/search.d.ts +18 -0
- package/out/types/src/notebook/slash.d.ts +1 -0
- package/out/types/src/notebook/types.d.ts +91 -0
- package/out/types/src/prism/iele.d.ts +1 -0
- package/out/types/src/prism/k.d.ts +1 -0
- package/out/types/src/render-enhancers/code-block-styling.d.ts +2 -0
- package/out/types/src/render-enhancers/embedded-local-images.d.ts +3 -0
- package/out/types/src/render-enhancers/embedded-svgs.d.ts +3 -0
- package/out/types/src/render-enhancers/extended-table-syntax.d.ts +2 -0
- package/out/types/src/render-enhancers/fenced-code-chunks.d.ts +19 -0
- package/out/types/src/render-enhancers/fenced-diagrams.d.ts +12 -0
- package/out/types/src/render-enhancers/fenced-math.d.ts +3 -0
- package/out/types/src/render-enhancers/resolved-image-paths.d.ts +2 -0
- package/out/types/src/renderers/parse-math.d.ts +13 -0
- package/out/types/src/renderers/puml-server.d.ts +5 -0
- package/out/types/src/renderers/puml.d.ts +6 -0
- package/out/types/src/renderers/vega-lite.d.ts +1 -0
- package/out/types/src/renderers/vega.d.ts +1 -0
- package/out/types/src/renderers/viz.d.ts +2 -0
- package/out/types/src/tools/image-uploader.d.ts +9 -0
- package/out/types/src/tools/latex.d.ts +8 -0
- package/out/types/src/tools/magick.d.ts +1 -0
- package/out/types/src/tools/mermaid.d.ts +1 -0
- package/out/types/src/tools/pdf.d.ts +7 -0
- package/out/types/src/tools/wavedrom.d.ts +1 -0
- package/out/types/src/utility.d.ts +27 -0
- package/out/types/src/webview/webview.d.ts +1 -0
- package/out/types/test/header-id-generator.test.d.ts +1 -0
- package/out/types/test/lib/attributes.test.d.ts +1 -0
- package/out/types/test/lib/block-info.test.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -0
- package/out/webview/index.js +22 -0
- package/package.json +127 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CodeChunkData } from '../code-chunk/code-chunk-data';
|
|
2
|
+
export declare function processGraphs(text: string, { fileDirectoryPath, projectDirectoryPath, imageDirectoryPath, imageFilePrefix, useRelativeFilePath, codeChunksData, graphsCache, imageMagickPath, mermaidTheme, addOptionsStr, plantumlJarPath, plantumlServer, }: {
|
|
3
|
+
fileDirectoryPath: string;
|
|
4
|
+
projectDirectoryPath: string;
|
|
5
|
+
imageDirectoryPath: string;
|
|
6
|
+
imageFilePrefix: string;
|
|
7
|
+
useRelativeFilePath: boolean;
|
|
8
|
+
codeChunksData: {
|
|
9
|
+
[key: string]: CodeChunkData;
|
|
10
|
+
};
|
|
11
|
+
graphsCache: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
imageMagickPath: string;
|
|
15
|
+
mermaidTheme: string;
|
|
16
|
+
addOptionsStr: boolean;
|
|
17
|
+
plantumlJarPath: string;
|
|
18
|
+
plantumlServer: string;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
outputString: string;
|
|
21
|
+
imagePaths: string[];
|
|
22
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { addFileProtocol, getCrossnoteBuildDirectory, openFile, setCrossnoteBuildDirectory, uploadImage, useExternalAddFileProtocolFunction } from './utility';
|
|
2
|
+
export declare const utility: {
|
|
3
|
+
addFileProtocol: typeof addFileProtocol;
|
|
4
|
+
getCrossnoteBuildDirectory: typeof getCrossnoteBuildDirectory;
|
|
5
|
+
openFile: typeof openFile;
|
|
6
|
+
setCrossnoteBuildDirectory: typeof setCrossnoteBuildDirectory;
|
|
7
|
+
useExternalAddFileProtocolFunction: typeof useExternalAddFileProtocolFunction;
|
|
8
|
+
uploadImage: typeof uploadImage;
|
|
9
|
+
};
|
|
10
|
+
export * from './code-chunk/code-chunk-data';
|
|
11
|
+
export * from './markdown-engine';
|
|
12
|
+
export * from './notebook';
|
|
13
|
+
export { loadConfigsInDirectory, wrapNodeFSAsApi, } from './notebook/config-helper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function scopeForLanguageName(language: any): any;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { JsonObject } from 'type-fest';
|
|
2
|
+
import * as vscode from 'vscode';
|
|
3
|
+
import { Notebook } from '../notebook';
|
|
4
|
+
interface MarkdownEngineConstructorArgs {
|
|
5
|
+
notebook: Notebook;
|
|
6
|
+
filePath: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MarkdownEngineRenderOption {
|
|
9
|
+
useRelativeFilePath: boolean;
|
|
10
|
+
isForPreview: boolean;
|
|
11
|
+
hideFrontMatter: boolean;
|
|
12
|
+
triggeredBySave?: boolean;
|
|
13
|
+
runAllCodeChunks?: boolean;
|
|
14
|
+
emojiToSvg?: boolean;
|
|
15
|
+
vscodePreviewPanel?: vscode.WebviewPanel | null;
|
|
16
|
+
fileDirectoryPath?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface MarkdownEngineOutput {
|
|
19
|
+
html: string;
|
|
20
|
+
markdown: string;
|
|
21
|
+
tocHTML: string;
|
|
22
|
+
yamlConfig: JsonObject;
|
|
23
|
+
JSAndCssFiles: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface HTMLTemplateOption {
|
|
26
|
+
isForPrint: boolean;
|
|
27
|
+
isForPrince: boolean;
|
|
28
|
+
offline: boolean;
|
|
29
|
+
embedLocalImages: boolean;
|
|
30
|
+
embedSVG?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare class MarkdownEngine {
|
|
33
|
+
private readonly filePath;
|
|
34
|
+
private readonly fileDirectoryPath;
|
|
35
|
+
private readonly projectDirectoryPath;
|
|
36
|
+
private readonly notebook;
|
|
37
|
+
private readonly fs;
|
|
38
|
+
private headings;
|
|
39
|
+
private tocHTML;
|
|
40
|
+
private vscodePreviewPanel;
|
|
41
|
+
private graphsCache;
|
|
42
|
+
private codeChunksData;
|
|
43
|
+
private filesCache;
|
|
44
|
+
isPreviewInPresentationMode: boolean;
|
|
45
|
+
constructor({ filePath, notebook }: MarkdownEngineConstructorArgs);
|
|
46
|
+
private get protocolsWhiteListRegExp();
|
|
47
|
+
cacheCodeChunkResult(id: string, result: string): void;
|
|
48
|
+
private generateScriptsForPreview;
|
|
49
|
+
private static AutoPrismThemeMap;
|
|
50
|
+
private static AutoPrismThemeMapForPresentation;
|
|
51
|
+
private getPrismTheme;
|
|
52
|
+
private generateStylesForPreview;
|
|
53
|
+
private generateJSAndCssFilesForPreview;
|
|
54
|
+
generateHTMLTemplateForPreview({ inputString, body, webviewScript, scripts, styles, head, config, vscodePreviewPanel, contentSecurityPolicy, isVSCodeWebExtension, }: {
|
|
55
|
+
inputString?: string;
|
|
56
|
+
body?: string;
|
|
57
|
+
webviewScript?: string;
|
|
58
|
+
scripts?: string;
|
|
59
|
+
styles?: string;
|
|
60
|
+
head?: string;
|
|
61
|
+
config: JsonObject;
|
|
62
|
+
vscodePreviewPanel: vscode.WebviewPanel | null | undefined;
|
|
63
|
+
contentSecurityPolicy?: string;
|
|
64
|
+
isVSCodeWebExtension?: boolean;
|
|
65
|
+
}): Promise<string>;
|
|
66
|
+
generateHTMLTemplateForExport(html: string, yamlConfig: {} | undefined, options: HTMLTemplateOption): Promise<string>;
|
|
67
|
+
openInBrowser({ runAllCodeChunks }: {
|
|
68
|
+
runAllCodeChunks?: boolean | undefined;
|
|
69
|
+
}): Promise<void>;
|
|
70
|
+
htmlExport({ offline, runAllCodeChunks, }: {
|
|
71
|
+
offline?: boolean | undefined;
|
|
72
|
+
runAllCodeChunks?: boolean | undefined;
|
|
73
|
+
}): Promise<string>;
|
|
74
|
+
chromeExport({ fileType, runAllCodeChunks, openFileAfterGeneration, }: {
|
|
75
|
+
fileType?: string | undefined;
|
|
76
|
+
runAllCodeChunks?: boolean | undefined;
|
|
77
|
+
openFileAfterGeneration?: boolean | undefined;
|
|
78
|
+
}): Promise<string>;
|
|
79
|
+
princeExport({ runAllCodeChunks, openFileAfterGeneration, }: {
|
|
80
|
+
runAllCodeChunks?: boolean | undefined;
|
|
81
|
+
openFileAfterGeneration?: boolean | undefined;
|
|
82
|
+
}): Promise<string>;
|
|
83
|
+
private eBookDownloadImages;
|
|
84
|
+
eBookExport({ fileType, runAllCodeChunks, }: {
|
|
85
|
+
fileType: string;
|
|
86
|
+
runAllCodeChunks?: boolean;
|
|
87
|
+
}): Promise<string>;
|
|
88
|
+
pandocExport({ runAllCodeChunks, openFileAfterGeneration, }: {
|
|
89
|
+
runAllCodeChunks?: boolean | undefined;
|
|
90
|
+
openFileAfterGeneration?: boolean | undefined;
|
|
91
|
+
}): Promise<string>;
|
|
92
|
+
markdownExport({ runAllCodeChunks }: {
|
|
93
|
+
runAllCodeChunks?: boolean | undefined;
|
|
94
|
+
}): Promise<string>;
|
|
95
|
+
private exportOnSave;
|
|
96
|
+
private resolveFilePath;
|
|
97
|
+
clearCaches(): void;
|
|
98
|
+
private frontMatterToTable;
|
|
99
|
+
private processFrontMatter;
|
|
100
|
+
private parseSlides;
|
|
101
|
+
pandocRender(text: string | undefined, args: string[]): Promise<string>;
|
|
102
|
+
parseMD(inputString: string, options: MarkdownEngineRenderOption): Promise<MarkdownEngineOutput>;
|
|
103
|
+
runCodeChunks(): Promise<string[]>;
|
|
104
|
+
runCodeChunk(id: string): Promise<string>;
|
|
105
|
+
private modifySource;
|
|
106
|
+
private generateRunOptions;
|
|
107
|
+
}
|
|
108
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface TocOption {
|
|
2
|
+
ordered: boolean;
|
|
3
|
+
depthFrom: number;
|
|
4
|
+
depthTo: number;
|
|
5
|
+
tab: string;
|
|
6
|
+
ignoreLink?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface HeadingData {
|
|
9
|
+
content: string;
|
|
10
|
+
level: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
id?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function toc(headings: HeadingData[], opt: TocOption): {
|
|
15
|
+
content: string;
|
|
16
|
+
array: string[];
|
|
17
|
+
};
|
|
18
|
+
export declare function generateSidebarToCHTML(headings: HeadingData[], mdRender: (md: string) => string, opt: TocOption): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import HeadingIdGenerator from './heading-id-generator';
|
|
2
|
+
import { HeadingData } from './toc';
|
|
3
|
+
export interface TransformMarkdownOutput {
|
|
4
|
+
outputString: string;
|
|
5
|
+
slideConfigs: object[];
|
|
6
|
+
tocBracketEnabled: boolean;
|
|
7
|
+
JSAndCssFiles: string[];
|
|
8
|
+
headings: HeadingData[];
|
|
9
|
+
frontMatterString: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TransformMarkdownOptions {
|
|
12
|
+
fileDirectoryPath: string;
|
|
13
|
+
projectDirectoryPath: string;
|
|
14
|
+
filesCache: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
useRelativeFilePath: boolean;
|
|
18
|
+
forPreview: boolean;
|
|
19
|
+
forMarkdownExport?: boolean;
|
|
20
|
+
protocolsWhiteListRegExp: RegExp | null;
|
|
21
|
+
notSourceFile?: boolean;
|
|
22
|
+
imageDirectoryPath?: string;
|
|
23
|
+
usePandocParser: boolean;
|
|
24
|
+
headingIdGenerator?: HeadingIdGenerator;
|
|
25
|
+
onWillTransformMarkdown?: ((markdown: string) => Promise<string>) | null;
|
|
26
|
+
onDidTransformMarkdown?: ((markdown: string) => Promise<string>) | null;
|
|
27
|
+
}
|
|
28
|
+
export declare function transformMarkdown(inputString: string, { fileDirectoryPath, projectDirectoryPath, filesCache, useRelativeFilePath, forPreview, forMarkdownExport, protocolsWhiteListRegExp, notSourceFile, imageDirectoryPath, usePandocParser, headingIdGenerator, onWillTransformMarkdown, onDidTransformMarkdown, }: TransformMarkdownOptions): Promise<TransformMarkdownOutput>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { KatexOptions } from 'katex';
|
|
2
|
+
import { MermaidConfig } from 'mermaid';
|
|
3
|
+
import { JsonObject } from 'type-fest';
|
|
4
|
+
import { FileSystemApi, ParserConfig } from './types';
|
|
5
|
+
export declare function loadConfigsInDirectory(directoryPath: string, fileSystem: FileSystemApi, createDirectoryIfNotExists?: boolean): Promise<{
|
|
6
|
+
globalCss: string;
|
|
7
|
+
mermaidConfig: MermaidConfig;
|
|
8
|
+
mathjaxConfig: JsonObject;
|
|
9
|
+
katexConfig: KatexOptions;
|
|
10
|
+
parserConfig: ParserConfig;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function getMermaidConfig(configPath: string, fs: FileSystemApi): Promise<MermaidConfig>;
|
|
13
|
+
export declare function getMathjaxConfig(configPath: string, fs: FileSystemApi): Promise<JsonObject>;
|
|
14
|
+
export declare function getKatexConfig(configPath: string, fs: FileSystemApi): Promise<KatexOptions>;
|
|
15
|
+
export declare function getParserConfig(configPath: string, fs: FileSystemApi): Promise<ParserConfig>;
|
|
16
|
+
export declare function wrapNodeFSAsApi(): FileSystemApi;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Notebook } from '.';
|
|
2
|
+
export interface GraphViewNode {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GraphViewLink {
|
|
7
|
+
source: string;
|
|
8
|
+
target: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GraphViewData {
|
|
11
|
+
hash: string;
|
|
12
|
+
nodes: GraphViewNode[];
|
|
13
|
+
links: GraphViewLink[];
|
|
14
|
+
}
|
|
15
|
+
export declare function constructGraphView(notebook: Notebook): GraphViewData;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import MarkdownIt from 'markdown-it';
|
|
2
|
+
import { MarkdownEngine } from '../markdown-engine';
|
|
3
|
+
import { Note, NoteConfig, Notes } from './note';
|
|
4
|
+
import { Reference, ReferenceMap } from './reference';
|
|
5
|
+
import { FileSystemApi, NotebookConfig } from './types';
|
|
6
|
+
export * from './types';
|
|
7
|
+
interface NotebookConstructorArgs {
|
|
8
|
+
notebookPath: string;
|
|
9
|
+
config: Partial<NotebookConfig>;
|
|
10
|
+
fs?: FileSystemApi;
|
|
11
|
+
}
|
|
12
|
+
interface RefreshNotesArgs {
|
|
13
|
+
dir: string;
|
|
14
|
+
includeSubdirectories?: boolean;
|
|
15
|
+
refreshRelations?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare class Notebook {
|
|
18
|
+
notebookPath: string;
|
|
19
|
+
config: NotebookConfig;
|
|
20
|
+
fs: FileSystemApi;
|
|
21
|
+
notes: Notes;
|
|
22
|
+
hasLoadedNotes: boolean;
|
|
23
|
+
referenceMap: ReferenceMap;
|
|
24
|
+
private refreshNotesIfNotLoadedMutex;
|
|
25
|
+
private search;
|
|
26
|
+
md: MarkdownIt;
|
|
27
|
+
private markdownEngines;
|
|
28
|
+
private constructor();
|
|
29
|
+
private init;
|
|
30
|
+
static init(args: NotebookConstructorArgs): Promise<Notebook>;
|
|
31
|
+
private initConfig;
|
|
32
|
+
private initMarkdownIt;
|
|
33
|
+
initFs(_fs?: FileSystemApi): void;
|
|
34
|
+
updateConfig(config: Partial<NotebookConfig>): void;
|
|
35
|
+
private interpolateConfig;
|
|
36
|
+
getBacklinkedNotes(filePath: string): Promise<Notes>;
|
|
37
|
+
getReferences(noteFilePath: string, backlinkedNoteFilePath: string): Promise<Reference[]>;
|
|
38
|
+
processNoteMentionsAndMentionedBy(filePath: string): Promise<void>;
|
|
39
|
+
getNote(filePath: string, refreshNoteRelations?: boolean): Promise<Note | null>;
|
|
40
|
+
refreshNotesIfNotLoaded({ dir, includeSubdirectories, }: RefreshNotesArgs): Promise<Notes>;
|
|
41
|
+
refreshNotes({ dir, includeSubdirectories, refreshRelations, }: RefreshNotesArgs): Promise<Notes>;
|
|
42
|
+
writeNote(filePath: string, markdown: string, noteConfig: NoteConfig): Promise<Note | null>;
|
|
43
|
+
removeNoteRelations(filePath: string): Promise<void>;
|
|
44
|
+
deleteNote(filePath: string): Promise<void>;
|
|
45
|
+
duplicateNote(filePath: string): Promise<Note | null | undefined>;
|
|
46
|
+
private resolveNoteAbsolutePath;
|
|
47
|
+
private resolveNoteRelativePath;
|
|
48
|
+
getNoteMarkdownEngine(filePath: string): MarkdownEngine;
|
|
49
|
+
getNoteMarkdownEngines(): {
|
|
50
|
+
[key: string]: MarkdownEngine;
|
|
51
|
+
};
|
|
52
|
+
clearAllNoteMarkdownEngineCaches(): void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JsonObject } from 'type-fest';
|
|
2
|
+
export declare const TagStopRegExp: RegExp;
|
|
3
|
+
export declare function getTags(markdown: string): string[];
|
|
4
|
+
export declare function sanitizeTag(tagName: string): string;
|
|
5
|
+
export declare function sanitizeNoteTitle(noteTitle: string): string;
|
|
6
|
+
export interface MatterOutput {
|
|
7
|
+
data: JsonObject;
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function matter(markdown: string): MatterOutput;
|
|
11
|
+
export declare function matterStringify(markdown: string, frontMatter: JsonObject): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type FilePath = string;
|
|
2
|
+
export interface NoteConfigEncryption {
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
export interface NoteConfig {
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
modifiedAt: Date;
|
|
8
|
+
pinned?: boolean;
|
|
9
|
+
favorited?: boolean;
|
|
10
|
+
icon?: string;
|
|
11
|
+
aliases?: string[];
|
|
12
|
+
}
|
|
13
|
+
export type Mentions = Set<FilePath>;
|
|
14
|
+
export interface Note {
|
|
15
|
+
notebookPath: string;
|
|
16
|
+
filePath: FilePath;
|
|
17
|
+
title: string;
|
|
18
|
+
markdown: string;
|
|
19
|
+
config: NoteConfig;
|
|
20
|
+
mentions: Mentions;
|
|
21
|
+
}
|
|
22
|
+
export interface Notes {
|
|
23
|
+
[key: string]: Note;
|
|
24
|
+
}
|
|
25
|
+
export declare function getNoteIcon(note: Note): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Token from 'markdown-it/lib/token';
|
|
2
|
+
export interface Reference {
|
|
3
|
+
elementId: string;
|
|
4
|
+
parentToken: Token | null;
|
|
5
|
+
token: Token;
|
|
6
|
+
text: string;
|
|
7
|
+
link: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class ReferenceMap {
|
|
10
|
+
map: {
|
|
11
|
+
[key: string]: {
|
|
12
|
+
[key: string]: Reference[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
constructor();
|
|
16
|
+
addReference(noteFilePath: string, referredByNoteFilePath: string, reference?: Reference): void;
|
|
17
|
+
deleteReferences(noteFilePath: string, referredByNoteFilePath: string): void;
|
|
18
|
+
hasRelation(filePath1: string, filePath2: string): boolean;
|
|
19
|
+
getReferences(noteFilePath: string, referredByNoteFilePath: string): Reference[];
|
|
20
|
+
noteHasReferences(filePath: string): boolean;
|
|
21
|
+
getReferredByNotesCount(noteFilePath: string): number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SearchOptions, SearchResult } from 'minisearch';
|
|
2
|
+
export declare function slugify(str: string, separater?: string): string;
|
|
3
|
+
export interface SearchDoc {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
filePath: string;
|
|
7
|
+
aliases: string[];
|
|
8
|
+
}
|
|
9
|
+
export default class Search {
|
|
10
|
+
private miniSearch;
|
|
11
|
+
private _cache;
|
|
12
|
+
constructor();
|
|
13
|
+
add(filePath: string, title: string, aliases?: string[]): void;
|
|
14
|
+
remove(filePath: string): void;
|
|
15
|
+
search(queryString: string, options?: SearchOptions): SearchResult[];
|
|
16
|
+
addAlias(filePath: string, alias: string): void;
|
|
17
|
+
deleteAlias(filePath: string, alias: string): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function slash(path: any): any;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/// <reference types="cheerio" />
|
|
2
|
+
import { KatexOptions } from 'katex';
|
|
3
|
+
import { MermaidConfig } from 'mermaid';
|
|
4
|
+
import { JsonObject } from 'type-fest';
|
|
5
|
+
export declare const IS_NODE: boolean;
|
|
6
|
+
export type FileSystemStats = {
|
|
7
|
+
mtimeMs: number;
|
|
8
|
+
ctimeMs: number;
|
|
9
|
+
size: number;
|
|
10
|
+
isFile: () => boolean;
|
|
11
|
+
isDirectory: () => boolean;
|
|
12
|
+
isSymbolicLink: () => boolean;
|
|
13
|
+
};
|
|
14
|
+
export type FileSystemApi = {
|
|
15
|
+
readFile: (path: string, encoding?: string) => Promise<string>;
|
|
16
|
+
writeFile: (path: string, content: string, encoding?: string) => Promise<void>;
|
|
17
|
+
mkdir: (path: string) => Promise<void>;
|
|
18
|
+
exists: (path: string) => Promise<boolean>;
|
|
19
|
+
stat: (path: string) => Promise<FileSystemStats>;
|
|
20
|
+
readdir: (path: string) => Promise<string[]>;
|
|
21
|
+
unlink: (path: string) => Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
export type MathRenderingOption = 'None' | 'KaTeX' | 'MathJax';
|
|
24
|
+
export interface ParserConfig {
|
|
25
|
+
onWillParseMarkdown?: (markdown: string) => Promise<string>;
|
|
26
|
+
onDidParseMarkdown?: (html: string, opts: {
|
|
27
|
+
cheerio: CheerioAPI;
|
|
28
|
+
}) => Promise<string>;
|
|
29
|
+
onWillTransformMarkdown?: (markdown: string) => Promise<string>;
|
|
30
|
+
onDidTransformMarkdown?: (markdown: string) => Promise<string>;
|
|
31
|
+
}
|
|
32
|
+
export type PreviewTheme = 'atom-dark.css' | 'atom-light.css' | 'atom-material.css' | 'github-dark.css' | 'github-light.css' | 'gothic.css' | 'medium.css' | 'monokai.css' | 'newsprint.css' | 'night.css' | 'none.css' | 'one-dark.css' | 'one-light.css' | 'solarized-dark.css' | 'solarized-light.css' | 'vue.css';
|
|
33
|
+
export type CodeBlockTheme = 'auto.css' | 'default.css' | 'atom-dark.css' | 'atom-light.css' | 'atom-material.css' | 'coy.css' | 'darcula.css' | 'dark.css' | 'funky.css' | 'github.css' | 'hopscotch.css' | 'monokai.css' | 'okaidia.css' | 'one-dark.css' | 'one-light.css' | 'pen-paper-coffee.css' | 'pojoaque.css' | 'solarized-dark.css' | 'solarized-light.css' | 'twilight.css' | 'vue.css' | 'vs.css' | 'xonokai.css';
|
|
34
|
+
export type RevealJsTheme = 'beige.css' | 'black.css' | 'blood.css' | 'league.css' | 'moon.css' | 'night.css' | 'serif.css' | 'simple.css' | 'sky.css' | 'solarized.css' | 'white.css' | 'none.css';
|
|
35
|
+
export type MermaidTheme = 'default' | 'forest' | 'dark' | 'neutral' | 'null';
|
|
36
|
+
export type FrontMatterRenderingOption = 'none' | 'table' | 'code';
|
|
37
|
+
export interface NotebookConfig {
|
|
38
|
+
globalCss: string;
|
|
39
|
+
mermaidConfig: MermaidConfig;
|
|
40
|
+
mathjaxConfig: JsonObject;
|
|
41
|
+
katexConfig: KatexOptions;
|
|
42
|
+
usePandocParser: boolean;
|
|
43
|
+
parserConfig: ParserConfig;
|
|
44
|
+
breakOnSingleNewLine: boolean;
|
|
45
|
+
enableTypographer: boolean;
|
|
46
|
+
enableWikiLinkSyntax: boolean;
|
|
47
|
+
enableLinkify: boolean;
|
|
48
|
+
useGitHubStylePipedLink: boolean;
|
|
49
|
+
wikiLinkFileExtension: string;
|
|
50
|
+
enableEmojiSyntax: boolean;
|
|
51
|
+
enableExtendedTableSyntax: boolean;
|
|
52
|
+
enableCriticMarkupSyntax: boolean;
|
|
53
|
+
protocolsWhiteList: string;
|
|
54
|
+
mathRenderingOption: MathRenderingOption;
|
|
55
|
+
mathInlineDelimiters: string[][];
|
|
56
|
+
mathBlockDelimiters: string[][];
|
|
57
|
+
mathRenderingOnlineService: string;
|
|
58
|
+
mathjaxV3ScriptSrc: string;
|
|
59
|
+
codeBlockTheme: CodeBlockTheme;
|
|
60
|
+
previewTheme: PreviewTheme;
|
|
61
|
+
revealjsTheme: RevealJsTheme;
|
|
62
|
+
mermaidTheme: MermaidTheme;
|
|
63
|
+
frontMatterRenderingOption: FrontMatterRenderingOption;
|
|
64
|
+
imageFolderPath: string;
|
|
65
|
+
printBackground: boolean;
|
|
66
|
+
chromePath: string;
|
|
67
|
+
imageMagickPath: string;
|
|
68
|
+
pandocPath: string;
|
|
69
|
+
pandocMarkdownFlavor: string;
|
|
70
|
+
pandocArguments: string[];
|
|
71
|
+
latexEngine: string;
|
|
72
|
+
enableScriptExecution: boolean;
|
|
73
|
+
enableHTML5Embed: boolean;
|
|
74
|
+
HTML5EmbedUseImageSyntax: boolean;
|
|
75
|
+
HTML5EmbedUseLinkSyntax: boolean;
|
|
76
|
+
HTML5EmbedIsAllowedHttp: boolean;
|
|
77
|
+
HTML5EmbedAudioAttributes: string;
|
|
78
|
+
HTML5EmbedVideoAttributes: string;
|
|
79
|
+
puppeteerWaitForTimeout: number;
|
|
80
|
+
puppeteerArgs: string[];
|
|
81
|
+
plantumlServer: string;
|
|
82
|
+
plantumlJarPath: string;
|
|
83
|
+
jsdelivrCdnHost: string;
|
|
84
|
+
krokiServer: string;
|
|
85
|
+
isVSCode: boolean;
|
|
86
|
+
}
|
|
87
|
+
export declare function getDefaultMermaidConfig(): MermaidConfig;
|
|
88
|
+
export declare function getDefaultMathjaxConfig(): JsonObject;
|
|
89
|
+
export declare function getDefaultKatexConfig(): KatexOptions;
|
|
90
|
+
export declare function getDefaultParserConfig(): ParserConfig;
|
|
91
|
+
export declare function getDefaultNotebookConfig(): NotebookConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (Prism: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (Prism: any): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="cheerio" />
|
|
2
|
+
import { CodeChunkData, CodeChunksData } from '../code-chunk/code-chunk-data';
|
|
3
|
+
import { BlockInfo } from '../lib/block-info';
|
|
4
|
+
import { MarkdownEngineOutput, MarkdownEngineRenderOption } from '../markdown-engine';
|
|
5
|
+
import { HeadingData } from '../markdown-engine/toc';
|
|
6
|
+
export default function enhance($: CheerioStatic, codeChunksData: CodeChunksData, renderOptions: MarkdownEngineRenderOption, runOptions: RunCodeChunkOptions): Promise<void>;
|
|
7
|
+
export declare function renderCodeBlock($container: Cheerio, normalizedInfo: BlockInfo, $: CheerioStatic, codeChunksData: CodeChunksData, arrayOfCodeChunkData: CodeChunkData[], renderOptions: MarkdownEngineRenderOption, runOptions: RunCodeChunkOptions): Promise<void>;
|
|
8
|
+
export interface RunCodeChunkOptions {
|
|
9
|
+
enableScriptExecution: boolean;
|
|
10
|
+
fileDirectoryPath: string;
|
|
11
|
+
filePath: string;
|
|
12
|
+
imageFolderPath: string;
|
|
13
|
+
latexEngine?: string;
|
|
14
|
+
modifySource: (codeChunkData: CodeChunkData, result: string, filePath: string) => Promise<string>;
|
|
15
|
+
parseMD: (inputString: string, options: MarkdownEngineRenderOption) => Promise<MarkdownEngineOutput>;
|
|
16
|
+
headings: HeadingData[];
|
|
17
|
+
}
|
|
18
|
+
export declare function runCodeChunk(id: string, codeChunksData: CodeChunksData, runOptions: RunCodeChunkOptions): Promise<string>;
|
|
19
|
+
export declare function runCodeChunks(codeChunksData: CodeChunksData, runOptions: RunCodeChunkOptions): Promise<string[]>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="cheerio" />
|
|
2
|
+
export default function enhance({ $, graphsCache, fileDirectoryPath, imageDirectoryPath, plantumlServer, plantumlJarPath, kirokiServer, }: {
|
|
3
|
+
$: CheerioStatic;
|
|
4
|
+
graphsCache: {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
7
|
+
fileDirectoryPath: string;
|
|
8
|
+
imageDirectoryPath: string;
|
|
9
|
+
plantumlServer: string;
|
|
10
|
+
plantumlJarPath: string;
|
|
11
|
+
kirokiServer: string;
|
|
12
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { MarkdownEngineRenderOption } from '../markdown-engine';
|
|
2
|
+
export default function enhance($: any, options: MarkdownEngineRenderOption, resolveFilePath: (path: string, useRelativeFilePath: boolean, fileDirectoryPath?: string) => string, usePandocParser: any): Promise<void>;
|