* 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
- 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.
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
* 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
* 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