@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.
Files changed (181) hide show
  1. package/package.json +1 -1
  2. package/lib/__tests__/index.spec.d.ts +0 -6
  3. package/lib/__tests__/index.spec.js +0 -61
  4. package/lib/__tests__/index.spec.js.map +0 -1
  5. package/lib/__tests__/myextension.spec.d.ts +0 -6
  6. package/lib/__tests__/myextension.spec.js +0 -11
  7. package/lib/__tests__/myextension.spec.js.map +0 -1
  8. package/lib/ast/ast.d.ts +0 -3
  9. package/lib/ast/ast.js +0 -39
  10. package/lib/ast/ast.js.map +0 -1
  11. package/lib/const.d.ts +0 -5
  12. package/lib/const.js +0 -12
  13. package/lib/const.js.map +0 -1
  14. package/lib/hooks/codemirror.d.ts +0 -4
  15. package/lib/hooks/codemirror.js +0 -52
  16. package/lib/hooks/codemirror.js.map +0 -1
  17. package/lib/index.d.ts +0 -6
  18. package/lib/index.js +0 -60
  19. package/lib/index.js.map +0 -1
  20. package/lib/manager.d.ts +0 -8
  21. package/lib/manager.js +0 -117
  22. package/lib/manager.js.map +0 -1
  23. package/lib/plugins/callouts.d.ts +0 -3
  24. package/lib/plugins/callouts.js +0 -209
  25. package/lib/plugins/callouts.js.map +0 -1
  26. package/lib/plugins/cites.d.ts +0 -3
  27. package/lib/plugins/cites.js +0 -148
  28. package/lib/plugins/cites.js.map +0 -1
  29. package/lib/plugins/decorator.d.ts +0 -3
  30. package/lib/plugins/decorator.js +0 -59
  31. package/lib/plugins/decorator.js.map +0 -1
  32. package/lib/plugins/divs.d.ts +0 -6
  33. package/lib/plugins/divs.js +0 -100
  34. package/lib/plugins/divs.js.map +0 -1
  35. package/lib/plugins/figure-divs.d.ts +0 -3
  36. package/lib/plugins/figure-divs.js +0 -53
  37. package/lib/plugins/figure-divs.js.map +0 -1
  38. package/lib/plugins/figures.d.ts +0 -17
  39. package/lib/plugins/figures.js +0 -99
  40. package/lib/plugins/figures.js.map +0 -1
  41. package/lib/plugins/gridtables/common/gridtables/GetCells.d.ts +0 -8
  42. package/lib/plugins/gridtables/common/gridtables/GetCells.js +0 -45
  43. package/lib/plugins/gridtables/common/gridtables/GetCells.js.map +0 -1
  44. package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.d.ts +0 -8
  45. package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.js +0 -27
  46. package/lib/plugins/gridtables/common/gridtables/GetColumnWidths.js.map +0 -1
  47. package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.d.ts +0 -8
  48. package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.js +0 -13
  49. package/lib/plugins/gridtables/common/markdown-it/ColumnAlignments.js.map +0 -1
  50. package/lib/plugins/gridtables/common/markdown-it/EmitTable.d.ts +0 -5
  51. package/lib/plugins/gridtables/common/markdown-it/EmitTable.js +0 -67
  52. package/lib/plugins/gridtables/common/markdown-it/EmitTable.js.map +0 -1
  53. package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.d.ts +0 -9
  54. package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.js +0 -19
  55. package/lib/plugins/gridtables/common/markdown-it/GetCharCodeAtStartOfLine.js.map +0 -1
  56. package/lib/plugins/gridtables/common/markdown-it/GetLine.d.ts +0 -3
  57. package/lib/plugins/gridtables/common/markdown-it/GetLine.js +0 -10
  58. package/lib/plugins/gridtables/common/markdown-it/GetLine.js.map +0 -1
  59. package/lib/plugins/gridtables/common/markdown-it/ParseTable.d.ts +0 -4
  60. package/lib/plugins/gridtables/common/markdown-it/ParseTable.js +0 -162
  61. package/lib/plugins/gridtables/common/markdown-it/ParseTable.js.map +0 -1
  62. package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.d.ts +0 -13
  63. package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.js +0 -18
  64. package/lib/plugins/gridtables/common/markdown-it/ParseTableResult.js.map +0 -1
  65. package/lib/plugins/gridtables/index.d.ts +0 -2
  66. package/lib/plugins/gridtables/index.js +0 -11
  67. package/lib/plugins/gridtables/index.js.map +0 -1
  68. package/lib/plugins/gridtables/interfaces/markdown-it/IState.d.ts +0 -11
  69. package/lib/plugins/gridtables/interfaces/markdown-it/IState.js +0 -6
  70. package/lib/plugins/gridtables/interfaces/markdown-it/IState.js.map +0 -1
  71. package/lib/plugins/gridtables/interfaces/markdown-it/IToken.d.ts +0 -7
  72. package/lib/plugins/gridtables/interfaces/markdown-it/IToken.js +0 -6
  73. package/lib/plugins/gridtables/interfaces/markdown-it/IToken.js.map +0 -1
  74. package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.d.ts +0 -4
  75. package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.js +0 -6
  76. package/lib/plugins/gridtables/interfaces/markdown-it/TRuleFunction.js.map +0 -1
  77. package/lib/plugins/gridtables/rules/gridtable.d.ts +0 -4
  78. package/lib/plugins/gridtables/rules/gridtable.js +0 -26
  79. package/lib/plugins/gridtables/rules/gridtable.js.map +0 -1
  80. package/lib/plugins/math.d.ts +0 -5
  81. package/lib/plugins/math.js +0 -177
  82. package/lib/plugins/math.js.map +0 -1
  83. package/lib/plugins/mermaid/index.d.ts +0 -5
  84. package/lib/plugins/mermaid/index.js +0 -55
  85. package/lib/plugins/mermaid/index.js.map +0 -1
  86. package/lib/plugins/shortcodes.d.ts +0 -4
  87. package/lib/plugins/shortcodes.js +0 -33
  88. package/lib/plugins/shortcodes.js.map +0 -1
  89. package/lib/plugins/spans.d.ts +0 -3
  90. package/lib/plugins/spans.js +0 -39
  91. package/lib/plugins/spans.js.map +0 -1
  92. package/lib/plugins/table-captions.d.ts +0 -3
  93. package/lib/plugins/table-captions.js +0 -69
  94. package/lib/plugins/table-captions.js.map +0 -1
  95. package/lib/plugins/utils/html.d.ts +0 -12
  96. package/lib/plugins/utils/html.js +0 -46
  97. package/lib/plugins/utils/html.js.map +0 -1
  98. package/lib/plugins/utils/markdownit.d.ts +0 -16
  99. package/lib/plugins/utils/markdownit.js +0 -45
  100. package/lib/plugins/utils/markdownit.js.map +0 -1
  101. package/lib/plugins/utils/tok.d.ts +0 -8
  102. package/lib/plugins/utils/tok.js +0 -14
  103. package/lib/plugins/utils/tok.js.map +0 -1
  104. package/lib/plugins/yaml.d.ts +0 -3
  105. package/lib/plugins/yaml.js +0 -311
  106. package/lib/plugins/yaml.js.map +0 -1
  107. package/lib/providers/attrs.d.ts +0 -2
  108. package/lib/providers/attrs.js +0 -16
  109. package/lib/providers/attrs.js.map +0 -1
  110. package/lib/providers/callouts.d.ts +0 -2
  111. package/lib/providers/callouts.js +0 -16
  112. package/lib/providers/callouts.js.map +0 -1
  113. package/lib/providers/cites.d.ts +0 -2
  114. package/lib/providers/cites.js +0 -16
  115. package/lib/providers/cites.js.map +0 -1
  116. package/lib/providers/decorator.d.ts +0 -2
  117. package/lib/providers/decorator.js +0 -16
  118. package/lib/providers/decorator.js.map +0 -1
  119. package/lib/providers/deflist.d.ts +0 -2
  120. package/lib/providers/deflist.js +0 -16
  121. package/lib/providers/deflist.js.map +0 -1
  122. package/lib/providers/divs.d.ts +0 -2
  123. package/lib/providers/divs.js +0 -28
  124. package/lib/providers/divs.js.map +0 -1
  125. package/lib/providers/figure-divs.d.ts +0 -2
  126. package/lib/providers/figure-divs.js +0 -16
  127. package/lib/providers/figure-divs.js.map +0 -1
  128. package/lib/providers/figures.d.ts +0 -2
  129. package/lib/providers/figures.js +0 -16
  130. package/lib/providers/figures.js.map +0 -1
  131. package/lib/providers/footnotes.d.ts +0 -2
  132. package/lib/providers/footnotes.js +0 -16
  133. package/lib/providers/footnotes.js.map +0 -1
  134. package/lib/providers/gridtables.d.ts +0 -2
  135. package/lib/providers/gridtables.js +0 -16
  136. package/lib/providers/gridtables.js.map +0 -1
  137. package/lib/providers/math.d.ts +0 -2
  138. package/lib/providers/math.js +0 -105
  139. package/lib/providers/math.js.map +0 -1
  140. package/lib/providers/mermaid.d.ts +0 -2
  141. package/lib/providers/mermaid.js +0 -16
  142. package/lib/providers/mermaid.js.map +0 -1
  143. package/lib/providers/provider.d.ts +0 -4
  144. package/lib/providers/provider.js +0 -13
  145. package/lib/providers/provider.js.map +0 -1
  146. package/lib/providers/shortcodes.d.ts +0 -2
  147. package/lib/providers/shortcodes.js +0 -16
  148. package/lib/providers/shortcodes.js.map +0 -1
  149. package/lib/providers/spans.d.ts +0 -2
  150. package/lib/providers/spans.js +0 -16
  151. package/lib/providers/spans.js.map +0 -1
  152. package/lib/providers/sub.d.ts +0 -2
  153. package/lib/providers/sub.js +0 -16
  154. package/lib/providers/sub.js.map +0 -1
  155. package/lib/providers/sup.d.ts +0 -2
  156. package/lib/providers/sup.js +0 -16
  157. package/lib/providers/sup.js.map +0 -1
  158. package/lib/providers/table-captions.d.ts +0 -2
  159. package/lib/providers/table-captions.js +0 -16
  160. package/lib/providers/table-captions.js.map +0 -1
  161. package/lib/providers/tasklists.d.ts +0 -2
  162. package/lib/providers/tasklists.js +0 -16
  163. package/lib/providers/tasklists.js.map +0 -1
  164. package/lib/providers/yaml.d.ts +0 -2
  165. package/lib/providers/yaml.js +0 -16
  166. package/lib/providers/yaml.js.map +0 -1
  167. package/lib/types.d.ts +0 -44
  168. package/lib/types.js +0 -2
  169. package/lib/types.js.map +0 -1
  170. package/lib/utils/html.d.ts +0 -12
  171. package/lib/utils/html.js +0 -46
  172. package/lib/utils/html.js.map +0 -1
  173. package/lib/utils/markdownit.d.ts +0 -16
  174. package/lib/utils/markdownit.js +0 -45
  175. package/lib/utils/markdownit.js.map +0 -1
  176. package/lib/utils/tok.d.ts +0 -8
  177. package/lib/utils/tok.js +0 -14
  178. package/lib/utils/tok.js.map +0 -1
  179. package/lib/widgets.d.ts +0 -15
  180. package/lib/widgets.js +0 -58
  181. 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
@@ -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,iBAAi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