@quarto/jupyterlab-quarto 0.1.45 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/README.md +48 -15
- package/lib/__tests__/jupyterlab_quarto.spec.d.ts +3 -0
- package/lib/__tests__/jupyterlab_quarto.spec.js +9 -0
- package/lib/ast/ast.d.ts +1 -2
- package/lib/ast/ast.js +4 -3
- package/lib/const.d.ts +1 -2
- package/lib/const.js +5 -6
- package/lib/hooks/codemirror.d.ts +5 -4
- package/lib/hooks/codemirror.js +37 -12
- package/lib/index.d.ts +2 -3
- package/lib/index.js +6 -5
- package/lib/manager.d.ts +2 -2
- package/lib/manager.js +14 -16
- package/lib/plugins/callouts.d.ts +1 -2
- package/lib/plugins/callouts.js +59 -58
- package/lib/plugins/cites.d.ts +1 -2
- package/lib/plugins/cites.js +41 -23
- package/lib/plugins/decorator.d.ts +1 -2
- package/lib/plugins/decorator.js +11 -12
- package/lib/plugins/divs.d.ts +1 -2
- package/lib/plugins/divs.js +20 -9
- package/lib/plugins/figure-divs.d.ts +1 -2
- package/lib/plugins/figure-divs.js +18 -17
- package/lib/plugins/figures.d.ts +3 -4
- package/lib/plugins/figures.js +30 -31
- package/lib/plugins/gridtables/common/gridtables/GetCells.d.ts +5 -6
- package/lib/plugins/gridtables/common/gridtables/GetCells.js +6 -8
- package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.d.ts +5 -6
- package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.js +9 -14
- package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.d.ts +0 -1
- package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.js +0 -1
- package/lib/plugins/gridtables/common/markdown-it/EmitTable.d.ts +3 -4
- package/lib/plugins/gridtables/common/markdown-it/EmitTable.js +12 -15
- package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.d.ts +1 -2
- package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.js +1 -3
- package/lib/plugins/gridtables/common/markdown-it/GetLine.d.ts +1 -2
- package/lib/plugins/gridtables/common/markdown-it/GetLine.js +0 -1
- package/lib/plugins/gridtables/common/markdown-it/ParseTable.d.ts +2 -3
- package/lib/plugins/gridtables/common/markdown-it/ParseTable.js +18 -28
- package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.d.ts +1 -2
- package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.js +0 -1
- package/lib/plugins/gridtables/index.d.ts +0 -1
- package/lib/plugins/gridtables/index.js +2 -3
- package/lib/plugins/gridtables/interfaces/markdown-it/IState.d.ts +1 -2
- package/lib/plugins/gridtables/interfaces/markdown-it/IState.js +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/IToken.d.ts +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/IToken.js +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.d.ts +1 -2
- package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.js +0 -1
- package/lib/plugins/gridtables/rules/gridtable.d.ts +2 -3
- package/lib/plugins/gridtables/rules/gridtable.js +5 -6
- package/lib/plugins/index.d.ts +15 -0
- package/lib/plugins/index.js +21 -0
- package/lib/plugins/math.d.ts +4 -3
- package/lib/plugins/math.js +33 -31
- package/lib/plugins/mermaid/index.d.ts +1 -2
- package/lib/plugins/mermaid/index.js +19 -14
- package/lib/plugins/shortcodes.d.ts +1 -2
- package/lib/plugins/shortcodes.js +6 -7
- package/lib/plugins/spans.d.ts +1 -2
- package/lib/plugins/spans.js +2 -4
- package/lib/plugins/table-captions.d.ts +1 -2
- package/lib/plugins/table-captions.js +19 -16
- package/lib/plugins/utils/html.d.ts +1 -2
- package/lib/plugins/utils/html.js +19 -15
- package/lib/plugins/utils/markdownit.d.ts +0 -1
- package/lib/plugins/utils/markdownit.js +14 -13
- package/lib/plugins/utils/tok.d.ts +0 -1
- package/lib/plugins/utils/tok.js +12 -13
- package/lib/plugins/yaml.d.ts +1 -2
- package/lib/plugins/yaml.js +59 -49
- package/lib/providers/attrs.d.ts +1 -2
- package/lib/providers/attrs.js +5 -6
- package/lib/providers/callouts.d.ts +1 -2
- package/lib/providers/callouts.js +7 -8
- package/lib/providers/cites.d.ts +1 -2
- package/lib/providers/cites.js +7 -8
- package/lib/providers/decorator.d.ts +1 -2
- package/lib/providers/decorator.js +7 -8
- package/lib/providers/deflist.d.ts +1 -2
- package/lib/providers/deflist.js +5 -6
- package/lib/providers/divs.d.ts +1 -2
- package/lib/providers/divs.js +9 -10
- package/lib/providers/figure-divs.d.ts +1 -2
- package/lib/providers/figure-divs.js +5 -6
- package/lib/providers/figures.d.ts +1 -2
- package/lib/providers/figures.js +5 -6
- package/lib/providers/footnotes.d.ts +1 -2
- package/lib/providers/footnotes.js +5 -6
- package/lib/providers/gridtables.d.ts +1 -2
- package/lib/providers/gridtables.js +5 -6
- package/lib/providers/math.d.ts +1 -2
- package/lib/providers/math.js +12 -13
- package/lib/providers/mermaid.d.ts +1 -2
- package/lib/providers/mermaid.js +10 -9
- package/lib/providers/provider.d.ts +1 -2
- package/lib/providers/provider.js +0 -1
- package/lib/providers/shortcodes.d.ts +1 -2
- package/lib/providers/shortcodes.js +5 -6
- package/lib/providers/spans.d.ts +1 -2
- package/lib/providers/spans.js +8 -9
- package/lib/providers/sub.d.ts +1 -2
- package/lib/providers/sub.js +5 -6
- package/lib/providers/sup.d.ts +1 -2
- package/lib/providers/sup.js +5 -6
- package/lib/providers/table-captions.d.ts +1 -2
- package/lib/providers/table-captions.js +5 -6
- package/lib/providers/tasklists.d.ts +1 -2
- package/lib/providers/tasklists.js +5 -6
- package/lib/providers/yaml.d.ts +1 -2
- package/lib/providers/yaml.js +7 -8
- package/lib/types.d.ts +0 -1
- package/lib/types.js +0 -1
- package/lib/widgets.d.ts +0 -1
- package/lib/widgets.js +5 -6
- package/package.json +105 -39
- package/style/base.css +34 -33
- package/style/index.css +1 -1
- package/lib/__tests__/index.spec.d.ts +0 -6
- package/lib/__tests__/index.spec.js +0 -61
- package/lib/__tests__/index.spec.js.map +0 -1
- package/lib/__tests__/myextension.spec.d.ts +0 -6
- package/lib/__tests__/myextension.spec.js +0 -11
- package/lib/__tests__/myextension.spec.js.map +0 -1
- package/lib/ast/ast.js.map +0 -1
- package/lib/const.js.map +0 -1
- package/lib/hooks/codemirror.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/manager.js.map +0 -1
- package/lib/plugins/callouts.js.map +0 -1
- package/lib/plugins/cites.js.map +0 -1
- package/lib/plugins/decorator.js.map +0 -1
- package/lib/plugins/divs.js.map +0 -1
- package/lib/plugins/figure-divs.js.map +0 -1
- package/lib/plugins/figures.js.map +0 -1
- package/lib/plugins/gridtables/common/gridtables/GetCells.js.map +0 -1
- package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/EmitTable.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/GetLine.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/ParseTable.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.js.map +0 -1
- package/lib/plugins/gridtables/index.js.map +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/IState.js.map +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/IToken.js.map +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.js.map +0 -1
- package/lib/plugins/gridtables/rules/gridtable.js.map +0 -1
- package/lib/plugins/math.js.map +0 -1
- package/lib/plugins/mermaid/index.js.map +0 -1
- package/lib/plugins/shortcodes.js.map +0 -1
- package/lib/plugins/spans.js.map +0 -1
- package/lib/plugins/table-captions.js.map +0 -1
- package/lib/plugins/utils/html.js.map +0 -1
- package/lib/plugins/utils/markdownit.js.map +0 -1
- package/lib/plugins/utils/tok.js.map +0 -1
- package/lib/plugins/yaml.js.map +0 -1
- package/lib/providers/attrs.js.map +0 -1
- package/lib/providers/callouts.js.map +0 -1
- package/lib/providers/cites.js.map +0 -1
- package/lib/providers/decorator.js.map +0 -1
- package/lib/providers/deflist.js.map +0 -1
- package/lib/providers/divs.js.map +0 -1
- package/lib/providers/figure-divs.js.map +0 -1
- package/lib/providers/figures.js.map +0 -1
- package/lib/providers/footnotes.js.map +0 -1
- package/lib/providers/gridtables.js.map +0 -1
- package/lib/providers/math.js.map +0 -1
- package/lib/providers/mermaid.js.map +0 -1
- package/lib/providers/provider.js.map +0 -1
- package/lib/providers/shortcodes.js.map +0 -1
- package/lib/providers/spans.js.map +0 -1
- package/lib/providers/sub.js.map +0 -1
- package/lib/providers/sup.js.map +0 -1
- package/lib/providers/table-captions.js.map +0 -1
- package/lib/providers/tasklists.js.map +0 -1
- package/lib/providers/yaml.js.map +0 -1
- package/lib/types.js.map +0 -1
- package/lib/widgets.js.map +0 -1
- package/schema/plugin.json +0 -8
- package/src/@types/markdown-it-deflist.d.ts +0 -10
- package/src/@types/markdown-it-footnote.d.ts +0 -10
- package/src/@types/markdown-it-gridtables.d.ts +0 -10
- package/src/@types/markdown-it-implicit-figures.d.ts +0 -10
- package/src/@types/markdown-it-sub.d.ts +0 -10
- package/src/@types/markdown-it-sup.d.ts +0 -10
- package/src/@types/markdown-it-task-lists.d.ts +0 -10
@@ -1,11 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* callouts.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
import { calloutPlugin } from
|
8
|
-
import { markdownItExtension } from
|
2
|
+
* callouts.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
import { calloutPlugin } from '../plugins/callouts';
|
8
|
+
import { markdownItExtension } from './provider';
|
9
9
|
export const callouts = markdownItExtension({
|
10
10
|
id: '@quarto/callouts',
|
11
11
|
title: 'Quarto callouts',
|
@@ -13,4 +13,3 @@ export const callouts = markdownItExtension({
|
|
13
13
|
return [calloutPlugin];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=callouts.js.map
|
package/lib/providers/cites.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export declare const cites: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=cites.d.ts.map
|
1
|
+
export declare const cites: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/cites.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* cites.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
import { citationPlugin } from
|
8
|
-
import { markdownItExtension } from
|
2
|
+
* cites.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
import { citationPlugin } from '../plugins/cites';
|
8
|
+
import { markdownItExtension } from './provider';
|
9
9
|
export const cites = markdownItExtension({
|
10
10
|
id: '@quarto/cites',
|
11
11
|
title: 'Citations',
|
@@ -13,4 +13,3 @@ export const cites = markdownItExtension({
|
|
13
13
|
return [citationPlugin];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=cites.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const decorator: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=decorator.d.ts.map
|
1
|
+
export declare const decorator: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* code.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
import { decoratorPlugin } from
|
8
|
-
import { markdownItExtension } from
|
2
|
+
* code.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
import { decoratorPlugin } from '../plugins/decorator';
|
8
|
+
import { markdownItExtension } from './provider';
|
9
9
|
export const decorator = markdownItExtension({
|
10
10
|
id: '@quarto/fence',
|
11
11
|
title: 'Fenced Code Blocks',
|
@@ -13,4 +13,3 @@ export const decorator = markdownItExtension({
|
|
13
13
|
return [decoratorPlugin];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=decorator.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const deflist: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=deflist.d.ts.map
|
1
|
+
export declare const deflist: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/deflist.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* deflist.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* deflist.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { markdownItExtension } from './provider';
|
8
8
|
export const deflist = markdownItExtension({
|
9
9
|
id: '@quarto/deflist',
|
@@ -13,4 +13,3 @@ export const deflist = markdownItExtension({
|
|
13
13
|
return [plugin.default];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=deflist.js.map
|
package/lib/providers/divs.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export declare const divs: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=divs.d.ts.map
|
1
|
+
export declare const divs: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/divs.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* callouts.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
import { divPlugin } from
|
8
|
-
import { markdownItExtension } from
|
2
|
+
* callouts.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
import { divPlugin } from '../plugins/divs';
|
8
|
+
import { markdownItExtension } from './provider';
|
9
9
|
export const divs = markdownItExtension({
|
10
10
|
id: '@quarto/divs',
|
11
11
|
title: 'Pandoc fenced divs',
|
@@ -16,13 +16,12 @@ export const divs = markdownItExtension({
|
|
16
16
|
preParse: {
|
17
17
|
run: (content) => {
|
18
18
|
// Detect close divs that are directly after text (e.g. not back to back whitespace)
|
19
|
-
// and add a whitespace. This will cause the close div to become a 'block'
|
19
|
+
// and add a whitespace. This will cause the close div to become a 'block'
|
20
20
|
// rather than appearing as the end of the paragraph block
|
21
|
-
const blockedDivs = content.replace(kCloseDivNoBlock,
|
21
|
+
const blockedDivs = content.replace(kCloseDivNoBlock, '$1\n\n$2');
|
22
22
|
return Promise.resolve(blockedDivs);
|
23
23
|
}
|
24
24
|
}
|
25
25
|
}
|
26
26
|
});
|
27
27
|
const kCloseDivNoBlock = /([^\s])\n(:::+(?:\{.*\})?)/gm;
|
28
|
-
//# sourceMappingURL=divs.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const figureDivs: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=figure-divs.d.ts.map
|
1
|
+
export declare const figureDivs: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* figure-divs.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* figure-divs.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { figureDivsPlugin } from '../plugins/figure-divs';
|
8
8
|
import { markdownItExtension } from './provider';
|
9
9
|
export const figureDivs = markdownItExtension({
|
@@ -13,4 +13,3 @@ export const figureDivs = markdownItExtension({
|
|
13
13
|
return [figureDivsPlugin];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=figure-divs.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const figures: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=figures.d.ts.map
|
1
|
+
export declare const figures: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/figures.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* figures.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* figures.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { figuresPlugin } from '../plugins/figures';
|
8
8
|
import { markdownItExtension } from './provider';
|
9
9
|
export const figures = markdownItExtension({
|
@@ -13,4 +13,3 @@ export const figures = markdownItExtension({
|
|
13
13
|
return [figuresPlugin, { figcaption: true, copyAttrs: true }];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=figures.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const footnotes: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=footnotes.d.ts.map
|
1
|
+
export declare const footnotes: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* footnotes.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* footnotes.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { markdownItExtension } from './provider';
|
8
8
|
export const footnotes = markdownItExtension({
|
9
9
|
id: '@quarto/footnotes',
|
@@ -13,4 +13,3 @@ export const footnotes = markdownItExtension({
|
|
13
13
|
return [footnotePlugin.default];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=footnotes.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const gridtables: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=gridtables.d.ts.map
|
1
|
+
export declare const gridtables: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* gridtables.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* gridtables.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import gridTableRulePlugin from '../plugins/gridtables';
|
8
8
|
import { markdownItExtension } from './provider';
|
9
9
|
export const gridtables = markdownItExtension({
|
@@ -13,4 +13,3 @@ export const gridtables = markdownItExtension({
|
|
13
13
|
return [gridTableRulePlugin];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=gridtables.js.map
|
package/lib/providers/math.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export declare const math: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=math.d.ts.map
|
1
|
+
export declare const math: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/math.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* math.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* math.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { mathjaxPlugin } from '../plugins/math';
|
8
8
|
import { markdownItExtension } from './provider';
|
9
9
|
export const math = markdownItExtension({
|
@@ -16,10 +16,10 @@ export const math = markdownItExtension({
|
|
16
16
|
postRender: {
|
17
17
|
run: (node) => {
|
18
18
|
// Inject mathjax
|
19
|
-
const mathjaxId =
|
19
|
+
const mathjaxId = 'MathJax-script';
|
20
20
|
const mathJaxScript = document.getElementById(mathjaxId);
|
21
21
|
if (!mathJaxScript) {
|
22
|
-
const configEl = document.createElement(
|
22
|
+
const configEl = document.createElement('script');
|
23
23
|
configEl.innerText = `
|
24
24
|
|
25
25
|
MathJax = {
|
@@ -84,12 +84,12 @@ MathJax = {
|
|
84
84
|
}
|
85
85
|
};`;
|
86
86
|
document.head.appendChild(configEl);
|
87
|
-
const polyFillEl = document.createElement(
|
88
|
-
polyFillEl.setAttribute(
|
87
|
+
const polyFillEl = document.createElement('script');
|
88
|
+
polyFillEl.setAttribute('src', 'https://polyfill.io/v3/polyfill.min.js?features=es6');
|
89
89
|
document.head.appendChild(polyFillEl);
|
90
|
-
const scriptEl = document.createElement(
|
90
|
+
const scriptEl = document.createElement('script');
|
91
91
|
scriptEl.id = mathjaxId;
|
92
|
-
scriptEl.setAttribute(
|
92
|
+
scriptEl.setAttribute('src', 'https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js');
|
93
93
|
document.head.appendChild(scriptEl);
|
94
94
|
}
|
95
95
|
return Promise.resolve();
|
@@ -101,5 +101,4 @@ MathJax = {
|
|
101
101
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
102
102
|
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
103
103
|
|
104
|
-
*/
|
105
|
-
//# sourceMappingURL=math.js.map
|
104
|
+
*/
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const mermaid: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=mermaid.d.ts.map
|
1
|
+
export declare const mermaid: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/mermaid.js
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
/*
|
2
|
-
* mermaid.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* mermaid.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import mermaidPlugin from '../plugins/mermaid';
|
8
8
|
import { markdownItExtension } from './provider';
|
9
|
-
export const mermaid = markdownItExtension({
|
9
|
+
export const mermaid = markdownItExtension({
|
10
|
+
id: '@quarto/mermaid',
|
10
11
|
title: 'Mermaid',
|
11
12
|
plugin: async () => {
|
12
13
|
// Figure out whether this is dark mode
|
13
|
-
const isDark = document.body.getAttribute(
|
14
|
+
const isDark = document.body.getAttribute('data-jp-theme-light') === 'false';
|
14
15
|
return [mermaidPlugin, { dark: isDark }];
|
15
|
-
}
|
16
|
-
|
16
|
+
}
|
17
|
+
});
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import { JupyterFrontEndPlugin } from '@jupyterlab/application';
|
2
2
|
import { MarkdownItPluginProvider } from '../types';
|
3
|
-
export declare function markdownItExtension(provider: MarkdownItPluginProvider): JupyterFrontEndPlugin<void
|
4
|
-
//# sourceMappingURL=provider.d.ts.map
|
3
|
+
export declare function markdownItExtension(provider: MarkdownItPluginProvider): JupyterFrontEndPlugin<void>;
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const shortcodes: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=shortcodes.d.ts.map
|
1
|
+
export declare const shortcodes: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* shortcodes.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* shortcodes.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { shortcodePlugin } from '../plugins/shortcodes';
|
8
8
|
import { markdownItExtension } from './provider';
|
9
9
|
export const shortcodes = markdownItExtension({
|
@@ -13,4 +13,3 @@ export const shortcodes = markdownItExtension({
|
|
13
13
|
return [shortcodePlugin];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=shortcodes.js.map
|
package/lib/providers/spans.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export declare const spans: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=spans.d.ts.map
|
1
|
+
export declare const spans: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/spans.js
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
/*
|
2
|
-
* spans.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
import { spansPlugin } from
|
8
|
-
import { markdownItExtension } from
|
2
|
+
* spans.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
import { spansPlugin } from '../plugins/spans';
|
8
|
+
import { markdownItExtension } from './provider';
|
9
9
|
export const spans = markdownItExtension({
|
10
10
|
id: '@quarto/spans',
|
11
11
|
title: 'Pandoc bracketed spans',
|
12
12
|
plugin: async () => {
|
13
13
|
return [spansPlugin];
|
14
|
-
}
|
14
|
+
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=spans.js.map
|
package/lib/providers/sub.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export declare const sub: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=sub.d.ts.map
|
1
|
+
export declare const sub: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/sub.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* sub.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* sub.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { markdownItExtension } from './provider';
|
8
8
|
export const sub = markdownItExtension({
|
9
9
|
id: '@quarto/sub',
|
@@ -13,4 +13,3 @@ export const sub = markdownItExtension({
|
|
13
13
|
return [plugin.default];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=sub.js.map
|
package/lib/providers/sup.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export declare const sup: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=sup.d.ts.map
|
1
|
+
export declare const sup: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/sup.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* sup.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* sup.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { markdownItExtension } from './provider';
|
8
8
|
export const sup = markdownItExtension({
|
9
9
|
id: '@quarto/sup',
|
@@ -13,4 +13,3 @@ export const sup = markdownItExtension({
|
|
13
13
|
return [plugin.default];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=sup.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const tableCaptions: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=table-captions.d.ts.map
|
1
|
+
export declare const tableCaptions: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* table-captions.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* table-captions.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { tableCaptionPlugin } from '../plugins/table-captions';
|
8
8
|
import { markdownItExtension } from './provider';
|
9
9
|
export const tableCaptions = markdownItExtension({
|
@@ -13,4 +13,3 @@ export const tableCaptions = markdownItExtension({
|
|
13
13
|
return [tableCaptionPlugin];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=table-captions.js.map
|
@@ -1,2 +1 @@
|
|
1
|
-
export declare const tasklists: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=tasklists.d.ts.map
|
1
|
+
export declare const tasklists: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* tasklists.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* tasklists.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { markdownItExtension } from './provider';
|
8
8
|
export const tasklists = markdownItExtension({
|
9
9
|
id: '@quarto/tasklists',
|
@@ -13,4 +13,3 @@ export const tasklists = markdownItExtension({
|
|
13
13
|
return [plugin.default];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=tasklists.js.map
|
package/lib/providers/yaml.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export declare const yaml: import("@jupyterlab/application").JupyterFrontEndPlugin<void
|
2
|
-
//# sourceMappingURL=yaml.d.ts.map
|
1
|
+
export declare const yaml: import("@jupyterlab/application").JupyterFrontEndPlugin<void>;
|
package/lib/providers/yaml.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* yaml-block.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
import { yamlPlugin } from
|
8
|
-
import { markdownItExtension } from
|
2
|
+
* yaml-block.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
import { yamlPlugin } from '../plugins/yaml';
|
8
|
+
import { markdownItExtension } from './provider';
|
9
9
|
export const yaml = markdownItExtension({
|
10
10
|
id: '@quarto/yaml',
|
11
11
|
title: 'Quarto Yaml',
|
@@ -13,4 +13,3 @@ export const yaml = markdownItExtension({
|
|
13
13
|
return [yamlPlugin];
|
14
14
|
}
|
15
15
|
});
|
16
|
-
//# sourceMappingURL=yaml.js.map
|
package/lib/types.d.ts
CHANGED
package/lib/types.js
CHANGED
package/lib/widgets.d.ts
CHANGED
package/lib/widgets.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* widgets.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
2
|
+
* widgets.ts
|
3
|
+
*
|
4
|
+
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
+
*
|
6
|
+
*/
|
7
7
|
import { RenderedHTMLCommon, renderHTML } from '@jupyterlab/rendermime';
|
8
8
|
// A mime rendered that renders Quarto Markdown
|
9
9
|
export class RenderedMarkdown extends RenderedHTMLCommon {
|
@@ -55,4 +55,3 @@ export class RenderedMarkdown extends RenderedHTMLCommon {
|
|
55
55
|
// }
|
56
56
|
}
|
57
57
|
}
|
58
|
-
//# sourceMappingURL=widgets.js.map
|