Commit graph

29 commits

Author SHA1 Message Date
Matt Bierner 9464d14f31
Make notebook renderer activate potentially async (#124647)
* Make notebook renderer activate potentially async

- Allow activate to be `async`
- Make `getRenderer` always return a promise instead of the api result directly

* Add comment on why we use async
2021-05-26 09:15:00 -07:00
rebornix 473cfe28bf Revert "Revert "Merge branch 'main' of https://github.com/microsoft/vscode into main""
This reverts commit 7c01395da1.
2021-05-25 17:49:34 -07:00
Harald Kirschner 7c01395da1 Revert "Merge branch 'main' of https://github.com/microsoft/vscode into main"
This reverts commit 7a976501eb, reversing
changes made to 2257676834.
2021-05-25 17:19:40 -07:00
Johannes Rieken ffd1f84ea9
rename notebookOutputRenderer to notebookRenderer, https://github.com/microsoft/vscode/issues/121819 2021-05-25 12:31:53 +02:00
Connor Peet 616e0fd992
refactor: polish
- Fix mis-used dependencies. Add the roughly proposed 'extends' model
  for notebook renderers. Keep it out of contribution schema for now
	until we can work it more.
- Made new loading work with JS modules.
- Consolidated the 'old style' code in the renderer so that we can just
  delete it when the time comes.
- Removed duplicated code and sharp edges from the 'queue' mechaism.
2021-05-18 16:59:09 -07:00
Matt Bierner 66fa5c41b3
First cut at unifying notebook renderers apis
This implements the api described in #123540. Major points:

- Instead of having the `markdown-it` renderer pull it its dependencies, instead the dependencies can call `getRenderer` to import the object returned by the `markdown-it` renderer

- We try to detect if a renderer is using the old or new api. Old renderers are still run as globals while new ones are loaded with `import`

- I have only hooked up the new API for markdown renderers so far
2021-05-12 19:32:57 -07:00
Matt Bierner 11a8c4b4bc
Merge the notebookMarkupRenderer contribution point into the renderers contribition point
For #123540
2021-05-12 13:28:28 -07:00
Matt Bierner 40321932fc
Render KaTeX errors in notebooks
Fixes #122413
2021-05-06 17:10:33 -07:00
Matt Bierner 0bae48f6c1
Enable markdown notebook extensions in untrusted workspaces 2021-05-06 16:05:47 -07:00
Matt Bierner 8c186e8f4a
Enable notebook markdown-extensions in virtualWorkspaces
Fixes #123067
2021-05-06 15:28:54 -07:00
Matt Bierner 7770708545
Reapply markup renderers change
Rewriting how we do replacements in the webviewPreloads function to hopefully handle optimization better
2021-04-28 10:44:25 -07:00
Matt Bierner fe7c5aba01
Revert "Better notebook markup renderer api (#121882)"
This reverts commit 4cb27d2ec7.
2021-04-26 19:43:16 -07:00
Matt Bierner 4cb27d2ec7
Better notebook markup renderer api (#121882)
* Better notebook markup renderer api

For #121256

- Use js modules for notebook output renderers
- Rename apis from `markdown` to `markup`
- Use imports and exports for apis instead of globals for apis
- Use esbuild instead of webpack so we can emit js modules
- Clearly split top level markup renderes from renderers that extend other renderers

* Use constant instead of comment for replacement
2021-04-26 16:30:34 -07:00
Sandeep Somavarapu 68bed01970
adopt virtual workspaces - not supported 2021-04-22 16:54:06 +02:00
Matt Bierner 119581fc2a
Use more standard name for shared extension tsconfig
This enables Intellisense in the `tsconfig.base` file
2021-04-12 15:58:38 -07:00
Matt Bierner 13944bac07
Pick up new katex version 2021-04-08 22:06:22 -07:00
Matt Bierner 3c89afbbc4
Pull in newer markdown-it katex version 2021-04-08 21:27:45 -07:00
Matt Bierner 9ab80019bf Use forked markdown-it-katex version 2021-03-30 16:08:34 -07:00
Matt Bierner d4412e708a
Render markdown preview cells inside a shadow dom (#120137)
* Render markdown preview cells inside a shadow dom

Fixes #119971

This moves all markdown previews into shadow doms. This lets us prevent styles from outside the preview leak into the preview, and also prevents styles from the preview leak out into the rest of the notebook

* Use composedPath for handling events in webviews

This lets us handle clicks triggered inside of a shadow dom
2021-03-30 14:17:15 -07:00
Matt Bierner 5c0c637a04 Make sure we ignore compiled media files 2021-03-19 12:12:59 -07:00
Matt Bierner c0885dd0c4
Add task to build extension media (#119294)
This lets us avoid checking in the compiled js files that are used inside webviews and notebooks
2021-03-18 19:15:59 -07:00
Matt Bierner 111a6cec70 Don't include build files in repo 2021-03-17 17:57:09 -07:00
Matt Bierner 3e4c057624 Make sure we exclude ts files from published build 2021-03-17 17:53:23 -07:00
Matt Bierner fc8d7681c4 Make sure katex styles are shipped under root of
Also copies of just the katex css we need instead of bundling the entire module
2021-03-16 17:43:52 -07:00
Matt Bierner 581a659d42 Update markdown notebook scripts 2021-03-16 17:28:29 -07:00
Matt Bierner d31566b57f Don't include css in main katex bundle 2021-03-11 14:03:01 -08:00
Matt Bierner 9b2ee7fb7d Reduce size of Katex bundle
Only load woff2 fonts instead of including all fallback font types in the bundle
2021-03-10 19:56:46 -08:00
Matt Bierner b3a33306fb Add markdown emoji for testing in notebooks 2021-02-22 18:10:27 -08:00
Matt Bierner 6a9f8ac758 Rename markdown math extension to notebook-markdown-extensions
We will use this to experiment with different types of extensions, not just math
2021-02-22 16:07:48 -08:00