feat(plugins): add bundled relays workspace panel plugin

This commit is contained in:
Federico Jaramillo Martinez
2026-07-28 23:14:21 +02:00
parent d19fca4090
commit 87c09982e9
13 changed files with 1591 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# Vendored dependencies
## marked (`marked.esm.js`)
- **Source:** `node_modules/marked/lib/marked.esm.js` — marked v18.0.6, the
version the repo pins (`"marked": "^18.0.6"` in the root `package.json`).
- **License:** MIT — copyright (c) 2018-2026 MarkedJS, (c) 2011-2018
Christopher Jeffrey. The attribution header at the top of `marked.esm.js` is
preserved; see also `node_modules/marked/LICENSE.md`.
- **Why vendored:** bundled plugins load in the browser as standalone ES
modules and cannot resolve bare package specifiers. The plugin therefore
ships the exact marked build the repo already depends on, rather than
hand-rolling a markdown subset or adding a markdown helper to the plugin API.
- **Local modification:** the trailing `//# sourceMappingURL=marked.esm.js.map`
comment was removed because the (much larger) source map is not vendored.
Everything else is byte-identical to the published file.
- **`marked.esm.d.ts`** is a hand-written minimal declaration covering only the
surface `markdownDocument.ts` uses. The plugin build
(`scripts/build-plugins.mjs`) skips `.d.ts` files and copies `.js` assets
verbatim, so the vendored module ships as-is.
**Updating:** after a `marked` upgrade in the root `package.json`, copy the new
`node_modules/marked/lib/marked.esm.js` here, re-apply the sourceMappingURL
removal, and update this note.
+28
View File
@@ -0,0 +1,28 @@
/**
* Minimal declarations for the vendored marked ESM build (./marked.esm.js).
* Covers only the surface markdownDocument.ts uses; widen it if usage grows.
* The plugin build copies the .js verbatim and skips this file, so these
* declarations exist for tsc and editor tooling only.
*/
export interface MarkedHtmlToken {
text: string;
}
export interface MarkedRenderer {
html: (token: MarkedHtmlToken) => string;
}
export interface MarkedParseOptions {
async?: false;
breaks?: boolean;
gfm?: boolean;
renderer?: MarkedRenderer;
}
export interface Marked {
Renderer: new () => MarkedRenderer;
parse(source: string, options?: MarkedParseOptions): string;
}
export const marked: Marked;
File diff suppressed because one or more lines are too long