@quarto/jupyterlab-quarto 0.1.42 → 0.1.44
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +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.d.ts +0 -3
- package/lib/ast/ast.js +0 -39
- package/lib/ast/ast.js.map +0 -1
- package/lib/const.d.ts +0 -5
- package/lib/const.js +0 -12
- package/lib/const.js.map +0 -1
- package/lib/hooks/codemirror.d.ts +0 -4
- package/lib/hooks/codemirror.js +0 -52
- package/lib/hooks/codemirror.js.map +0 -1
- package/lib/index.d.ts +0 -6
- package/lib/index.js +0 -60
- package/lib/index.js.map +0 -1
- package/lib/manager.d.ts +0 -8
- package/lib/manager.js +0 -117
- package/lib/manager.js.map +0 -1
- package/lib/plugins/callouts.d.ts +0 -3
- package/lib/plugins/callouts.js +0 -209
- package/lib/plugins/callouts.js.map +0 -1
- package/lib/plugins/cites.d.ts +0 -3
- package/lib/plugins/cites.js +0 -148
- package/lib/plugins/cites.js.map +0 -1
- package/lib/plugins/decorator.d.ts +0 -3
- package/lib/plugins/decorator.js +0 -59
- package/lib/plugins/decorator.js.map +0 -1
- package/lib/plugins/divs.d.ts +0 -6
- package/lib/plugins/divs.js +0 -100
- package/lib/plugins/divs.js.map +0 -1
- package/lib/plugins/figure-divs.d.ts +0 -3
- package/lib/plugins/figure-divs.js +0 -53
- package/lib/plugins/figure-divs.js.map +0 -1
- package/lib/plugins/figures.d.ts +0 -17
- package/lib/plugins/figures.js +0 -99
- package/lib/plugins/figures.js.map +0 -1
- package/lib/plugins/gridtables/common/gridtables/GetCells.d.ts +0 -8
- package/lib/plugins/gridtables/common/gridtables/GetCells.js +0 -45
- package/lib/plugins/gridtables/common/gridtables/GetCells.js.map +0 -1
- package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.d.ts +0 -8
- package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.js +0 -27
- package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.d.ts +0 -8
- package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.js +0 -13
- package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/EmitTable.d.ts +0 -5
- package/lib/plugins/gridtables/common/markdown-it/EmitTable.js +0 -67
- package/lib/plugins/gridtables/common/markdown-it/EmitTable.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.d.ts +0 -9
- package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.js +0 -19
- package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/GetLine.d.ts +0 -3
- package/lib/plugins/gridtables/common/markdown-it/GetLine.js +0 -10
- package/lib/plugins/gridtables/common/markdown-it/GetLine.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/ParseTable.d.ts +0 -4
- package/lib/plugins/gridtables/common/markdown-it/ParseTable.js +0 -162
- package/lib/plugins/gridtables/common/markdown-it/ParseTable.js.map +0 -1
- package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.d.ts +0 -13
- package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.js +0 -18
- package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.js.map +0 -1
- package/lib/plugins/gridtables/index.d.ts +0 -2
- package/lib/plugins/gridtables/index.js +0 -11
- package/lib/plugins/gridtables/index.js.map +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/IState.d.ts +0 -11
- package/lib/plugins/gridtables/interfaces/markdown-it/IState.js +0 -6
- package/lib/plugins/gridtables/interfaces/markdown-it/IState.js.map +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/IToken.d.ts +0 -7
- package/lib/plugins/gridtables/interfaces/markdown-it/IToken.js +0 -6
- package/lib/plugins/gridtables/interfaces/markdown-it/IToken.js.map +0 -1
- package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.d.ts +0 -4
- package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.js +0 -6
- package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.js.map +0 -1
- package/lib/plugins/gridtables/rules/gridtable.d.ts +0 -4
- package/lib/plugins/gridtables/rules/gridtable.js +0 -26
- package/lib/plugins/gridtables/rules/gridtable.js.map +0 -1
- package/lib/plugins/math.d.ts +0 -5
- package/lib/plugins/math.js +0 -177
- package/lib/plugins/math.js.map +0 -1
- package/lib/plugins/mermaid/index.d.ts +0 -5
- package/lib/plugins/mermaid/index.js +0 -55
- package/lib/plugins/mermaid/index.js.map +0 -1
- package/lib/plugins/shortcodes.d.ts +0 -4
- package/lib/plugins/shortcodes.js +0 -33
- package/lib/plugins/shortcodes.js.map +0 -1
- package/lib/plugins/spans.d.ts +0 -3
- package/lib/plugins/spans.js +0 -39
- package/lib/plugins/spans.js.map +0 -1
- package/lib/plugins/table-captions.d.ts +0 -3
- package/lib/plugins/table-captions.js +0 -69
- package/lib/plugins/table-captions.js.map +0 -1
- package/lib/plugins/utils/html.d.ts +0 -12
- package/lib/plugins/utils/html.js +0 -46
- package/lib/plugins/utils/html.js.map +0 -1
- package/lib/plugins/utils/markdownit.d.ts +0 -16
- package/lib/plugins/utils/markdownit.js +0 -45
- package/lib/plugins/utils/markdownit.js.map +0 -1
- package/lib/plugins/utils/tok.d.ts +0 -8
- package/lib/plugins/utils/tok.js +0 -14
- package/lib/plugins/utils/tok.js.map +0 -1
- package/lib/plugins/yaml.d.ts +0 -3
- package/lib/plugins/yaml.js +0 -311
- package/lib/plugins/yaml.js.map +0 -1
- package/lib/providers/attrs.d.ts +0 -2
- package/lib/providers/attrs.js +0 -16
- package/lib/providers/attrs.js.map +0 -1
- package/lib/providers/callouts.d.ts +0 -2
- package/lib/providers/callouts.js +0 -16
- package/lib/providers/callouts.js.map +0 -1
- package/lib/providers/cites.d.ts +0 -2
- package/lib/providers/cites.js +0 -16
- package/lib/providers/cites.js.map +0 -1
- package/lib/providers/decorator.d.ts +0 -2
- package/lib/providers/decorator.js +0 -16
- package/lib/providers/decorator.js.map +0 -1
- package/lib/providers/deflist.d.ts +0 -2
- package/lib/providers/deflist.js +0 -16
- package/lib/providers/deflist.js.map +0 -1
- package/lib/providers/divs.d.ts +0 -2
- package/lib/providers/divs.js +0 -28
- package/lib/providers/divs.js.map +0 -1
- package/lib/providers/figure-divs.d.ts +0 -2
- package/lib/providers/figure-divs.js +0 -16
- package/lib/providers/figure-divs.js.map +0 -1
- package/lib/providers/figures.d.ts +0 -2
- package/lib/providers/figures.js +0 -16
- package/lib/providers/figures.js.map +0 -1
- package/lib/providers/footnotes.d.ts +0 -2
- package/lib/providers/footnotes.js +0 -16
- package/lib/providers/footnotes.js.map +0 -1
- package/lib/providers/gridtables.d.ts +0 -2
- package/lib/providers/gridtables.js +0 -16
- package/lib/providers/gridtables.js.map +0 -1
- package/lib/providers/math.d.ts +0 -2
- package/lib/providers/math.js +0 -105
- package/lib/providers/math.js.map +0 -1
- package/lib/providers/mermaid.d.ts +0 -2
- package/lib/providers/mermaid.js +0 -16
- package/lib/providers/mermaid.js.map +0 -1
- package/lib/providers/provider.d.ts +0 -4
- package/lib/providers/provider.js +0 -13
- package/lib/providers/provider.js.map +0 -1
- package/lib/providers/shortcodes.d.ts +0 -2
- package/lib/providers/shortcodes.js +0 -16
- package/lib/providers/shortcodes.js.map +0 -1
- package/lib/providers/spans.d.ts +0 -2
- package/lib/providers/spans.js +0 -16
- package/lib/providers/spans.js.map +0 -1
- package/lib/providers/sub.d.ts +0 -2
- package/lib/providers/sub.js +0 -16
- package/lib/providers/sub.js.map +0 -1
- package/lib/providers/sup.d.ts +0 -2
- package/lib/providers/sup.js +0 -16
- package/lib/providers/sup.js.map +0 -1
- package/lib/providers/table-captions.d.ts +0 -2
- package/lib/providers/table-captions.js +0 -16
- package/lib/providers/table-captions.js.map +0 -1
- package/lib/providers/tasklists.d.ts +0 -2
- package/lib/providers/tasklists.js +0 -16
- package/lib/providers/tasklists.js.map +0 -1
- package/lib/providers/yaml.d.ts +0 -2
- package/lib/providers/yaml.js +0 -16
- package/lib/providers/yaml.js.map +0 -1
- package/lib/types.d.ts +0 -44
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
- package/lib/utils/html.d.ts +0 -12
- package/lib/utils/html.js +0 -46
- package/lib/utils/html.js.map +0 -1
- package/lib/utils/markdownit.d.ts +0 -16
- package/lib/utils/markdownit.js +0 -45
- package/lib/utils/markdownit.js.map +0 -1
- package/lib/utils/tok.d.ts +0 -8
- package/lib/utils/tok.js +0 -14
- package/lib/utils/tok.js.map +0 -1
- package/lib/widgets.d.ts +0 -15
- package/lib/widgets.js +0 -58
- package/lib/widgets.js.map +0 -1
package/lib/widgets.js
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* widgets.ts
|
3
|
-
*
|
4
|
-
* Copyright (C) 2020-2023 Posit Software, PBC
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
import { RenderedHTMLCommon, renderHTML } from '@jupyterlab/rendermime';
|
8
|
-
// A mime rendered that renders Quarto Markdown
|
9
|
-
export class RenderedMarkdown extends RenderedHTMLCommon {
|
10
|
-
constructor(options, manager) {
|
11
|
-
super(options);
|
12
|
-
this.renderer = null;
|
13
|
-
this.addClass('quarto-rendered-md');
|
14
|
-
this.markdownItManager = manager;
|
15
|
-
}
|
16
|
-
// Renders a mime model
|
17
|
-
async render(model) {
|
18
|
-
if (this.renderer === null) {
|
19
|
-
this.renderer = await this.markdownItManager.getRenderer(this, {});
|
20
|
-
}
|
21
|
-
const { host, source, renderer, ...others } = {
|
22
|
-
host: this.node,
|
23
|
-
source: String(model.data[this.mimeType]),
|
24
|
-
trusted: model.trusted,
|
25
|
-
resolver: this.resolver,
|
26
|
-
sanitizer: this.sanitizer,
|
27
|
-
linkHandler: this.linkHandler,
|
28
|
-
shouldTypeset: this.isAttached,
|
29
|
-
renderer: this.renderer,
|
30
|
-
latexTypesetter: this.latexTypesetter
|
31
|
-
};
|
32
|
-
// Transform source
|
33
|
-
const markup = await renderer.preParse(source);
|
34
|
-
// Clear the content if there is no source.
|
35
|
-
if (!markup) {
|
36
|
-
host.textContent = '';
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
// Render HTML.
|
40
|
-
await renderHTML({
|
41
|
-
host,
|
42
|
-
source: renderer.render(markup),
|
43
|
-
...others,
|
44
|
-
shouldTypeset: false
|
45
|
-
});
|
46
|
-
await renderer.postRender(host);
|
47
|
-
}
|
48
|
-
/**
|
49
|
-
* A message handler invoked on an `'after-attach'` message.
|
50
|
-
*/
|
51
|
-
onAfterAttach(msg) {
|
52
|
-
// Don't render math automatically
|
53
|
-
// if (this.latexTypesetter ) {
|
54
|
-
// this.latexTypesetter.typeset(this.node);
|
55
|
-
// }
|
56
|
-
}
|
57
|
-
}
|
58
|
-
//# sourceMappingURL=widgets.js.map
|
package/lib/widgets.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"widgets.js","sourceRoot":"","sources":["../src/widgets.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AACF,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAKxE,+CAA+C;AAC/C,MAAM,OAAO,gBAAiB,SAAQ,kBAAkB;IAEtD,YAAY,OAAqC,EAAE,OAA0B;QAC3E,KAAK,CAAC,OAAO,CAAC,CAAC;QA0CjB,aAAQ,GAAoB,IAAI,CAAC;QAzC/B,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;QACpC,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC;IACnC,CAAC;IAGD,uBAAuB;IACvB,KAAK,CAA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