crossnote 0.8.3 → 0.8.4
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 +2 -4
- package/out/cjs/index.cjs +188 -183
- package/out/esm/index.mjs +190 -185
- package/out/types/src/converters/markdown-convert.d.ts +3 -12
- package/out/types/src/converters/pandoc-convert.d.ts +3 -11
- package/out/types/src/converters/process-graphs.d.ts +3 -5
- package/out/types/src/markdown-engine/transformer.d.ts +3 -4
- package/out/types/src/notebook/config-helper.d.ts +2 -15
- package/out/types/src/notebook/types.d.ts +1 -4
- package/out/types/src/utility.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -1
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
import { CodeChunkData } from '../code-chunk/code-chunk-data';
|
|
2
|
-
|
|
2
|
+
import { Notebook } from '../notebook';
|
|
3
|
+
export declare function markdownConvert(text: any, { projectDirectoryPath, fileDirectoryPath, protocolsWhiteListRegExp, filesCache, codeChunksData, graphsCache, notebook, }: {
|
|
3
4
|
projectDirectoryPath: string;
|
|
4
5
|
fileDirectoryPath: string;
|
|
5
6
|
protocolsWhiteListRegExp: RegExp;
|
|
6
7
|
filesCache: {
|
|
7
8
|
[key: string]: string;
|
|
8
9
|
};
|
|
9
|
-
mathRenderingOption: string;
|
|
10
|
-
mathInlineDelimiters: string[][];
|
|
11
|
-
mathBlockDelimiters: string[][];
|
|
12
|
-
mathRenderingOnlineService: string;
|
|
13
10
|
codeChunksData: {
|
|
14
11
|
[key: string]: CodeChunkData;
|
|
15
12
|
};
|
|
16
13
|
graphsCache: {
|
|
17
14
|
[key: string]: string;
|
|
18
15
|
};
|
|
19
|
-
|
|
20
|
-
imageMagickPath: string;
|
|
21
|
-
mermaidTheme: string;
|
|
22
|
-
plantumlServer: string;
|
|
23
|
-
plantumlJarPath: string;
|
|
24
|
-
onWillTransformMarkdown?: ((markdown: string) => Promise<string>) | null;
|
|
25
|
-
onDidTransformMarkdown?: ((markdown: string) => Promise<string>) | null;
|
|
16
|
+
notebook: Notebook;
|
|
26
17
|
}, config: object): Promise<string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CodeChunkData } from '../code-chunk/code-chunk-data';
|
|
2
|
-
|
|
2
|
+
import { Notebook } from '../notebook';
|
|
3
|
+
export declare function pandocConvert(text: any, { fileDirectoryPath, projectDirectoryPath, sourceFilePath, filesCache, protocolsWhiteListRegExp, codeChunksData, graphsCache, notebook, }: {
|
|
3
4
|
fileDirectoryPath: string;
|
|
4
5
|
projectDirectoryPath: string;
|
|
5
6
|
sourceFilePath: string;
|
|
@@ -13,14 +14,5 @@ export declare function pandocConvert(text: any, { fileDirectoryPath, projectDir
|
|
|
13
14
|
graphsCache: {
|
|
14
15
|
[key: string]: string;
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
-
pandocPath: string;
|
|
18
|
-
imageMagickPath: string;
|
|
19
|
-
mermaidTheme: string;
|
|
20
|
-
plantumlJarPath: string;
|
|
21
|
-
plantumlServer: string;
|
|
22
|
-
pandocMarkdownFlavor: string;
|
|
23
|
-
latexEngine?: string;
|
|
24
|
-
onWillTransformMarkdown?: (markdown: string) => Promise<string>;
|
|
25
|
-
onDidTransformMarkdown?: (markdown: string) => Promise<string>;
|
|
17
|
+
notebook: Notebook;
|
|
26
18
|
}, config?: {}): Promise<string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CodeChunkData } from '../code-chunk/code-chunk-data';
|
|
2
|
-
|
|
2
|
+
import { Notebook } from '../notebook';
|
|
3
|
+
export declare function processGraphs(text: string, { fileDirectoryPath, projectDirectoryPath, imageDirectoryPath, imageFilePrefix, useRelativeFilePath, codeChunksData, graphsCache, addOptionsStr, notebook, }: {
|
|
3
4
|
fileDirectoryPath: string;
|
|
4
5
|
projectDirectoryPath: string;
|
|
5
6
|
imageDirectoryPath: string;
|
|
@@ -11,11 +12,8 @@ export declare function processGraphs(text: string, { fileDirectoryPath, project
|
|
|
11
12
|
graphsCache: {
|
|
12
13
|
[key: string]: string;
|
|
13
14
|
};
|
|
14
|
-
imageMagickPath: string;
|
|
15
|
-
mermaidTheme: string;
|
|
16
15
|
addOptionsStr: boolean;
|
|
17
|
-
|
|
18
|
-
plantumlServer: string;
|
|
16
|
+
notebook: Notebook;
|
|
19
17
|
}): Promise<{
|
|
20
18
|
outputString: string;
|
|
21
19
|
imagePaths: string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Notebook } from '../notebook';
|
|
1
2
|
import HeadingIdGenerator from './heading-id-generator';
|
|
2
3
|
import { HeadingData } from './toc';
|
|
3
4
|
export interface TransformMarkdownOutput {
|
|
@@ -20,9 +21,7 @@ export interface TransformMarkdownOptions {
|
|
|
20
21
|
protocolsWhiteListRegExp: RegExp | null;
|
|
21
22
|
notSourceFile?: boolean;
|
|
22
23
|
imageDirectoryPath?: string;
|
|
23
|
-
usePandocParser: boolean;
|
|
24
24
|
headingIdGenerator?: HeadingIdGenerator;
|
|
25
|
-
|
|
26
|
-
onDidTransformMarkdown?: ((markdown: string) => Promise<string>) | null;
|
|
25
|
+
notebook: Notebook;
|
|
27
26
|
}
|
|
28
|
-
export declare function transformMarkdown(inputString: string, { fileDirectoryPath, projectDirectoryPath, filesCache, useRelativeFilePath, forPreview, forMarkdownExport, protocolsWhiteListRegExp, notSourceFile, imageDirectoryPath,
|
|
27
|
+
export declare function transformMarkdown(inputString: string, { fileDirectoryPath, projectDirectoryPath, filesCache, useRelativeFilePath, forPreview, forMarkdownExport, protocolsWhiteListRegExp, notSourceFile, imageDirectoryPath, headingIdGenerator, notebook, }: TransformMarkdownOptions): Promise<TransformMarkdownOutput>;
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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>;
|
|
1
|
+
import { FileSystemApi, NotebookConfig } from './types';
|
|
2
|
+
export declare function loadConfigsInDirectory(directoryPath: string, fileSystem: FileSystemApi, createDirectoryIfNotExists?: boolean): Promise<Partial<NotebookConfig>>;
|
|
16
3
|
export declare function wrapNodeFSAsApi(): FileSystemApi;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="cheerio" />
|
|
2
1
|
import { KatexOptions } from 'katex';
|
|
3
2
|
import { MermaidConfig } from 'mermaid';
|
|
4
3
|
import { JsonObject } from 'type-fest';
|
|
@@ -27,9 +26,7 @@ export interface ProcessWikiLinkArgs {
|
|
|
27
26
|
}
|
|
28
27
|
export interface ParserConfig {
|
|
29
28
|
onWillParseMarkdown: (markdown: string) => Promise<string>;
|
|
30
|
-
onDidParseMarkdown: (html: string
|
|
31
|
-
cheerio: CheerioAPI;
|
|
32
|
-
}) => Promise<string>;
|
|
29
|
+
onDidParseMarkdown: (html: string) => Promise<string>;
|
|
33
30
|
onWillTransformMarkdown: (markdown: string) => Promise<string>;
|
|
34
31
|
onDidTransformMarkdown: (markdown: string) => Promise<string>;
|
|
35
32
|
processWikiLink: (args: ProcessWikiLinkArgs) => {
|