From 691cc029683e87caeb08fa3359ea5b82dd10f047 Mon Sep 17 00:00:00 2001 From: Okiki Date: Sun, 27 Feb 2022 19:00:23 +0000 Subject: [PATCH] chore: lsp-dev-ts --- astro.config.mjs | 5 - .../Experimental-Editor.ts | 75 - .../capabilities/completion.ts | 585 --- .../capabilities/diagnostic.ts | 69 - .../capabilities/document-highlight.ts | 47 - .../capabilities/document-symbols.ts | 144 - .../capabilities/goto.ts | 43 - .../capabilities/hover.ts | 81 - .../capabilities/index.ts | 13 - .../capabilities/signature-help.ts | 108 - .../capabilities/snippet.ts | 199 - codemirror-workspace-lsps/events.ts | 140 - codemirror-workspace-lsps/index.ts | 1 - codemirror-workspace-lsps/ui/context-menu.ts | 83 - codemirror-workspace-lsps/ui/tooltip.ts | 27 - .../ui/typeahead-input.ts | 282 -- codemirror-workspace-lsps/utils/array.test.ts | 66 - codemirror-workspace-lsps/utils/array.ts | 34 - .../utils/conversions.ts | 190 - codemirror-workspace-lsps/utils/editor.ts | 50 - .../utils/event-stream.ts | 186 - codemirror-workspace-lsps/utils/promise.ts | 1 - codemirror-workspace-lsps/utils/regexp.ts | 2 - codemirror-workspace-lsps/utils/string.ts | 12 - codemirror-workspace-lsps/workspace.ts | 902 ---- index.html | 62 + package.json | 26 +- pnpm-lock.yaml | 3884 +++-------------- public/assets/logo.svg | 12 - public/robots.txt | 2 - public/workers/tsserver.js | 86 - public/workers/tsserver.ts | 108 - public/workers/worker.ts | 316 -- snowpack.config.mjs | 29 - {public => src/assets}/favicon.svg | 0 src/components/Editor.tsx | 157 +- src/components/Transport.ts | 79 - src/components/TransportRequestManager.ts | 152 - src/components/basic.tsx | 18 - src/components/codemirror.ts | 13 + src/components/editor-basic-setup.ts | 8 +- src/components/index.tsx | 5 + src/components/json-server.ts | 92 + src/components/lsps.ts | 15 +- src/components/tsserver.ts | 7 +- src/open-rpc-client-js/Client.ts | 100 + src/open-rpc-client-js/ClientInterface.ts | 19 + .../Error.ts | 2 +- .../Request.ts | 2 +- src/open-rpc-client-js/RequestManager.ts | 122 + src/open-rpc-client-js/index.ts | 20 + .../transports/EventEmitterTransport.ts | 45 + .../transports/HTTPTransport.ts | 80 + .../transports/PostMessageIframeTransport.ts | 63 + .../transports/PostMessageWindowTransport.ts | 73 + .../transports}/PostMessageWorkerTransport.ts | 10 +- .../transports/Transport.ts | 79 + .../transports/TransportRequestManager.ts | 152 + .../transports/WebSocketTransport.ts | 49 + src/pages/index.astro | 60 - tsconfig.json | 6 + vite.config.ts | 10 + 62 files changed, 1529 insertions(+), 7779 deletions(-) delete mode 100644 astro.config.mjs delete mode 100644 codemirror-workspace-lsps/Experimental-Editor.ts delete mode 100644 codemirror-workspace-lsps/capabilities/completion.ts delete mode 100644 codemirror-workspace-lsps/capabilities/diagnostic.ts delete mode 100644 codemirror-workspace-lsps/capabilities/document-highlight.ts delete mode 100644 codemirror-workspace-lsps/capabilities/document-symbols.ts delete mode 100644 codemirror-workspace-lsps/capabilities/goto.ts delete mode 100644 codemirror-workspace-lsps/capabilities/hover.ts delete mode 100644 codemirror-workspace-lsps/capabilities/index.ts delete mode 100644 codemirror-workspace-lsps/capabilities/signature-help.ts delete mode 100644 codemirror-workspace-lsps/capabilities/snippet.ts delete mode 100644 codemirror-workspace-lsps/events.ts delete mode 100644 codemirror-workspace-lsps/index.ts delete mode 100644 codemirror-workspace-lsps/ui/context-menu.ts delete mode 100644 codemirror-workspace-lsps/ui/tooltip.ts delete mode 100644 codemirror-workspace-lsps/ui/typeahead-input.ts delete mode 100644 codemirror-workspace-lsps/utils/array.test.ts delete mode 100644 codemirror-workspace-lsps/utils/array.ts delete mode 100644 codemirror-workspace-lsps/utils/conversions.ts delete mode 100644 codemirror-workspace-lsps/utils/editor.ts delete mode 100644 codemirror-workspace-lsps/utils/event-stream.ts delete mode 100644 codemirror-workspace-lsps/utils/promise.ts delete mode 100644 codemirror-workspace-lsps/utils/regexp.ts delete mode 100644 codemirror-workspace-lsps/utils/string.ts delete mode 100644 codemirror-workspace-lsps/workspace.ts create mode 100644 index.html delete mode 100644 public/assets/logo.svg delete mode 100644 public/robots.txt delete mode 100644 public/workers/tsserver.js delete mode 100644 public/workers/tsserver.ts delete mode 100644 public/workers/worker.ts delete mode 100644 snowpack.config.mjs rename {public => src/assets}/favicon.svg (100%) delete mode 100644 src/components/Transport.ts delete mode 100644 src/components/TransportRequestManager.ts delete mode 100644 src/components/basic.tsx create mode 100644 src/components/index.tsx create mode 100644 src/components/json-server.ts create mode 100644 src/open-rpc-client-js/Client.ts create mode 100644 src/open-rpc-client-js/ClientInterface.ts rename src/{components => open-rpc-client-js}/Error.ts (99%) rename src/{components => open-rpc-client-js}/Request.ts (99%) create mode 100644 src/open-rpc-client-js/RequestManager.ts create mode 100644 src/open-rpc-client-js/index.ts create mode 100644 src/open-rpc-client-js/transports/EventEmitterTransport.ts create mode 100644 src/open-rpc-client-js/transports/HTTPTransport.ts create mode 100644 src/open-rpc-client-js/transports/PostMessageIframeTransport.ts create mode 100644 src/open-rpc-client-js/transports/PostMessageWindowTransport.ts rename src/{components => open-rpc-client-js/transports}/PostMessageWorkerTransport.ts (84%) create mode 100644 src/open-rpc-client-js/transports/Transport.ts create mode 100644 src/open-rpc-client-js/transports/TransportRequestManager.ts create mode 100644 src/open-rpc-client-js/transports/WebSocketTransport.ts delete mode 100644 src/pages/index.astro create mode 100644 vite.config.ts diff --git a/astro.config.mjs b/astro.config.mjs deleted file mode 100644 index 9030029..0000000 --- a/astro.config.mjs +++ /dev/null @@ -1,5 +0,0 @@ -export default { - renderers: [ - "@astrojs/renderer-solid" - ] -}; diff --git a/codemirror-workspace-lsps/Experimental-Editor.ts b/codemirror-workspace-lsps/Experimental-Editor.ts deleted file mode 100644 index cd466e6..0000000 --- a/codemirror-workspace-lsps/Experimental-Editor.ts +++ /dev/null @@ -1,75 +0,0 @@ - -import marked from "marked"; - -import { Workspace } from "@qualified/codemirror-workspace"; -import "@qualified/codemirror-workspace/css/default.css"; - -const modeMap: { [k: string]: string } = { - json: "application/json", - typescript: "text/typescript", - javascript: "text/javascript", - html: "text/html", - css: "text/css", -}; - -const highlight = (code: string, language: string) => { - const mode = modeMap[language] || "text/plain"; - const tmp = document.createElement("div"); - CodeMirror.runMode(code, mode, tmp, { tabSize: 4 }); - return tmp.innerHTML; -}; - -marked.use({ - // @ts-ignore renderer can be object literal - renderer: { - code(code: string, language: string | undefined) { - if (!language) language = "text"; - code = highlight(code, language); - // We need to add a class for the theme (e.g., `cm-s-idea`) on the wrapper. - // If we're using a custom theme, it can apply its styles to `code[class^="language-"]` - // and use Marked's default `code` with `highlight` option. - return `
${code}
`; - }, - }, -}); - -const initialText = `export * from "@okikio/animate";`; -import Codemirror from "../src/components/codemirror"; - -const config: CodeMirror.EditorConfiguration = { - theme: "idea", - // keyMap: "vim", - gutters: ["cmw-gutter"], - lineNumbers: true, - matchBrackets: true, - autoCloseBrackets: true, -}; - -const TSCodeEditor = CodeMirror($("#editor"), { - ...config, - mode: "text/typescript", - value: initialText, -}); - -const TS_WORKER = "ts-worker"; -const workspace = new Workspace({ - rootUri: "inmemory://workspace/", - getLanguageAssociation: (uri: string) => { - if (uri.endsWith(".ts")) { - return { languageId: "typescript", languageServerIds: [TS_WORKER] }; - } - return null; - }, - getConnectionString: async (id: string) => { - switch (id) { - case TS_WORKER: - return "workers/worker.js"; - default: - return ""; - } - }, - // Support Markdown documentation - renderMarkdown: (markdown) => marked(markdown), -}); - -workspace.openTextDocument("index.ts", TSCodeEditor); \ No newline at end of file diff --git a/codemirror-workspace-lsps/capabilities/completion.ts b/codemirror-workspace-lsps/capabilities/completion.ts deleted file mode 100644 index 1c14fa8..0000000 --- a/codemirror-workspace-lsps/capabilities/completion.ts +++ /dev/null @@ -1,585 +0,0 @@ -/// - -import type { Editor, Position, Hint, Hints } from "codemirror"; -import type { - CompletionContext, - CompletionItem, - CompletionList, - CancellationToken, -} from "vscode-languageserver-protocol"; -import { - CancellationTokenSource, - CompletionItemKind, - CompletionTriggerKind, - InsertTextFormat, - TextEdit, -} from "vscode-languageserver-protocol"; -import CodeMirror from "codemirror"; - -import { LspConnection } from "@qualified/lsp-connection"; - -import { - cmRange, - completionItemKindToString, - completionItemsToList, - documentationToString, - lspPosition, -} from "../utils/conversions"; -import { applyEdits } from "../utils/editor"; -import { escapeHtml } from "../utils/string"; -import { insertSnippet } from "./snippet"; - -export type CompletionHandlerOptions = { - uri: string; - editor: Editor; - conn: LspConnection; - renderMarkdown: (x: string) => string; -}; - -export class CompletionHandler { - private uri: string; - private editor: Editor; - private conn: LspConnection; - private pendingRequest: CancellationTokenSource | null = null; - private renderMarkdown: (x: string) => string; - - constructor({ uri, editor, conn, renderMarkdown }: CompletionHandlerOptions) { - this.uri = uri; - this.editor = editor; - this.conn = conn; - this.renderMarkdown = renderMarkdown; - } - - invoke() { - this.request({ - triggerKind: CompletionTriggerKind.Invoked, - }); - } - - private retriggerForIncomplete() { - this.request({ - triggerKind: CompletionTriggerKind.TriggerForIncompleteCompletions, - }); - } - - private triggerWith(triggerCharacter: string) { - this.request({ - triggerKind: CompletionTriggerKind.TriggerCharacter, - triggerCharacter, - }); - } - - /** - * Attempt to start/resume completion on `change` event. - * - * @returns true if handled. - */ - onChange(): boolean { - const pos = this.editor.getCursor(); - // Treat as handled - if (pos.ch === 0) return true; - - const triggerCharacter = this.editor.getLine(pos.line)[pos.ch - 1]; - // Note that this must be checked before ignoring further typing for "complete" - // completion so a new completion is triggered. - if (this.conn.completionTriggers.includes(triggerCharacter)) { - this.triggerWith(triggerCharacter); - return true; - } - - if (this.isComplete()) { - // Do nothing, completion is active with a complete list. - // The popup is updated on `curorActivity` event. - // Treat this as handled. - return true; - } - - const type = this.editor.getTokenTypeAt(pos); - if (type) { - if (/\b(?:variable|property|type)\b/.test(type)) { - if (this.isActive()) { - this.retriggerForIncomplete(); - } else { - this.invoke(); - } - return true; - } - - // HTML attribute completion within a string. - if (this.isActive() && type === "string") { - this.retriggerForIncomplete(); - return true; - } - } - - return false; - } - - private request(context: CompletionContext) { - this.cancelPending(); - - const cts = new CancellationTokenSource(); - this.pendingRequest = cts; - this.conn - .getCompletion( - { - textDocument: { uri: this.uri }, - position: lspPosition(this.editor.getCursor()), - context, - }, - this.pendingRequest.token - ) - .then((list) => { - if (this.pendingRequest === cts) { - this.pendingRequest = null; - } else { - // canceled - return; - } - - if (!list) return; - if (Array.isArray(list)) { - list = completionItemsToList(list); - } - if (list.items.length === 0) return; - - new CompletionHint({ - list, - editor: this.editor, - invoked: - context.triggerKind !== CompletionTriggerKind.TriggerCharacter, - renderMarkdown: this.renderMarkdown, - resolveItem: (item, cancel) => - this.conn - .getCompletionItemDetails(item, cancel) - .then((x) => x || item), - }).show(); - }); - } - - /** - * Close completion popup. - */ - close() { - this.cancelPending(); - this.editor.closeHint(); - } - - /** - * True if completion is active. - */ - private isActive() { - return !!this.editor.state?.completionActive; - } - - /** - * True if completion is active, and the completion list is complete. - * There's no need to make new requests. - */ - private isComplete() { - return !!this.editor.state?.completionActive?.options - ?.updateOnCursorActivity; - } - - private cancelPending() { - if (this.pendingRequest) { - this.pendingRequest.cancel(); - this.pendingRequest = null; - } - } -} - -export type CompletionHintOptions = { - editor: Editor; - list: CompletionList; - invoked: boolean; - renderMarkdown: (x: string) => string; - resolveItem: ( - item: CompletionItem, - token?: CancellationToken - ) => Promise; -}; - -// Manages completion state. -// - Avoid querying the server when the list is complete -// - Cache `completionItem/resolve` -class CompletionHint { - private editor: Editor; - private list: CompletionList; - private updates: number; - private invoked: boolean; - private renderMarkdown: (x: string) => string; - private resolveItem: ( - item: CompletionItem, - token?: CancellationToken - ) => Promise; - private tooltip: HTMLElement | null = null; - private detailsCache: WeakMap = new WeakMap(); - private pendingRequest: CancellationTokenSource | null = null; - - constructor({ - editor, - invoked, - list, - renderMarkdown, - resolveItem, - }: CompletionHintOptions) { - this.editor = editor; - this.list = list; - this.invoked = invoked; - this.updates = 0; - this.renderMarkdown = renderMarkdown; - this.resolveItem = resolveItem; - } - - show() { - this.editor.showHint({ - completeSingle: false, - updateOnCursorActivity: !this.list.isIncomplete, - // Called once at first, then for each `cursorActivity` if the list is complete (no need to requery) - hint: () => this.update(), - }); - } - - private update() { - const { from: posFrom, to: posTo, items } = this.getState(); - const list = items.map((item) => { - const hint: HintWithItem = { - // Note that `text` field is only set because @types/codemirror wrongly requires it. - text: "", - displayText: item.label, - // Called when this completion is picked. - hint: (cm: Editor) => { - let text = item.insertText || item.label; - let from = { line: posFrom.line, ch: posFrom.ch }; - let to = { line: posTo.line, ch: posTo.ch }; - if (item.textEdit) { - // Need to adjust the content for the typed characters because the - // range in `textEdit` can be the range when the completion was requested. - // Replace the range so it matches the original content before completing. - const edit = item.textEdit; - const range = cmRange( - TextEdit.is(edit) ? edit.range : edit.replace - ); - // Adjust the current range based on the item's range to - // make sure the current range contains the original range. - // This is necessary when the current range was not accurate due to CM limitation. - // - // The item's range can start before the current range when CM token doesn't match - // with the Language Server's (e.g., HTML closing tag completion containing the slash). - if (range[0].ch < from.ch) from.ch = range[0].ch; - // The item's range can end after the current range for completion within string - // where the end of the current range is the cursor position. - if (range[1].ch > to.ch) to.ch = range[1].ch; - - this.editor.replaceRange( - this.editor.getRange(range[0], range[1]), - from, - to, - "complete" - ); - [from, to] = range; - text = edit.newText; - } - - if (item.insertTextFormat === InsertTextFormat.Snippet) { - // Insert snippet and start snippet mode. - return insertSnippet(cm, text, from, to, item.additionalTextEdits); - } - - cm.replaceRange(text, from, to, "+complete"); - if (item.additionalTextEdits) { - applyEdits(cm, item.additionalTextEdits, "+complete"); - } - // Scroll to cursor - cm.scrollIntoView(null); - cm.closeHint(); - }, - // Function to create item in menu. Called once in `Widget`'s constructor. - // @ts-ignore: using `HintWithItem` instead of `Hint` - render: this.renderItem, - item, - }; - return hint; - }); - const hints: Hints = { - from: posFrom, - to: posTo, - list, - }; - CodeMirror.on(hints, "close", this.onHintsClose); - CodeMirror.on(hints, "update", this.onHintsUpdate); - // @ts-ignore: using `HintWithItem` instead of `Hint` - CodeMirror.on(hints, "select", this.onHintsSelect); - return hints; - } - - private getState(): { - from: Position; - to: Position; - items: CompletionItem[]; - } { - const pos = this.editor.getCursor(); - // Filter by typed text when: - // - the completion was invoked (typing identifier or manually invoked) - // - the triggered completion was updated by user typing after the trigger character - if (this.updates++ > 0 || this.invoked) { - const token = this.editor.getTokenAt(pos); - if (token.type === "string") { - // HACK Try to find the correct range within a string. - // Completion inside a string is possible in: - // - HTML for attributes - // - import module path completion for JS/TS, etc. - // - // If there's a completion item with `TextEdit` use that. - // Set the start of the range to match the start of a TextEdit. - // Set the end of the range to the cursor position. - // The end of the range is adjusted again when completing an item. - const itemWithTextEdit = this.list.items.find((x) => x.textEdit); - if (itemWithTextEdit) { - const edit = itemWithTextEdit.textEdit!; - const range = cmRange(TextEdit.is(edit) ? edit.range : edit.replace); - token.start = range[0].ch; - token.end = pos.ch; - } else { - // For simple text insertion, remove quotes from the range. - const start = token.string[0]; - const end = token.string[token.string.length - 1]; - if (start === '"' || start === "'") { - if (start === end) { - token.start += 1; - token.end -= 1; - } else { - // If the string doesn't have a matching closing quote, - // use the cursor position to end the range. - token.start += 1; - token.end = pos.ch; - } - } - } - } - - const posFrom = { line: pos.line, ch: token.start }; - const posTo = { line: pos.line, ch: token.end }; - const typed = this.editor.getRange(posFrom, posTo); - return { - from: posFrom, - to: posTo, - items: filteredItems(this.list.items, typed, 50), - }; - } else { - return { - from: pos, - to: pos, - items: this.list.items, - }; - } - } - - private renderItem = (el: HTMLLIElement, _data: Hints, cur: HintWithItem) => { - const item = cur.item; - // TODO Use meaningful icons for each kind - // TODO Show matching characters in different color? - const hue = Math.floor(((item.kind || 0) / 30) * 180 + 180); - let color = `hsl(${hue}, 75%, 50%)`; - // If completing a color, show the color. - // TODO This is just an example and only handles 6 digit hex. - if (item.kind === CompletionItemKind.Color) { - const doc = documentationToString(item.documentation); - if (doc) { - const hex = doc.match(/#[\da-f]{6}/i); - if (hex) color = hex[0]; - } - } - - const icon = el.appendChild(document.createElement("div")); - icon.style.color = color; - icon.className = [ - `cmw-icon`, - `cmw-icon--${completionItemKindToString(item.kind)}`, - ].join(" "); - el.appendChild(document.createTextNode(item.label)); - }; - - private onHintsClose = () => { - this.cancelPending(); - this.removeTooltip(); - }; - - private onHintsUpdate = () => { - this.cancelPending(); - this.removeTooltip(); - }; - - // Show details of each completion item on `select`. - // See https://github.com/codemirror/CodeMirror/blob/6fcc49d5321261b525e50f111f3b28a602f01f71/addon/tern/tern.js#L229 - private onHintsSelect = (selected: HintWithItem, node: HTMLElement) => { - this.cancelPending(); - this.removeTooltip(); - - const item = selected.item; - const cached = this.detailsCache.get(item); - if (cached) { - this.addTooltip(node, cached); - } else { - const cts = new CancellationTokenSource(); - this.pendingRequest = cts; - this.resolveItem(item, this.pendingRequest.token).then((x) => { - this.removeTooltip(); - if (this.pendingRequest === cts) { - this.pendingRequest = null; - } else { - // canceled - return; - } - - const cached = this.cacheDetails(Object.assign(item, x)); - this.detailsCache.set(item, cached); - this.addTooltip(node, cached); - }); - } - }; - - private cacheDetails(item: CompletionItem): CachedDetails { - return { - kind: item.kind && completionItemKindToString(item.kind), - detail: item.detail && escapeHtml(item.detail), - documentation: - item.documentation && - documentationToString(item.documentation, this.renderMarkdown), - }; - } - - private tooltipContent(cached: CachedDetails): string { - let content = ""; - if (cached.detail) { - content += `${cached.detail}`; - } - if (cached.documentation) { - content += `
${cached.documentation}
`; - } - return content; - } - - private addTooltip(node: HTMLElement, cached: CachedDetails) { - // Ensure the `node` is in document - if (!node.isConnected) return; - const content = this.tooltipContent(cached); - if (!content) return; - - const menu = node.parentNode! as HTMLElement; - const x = menu.getBoundingClientRect().right + window.pageXOffset; - const y = menu.getBoundingClientRect().top + window.pageYOffset; - const el = document.createElement("div"); - el.innerHTML = content; - const tooltip = document.createElement("div"); - tooltip.classList.add("cmw-completion-item-doc"); - tooltip.style.cssText = ` - z-index: 10; - position: absolute; - left: ${x}px; - top: ${y}px; - font-size: 12px; - padding: 2px; - max-height: 400px; - max-width: 400px; - overflow: auto; - `; - tooltip.appendChild(el); - document.body.appendChild(tooltip); - this.tooltip = tooltip; - } - - private removeTooltip() { - if (this.tooltip) { - this.tooltip.remove(); - this.tooltip = null; - } - } - - private cancelPending() { - if (this.pendingRequest) { - this.pendingRequest.cancel(); - this.pendingRequest = null; - } - } -} - -interface CachedDetails { - kind: string | undefined; - detail: string | undefined; - documentation: string | undefined; -} - -interface HintWithItem extends Hint { - item: CompletionItem; -} - -const filteredItems = ( - items: CompletionItem[], - typed: string, - maxItems: number = 30 -) => { - const scores = items.reduce((o, item) => { - o[item.label] = lcsScore(item.filterText || item.label, typed); - // Boost the score if preselect - // if (item.preselect) o[item.label] *= 100; - return o; - }, {} as { [k: string]: number }); - - return items - .slice() - .sort((a, b) => scores[b.label] - scores[a.label]) - .slice(0, maxItems); -}; - -const PREFIX_BONUS = 0.5; - -// Similarity score between strings based on the length of the longest common subsequence. -const lcsScore = (fst: string, snd: string): number => { - const m = fst.length; - const n = snd.length; - const k = Math.min(m, n); - if (k === 0) return 0; - - // Length of the common prefix to boost with - let prefix = 0; - while (fst[prefix] === snd[prefix] && ++prefix < k); - - // Normalize the score based on the input lengths - const scale = (m + n) / (2 * m * n); - const llcs = - k === prefix ? k : m < n ? lcsLength(snd, fst) : lcsLength(fst, snd); - return scale * llcs ** 2 + prefix * PREFIX_BONUS; -}; - -// Returns LCS length. -// Uses single array of size min(x.length, y.length) + 1 for look up. -// Assumes x.length >= y.length > 0. -// -// For X = AGCAT, Y = GAC, L changes like the following: -// -// Ø G A C -// Ø 0 0 0 0 -// A 0 0 *1 1 -// G 0 *1 1 1 -// C 0 1 1 *2 -// A 0 1 *2 2 -// T 0 1 2 2 -// -// where * denotes a match that incremented the value from previous column/row. -const lcsLength = (x: string, y: string): number => { - const m = x.length; - const n = y.length; - const L = [0]; - for (let i = 1; i <= n; ++i) L[i] = 0; - for (let i = 1; i <= m; ++i) { - // prev is the value from previous column/row - for (let j = 1, prev = L[0]; j <= n; ++j) { - const tmp = L[j]; - L[j] = x[i - 1] === y[j - 1] ? prev + 1 : Math.max(L[j - 1], L[j]); - prev = tmp; - } - } - return L[n]; -}; diff --git a/codemirror-workspace-lsps/capabilities/diagnostic.ts b/codemirror-workspace-lsps/capabilities/diagnostic.ts deleted file mode 100644 index 14a7f91..0000000 --- a/codemirror-workspace-lsps/capabilities/diagnostic.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { Editor, TextMarker } from "codemirror"; -import type { Diagnostic } from "vscode-languageserver/browser"; - -import { cmRange, diagnosticSeverityName } from "../utils/conversions"; - -// TODO Group diagnostic by start line (and maybe separate if end is on different line) -// - Gutter marker should use the most significant severity (lowest severity number) -// TODO Find a way to show the diagnostic messages, some ideas: -// - On "gutterClick", toggle line widgets of diagnotics on that line -// - On hover over TextMarker, show tooptip under the marker with messages. -// 1. Get mouse coordinates from event listener on the wrapper element. -// 2. pos = editor.coordsChar({ left: ev.clientX, top: ev.clientY }); -// 3. markers = editor.findMarksAt(pos); -// - -const GUTTER_ID = "cmw-gutter"; -const states = new WeakMap(); - -interface LspDiagnosticsState { - marks: TextMarker[]; -} - -/** - * Show diagnostics on the editor. - * @param editor - * @param diagnostics - */ -export const showDiagnostics = (editor: Editor, diagnostics: Diagnostic[]) => { - removeDiagnostics(editor); - if (diagnostics.length === 0) return; - - const state = states.get(editor) || { marks: [] }; - for (const d of diagnostics) { - // TODO Use diagnostic information to style text appropriately - const [start, end] = cmRange(d.range); - const severity = diagnosticSeverityName(d.severity || 3); - // const tags = (d.tags || []).map(t => diagnosticTagName(t)); - // const code = d.code; - // const source = d.source; - state.marks.push( - editor.markText(start, end, { className: `cmw-mark-${severity}` }) - ); - - // TODO Improve appearance - const el = document.createElement("div"); - el.classList.add(`cmw-guttermark-${severity}`); - el.style.width = "10px"; - el.style.fontSize = "8px"; - el.style.textAlign = "center"; - el.title = d.message; - el.innerText = "⬤"; - editor.setGutterMarker(start.line, GUTTER_ID, el); - } - states.set(editor, state); -}; - -/** - * Remove diagnostics from the editor. - * @param editor - */ -export const removeDiagnostics = (editor: Editor) => { - const state = states.get(editor); - if (!state) return; - - editor.clearGutter(GUTTER_ID); - for (const mark of state.marks) mark.clear(); - state.marks.length = 0; - states.delete(editor); -}; diff --git a/codemirror-workspace-lsps/capabilities/document-highlight.ts b/codemirror-workspace-lsps/capabilities/document-highlight.ts deleted file mode 100644 index 9165c6b..0000000 --- a/codemirror-workspace-lsps/capabilities/document-highlight.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { Editor, TextMarker } from "codemirror"; -import type { DocumentHighlight } from "vscode-languageserver-protocol"; - -import { cmRange } from "../utils/conversions"; - -const states = new WeakMap(); - -interface LspDocumentHighlightState { - marks: TextMarker[]; -} - -/** - * Show document highlights in the editor. - * @param editor - * @param highlights - */ -export const showHighlights = ( - editor: Editor, - highlights: DocumentHighlight[] -) => { - const state = states.get(editor) || { marks: [] }; - for (const { kind, range } of highlights) { - // TODO Use kind to style differently - const [start, end] = cmRange(range); - state.marks.push( - editor.markText(start, end, { - className: `cmw-highlight`, - }) - ); - } - states.set(editor, state); -}; - -/** - * Remove document highlights from the editor. - * @param editor - */ -export const removeHighlights = (editor: Editor) => { - const state = states.get(editor); - if (!state) return; - - if (state.marks && state.marks.length > 0) { - for (const mark of state.marks) mark.clear(); - state.marks.length = 0; - } - states.delete(editor); -}; diff --git a/codemirror-workspace-lsps/capabilities/document-symbols.ts b/codemirror-workspace-lsps/capabilities/document-symbols.ts deleted file mode 100644 index bec2097..0000000 --- a/codemirror-workspace-lsps/capabilities/document-symbols.ts +++ /dev/null @@ -1,144 +0,0 @@ -import type { Editor, TextMarker } from "codemirror"; -import type { SymbolKind, Location } from "vscode-languageserver-protocol"; -import { - DocumentSymbol, - SymbolInformation, -} from "vscode-languageserver-protocol"; - -import { gotoLocation } from "./goto"; -import { cmRange, symbolKindToString } from "../utils/conversions"; -import { attachTypeahead } from "../ui/typeahead-input"; -import { escapeRegExp } from "../utils/regexp"; - -type SymbolMenuItem = { - label: string; - kind: SymbolKind; - location: Location; -}; - -export const showSymbolSelector = ( - editor: Editor, - uri: string, - symbols: DocumentSymbol[] | SymbolInformation[] -) => { - if (symbols.length === 0) return; - - let mark: TextMarker | null = null; - const items = isDocumentSymbols(symbols) - ? symbols.flatMap((s) => [ - documentSymbolToItem(s, uri), - ...(s.children || []).map((c) => documentSymbolToItem(c, uri)), - ]) - : symbols.map((s) => symbolInfoToItem(s, uri)); - - const wrapper = editor.getWrapperElement(); - const dialog = wrapper.appendChild(document.createElement("div")); - const input = dialog.appendChild(document.createElement("input")); - dialog.className = "cmw-document-symbols"; - input.className = "cmw-document-symbols-input"; - - const disposeTypeahead = attachTypeahead(input, { - className: "cmw-document-symbols-list", - getSuggestions: async (text) => { - if (text === "") return items.slice(); - - const scores = items.reduce((o, item) => { - o[item.label] = substringScore(item.label, text); - return o; - }, {} as { [k: string]: number }); - return items - .slice() - .filter((a) => scores[a.label] > 0) - .sort((a, b) => scores[b.label] - scores[a.label]); - }, - render: (item, value) => { - const div = document.createElement("div"); - // TODO Specify color in CSS once we have proper icons - const icon = div.appendChild(document.createElement("div")); - const hue = Math.floor(((item.kind || 0) / 30) * 180 + 180); - icon.style.color = `hsl(${hue}, 75%, 50%)`; - icon.className = `cmw-icon cmw-icon--${symbolKindToString(item.kind)}`; - div.insertAdjacentHTML( - "beforeend", - item.label.replace( - new RegExp("(" + escapeRegExp(value) + ")", "i"), - `$1` - ) - ); - return div; - }, - onSelect: (item) => { - close(); - gotoLocation(editor, uri, item.location); - }, - onUpdate: (item) => { - if (mark) mark.clear(); - - const location = item.location; - if (location.uri !== uri) return; - mark = editor.markText(...cmRange(location.range), { - className: "cmw-highlight", - }); - }, - onCancel: () => { - input.blur(); - close(); - }, - }); - - let closed = false; - const close = () => { - if (closed) return; - - closed = true; - if (mark) mark.clear(); - disposeTypeahead(); - dialog.remove(); - editor.focus(); - }; - dialog.addEventListener("focusout", (e) => { - if (e.relatedTarget !== null) close(); - }); - input.focus(); -}; - -const isDocumentSymbols = (symbols: any[]): symbols is DocumentSymbol[] => - symbols.every((symbol) => DocumentSymbol.is(symbol)); - -const symbolInfoToItem = ( - symbol: SymbolInformation, - uri: string -): SymbolMenuItem => { - return { - label: symbol.name, - kind: symbol.kind, - // TODO Handle locations in other document - // symbol.location.uri !== uri - location: symbol.location, - }; -}; - -const documentSymbolToItem = ( - symbol: DocumentSymbol, - uri: string -): SymbolMenuItem => { - return { - label: symbol.name, - kind: symbol.kind, - location: { - uri, - range: symbol.range, - }, - }; -}; - -// Simple score based on substrings -const substringScore = (item: string, typed: string): number => { - const itemLower = item.toLowerCase(); - const textLower = typed.toLowerCase(); - const ii = itemLower.includes(textLower) ? 1 : 0; - const ci = item.includes(typed) ? 1 : 0; - const is = itemLower.startsWith(textLower) ? 2 : 0; - const cs = item.startsWith(typed) ? 3 : 0; - return ii + ci + is + cs; -}; diff --git a/codemirror-workspace-lsps/capabilities/goto.ts b/codemirror-workspace-lsps/capabilities/goto.ts deleted file mode 100644 index 8e249b7..0000000 --- a/codemirror-workspace-lsps/capabilities/goto.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { Editor } from "codemirror"; -import { Location, LocationLink } from "vscode-languageserver-protocol"; - -import { cmPosition, cmRange } from "../utils/conversions"; -import { highlightRange } from "../utils/editor"; - -// Go to the location if it's in the same text document. -// Otherwise, let the app handle it. -// TODO Support Peek -export const gotoLocation = ( - cm: Editor, - uri: string, - location: Location | LocationLink[] | Location[] -) => { - // TODO Let user pick if there are multiple locations - const loc = Array.isArray(location) ? location[0] : location; - if (Location.is(loc)) { - if (loc.uri === uri) { - const newPos = cmPosition(loc.range.start); - highlightRange(cm, ...cmRange(loc.range), 1500); - // @ts-ignore @types/codemirror doesn't allow `setCursor(pos, options)` - cm.setCursor(newPos, { scroll: true }); - // TODO Figure out why the editor loses focus when triggered from context menu - cm.focus(); - } else { - // this.showTextDocument(loc.uri, loc.range); - // console.log(loc); - } - } else if (LocationLink.is(loc)) { - // Returned with client capability: textDocument.*.linkSupport - if (loc.targetUri === uri) { - const newPos = cmPosition(loc.targetSelectionRange.start); - highlightRange(cm, ...cmRange(loc.targetRange), 1500); - // @ts-ignore @types/codemirror doesn't allow `setCursor(pos, options)` - cm.setCursor(newPos, { scroll: true }); - // TODO Figure out why the editor loses focus when triggered from context menu - cm.focus(); - } else { - // this.showTextDocument(loc.targetUri, loc.targetSelectionRange); - // console.log(loc); - } - } -}; diff --git a/codemirror-workspace-lsps/capabilities/hover.ts b/codemirror-workspace-lsps/capabilities/hover.ts deleted file mode 100644 index 91d3d1a..0000000 --- a/codemirror-workspace-lsps/capabilities/hover.ts +++ /dev/null @@ -1,81 +0,0 @@ -import type { Editor, Position, TextMarker } from "codemirror"; -import type { Hover } from "vscode-languageserver-protocol"; - -import { addTooltip } from "../ui/tooltip"; -import { cmRange, hoverContentsToString } from "../utils/conversions"; -import { MouseLeaveAllListener } from "../events"; - -const states = new WeakMap(); - -interface LspHoverState { - marker?: TextMarker; - tooltip?: HTMLElement; - disabled?: boolean; - mouseLeaveAllListener?: MouseLeaveAllListener; -} - -/** - * Show hover information. - * @param editor - * @param mouseLeaveAllListener - * @param pos Position of the event - * @param hover - * @param renderMarkdown - */ -export const showHoverInfo = ( - editor: Editor, - mouseLeaveAllListener: MouseLeaveAllListener, - pos: Position, - hover: Hover, - renderMarkdown: (x: string) => string = (x) => x -) => { - removeHoverInfo(editor); - if (Array.isArray(hover.contents) && hover.contents.length === 0) return; - const info = hoverContentsToString(hover.contents, renderMarkdown); - if (!info) return; - - const state = states.get(editor) || {}; - let start = pos; - if (hover.range) { - let end = pos; - [start, end] = cmRange(hover.range); - state.marker = editor.markText(start, end, { - css: "text-decoration: underline", - }); - } - - const el = document.createElement("div"); - el.innerHTML = info; - const coords = editor.charCoords(start, "page"); - state.tooltip = addTooltip(el, coords.left, coords.top); - state.mouseLeaveAllListener = mouseLeaveAllListener; - mouseLeaveAllListener.addElement(state.tooltip); - states.set(editor, state); -}; - -/** - * Remove hover information from the editor. - * @param editor - */ -export const removeHoverInfo = (editor: Editor) => { - const state = states.get(editor); - if (!state) return; - - if (state.marker) state.marker.clear(); - if (state.mouseLeaveAllListener && state.tooltip) - state.mouseLeaveAllListener.removeElement(state.tooltip); - if (state.tooltip) state.tooltip.remove(); - states.delete(editor); -}; - -export const hoverInfoEnabled = (editor: Editor) => - !states.get(editor)?.disabled; - -export const disableHoverInfo = (editor: Editor) => { - removeHoverInfo(editor); - states.set(editor, { disabled: true }); -}; - -export const enableHoverInfo = (editor: Editor) => { - removeHoverInfo(editor); -}; diff --git a/codemirror-workspace-lsps/capabilities/index.ts b/codemirror-workspace-lsps/capabilities/index.ts deleted file mode 100644 index 2ef1bbf..0000000 --- a/codemirror-workspace-lsps/capabilities/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export { showDiagnostics, removeDiagnostics } from "./diagnostic"; -export { - showHoverInfo, - removeHoverInfo, - hoverInfoEnabled, - disableHoverInfo, - enableHoverInfo, -} from "./hover"; -export { showHighlights, removeHighlights } from "./document-highlight"; -export { CompletionHandler } from "./completion"; -export { showSignatureHelp, removeSignatureHelp } from "./signature-help"; -export { gotoLocation } from "./goto"; -export { showSymbolSelector } from "./document-symbols"; diff --git a/codemirror-workspace-lsps/capabilities/signature-help.ts b/codemirror-workspace-lsps/capabilities/signature-help.ts deleted file mode 100644 index 9a4d008..0000000 --- a/codemirror-workspace-lsps/capabilities/signature-help.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { Editor, Position } from "codemirror"; -import type { SignatureHelp } from "vscode-languageserver/browser"; - -import { documentationToString } from "../utils/conversions"; -import { addTooltip } from "../ui/tooltip"; -import { escapeRegExp } from "../utils/regexp"; -import { MouseLeaveAllListener } from "../events"; - -const states = new WeakMap(); - -interface LspSignatureHelpState { - tooltip?: HTMLElement; - mouseLeaveAllListener?: MouseLeaveAllListener; - // For retriggering - // activeHelp?: SignatureHelp; -} - -// TODO Improve appearance -// TODO Syntax highlight the signature with current mode? -/** - * Show signature help. - * @param editor - * @param mouseLeaveAllListener - * @param help - * @param pos - Cursor position. - * @param renderMarkdown - */ -export const showSignatureHelp = ( - editor: Editor, - mouseLeaveAllListener: MouseLeaveAllListener, - help: SignatureHelp, - pos: Position, - renderMarkdown: (x: string) => string = (x) => x -) => { - // `activeSignature` should be `number | null`, but can be `undefined` (JSON is missing the field). - // If `activeSignature` is not set, show the first one. - help.activeSignature ??= 0; - const info = help.signatures[help.activeSignature]; - if (!info) return; - - const state = states.get(editor) || {}; - - const sig = document.createElement("div"); - const label = document.createElement("div"); - let hasParameterDoc = false; - // Emphasize active parameter within the signature. - if (help.activeParameter !== null && info.parameters) { - // Ensure index is within bounds for variadic parameters. - const index = Math.min(help.activeParameter, info.parameters.length - 1); - const paramInfo = info.parameters[index]; - const style = "text-decoration: underline; font-weight: 500;"; - // signatureInformation.parameterInformation.labelOffsetSupport - if (Array.isArray(paramInfo.label)) { - const [start, end] = paramInfo.label; - label.innerHTML = [ - info.label.slice(0, start), - ``, - info.label.slice(start, end), - "", - info.label.slice(end), - ].join(""); - } else { - label.innerHTML = info.label.replace( - new RegExp("(" + escapeRegExp(paramInfo.label) + ")"), - `$1` - ); - } - sig.appendChild(label); - - const paramDoc = documentationToString( - paramInfo.documentation, - renderMarkdown - ); - if (paramDoc) { - hasParameterDoc = true; - const paramDocEl = document.createElement("div"); - paramDocEl.style.marginTop = "4px"; - paramDocEl.innerHTML = paramDoc; - sig.appendChild(paramDocEl); - } - } else { - label.innerText = info.label; - sig.appendChild(label); - } - - const sigDoc = documentationToString(info.documentation, renderMarkdown); - if (sigDoc) { - const sigDocEl = document.createElement("div"); - if (hasParameterDoc) sigDocEl.style.marginTop = "8px"; - sigDocEl.innerHTML = sigDoc; - sig.appendChild(sigDocEl); - } - - const coords = editor.charCoords(pos, "page"); - state.tooltip = addTooltip(sig, coords.left, coords.top); - state.mouseLeaveAllListener = mouseLeaveAllListener; - mouseLeaveAllListener.addElement(state.tooltip); - states.set(editor, state); -}; - -export const removeSignatureHelp = (editor: Editor) => { - const state = states.get(editor); - if (!state) return; - if (state.mouseLeaveAllListener && state.tooltip) - state.mouseLeaveAllListener.removeElement(state.tooltip); - if (state.tooltip) state.tooltip.remove(); - states.delete(editor); -}; diff --git a/codemirror-workspace-lsps/capabilities/snippet.ts b/codemirror-workspace-lsps/capabilities/snippet.ts deleted file mode 100644 index c455e42..0000000 --- a/codemirror-workspace-lsps/capabilities/snippet.ts +++ /dev/null @@ -1,199 +0,0 @@ -import type { Editor, TextMarker, Position, MarkerRange } from "codemirror"; -import type { TextEdit } from "vscode-languageserver-protocol"; -import { normalizeKeyMap } from "codemirror"; -import { - SnippetParser, - TextmateSnippet, - Placeholder, - Choice, - Text, -} from "@qualified/vscode-snippet-parser"; - -import { groupBy } from "../utils/array"; -import { applyEdits } from "../utils/editor"; - -/** - * Insert snippet by replacing the range (`from` `to`). - * - * @param cm - Editor - * @param text - Snippet template. - * @param from - The start of range to replace with the snippet. - * @param to - The end of range to replace with the snippet. - * @param edits - Additional edits from completion item. - */ -export const insertSnippet = ( - cm: Editor, - text: string, - from: Position, - to: Position, - edits?: TextEdit[] -) => { - // Parse and insert the final tabstop if missing. - const snippet = new SnippetParser().parse(text, true, true); - adjustWhitespace(cm, from, snippet); - // TODO Support some variables and transforms? - // snippet.resolveVariables(); - // console.log(JSON.stringify(snippet.toTextmateString())); - // console.log(JSON.stringify(snippet.toString())); - cm.replaceRange(snippet.toString(), from, to, "complete"); - - // Add markers to tabstops so we can keep track of them after insertions. - const markers = new Map>(); - const offset = cm.indexFromPos(from); - for (const placeholder of snippet.placeholders) { - markers.set( - placeholder, - cm.markText(...getPlaceholderRange(cm, offset, snippet, placeholder), { - className: "cmw-snippet-tabstop", - collapsed: false, - clearWhenEmpty: false, - // New text will be part of the marker - inclusiveLeft: true, - inclusiveRight: true, - }) - ); - } - - if (edits) applyEdits(cm, edits, "+complete"); - if (snippet.placeholders.length === 0) return; - - let groupIndex = 0; - const tabstopGroups = groupBy( - snippet.placeholders, - Placeholder.compareByIndex - ); - // Add some visual marker to the final tabstop unless the cursor jumps there immediately. - let finalMarker: TextMarker | null = null; - if (tabstopGroups.length > 1) { - const widget = document.createElement("span"); - widget.className = "cmw-snippet-final-tabstop"; - const finals = tabstopGroups[tabstopGroups.length - 1]; - const final = finals[finals.length - 1]; - finalMarker = cm.setBookmark( - cm.posFromIndex(offset + snippet.offset(final) + snippet.fullLen(final)), - { widget, insertLeft: true } - ); - } - - // Jump to tabstop index. - const jumpTo = (index: number) => { - const placeholders = tabstopGroups[index]; - const placeholder = placeholders[0]; - const isFinal = placeholder.isFinalTabstop; - const selections = placeholders.map((p) => { - const { from, to } = markers.get(p)!.find()!; - return { anchor: from, head: to }; - }); - // If the group is for final tabstop, we make the last one primary. - cm.setSelections(selections, isFinal ? selections.length - 1 : 0, { - scroll: true, - origin: "snippet", - }); - // TODO Support Choice. Show completion popup with options. - }; - - // Clicking something exits snippet mode. - const onMousedown = () => { - dispose(); - }; - - const dispose = () => { - cm.removeKeyMap(tabstopKeyMap); - cm.off("mousedown", onMousedown); - - const ps = tabstopGroups[tabstopGroups.length - 1]; - const placeholder = ps[ps.length - 1]; - const marker = markers.get(placeholder)!.find()!; - cm.setCursor(marker.to); - for (const m of markers.values()) m.clear(); - markers.clear(); - if (finalMarker) finalMarker.clear(); - tabstopGroups.length = 0; - }; - - // Add keymaps to jump to tabstops - const tabstopKeyMap = normalizeKeyMap({ - Tab: (cm: Editor) => { - if (groupIndex + 1 <= tabstopGroups.length - 1) { - jumpTo(++groupIndex); - } - if (groupIndex >= tabstopGroups.length - 1) { - dispose(); - } - }, - "Shift-Tab": (cm: Editor) => { - if (groupIndex - 1 >= 0) jumpTo(--groupIndex); - }, - Enter: (cm: Editor) => { - dispose(); - }, - Esc: (cm: Editor) => { - dispose(); - }, - }); - cm.addKeyMap(tabstopKeyMap); - cm.on("mousedown", onMousedown); - jumpTo(0); - // Finish immediately if the snippet only contained single final tabstop. - if (tabstopGroups.length === 1 && tabstopGroups[0].length === 1) { - dispose(); - } -}; - -const getPlaceholderRange = ( - cm: Editor, - offset: number, - snippet: TextmateSnippet, - placeholder: Placeholder -): [Position, Position] => { - const pOffset = offset + snippet.offset(placeholder); - return [ - cm.posFromIndex(pOffset), - cm.posFromIndex(pOffset + snippet.fullLen(placeholder)), - ]; -}; - -// https://github.com/microsoft/vscode/blob/355fbca8b2b13507b5f8a73189e06f6ac4d694c8/src/vs/editor/contrib/snippet/snippetSession.ts#L336 -const adjustWhitespace = ( - cm: Editor, - pos: Position, - snippet: TextmateSnippet -) => { - const lineWhites = getLeadingWhitespace(cm.getLine(pos.line), 0, pos.ch); - snippet.walk((marker) => { - // Adjust indentation of text markers, except for choise elements - // which get adjusted when being selected - if (marker instanceof Text && !(marker.parent instanceof Choice)) { - const lines = marker.value.split(/\r?\n|\r/); - for (let i = 1; i < lines.length; ++i) { - const originalWhites = getLeadingWhitespace(lines[i]); - let whites = lineWhites + originalWhites; - // Replace spaces with Tabs - if (cm.getOption("indentWithTabs")) { - const unit = cm.getOption("indentUnit") || 2; - whites = whites.replace(/\t/g, " ".repeat(unit)); - const tabs = Math.floor(whites.length / unit); - whites = "\t".repeat(tabs) + " ".repeat(whites.length - tabs * unit); - } - lines[i] = whites + lines[i].substr(originalWhites.length); - } - - const newValue = lines.join(cm.lineSeparator()); - if (newValue !== marker.value) { - marker.parent.replace(marker, [new Text(newValue)]); - } - } - return true; - }); -}; - -const getLeadingWhitespace = ( - line: string, - start: number = 0, - end: number = line.length -): string => { - for (let i = start; i < end; ++i) { - if (line[i] !== " " && line[i] !== "\t") return line.substring(start, i); - } - return line.substring(start, end); -}; diff --git a/codemirror-workspace-lsps/events.ts b/codemirror-workspace-lsps/events.ts deleted file mode 100644 index 669418f..0000000 --- a/codemirror-workspace-lsps/events.ts +++ /dev/null @@ -1,140 +0,0 @@ -import type { Editor, EditorChange } from "codemirror"; -import { signal as cmSignal } from "codemirror"; -import type { Disposer, Stream } from "./utils/event-stream"; - -export interface EditorEventMap { - changes: [cm: Editor, changes: EditorChange[]]; - cursorActivity: [cm: Editor]; - contextmenu: [cm: Editor, event: MouseEvent]; - "cmw:contextMenuOpened": [cm: Editor]; - "cmw:contextMenuClosed": [cm: Editor]; - blur: [cm: Editor]; - viewportChange: [cm: Editor, from: number, to: number]; - refresh: [cm: Editor]; -} - -export interface EditorEventTarget { - on(type: string, handler: (...args: EditorEventMap[K]) => void): void; - off(type: string, handler: (...args: EditorEventMap[K]) => void): void; -} - -export const fromEditorEvent = ( - target: EditorEventTarget, - type: K -): Stream => { - return (cb) => { - const untupled = (...args: EditorEventMap[K]) => { - cb(args); - }; - target.on(type, untupled); - return () => { - target.off(type, untupled); - }; - }; -}; - -export const onEditorEvent = ( - target: EditorEventTarget, - type: K, - handler: (args: EditorEventMap[K]) => void -): Disposer => fromEditorEvent(target, type)(handler); - -/** - * Typed wrapper around `CodeMirror.signal`. - * @param editor - Editor instance - * @param name - Event name - * @param args - Event parameters - */ -export const signal = ( - editor: Editor, - name: K, - ...args: EditorEventMap[K] -) => { - cmSignal(editor, name, ...args); -}; - -/** - * Internal object for tracking individual elements and their event listeners - */ -export interface MouseLeaveAllListenerItem { - over: boolean; - element: HTMLElement; - onEnter: EventListenerOrEventListenerObject; - onLeave: EventListenerOrEventListenerObject; -} - -/** - * Special class for listening to enter/leave events on a group of elements. When none of those elements are - * being hovered over, a callback is triggered. - */ -export class MouseLeaveAllListener { - private listeners: MouseLeaveAllListenerItem[]; - private onMouseLeaveAll: Function; - - /** - * @param onMouseLeaveAll - Called when none of the tracked elements have a mouse over them. - */ - constructor(onMouseLeaveAll: Function) { - this.onMouseLeaveAll = onMouseLeaveAll; - this.listeners = []; - } - - /** - * Adds an element to the list of tracked elements. - * This element will have mouseenter and mouseleave events tracked. - * @param element - */ - addElement(element: HTMLElement) { - if (this.listeners.find((l) => l.element === element)) return; - const l = { - element, - over: false, - onEnter: () => { - l.over = true; - }, - onLeave: () => { - l.over = false; - this.checkHoverState(); - }, - }; - this.listeners.push(l); - element.addEventListener("mouseenter", l.onEnter); - element.addEventListener("mouseleave", l.onLeave); - } - - /** - * Removes an element from the list of tracked elements. - * If the element is found, we also remove the event listeners. - * @param element - * @return {boolean} - true if the element was found, false otherwise - */ - removeElement(element: HTMLElement) { - const idx = this.listeners.findIndex((l) => l.element === element); - const found = idx !== -1; - if (found) { - const l = this.listeners[idx]; - this.listeners.splice(idx, 1); - l.element.removeEventListener("mouseenter", l.onEnter); - l.element.removeEventListener("mouseleave", l.onLeave); - this.checkHoverState(); - } - return found; - } - - /** - * Removes all tracked elements from this class. - */ - dispose() { - this.listeners.forEach((l) => { - this.removeElement(l.element); - }); - } - - private checkHoverState() { - window.setTimeout(() => { - if (this.listeners.every((el) => !el.over)) { - this.onMouseLeaveAll(); - } - }, 500); - } -} diff --git a/codemirror-workspace-lsps/index.ts b/codemirror-workspace-lsps/index.ts deleted file mode 100644 index 3e025ef..0000000 --- a/codemirror-workspace-lsps/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { Workspace } from "./workspace"; diff --git a/codemirror-workspace-lsps/ui/context-menu.ts b/codemirror-workspace-lsps/ui/context-menu.ts deleted file mode 100644 index 7cdb82e..0000000 --- a/codemirror-workspace-lsps/ui/context-menu.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Editor } from "codemirror"; -import { signal } from "../events"; - -export interface MenuItem { - label: string; - handler?: (this: void) => void; - // TODO Show mapped key - // TODO Submenu -} - -interface ContextMenuState { - menu?: HTMLElement; - callback?: (this: void) => void; -} -const states = new WeakMap(); - -export const showContextMenu = ( - cm: Editor, - x: number, - y: number, - itemGroups: MenuItem[][] -) => { - if (states.has(cm)) removeContextMenu(cm); - - const menu = document.createElement("div"); - menu.className = "cmw-context-menu"; - menu.style.cssText = [ - "z-index: 10;", - "position: absolute;", - "white-space: nowrap;", - "transition: opacity 200ms;", - ].join(""); - - for (let i = 0; i < itemGroups.length; ++i) { - const items = itemGroups[i]; - for (const { label, handler } of items) { - const menuItem = menu.appendChild(document.createElement("div")); - menuItem.className = "cmw-context-menu-item"; - menuItem.appendChild(document.createTextNode(label)); - if (!handler) { - menuItem.setAttribute("disabled", ""); - } else { - menuItem.addEventListener("click", (e) => { - e.preventDefault(); - removeContextMenu(cm); - handler(); - }); - } - } - if (i + 1 < itemGroups.length) { - const sep = menu.appendChild(document.createElement("hr")); - sep.className = "cmw-context-menu-item-separator"; - } - } - - menu.style.opacity = "0"; - document.body.appendChild(menu); - const menuWidth = menu.offsetWidth + 10; - const menuHeight = menu.offsetHeight + 10; - menu.style.left = Math.min(x, window.innerWidth - menuWidth) + "px"; - menu.style.top = Math.min(y, window.innerHeight - menuHeight) + "px"; - menu.style.opacity = "1"; - signal(cm, "cmw:contextMenuOpened", cm); - - const onMousedownOutside = (e: MouseEvent) => { - if (!(e.target instanceof Node) || !menu.contains(e.target)) { - removeContextMenu(cm); - document.removeEventListener("mousedown", onMousedownOutside); - } - }; - document.addEventListener("mousedown", onMousedownOutside); - - states.set(cm, { menu }); -}; - -export const removeContextMenu = (cm: Editor) => { - const state = states.get(cm); - if (!state) return; - - if (state.menu) state.menu.remove(); - states.delete(cm); - signal(cm, "cmw:contextMenuClosed", cm); -}; diff --git a/codemirror-workspace-lsps/ui/tooltip.ts b/codemirror-workspace-lsps/ui/tooltip.ts deleted file mode 100644 index 704a2e8..0000000 --- a/codemirror-workspace-lsps/ui/tooltip.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const addTooltip = ( - tooltipContent: HTMLElement, - x: number, - y: number -) => { - const tooltip = document.createElement("div"); - tooltip.classList.add("cmw-tooltip"); - tooltip.style.cssText = [ - "font-size: 12px;", - "padding: 2px;", - "z-index: 10;", - "position: absolute;", - `left: ${x}px;`, - `top: ${y}px;`, - `max-width: 50ch;`, - `max-height: 120px;`, - `overflow-y: auto;`, - ].join(" "); - tooltip.appendChild(tooltipContent); - document.body.appendChild(tooltip); - - // Make sure that the tooltip is above the text even when it's multiline. - requestAnimationFrame(() => { - tooltip.style.top = `${y - tooltip.offsetHeight}px`; - }); - return tooltip; -}; diff --git a/codemirror-workspace-lsps/ui/typeahead-input.ts b/codemirror-workspace-lsps/ui/typeahead-input.ts deleted file mode 100644 index 187ee1a..0000000 --- a/codemirror-workspace-lsps/ui/typeahead-input.ts +++ /dev/null @@ -1,282 +0,0 @@ -// Derived from [autocompleter](https://github.com/kraaden/autocomplete). -// MIT License. Copyright (c) 2016 - Denys Krasnoshchok - -export interface TypeaheadItem { - label: string; -} - -export interface TypeaheadOptions { - getSuggestions: (this: void, text: string) => Promise; - onSelect: (this: void, item: T) => void; - onUpdate?: (this: void, current: T) => void; - onCancel?: (this: void) => void; - render?: (this: void, item: T, value: string) => HTMLDivElement | undefined; - className?: string; - debounceTimeout?: number; -} - -export type Disposer = () => void; - -// Attach suggestions to input element. -export const attachTypeahead = ( - input: HTMLInputElement, - { - getSuggestions, - onSelect, - onUpdate, - onCancel, - render = defaultRender, - className = "", - debounceTimeout = 0, - }: TypeaheadOptions -): Disposer => { - const doc = document; - let items: T[] = []; - let inputValue = ""; - let selected: T | undefined; - let selectedIndex = -1; - let suggestionCount = 0; - let debounceTimer: number | undefined; - - const container: HTMLDivElement = doc.createElement("div"); - const containerStyle = container.style; - container.className = className; - containerStyle.position = "absolute"; - - const attach = () => { - if (!container.parentNode) doc.body.appendChild(container); - }; - const detach = () => { - const parent = container.parentNode; - if (parent) parent.removeChild(container); - }; - const containerDisplayed = () => !!container.parentNode; - const clear = () => { - // prevent suggestion update - suggestionCount++; - items = []; - inputValue = ""; - selected = undefined; - selectedIndex = -1; - detach(); - }; - - const clearDebounceTimer = () => { - if (debounceTimer) window.clearTimeout(debounceTimer); - }; - - const updatePosition = () => { - if (!containerDisplayed()) return; - - containerStyle.height = "auto"; - containerStyle.width = input.offsetWidth + "px"; - - const calc = () => { - const docEl = doc.documentElement; - const clientTop = docEl.clientTop || doc.body.clientTop || 0; - const clientLeft = docEl.clientLeft || doc.body.clientLeft || 0; - const scrollTop = window.pageYOffset || docEl.scrollTop; - const scrollLeft = window.pageXOffset || docEl.scrollLeft; - const inputRect = input.getBoundingClientRect(); - const top = inputRect.top + input.offsetHeight + scrollTop - clientTop; - const left = inputRect.left + scrollLeft - clientLeft; - containerStyle.top = top + "px"; - containerStyle.left = left + "px"; - - const maxHeight = Math.max( - 0, - window.innerHeight - (inputRect.top + input.offsetHeight) - ); - containerStyle.top = top + "px"; - containerStyle.bottom = ""; - containerStyle.left = left + "px"; - containerStyle.maxHeight = maxHeight + "px"; - }; - - // > Must be called twice, otherwise the calculation may be wrong on resize event (chrome browser) - calc(); - calc(); - }; - - // Show suggestions - const update = () => { - container.textContent = ""; - if (items.length === 0) { - clear(); - return; - } - - const fragment = doc.createDocumentFragment(); - for (const item of items) { - const div = render(item, inputValue); - if (!div) return; - - div.addEventListener("click", (ev: MouseEvent) => { - onSelect(item); - clear(); - ev.preventDefault(); - ev.stopPropagation(); - }); - if (item === selected) div.className += " selected"; - fragment.appendChild(div); - } - container.appendChild(fragment); - attach(); - updatePosition(); - updateScroll(); - }; - - const updateIfDisplayed = () => { - if (containerDisplayed()) update(); - }; - - const onResize = () => { - updateIfDisplayed(); - }; - - const onScroll = (e: Event) => { - if (e.target !== container) { - updateIfDisplayed(); - } else { - e.preventDefault(); - } - }; - - const onInput = (ev: Event) => { - triggerGetSuggestion(); - }; - - // Scroll if selected item is not visible - const updateScroll = () => { - const selectedEl = container.getElementsByClassName("selected"); - if (selectedEl.length === 0) return; - - const el = selectedEl[0] as HTMLDivElement; - if (el.offsetTop < container.scrollTop) { - container.scrollTop = el.offsetTop; - } else { - const selectedBottom = el.offsetTop + el.offsetHeight; - const containerBottom = container.scrollTop + container.offsetHeight; - if (selectedBottom > containerBottom) { - container.scrollTop += selectedBottom - containerBottom; - } - } - }; - - const handleArrow = (newIndex: number) => { - const n = items.length; - if (n === 0) { - selected = undefined; - selectedIndex = -1; - } else { - selectedIndex = ((newIndex % n) + n) % n; - selected = items[selectedIndex]; - if (selected && onUpdate) onUpdate(selected); - update(); - } - }; - - const onKeydown = (ev: KeyboardEvent) => { - const key = ev.key; - switch (key) { - case "Esc": - case "Escape": - clear(); - ev.preventDefault(); - ev.stopPropagation(); - if (onCancel) onCancel(); - return; - - case "Up": - case "Down": - case "ArrowUp": - case "ArrowDown": { - const delta = key === "ArrowUp" || key === "Up" ? -1 : +1; - ev.preventDefault(); - handleArrow(selectedIndex + delta); - return; - } - - case "Enter": - if (selected) { - onSelect(selected); - clear(); - } - ev.preventDefault(); - return; - } - }; - - const onInputFocus = () => { - triggerGetSuggestion(false); - }; - - const triggerGetSuggestion = (debounce: boolean = true) => { - const count = ++suggestionCount; - const val = input.value; - clearDebounceTimer(); - debounceTimer = window.setTimeout( - () => { - getSuggestions(val).then((xs) => { - if (suggestionCount !== count) return; - - items = xs; - inputValue = val; - if (items.length === 0) { - selectedIndex = -1; - selected = undefined; - } else { - selectedIndex = 0; - selected = items[0]; - if (selected && onUpdate) onUpdate(selected); - } - update(); - }); - }, - debounce ? debounceTimeout : 0 - ); - }; - - const onInputBlur = () => { - // Delayed so that clicked item is not cleared (input.blur happens before item.click) - setTimeout(() => { - if (doc.activeElement !== input) clear(); - }, 200); - }; - - // Prevent long clicks from losing focus - container.addEventListener("mousedown", (evt: Event) => { - evt.stopPropagation(); - evt.preventDefault(); - }); - // Prevent closing when scrollbar is clicked in IE - container.addEventListener("focus", () => input.focus()); - - // Set up event handlers - input.addEventListener("keydown", onKeydown); - input.addEventListener("input", onInput); - input.addEventListener("blur", onInputBlur); - input.addEventListener("focus", onInputFocus); - window.addEventListener("resize", onResize); - doc.addEventListener("scroll", onScroll, true); - - return () => { - input.removeEventListener("focus", onInputFocus); - input.removeEventListener("keydown", onKeydown); - input.removeEventListener("input", onInput); - input.removeEventListener("blur", onInputBlur); - window.removeEventListener("resize", onResize); - doc.removeEventListener("scroll", onScroll, true); - clearDebounceTimer(); - clear(); - }; -}; - -const defaultRender = ( - item: T, - value: string -): HTMLDivElement | undefined => { - const div = document.createElement("div"); - div.textContent = item.label; - return div; -}; diff --git a/codemirror-workspace-lsps/utils/array.test.ts b/codemirror-workspace-lsps/utils/array.test.ts deleted file mode 100644 index e25d975..0000000 --- a/codemirror-workspace-lsps/utils/array.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @jest-environment node - */ -import fc from "fast-check"; -import { groupBy, insertionSort, Compare } from "./array"; - -describe("insertionSort", () => { - test("sorts the input according to the compare function in place", () => { - fc.assert( - fc.property( - fc.array(fc.nat(10), 10), - fc.compareFunc(), - (xs, cmp) => { - insertionSort(xs, cmp); - for (let i = 1; i < xs.length; ++i) { - if (cmp(xs[i - 1], xs[i]) > 0) return false; - } - return true; - } - ) - ); - }); -}); - -describe("groupBy", () => { - test("order within a group is maintained", () => { - type XY = { x: number; y: number }; - const cmp: Compare = (a, b) => a.x - b.x; - expect( - groupBy( - [ - { x: 100, y: 80 }, - { x: 90, y: 90 }, - { x: 70, y: 95 }, - { x: 100, y: 100 }, - { x: 80, y: 110 }, - { x: 110, y: 115 }, - { x: 100, y: 120 }, - { x: 70, y: 125 }, - { x: 70, y: 130 }, - { x: 100, y: 135 }, - { x: 75, y: 140 }, - { x: 70, y: 140 }, - ] as XY[], - cmp - ) - ).toEqual([ - [ - { x: 70, y: 95 }, - { x: 70, y: 125 }, - { x: 70, y: 130 }, - { x: 70, y: 140 }, - ], - [{ x: 75, y: 140 }], - [{ x: 80, y: 110 }], - [{ x: 90, y: 90 }], - [ - { x: 100, y: 80 }, - { x: 100, y: 100 }, - { x: 100, y: 120 }, - { x: 100, y: 135 }, - ], - [{ x: 110, y: 115 }], - ] as XY[][]); - }); -}); diff --git a/codemirror-workspace-lsps/utils/array.ts b/codemirror-workspace-lsps/utils/array.ts deleted file mode 100644 index 64aa61f..0000000 --- a/codemirror-workspace-lsps/utils/array.ts +++ /dev/null @@ -1,34 +0,0 @@ -export type Compare = (a: T, b: T) => number; - -// Used for grouping snippet tabstops. -export const groupBy = (xs: readonly T[], compare: Compare): T[][] => { - if (xs.length === 0) return []; - - const sorted = insertionSort(xs.slice(), compare); - const groups: T[][] = [[sorted[0]]]; - for (let i = 1; i < sorted.length; ++i) { - if (compare(sorted[i - 1], sorted[i]) !== 0) { - groups.push([sorted[i]]); - } else { - groups[groups.length - 1].push(sorted[i]); - } - } - return groups; -}; - -// For stable sorting. -// Insertion sort works well for small input, especially when nearly sorted. -export const insertionSort = (xs: T[], compare: Compare): T[] => { - for (let i = 1; i < xs.length; ++i) { - if (compare(xs[i - 1], xs[i]) > 0) { - // Do chained swaps - let j = i; - const tmp = xs[j]; - do { - xs[j] = xs[--j]; - } while (j > 0 && compare(xs[j - 1], tmp) > 0); - xs[j] = tmp; - } - } - return xs; -}; diff --git a/codemirror-workspace-lsps/utils/conversions.ts b/codemirror-workspace-lsps/utils/conversions.ts deleted file mode 100644 index bac1194..0000000 --- a/codemirror-workspace-lsps/utils/conversions.ts +++ /dev/null @@ -1,190 +0,0 @@ -import type { Position as CMPosition, EditorChange } from "codemirror"; -import type { - Position, - Range, - DiagnosticSeverity, - DiagnosticTag, - CompletionItem, - CompletionList, - CompletionItemKind, - SymbolKind, - TextDocumentContentChangeEvent, -} from "vscode-languageserver/browser"; -import { MarkupContent, MarkedString } from "vscode-languageserver/browser"; - -import { escapeHtml } from "./string"; - -export const lspPosition = ({ line, ch }: CMPosition): Position => ({ - line, - character: ch, -}); - -export const lspRange = (start: CMPosition, end: CMPosition): Range => ({ - start: lspPosition(start), - end: lspPosition(end), -}); - -export const lspChange = ( - change: EditorChange -): TextDocumentContentChangeEvent => ({ - range: lspRange(change.from, change.to), - text: change.text.join("\n"), -}); - -export const cmPosition = ({ line, character }: Position): CMPosition => ({ - line, - ch: character, -}); - -export const cmRange = ({ start, end }: Range): [CMPosition, CMPosition] => [ - cmPosition(start), - cmPosition(end), -]; - -export const diagnosticSeverityName = ( - severity: DiagnosticSeverity -): string => { - switch (severity) { - case 1 /* DiagnosticSeverity.Error */: - return "error"; - case 2 /* DiagnosticSeverity.Warning */: - return "warning"; - case 3 /* DiagnosticSeverity.Information */: - return "information"; - case 4 /* DiagnosticSeverity.Hint */: - return "hint"; - } -}; - -export const diagnosticTagName = (tag: DiagnosticTag): string => { - switch (tag) { - case 1 /* DiagnosticTag.Unnecessary */: - // Style this with faded text. - return "unnecessary"; - case 2 /* DiagnosticTag.Deprecated */: - // Style this with strike through. - return "deprecated"; - } -}; - -export const documentationToString = ( - doc?: string | MarkupContent, - renderMarkdown: (x: string) => string = (x) => x -) => { - if (!doc) return ""; - if (typeof doc === "string") return escapeHtml(doc); - return markupContentToString(doc, renderMarkdown); -}; - -export const hoverContentsToString = ( - contents: MarkupContent | MarkedString | MarkedString[], - renderMarkdown: (x: string) => string -): string => { - // Note that MarkedString is considereed deprecated - // MarkedString[] - if (Array.isArray(contents)) { - return contents - .map((c) => markedStringToString(c, renderMarkdown)) - .join("\n"); - } - if (MarkedString.is(contents)) { - return markedStringToString(contents, renderMarkdown); - } - - return markupContentToString(contents, renderMarkdown); -}; - -const markupContentToString = ( - content: MarkupContent, - renderMarkdown: (x: string) => string -): string => - content.kind === "markdown" - ? renderMarkdown(content.value) - : escapeHtml(content.value); - -const markedStringToString = ( - m: MarkedString, - render: (x: string) => string -) => { - // Remove two backslashes in front of periods and hyphens in plain text. - if (typeof m === "string") return m.replace(/\\(?=[-.])/g, ""); - - // To Markdown code block - return render(["```" + m.language, m.value, "```"].join("\n")); -}; - -export const completionItemKindToString = (() => { - const kinds = [ - "", - "text", - "method", - "function", - "constructor", - "field", - "variable", - "class", - "interface", - "module", - "property", - "unit", - "value", - "enum", - "keyword", - "snippet", - "color", - "file", - "reference", - "folder", - "enum-member", - "constant", - "struct", - "event", - "operator", - "type-parameter", - ]; - - return (kind?: CompletionItemKind) => kinds[kind ?? 0] || "unknown"; -})(); - -export const symbolKindToString = (() => { - const kinds = [ - "", - "file", - "module", - "namespace", - "package", - "class", - "method", - "property", - "field", - "constructor", - "enum", - "interface", - "function", - "variable", - "constant", - "string", - "number", - "boolean", - "array", - "object", - "key", - "null", - "enum-member", - "struct", - "event", - "operator", - "type-parameter", - ]; - - return (kind?: SymbolKind): string => kinds[kind ?? 0] || "unknown"; -})(); - -// > If a `CompletionItem[]` is provided it is interpreted to be complete. -// > So it is the same as `{ isIncomplete: false, items }` -export const completionItemsToList = ( - items: CompletionItem[] -): CompletionList => ({ - items, - isIncomplete: false, -}); diff --git a/codemirror-workspace-lsps/utils/editor.ts b/codemirror-workspace-lsps/utils/editor.ts deleted file mode 100644 index ee7ed91..0000000 --- a/codemirror-workspace-lsps/utils/editor.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { Editor, TextMarker, Position } from "codemirror"; -import type { TextEdit } from "vscode-languageserver-protocol"; - -import { cmRange } from "./conversions"; - -/** - * Apply text edits preserving cursor location. - * @param cm - Editor - * @param edits - Array of text edit to apply. - * @param origin - Optional origin string to use. - */ -export const applyEdits = (cm: Editor, edits: TextEdit[], origin?: string) => { - const pos = cm.getCursor(); - const current = cm.markText(pos, pos, { clearWhenEmpty: false }); - const marks = edits.map((e) => - cm.markText(...cmRange(e.range), { clearWhenEmpty: false }) - ); - cm.operation(() => { - for (let i = 0; i < edits.length; ++i) { - const mark = marks[i]; - const range = mark.find()!; - cm.replaceRange(edits[i].newText, range.from, range.to, origin); - mark.clear(); - } - }); - cm.setCursor(current.find()!.to); - current.clear(); -}; - -/** - * Highlight range of text. - * @param cm - Editor to operate on. - * @param from - Start of the range to highlight - * @param to - End of the range to highlight - * @param duration - Clear after duration if given. - */ -export const highlightRange = ( - cm: Editor, - from: Position, - to: Position, - duration: number = 0 -): TextMarker => { - const mark = cm.markText(from, to, { className: "cmw-highlight" }); - if (typeof duration === "number" && duration > 0) { - setTimeout(() => { - mark.clear(); - }, duration); - } - return mark; -}; diff --git a/codemirror-workspace-lsps/utils/event-stream.ts b/codemirror-workspace-lsps/utils/event-stream.ts deleted file mode 100644 index 5ff8ba7..0000000 --- a/codemirror-workspace-lsps/utils/event-stream.ts +++ /dev/null @@ -1,186 +0,0 @@ -// Minimal Event Stream -// Same idea as https://github.com/rpominov/basic-streams, but -// operators return a function accepting a Stream instead so that -// we can pipe through them. -export type Subscriber = (x: T) => void; -export type Disposer = () => void; -export type Stream = (cb: Subscriber) => Disposer; - -export interface DomEventTarget { - addEventListener( - type: string, - listener: (x: HTMLElementEventMap[K]) => void - ): void; - removeEventListener( - type: string, - listener?: (x: HTMLElementEventMap[K]) => void - ): void; -} - -// Creating Streams -export const fromDomEvent = ( - target: DomEventTarget, - type: K -): Stream => { - return (cb) => { - target.addEventListener(type, cb); - return () => { - target.removeEventListener(type, cb); - }; - }; -}; - -// Operators -// Transform value -export const map = (transform: (x: T) => U) => ( - stream: Stream -): Stream => { - return (cb) => stream((x) => cb(transform(x))); -}; - -// Perform side effect -export const tap = (effect: (x: T) => void) => ( - stream: Stream -): Stream => { - return (cb) => { - return stream((x) => { - effect(x); - cb(x); - }); - }; -}; - -type Maybe = null | { value: T }; -// stream: ____1____2____2____3 -// result: ____1____2_________3 -export const skipDuplicates = ( - equals: (prev: T, next: T) => boolean = (a, b) => a === b -) => (stream: Stream): Stream => { - return (cb) => { - let prev: Maybe = null; - return stream((x) => { - if (!prev || !equals(prev.value, x)) { - prev = { value: x }; - cb(x); - } - }); - }; -}; - -export const debounce = (ms: number) => (stream: Stream): Stream => { - return (cb) => { - let timeout: ReturnType | null = null; - return stream((x) => { - if (timeout !== null) { - clearTimeout(timeout); - timeout = null; - } - timeout = setTimeout(() => cb(x), ms); - }); - }; -}; - -export const debouncedBuffer = (ms: number) => ( - stream: Stream -): Stream => { - return (cb) => { - let timeout: ReturnType | null = null; - const buffer: T[] = []; - return stream((x) => { - if (timeout !== null) { - clearTimeout(timeout); - timeout = null; - } - buffer.push(x); - timeout = setTimeout(() => { - cb(buffer.slice()); - buffer.length = 0; - }, ms); - }); - }; -}; - -export const filter = (test: (x: T) => boolean) => ( - stream: Stream -): Stream => { - return (cb) => { - return stream((x) => { - if (test(x)) cb(x); - }); - }; -}; - -// For returning a Stream piped through operators. -export const piped: Piped = ( - stream: unknown, - ...ops: UnknownUnaryFunction[] -): unknown => ops.reduce((v, op) => op(v), stream); - -export type UnknownUnaryFunction = (param: unknown) => unknown; -export type Piped = { - (a: A, ab: (this: void, a: A) => B): B; - (a: A, ab: (this: void, a: A) => B, bc: (this: void, b: B) => C): C; - ( - a: A, - ab: (this: void, a: A) => B, - bc: (this: void, b: B) => C, - cd: (this: void, c: C) => D - ): D; - ( - a: A, - ab: (this: void, a: A) => B, - bc: (this: void, b: B) => C, - cd: (this: void, c: C) => D, - de: (this: void, d: D) => E - ): E; - ( - a: A, - ab: (this: void, a: A) => B, - bc: (this: void, b: B) => C, - cd: (this: void, c: C) => D, - de: (this: void, d: D) => E, - ef: (this: void, e: E) => F - ): F; - ( - a: A, - ab: (this: void, a: A) => B, - bc: (this: void, b: B) => C, - cd: (this: void, c: C) => D, - de: (this: void, d: D) => E, - ef: (this: void, e: E) => F, - fg: (this: void, f: F) => G - ): G; - ( - a: A, - ab: (this: void, a: A) => B, - bc: (this: void, b: B) => C, - cd: (this: void, c: C) => D, - de: (this: void, d: D) => E, - ef: (this: void, e: E) => F, - fg: (this: void, f: F) => G, - gh: (this: void, g: G) => H - ): H; - ( - a: A, - ab: (this: void, a: A) => B, - bc: (this: void, b: B) => C, - cd: (this: void, c: C) => D, - de: (this: void, d: D) => E, - ef: (this: void, e: E) => F, - fg: (this: void, f: F) => G, - gh: (this: void, g: G) => H, - hi: (this: void, h: H) => I - ): I; - ( - a: A, - ab: (this: void, a: A) => B, - bc: (this: void, b: B) => C, - cd: (this: void, c: C) => D, - de: (this: void, d: D) => E, - ef: (this: void, e: E) => F, - fg: (this: void, f: F) => G, - gh: (this: void, g: G) => H, - hi: (this: void, h: H) => I, - ij: (this: void, i: I) => J - ): J; -}; diff --git a/codemirror-workspace-lsps/utils/promise.ts b/codemirror-workspace-lsps/utils/promise.ts deleted file mode 100644 index 4148fb1..0000000 --- a/codemirror-workspace-lsps/utils/promise.ts +++ /dev/null @@ -1 +0,0 @@ -export const delay = (ms: number) => new Promise((f) => setTimeout(f, ms)); diff --git a/codemirror-workspace-lsps/utils/regexp.ts b/codemirror-workspace-lsps/utils/regexp.ts deleted file mode 100644 index bc65559..0000000 --- a/codemirror-workspace-lsps/utils/regexp.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const escapeRegExp = (s: string): string => - s.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); diff --git a/codemirror-workspace-lsps/utils/string.ts b/codemirror-workspace-lsps/utils/string.ts deleted file mode 100644 index 3c4739c..0000000 --- a/codemirror-workspace-lsps/utils/string.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const escapeHtml = (s: string): string => s.replace(PATTERN, escaped); -const PATTERN = /[&<>'"]/g; -const escaped = (c: string) => - c === "&" - ? "&" - : c === "<" - ? "<" - : c === ">" - ? ">" - : c === "'" - ? "'" - : """; diff --git a/codemirror-workspace-lsps/workspace.ts b/codemirror-workspace-lsps/workspace.ts deleted file mode 100644 index 5aa5a68..0000000 --- a/codemirror-workspace-lsps/workspace.ts +++ /dev/null @@ -1,902 +0,0 @@ -// Based on @qualified/codemirror-workspace (https://npmjs.com/@qualified/codemirror-workspace), -// Upgraded for @codemirror v6.0.0, and purpose built for browsers - -import { EventEmitter } from "@okikio/emitter"; - -import { autocompletion, completeFromList, startCompletion } from "@codemirror/autocomplete"; -import { hoverTooltip } from "@codemirror/tooltip"; -import { Diagnostic, linter } from "@codemirror/lint"; - -import { KeyBinding, keymap, ViewUpdate } from "@codemirror/view"; -import { indentWithTab } from "@codemirror/commands"; -import { javascript } from "@codemirror/lang-javascript"; - -import { BASIC_SETUP, EditorView, EditorState } from "../src/components/editor-basic-setup"; -import { THEME, HIGHTLIGHT_STYLE } from "../src/components/editor-theme"; - -// import { normalizeKeyMap } from "codemirror"; - -import { - DiagnosticTag, - FileEvent, - SignatureHelpTriggerKind, - TextDocumentSaveReason, -} from "vscode-languageserver/browser"; - -import { createMessageConnection as createWorkerMessageConnection } from "@qualified/vscode-jsonrpc-ww"; -import { createLspConnection, LspConnection } from "@qualified/lsp-connection"; - -import { - CompletionHandler, - disableHoverInfo, - enableHoverInfo, - gotoLocation, - hoverInfoEnabled, - removeDiagnostics, - removeHighlights, - removeHoverInfo, - removeSignatureHelp, - showDiagnostics, - showHighlights, - showHoverInfo, - showSignatureHelp, - showSymbolSelector, -} from "./capabilities"; -import { - debounce, - debouncedBuffer, - Disposer, - filter, - fromDomEvent, - map, - piped, - skipDuplicates, -} from "./utils/event-stream"; -import { - fromEditorEvent, - MouseLeaveAllListener, - onEditorEvent, -} from "./events"; -import { lspChange, lspPosition } from "./utils/conversions"; -import { applyEdits } from "./utils/editor"; -import { delay } from "./utils/promise"; -import { removeContextMenu, showContextMenu } from "./ui/context-menu"; - -// Changes stream emits at most once per 50ms. -const CHANGES_FRAME = 50; - -/** - * Describes text document's language association. - */ -export interface LanguageAssociation { - /** - * Language ID associated with the file. - */ - languageId: string; - /** - * IDs of language servers to connect to. - * Accepts multiple IDs for future extension, but currently only the first one is used. - */ - languageServerIds: string[]; -} - -/** Configs to use for each server. */ -export interface LanguageServerConfigs { - [serverId: string]: LanguageServerConfig; -} - -// TODO? Replace `languageAssociations` with some methods in config? -/** - * Server's `initializationOptions` and client `settings`. - */ -export interface LanguageServerConfig { - // TODO? Provide typed values for commonly used servers? - /** Custom initialization options for the server. */ - initOptions?: any; - /** Client settings for the server. */ - settings?: any; -} - -/** - * Options for Workspace. - */ -export interface WorkspaceOptions { - /** - * The URI of the project root. - */ - rootUri: string; - /** - * Optional configs for Language Servers. - */ - configs?: LanguageServerConfigs; - /** - * Provide Language Server connection string. - * - * The returned string can be either: - * - * - URI of a WebSocket proxy of a Language Server (`wss?://`) - * - Path to a script to start Language Server in Web Worker - * - * If the returned string does not start with `wss?://`, it's assumed to be a Worker script. - */ - getConnectionString: (this: void, langserverId: string) => Promise; - /** - * Provide language association (language id, language server id) for a file with the uri. - */ - getLanguageAssociation: ( - this: void, - uri: string - ) => LanguageAssociation | null; - /** - * Function to render Markdown to HTML string. - * If not provided and the server's response contains Markdown, it'll be displayed as is. - */ - renderMarkdown?: (this: void, markdown: string) => string; - // Called when jumping to different document. - // showTextDocument?: (uri: string, line?: number, character?: number) => void; - // Called on showMeessage notification - // showMessage?: (message: string, level: "error" | "warning" | "info" | "log") => void; - // Called on logMeessage notification - // logMessage?: (message: string, level: "error" | "warning" | "info" | "log") => void; -} - -/** - * Workspace provides code intelligence to CodeMirror editors by managing - * communications with Language Servers and adding event handlers. - */ -export class Workspace { - // Map of `documentUri` to open editors in the workspace. - // Used to find the editor to apply actions on event. - private editors: { [uri: string]: EditorView }; - // Keep track of `connect` calls for each `serverId`. - private connectPromises: { [id: string]: Promise }; - // Map of Language Server ID to connection. - private connections: { [id: string]: LspConnection }; - // Map of `documentUri` to document versions. - private documentVersions: { [uri: string]: number }; - // Array of Disposers to remove event listeners. - private subscriptionDisposers: WeakMap; - // Function to get the language server's connection string when creating new connection. - private getConnectionString: (langserverId: string) => Promise; - // Function to get the language association from the document uri. - private getLanguageAssociation: (uri: string) => LanguageAssociation | null; - // Function to get convert Markdown to HTML string. - private renderMarkdown: (markdown: string) => string; - private canHandleMarkdown: boolean; - // The URI of the project root. - private rootUri: string; - private configs: LanguageServerConfigs; - private completionHandlers: WeakMap; - - /** - * Create new workspace. - * @param options - */ - constructor(options: WorkspaceOptions) { - this.editors = Object.create(null); - this.connectPromises = Object.create(null); - this.connections = Object.create(null); - this.documentVersions = Object.create(null); - this.subscriptionDisposers = new WeakMap(); - this.completionHandlers = new WeakMap(); - this.configs = options.configs || {}; - this.rootUri = - options.rootUri + (!options.rootUri.endsWith("/") ? "/" : ""); - this.getConnectionString = options.getConnectionString.bind(void 0); - this.getLanguageAssociation = options.getLanguageAssociation.bind(void 0); - this.canHandleMarkdown = typeof options.renderMarkdown === "function"; - const renderMarkdown = options.renderMarkdown || ((x: string) => x); - this.renderMarkdown = renderMarkdown.bind(void 0); - } - - /** - * Dispose the workspace. - * Close connections and remove references to editors. - */ - dispose() { - // TODO shutdown and exit all connections - } - - /** - * Open text document in the workspace to notify the Language Server and - * enable code intelligence. - * @param path - The file path relative to the project root. - * @param editor - CodeMirror EditorView instance. - */ - async openTextDocument(path: string, editor: EditorView) { - const uri = this.getDocumentUri(path); - const assoc = this.getLanguageAssociation(uri); - if (!assoc) return; - // TODO Allow connecting to multiple language servers - const serverId = assoc.languageServerIds[0]; - if (!serverId) return; - - const conn = await this.getConnection(serverId); - if (!conn) return; - - this.editors[uri] = editor; - this.documentVersions[uri] = 0; - const languageId = assoc.languageId; - conn.textDocumentOpened({ - textDocument: { - uri, - languageId, - text: editor.state.doc.toString(), - version: ++this.documentVersions[uri], - }, - }); - - this.addEventHandlers(uri, editor, conn); - } - - // TODO Clean up. Workspace should signal custom events for providers to react - private addEventHandlers(uri: string, editor: EditorView, conn: LspConnection) { - const completion = new CompletionHandler({ - uri, - editor, - conn, - renderMarkdown: this.renderMarkdown, - }); - this.completionHandlers.set(editor, completion); - const disposers: Disposer[] = []; - - // create a listener to track whether the mouse is over the editor and/or any of it's tooltips - const mouseLeaveAllListener = new MouseLeaveAllListener(() => { - this.hideTooltips(editor); - }); - mouseLeaveAllListener.addElement(editor.dom); // .getWrapperElement() - disposers.push(() => { - mouseLeaveAllListener.dispose(); - }); - - const requestCompletion = (cm: EditorView) => { - removeSignatureHelp(cm); - completion.invoke(); - }; - - // EditorView.updateListener.of(debounce((update: ViewUpdate) => { - // if (update.docChanged) { - // // tsServer.postMessage({ - // // event: "updateText", - // // details: update.state.doc, - // // }); - // } - // }, CHANGES_FRAME)) - - const changeStream = piped( - fromEditorEvent(editor, "changes"), - debouncedBuffer(CHANGES_FRAME), - map((buffered) => { - const cm = buffered[0][0]; - // Send incremental contentChanges - conn.textDocumentChanged({ - textDocument: { - uri, - version: ++this.documentVersions[uri], - }, - contentChanges: conn.syncsIncrementally - ? buffered.flatMap(([_, cs]) => cs.map(lspChange)) - : [{ text: cm.getValue() }], - }); - - // Only pass the editor and the last change object. - const lastChanges = buffered[buffered.length - 1][1]; - return [cm, lastChanges[lastChanges.length - 1]] as const; - }), - filter(([cm, change]) => { - // Text removed - if ( - change.origin === "+delete" || - change.text.every((s) => s.length === 0) - ) { - completion.close(); - removeSignatureHelp(cm); - return false; - } - - // Text completed - if (change.origin === "complete" || change.origin === "+complete") { - return false; - } - - return true; - }) - ); - disposers.push( - // Trigger completion or signature help or hide them - changeStream(([cm, _change]) => { - if (completion.onChange()) return; - - const pos = cm.getCursor(); - if (pos.ch === 0) return; - const triggerCharacter = cm.getLine(pos.line)[pos.ch - 1]; - if ( - conn.signatureHelpTriggers.includes(triggerCharacter) || - conn.signatureHelpRetriggers.includes(triggerCharacter) - ) { - completion.close(); - removeSignatureHelp(cm); - conn - .getSignatureHelp({ - textDocument: { uri }, - position: lspPosition(pos), - context: { - triggerKind: SignatureHelpTriggerKind.TriggerCharacter, - triggerCharacter, - // TODO Look into this - isRetrigger: false, - // activeSignatureHelp, - }, - }) - .then((help) => { - if (!help || help.signatures.length === 0) return; - showSignatureHelp( - cm, - mouseLeaveAllListener, - help, - pos, - this.renderMarkdown - ); - }); - - return; - } - - completion.close(); - removeSignatureHelp(cm); - }) - ); - - // Highlights identifiers matching the word under cursor - // Note that `cursorActivity` is also emitted when content changes. - const cursorActivityStream = piped( - fromEditorEvent(editor, "cursorActivity"), - debounce(100), - map(([cm]) => [cm, cm.getCursor()] as const) - ); - disposers.push( - cursorActivityStream(([cm, pos]) => { - const type = cm.getTokenTypeAt(pos); - if (type && /\b(?:variable|property)\b/.test(type)) { - conn - .getDocumentHighlight({ - textDocument: { uri }, - position: lspPosition(pos), - }) - .then((highlights) => { - removeHighlights(cm); - if (highlights) showHighlights(cm, highlights); - }); - } else { - removeHighlights(cm); - - if (pos.ch > 0) { - const triggerCharacter = cm.getLine(pos.line)[pos.ch - 1]; - if ( - !conn.signatureHelpTriggers.includes(triggerCharacter) && - !conn.signatureHelpRetriggers.includes(triggerCharacter) - ) { - removeSignatureHelp(cm); - } - } else { - removeSignatureHelp(cm); - } - } - }) - ); - - // Show hover information on mouseover - const mouseoverStream = piped( - fromDomEvent(editor.getWrapperElement(), "mouseover"), - filter(() => hoverInfoEnabled(editor)), - debounce(100), - map((ev) => editor.coordsChar({ left: ev.pageX, top: ev.pageY }, "page")), - // Ignore same position - skipDuplicates((p1, p2) => { - if (p1.line !== p2.line) return false; - if (p1.ch === p2.ch) return true; - - const t1 = editor.getTokenAt(p1); - const t2 = editor.getTokenAt(p2); - return ( - t1.string === t2.string && t1.start === t2.start && t1.end === t2.end - ); - }) - ); - disposers.push( - mouseoverStream((pos) => { - removeHoverInfo(editor); - const token = editor.getTokenAt(pos); - if ( - token.type === "comment" || - token.string.length === 0 || - token.type === null - ) { - return; - } - - conn - .getHoverInfo({ - textDocument: { uri }, - position: lspPosition(pos), - }) - .then((hover) => { - if (hover) { - removeSignatureHelp(editor); - showHoverInfo( - editor, - mouseLeaveAllListener, - pos, - hover, - this.renderMarkdown - ); - } - }); - }) - ); - - const hideAllPopups = ([cm]: [EditorView, ...any]) => { - this.hideAllPopups(cm); - }; - - const hideTooltips = ([cm]: [EditorView, ...any]) => { - this.hideTooltips(cm); - }; - - disposers.push( - onEditorEvent(editor, "cmw:contextMenuOpened", ([cm]) => { - disableHoverInfo(cm); - completion.close(); - removeSignatureHelp(cm); - }), - onEditorEvent(editor, "cmw:contextMenuClosed", ([cm]) => { - enableHoverInfo(cm); - }), - - // if the editor loses focus, or gets completely reset, hide all overlays, because they are no longer valid - onEditorEvent(editor, "refresh", hideAllPopups), - // For `blur`, just remove tooltips. - // ContextMenu should not be closed on `blur` because that happens when you click the menu. - // Completion is closed on `blur` alreaady with the default `closeOnUnfocus: true` option after 100ms without focus. - onEditorEvent(editor, "blur", hideTooltips), - - // if we type something, or modify the viewport, hide any tooltips, because they no longer line up correctly - onEditorEvent(editor, "changes", hideTooltips), - onEditorEvent(editor, "viewportChange", hideTooltips) - ); - - const gotoDefinition = (cm: EditorView, pos = cm.getCursor()) => { - conn - .getDefinition({ - textDocument: { uri }, - position: lspPosition(pos), - }) - .then((location) => { - if (location) gotoLocation(cm, uri, location); - }); - }; - const gotoDeclaration = (cm: EditorView, pos = cm.getCursor()) => { - conn - .getDeclaration({ - textDocument: { uri }, - position: lspPosition(pos), - }) - .then((location) => { - if (location) gotoLocation(cm, uri, location); - }); - }; - const gotoTypeDefinition = (cm: EditorView, pos = cm.getCursor()) => { - conn - .getTypeDefinition({ - textDocument: { uri }, - position: lspPosition(pos), - }) - .then((location) => { - if (location) gotoLocation(cm, uri, location); - }); - }; - const gotoReferences = (cm: EditorView, pos = cm.getCursor()) => { - conn - .getReferences({ - textDocument: { uri }, - position: lspPosition(pos), - context: { - includeDeclaration: true, - }, - }) - .then((location) => { - if (location) gotoLocation(cm, uri, location); - }); - }; - const gotoImplementations = (cm: EditorView, pos = cm.getCursor()) => { - conn - .getImplementation({ - textDocument: { uri }, - position: lspPosition(pos), - }) - .then((location) => { - if (location) gotoLocation(cm, uri, location); - }); - }; - - disposers.push( - onEditorEvent(editor, "contextmenu", ([cm, e]) => { - e.preventDefault(); - const pos = cm.coordsChar({ left: e.pageX, top: e.pageY }, "page"); - // TODO Disable items if the server doesn't support it. - showContextMenu(cm, e.pageX, e.pageY, [ - [ - { - label: "Go to Definition", - handler: () => { - gotoDefinition(cm, pos); - }, - }, - { - label: "Go to Type Definition", - handler: () => { - gotoTypeDefinition(cm, pos); - }, - }, - { - label: "Go to Implementations", - handler: () => { - gotoImplementations(cm, pos); - }, - }, - { - label: "Go to References", - handler: () => { - gotoReferences(cm, pos); - }, - }, - { - label: "Go to Symbol...", - handler: () => { - conn - .getDocumentSymbol({ - textDocument: { uri }, - }) - .then((symbols) => { - if (symbols) showSymbolSelector(cm, uri, symbols); - }); - }, - }, - ], - // TODO Handle Copy and Cut because we won't show the browser's context menu. - // Paste requires explicit permission. - [ - { - label: "Copy", - }, - { - label: "Cut", - }, - ], - ]); - }) - ); - - // Add some keymaps for jumping to various locations. - // const keyMap = normalizeKeyMap(); - const keyMaps: KeyBinding[] = Object.entries({ - "Ctrl-Space": (view: EditorView) => { - requestCompletion(view); - return true; - }, - "Alt-G D": (cm: EditorView) => { - gotoDefinition(cm); - return true; - }, - "Alt-G H": (cm: EditorView) => { - gotoDeclaration(cm); - return true; - }, - "Alt-G T": (cm: EditorView) => { - gotoTypeDefinition(cm); - return true; - }, - "Alt-G I": (cm: EditorView) => { - gotoImplementations(cm); - return true; - }, - "Alt-G R": (cm: EditorView) => { - gotoReferences(cm); - return true; - }, - }).map(([key, handler]) => ({ key, run: handler })); - - const keyMap = keymap.of(keyMaps); - // editor.state.update({ - // effects: keyMap - // }); - // editor.dispatch(); - editor.addKeyMap(keyMap); - disposers.push(() => { - editor.removeKeyMap(keyMap); - }); - - this.subscriptionDisposers.set(editor, disposers); - } - - hideAllPopups(cm?: EditorView) { - if (cm) { - this.hideTooltips(cm); - const completion = this.completionHandlers.get(cm); - if (completion) completion.close(); - removeContextMenu(cm); - } else { - Object.values(this.editors).forEach((cm) => this.hideAllPopups(cm)); - } - } - - hideTooltips(cm?: EditorView) { - if (cm) { - removeHoverInfo(cm); - removeSignatureHelp(cm); - } else { - Object.values(this.editors).forEach((cm) => this.hideTooltips(cm)); - } - } - - /** - * Close text document in the workspace to notify the Language Server and - * remove everything added by the workspace. - * @param path - The file path relative to the project root. - */ - async closeTextDocument(path: string) { - const uri = this.getDocumentUri(path); - const assoc = this.getLanguageAssociation(uri); - if (!assoc) return; - const serverId = assoc.languageServerIds[0]; - if (!serverId) return; - const conn = this.connections[serverId]; - if (!conn) return; - - const editor = this.editors[uri]; - delete this.editors[uri]; - delete this.documentVersions[uri]; - this.removeEventHandlers(editor); - conn.textDocumentClosed({ - textDocument: { uri }, - }); - } - - /** - * Notify the Language Server that the text document was saved. - * - * If connected to a WebSocket proxy with synchronization enabled, - * the contents of the file will be written to disk. - * @param path - The file path relative to the project root. - */ - async saveTextDocument(path: string) { - const uri = this.getDocumentUri(path); - // TODO Support `willSave` with `reason` and `willSaveWaitUntil` - const assoc = this.getLanguageAssociation(uri); - if (!assoc) return; - - const serverId = assoc.languageServerIds[0]; - if (!serverId) return; - - const conn = this.connections[serverId]; - if (!conn) return; - - const editor = this.editors[uri]; - if (!editor) return; - - // TODO Find Language Server supporting these to test - conn.textDocumentWillSave({ - textDocument: { uri }, - reason: TextDocumentSaveReason.Manual, - }); - const edits = await conn.getEditsBeforeSave({ - textDocument: { uri }, - reason: TextDocumentSaveReason.Manual, - }); - if (edits) { - applyEdits(editor, edits, "beforeSave"); - await delay(CHANGES_FRAME * 1.5); - } - conn.textDocumentSaved({ - textDocument: { uri }, - text: editor.getValue(), - }); - } - - /** - * Send `workspace/didChangeWatchedFiles` notification to all active Language Servers. - * - * Note that `FileEvent` must have a valid `uri` starting with `rootUri`. - * @param changes - */ - async notifyFilesChanged(changes: FileEvent[]) { - for (const conn of Object.values(this.connections)) { - conn.watchedFilesChanged({ changes }); - } - } - - private async getConnection(serverId: string) { - return ( - this.connectPromises[serverId] || - (this.connectPromises[serverId] = this.connect(serverId)) - ); - } - - private removeEventHandlers(editor: EditorView) { - const disposers = this.subscriptionDisposers.get(editor); - if (disposers) { - for (const dispose of disposers) dispose(); - disposers.length = 0; - this.subscriptionDisposers.delete(editor); - } - - removeDiagnostics(editor); - removeHoverInfo(editor); - removeHighlights(editor); - removeSignatureHelp(editor); - - const completion = this.completionHandlers.get(editor); - if (completion) { - completion.close(); - this.completionHandlers.delete(editor); - } - } - - /** - * Private method to connect to the language server if possible. - * If existing connection exists, it'll be shared. - * - * @param serverId - ID of the language server. - */ - private async connect(serverId: string): Promise { - const existing = this.connections[serverId]; - if (existing || existing === null) return existing; - - const connectionString = await this.getConnectionString(serverId); - if (!connectionString) return null; - - // If we got some string that doesn't start with Web Socket protocol, assume - // it's the worker's location. - const messageConn = createWorkerMessageConnection(new Worker(connectionString)); - const conn = await messageConn.then(createLspConnection); - this.connections[serverId] = conn; - conn.onClose(() => { - delete this.connections[serverId]; - delete this.connectPromises[serverId]; - }); - - conn.listen(); - - const config = this.configs[serverId]; - await conn.initialize({ - capabilities: { - textDocument: { - synchronization: { - dynamicRegistration: true, - willSave: true, - willSaveWaitUntil: true, - didSave: true, - }, - completion: { - dynamicRegistration: true, - completionItem: { - snippetSupport: true, - insertReplaceSupport: true, - // TODO Commit characters cannot be supported with show-hint addon because by the time the - // commit character is detected, the Widget is updated and selected item is gone. - // Maybe assign it somewhere inside `select` event. - commitCharactersSupport: false, - documentationFormat: this.canHandleMarkdown - ? ["markdown", "plaintext"] - : ["plaintext"], - deprecatedSupport: true, - preselectSupport: true, - resolveSupport: { properties: ["documentation", "detail"] }, - }, - contextSupport: true, - }, - hover: { - dynamicRegistration: true, - contentFormat: this.canHandleMarkdown - ? ["markdown", "plaintext"] - : ["plaintext"], - }, - signatureHelp: { - dynamicRegistration: true, - signatureInformation: { - documentationFormat: this.canHandleMarkdown - ? ["markdown", "plaintext"] - : ["plaintext"], - parameterInformation: { - labelOffsetSupport: true, - }, - // activeParameterSupport: true, - }, - contextSupport: true, - }, - declaration: { - dynamicRegistration: true, - linkSupport: false, - }, - definition: { - dynamicRegistration: true, - linkSupport: true, - }, - typeDefinition: { - dynamicRegistration: true, - linkSupport: true, - }, - implementation: { - dynamicRegistration: true, - linkSupport: true, - }, - references: { - dynamicRegistration: true, - }, - documentHighlight: { - dynamicRegistration: true, - }, - documentSymbol: { - dynamicRegistration: true, - hierarchicalDocumentSymbolSupport: true, - }, - // codeAction: {}, - // codeLens: {}, - // documentLink: { - // dynamicRegistration: true, - // tooltipSupport: false, - // }, - // colorProvider: {}, - // formatting: {}, - // rangeFormatting: {}, - // onTypeFormatting: {}, - // rename: {}, - // foldingRange: {}, - // selectionRange: {}, - publishDiagnostics: { - relatedInformation: true, - tagSupport: { - valueSet: [DiagnosticTag.Unnecessary, DiagnosticTag.Deprecated], - }, - }, - moniker: {}, - }, - workspace: { - didChangeConfiguration: { - dynamicRegistration: true, - }, - didChangeWatchedFiles: { - dynamicRegistration: false, - }, - }, - }, - // clientInfo: { name: "codemirror-workspace" }, - initializationOptions: config?.initOptions ?? null, - processId: null, - rootUri: this.rootUri, - workspaceFolders: null, - }); - conn.initialized(); - - const settings = config?.settings; - if (settings) conn.configurationChanged({ settings }); - - // Add event handlers to pass payload to matching open editors. - conn.onDiagnostics(({ uri, diagnostics }) => { - const editor = this.editors[uri]; - if (editor) showDiagnostics(editor, diagnostics); - }); - - return conn; - } - - private getDocumentUri(path: string) { - return this.rootUri + path.replace(/^\/+/, ""); - } -} - -// Renaming file should be done by: -// 1. Close -// 2. Delete -// 3. Create -// 4. Open diff --git a/index.html b/index.html new file mode 100644 index 0000000..6187692 --- /dev/null +++ b/index.html @@ -0,0 +1,62 @@ + + + + + + + + + + + + Codemirror LSPS Test + + + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/package.json b/package.json index 1983999..7361b03 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,10 @@ "private": true, "type": "module", "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro build" + "start": "vite", + "dev": "vite", + "build": "vite build", + "serve": "vite preview" }, "dependencies": { "@codemirror/autocomplete": "^0.19.13", @@ -21,26 +22,17 @@ "@codemirror/rectangular-selection": "^0.19.1", "@codemirror/search": "^0.19.8", "@codemirror/view": "^0.19.45", - "@okikio/emitter": "^2.1.7", - "@open-rpc/client-js": "^1.7.1", "@primer/primitives": "^7.4.1", - "@typescript/vfs": "^1.3.5", - "debounce-async": "^0.0.2", "events": "^3.3.0", - "lodash.debounce": "^4.0.8", - "marked": "^4.0.12", + "isomorphic-fetch": "^3.0.0", + "isomorphic-ws": "^4.0.1", "strict-event-emitter-types": "^2.0.0", "typescript": "^4.5.5", - "vscode-languageserver": "^7.0.0", - "vscode-languageserver-textdocument": "^1.0.4", + "vscode-json-languageservice": "^4.2.0", "vscode-typescript-languageservice": "^0.32.0" }, "devDependencies": { - "@astrojs/renderer-solid": "^0.4.0", - "astro": "^0.23.2", - "esbuild": "^0.14.23", - "lz-string": "^1.4.4", - "sass": "^1.49.9", - "solid-js": "^1.3.9" + "solid-js": "^1.3.9", + "vite-plugin-solid": "^2.2.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef1ea8f..af2eaa3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,7 +1,6 @@ lockfileVersion: 5.3 specifiers: - '@astrojs/renderer-solid': ^0.4.0 '@codemirror/autocomplete': ^0.19.13 '@codemirror/closebrackets': ^0.19.1 '@codemirror/commands': ^0.19.8 @@ -14,23 +13,15 @@ specifiers: '@codemirror/rectangular-selection': ^0.19.1 '@codemirror/search': ^0.19.8 '@codemirror/view': ^0.19.45 - '@okikio/emitter': ^2.1.7 - '@open-rpc/client-js': ^1.7.1 '@primer/primitives': ^7.4.1 - '@typescript/vfs': ^1.3.5 - astro: ^0.23.2 - debounce-async: ^0.0.2 - esbuild: ^0.14.23 events: ^3.3.0 - lodash.debounce: ^4.0.8 - lz-string: ^1.4.4 - marked: ^4.0.12 - sass: ^1.49.9 + isomorphic-fetch: ^3.0.0 + isomorphic-ws: ^4.0.1 solid-js: ^1.3.9 strict-event-emitter-types: ^2.0.0 typescript: ^4.5.5 - vscode-languageserver: ^7.0.0 - vscode-languageserver-textdocument: ^1.0.4 + vite-plugin-solid: ^2.2.5 + vscode-json-languageservice: ^4.2.0 vscode-typescript-languageservice: ^0.32.0 dependencies: @@ -46,27 +37,18 @@ dependencies: '@codemirror/rectangular-selection': 0.19.1 '@codemirror/search': 0.19.8 '@codemirror/view': 0.19.45 - '@okikio/emitter': 2.1.7 - '@open-rpc/client-js': 1.7.1 '@primer/primitives': 7.4.1 - '@typescript/vfs': 1.3.5 - debounce-async: 0.0.2 events: 3.3.0 - lodash.debounce: 4.0.8 - marked: 4.0.12 + isomorphic-fetch: 3.0.0 + isomorphic-ws: 4.0.1 strict-event-emitter-types: 2.0.0 typescript: 4.5.5 - vscode-languageserver: 7.0.0 - vscode-languageserver-textdocument: 1.0.4 + vscode-json-languageservice: 4.2.0 vscode-typescript-languageservice: 0.32.0 devDependencies: - '@astrojs/renderer-solid': 0.4.0 - astro: 0.23.2_sass@1.49.9+typescript@4.5.5 - esbuild: 0.14.23 - lz-string: 1.4.4 - sass: 1.49.9 solid-js: 1.3.9 + vite-plugin-solid: 2.2.5 packages: @@ -77,133 +59,6 @@ packages: '@jridgewell/trace-mapping': 0.3.4 dev: true - /@astrojs/compiler/0.11.4: - resolution: {integrity: sha512-T598FTCgBFjjPLPClvn+lc2SFGAJkjaF+lbxvHNjzmUpOYdz7YyH1apd3XAZvDp5r5WBBhicB6693GhQRpf3oQ==} - dependencies: - typescript: 4.5.5 - dev: true - - /@astrojs/language-server/0.8.8: - resolution: {integrity: sha512-XgBSVpqXEqGTdst+CnM03/nXYw9PYNAfTl27BaJuUhEtqA/iDlyM7wLnQMsJzwWVmoLqp0bCumHkb62NtfeDNA==} - hasBin: true - dependencies: - lodash: 4.17.21 - source-map: 0.7.3 - ts-morph: 12.2.0 - typescript: 4.5.5 - vscode-css-languageservice: 5.1.13 - vscode-emmet-helper: 2.1.2 - vscode-html-languageservice: 3.2.0 - vscode-languageserver: 6.1.1 - vscode-languageserver-protocol: 3.16.0 - vscode-languageserver-textdocument: 1.0.4 - vscode-languageserver-types: 3.16.0 - vscode-uri: 3.0.3 - dev: true - - /@astrojs/markdown-remark/0.6.2: - resolution: {integrity: sha512-hC2WNACapgW5P/18NWUndFYFa4CNtIGYU3xuvLiDgyZNp8nCyt7CJkc1lBC+xh2JFaV/sIQEyB24KyCICMiJyw==} - dependencies: - '@astrojs/prism': 0.4.0 - assert: 2.0.0 - github-slugger: 1.4.0 - gray-matter: 4.0.3 - mdast-util-mdx-expression: 1.2.0 - mdast-util-mdx-jsx: 1.2.0 - micromark-extension-mdx-expression: 1.0.3 - micromark-extension-mdx-jsx: 1.0.3 - prismjs: 1.27.0 - rehype-raw: 6.1.1 - rehype-slug: 5.0.1 - rehype-stringify: 9.0.3 - remark-gfm: 3.0.1 - remark-parse: 10.0.1 - remark-rehype: 10.1.0 - remark-smartypants: 2.0.0 - shiki: 0.10.1 - unified: 10.1.1 - unist-util-map: 3.0.0 - unist-util-visit: 4.1.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@astrojs/prism/0.4.0: - resolution: {integrity: sha512-dbB9Acm9Z/GDqhxwPv7W/DlZAScWNZGzFz8klTqDo9kaWD6O3qsZpXn641GuGeXdNWkqTmkinu37ZJHSxaDB7A==} - engines: {node: ^14.15.0 || >=16.0.0} - dev: true - - /@astrojs/renderer-preact/0.5.0_@babel+core@7.17.5: - resolution: {integrity: sha512-83De5FdGzCt7lqsHWx1Oc+pLgSM6G1xkdlZyV2pU0pyuV/NaTek9qaGNAmh96G28lufeyWKw1m1dVx8UGCSBnw==} - engines: {node: ^14.15.0 || >=16.0.0} - dependencies: - '@babel/plugin-transform-react-jsx': 7.17.3_@babel+core@7.17.5 - preact: 10.6.6 - preact-render-to-string: 5.1.20_preact@10.6.6 - transitivePeerDependencies: - - '@babel/core' - dev: true - - /@astrojs/renderer-react/0.5.0_@babel+core@7.17.5: - resolution: {integrity: sha512-9Ij1TjJbRuPTK7mwOylDdKW6rDUk1RaBFD6rcZkrHHrA0M6b6a6HQzjXCFjJMeZIDg10N1aqtIJWM6Fptwhz1g==} - engines: {node: ^14.15.0 || >=16.0.0} - dependencies: - '@babel/plugin-transform-react-jsx': 7.17.3_@babel+core@7.17.5 - react: 17.0.2 - react-dom: 17.0.2_react@17.0.2 - transitivePeerDependencies: - - '@babel/core' - dev: true - - /@astrojs/renderer-solid/0.4.0: - resolution: {integrity: sha512-d5QcmbBmaWkcVSG5ULm4708XpEP32OI25eT4xGEfGuvNSZttNtAHrfxhyk2caQbeTnpqMZ+KX/0zOkAS45mo/g==} - engines: {node: ^14.15.0 || >=16.0.0} - dependencies: - babel-preset-solid: 1.3.6 - solid-js: 1.3.9 - transitivePeerDependencies: - - '@babel/core' - dev: true - - /@astrojs/renderer-svelte/0.4.0_083b6655da0eff7d18040e168afb0094: - resolution: {integrity: sha512-YP6e6qPMEx5Pr6tCiD+GTyT7Bl+aA1biTX9Yg8Sd7bjXHOiqfMH28d8Bo0CXHiqUXli/CTp6pRtR0WN44a4gUg==} - engines: {node: ^14.15.0 || >=16.0.0} - dependencies: - '@sveltejs/vite-plugin-svelte': 1.0.0-next.38_svelte@3.46.4+vite@2.8.4 - postcss-load-config: 3.1.3 - svelte: 3.46.4 - svelte-preprocess: 4.10.4_b7271f2ed782f08978c4d0e2d2ea2757 - transitivePeerDependencies: - - '@babel/core' - - coffeescript - - diff-match-patch - - less - - node-sass - - postcss - - pug - - sass - - stylus - - sugarss - - supports-color - - ts-node - - typescript - - vite - dev: true - - /@astrojs/renderer-vue/0.4.0_vite@2.8.4: - resolution: {integrity: sha512-jeD+KJZcIGIyZDMkA2uKkA+vRGC/+bRV4o9+q+yFJA+npLHuGt9EdSTAqvEJyBMvZ+O2JG2wgAl8S7nFy1S7nw==} - engines: {node: ^14.15.0 || >=16.0.0} - dependencies: - '@vitejs/plugin-vue': 2.2.2_vite@2.8.4+vue@3.2.31 - vue: 3.2.31 - transitivePeerDependencies: - - vite - dev: true - - /@astropub/webapi/0.10.14: - resolution: {integrity: sha512-/o0XdOZLSD3PcZEMm/gRGx5XTFmMzJOCgbBYw//cmHWwpLn6H+9xWBe68r9ToUQ1Ns4GVkfwZlyKVMBNTTXn/g==} - dev: true - /@babel/code-frame/7.16.7: resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} engines: {node: '>=6.9.0'} @@ -268,6 +123,24 @@ packages: semver: 6.3.0 dev: true + /@babel/helper-create-class-features-plugin/7.17.6_@babel+core@7.17.5: + resolution: {integrity: sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.17.5 + '@babel/helper-annotate-as-pure': 7.16.7 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-function-name': 7.16.7 + '@babel/helper-member-expression-to-functions': 7.16.7 + '@babel/helper-optimise-call-expression': 7.16.7 + '@babel/helper-replace-supers': 7.16.7 + '@babel/helper-split-export-declaration': 7.16.7 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/helper-environment-visitor/7.16.7: resolution: {integrity: sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==} engines: {node: '>=6.9.0'} @@ -298,6 +171,13 @@ packages: '@babel/types': 7.17.0 dev: true + /@babel/helper-member-expression-to-functions/7.16.7: + resolution: {integrity: sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.17.0 + dev: true + /@babel/helper-module-imports/7.16.0: resolution: {integrity: sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==} engines: {node: '>=6.9.0'} @@ -328,11 +208,31 @@ packages: - supports-color dev: true + /@babel/helper-optimise-call-expression/7.16.7: + resolution: {integrity: sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.17.0 + dev: true + /@babel/helper-plugin-utils/7.16.7: resolution: {integrity: sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==} engines: {node: '>=6.9.0'} dev: true + /@babel/helper-replace-supers/7.16.7: + resolution: {integrity: sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-member-expression-to-functions': 7.16.7 + '@babel/helper-optimise-call-expression': 7.16.7 + '@babel/traverse': 7.17.3 + '@babel/types': 7.17.0 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/helper-simple-access/7.16.7: resolution: {integrity: sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==} engines: {node: '>=6.9.0'} @@ -383,17 +283,18 @@ packages: hasBin: true dev: true - /@babel/plugin-syntax-jsx/7.16.7: + /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.17.5: resolution: {integrity: sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: + '@babel/core': 7.17.5 '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.17.5: - resolution: {integrity: sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==} + /@babel/plugin-syntax-typescript/7.16.7_@babel+core@7.17.5: + resolution: {integrity: sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -402,18 +303,32 @@ packages: '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-transform-react-jsx/7.17.3_@babel+core@7.17.5: - resolution: {integrity: sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ==} + /@babel/plugin-transform-typescript/7.16.8_@babel+core@7.17.5: + resolution: {integrity: sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.5 - '@babel/helper-annotate-as-pure': 7.16.7 - '@babel/helper-module-imports': 7.16.7 + '@babel/helper-create-class-features-plugin': 7.17.6_@babel+core@7.17.5 '@babel/helper-plugin-utils': 7.16.7 - '@babel/plugin-syntax-jsx': 7.16.7_@babel+core@7.17.5 - '@babel/types': 7.17.0 + '@babel/plugin-syntax-typescript': 7.16.7_@babel+core@7.17.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/preset-typescript/7.16.7_@babel+core@7.17.5: + resolution: {integrity: sha512-WbVEmgXdIyvzB77AQjGBEyYPZx+8tTsO50XtfozQrkW8QB2rLJpH2lgx0TRw5EJrBxOZQ+wCcyPVQvS8tjEHpQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.5 + '@babel/helper-plugin-utils': 7.16.7 + '@babel/helper-validator-option': 7.16.7 + '@babel/plugin-transform-typescript': 7.16.8_@babel+core@7.17.5 + transitivePeerDependencies: + - supports-color dev: true /@babel/template/7.16.7: @@ -629,22 +544,6 @@ packages: w3c-keyname: 2.2.4 dev: false - /@emmetio/abbreviation/2.2.3: - resolution: {integrity: sha512-87pltuCPt99aL+y9xS6GPZ+Wmmyhll2WXH73gG/xpGcQ84DRnptBsI2r0BeIQ0EB/SQTOe2ANPqFqj3Rj5FOGA==} - dependencies: - '@emmetio/scanner': 1.0.0 - dev: true - - /@emmetio/css-abbreviation/2.1.4: - resolution: {integrity: sha512-qk9L60Y+uRtM5CPbB0y+QNl/1XKE09mSO+AhhSauIfr2YOx/ta3NJw2d8RtCFxgzHeRqFRr8jgyzThbu+MZ4Uw==} - dependencies: - '@emmetio/scanner': 1.0.0 - dev: true - - /@emmetio/scanner/1.0.0: - resolution: {integrity: sha512-8HqW8EVqjnCmWXVpqAOZf+EGESdkR27odcMMMGefgKXtar00SoYNSryGv//TELI4T3QFsECo78p+0lmalk/CFA==} - dev: true - /@jridgewell/resolve-uri/3.0.5: resolution: {integrity: sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==} engines: {node: '>=6.0.0'} @@ -677,3242 +576,588 @@ packages: '@lezer/common': 0.15.11 dev: false - /@ljharb/has-package-exports-patterns/0.0.1: - resolution: {integrity: sha512-J4HxcjHI8EzVwXj2HKfZrwnWv4wmOhGxSHyxDQLhiL4ibwRoIkYBqsacZUXFUWQzJtW6QC+FKSNy8HqKjkEqaQ==} - dev: true - - /@nodelib/fs.scandir/2.1.5: - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - dev: true - - /@nodelib/fs.stat/2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - dev: true - - /@nodelib/fs.walk/1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.13.0 - dev: true - - /@okikio/emitter/2.1.7: - resolution: {integrity: sha512-Ta87D0uTN/RclDm3zNwzKaPm2jES58uh3MW3OlRBJ7MNn/c6jIz/I3i01HF3T4qKWjqjNj7OdyT6ndg5P972qw==} - dependencies: - '@okikio/manager': 2.1.7 - dev: false - - /@okikio/manager/2.1.7: - resolution: {integrity: sha512-fle8woS2vX4Im8wPekQOxYT00ITA5lABqEGoE12Tj7Mb6HdMsQBVxujMLVJ7OobMTmZHdT949A4yc35MC/uTEA==} - dev: false - - /@open-rpc/client-js/1.7.1: - resolution: {integrity: sha512-DycSYZUGSUwFl+k9T8wLBSGA8f2hYkvS5A9AB94tBOuU8QlP468NS5ZtAxy72dF4g2WW0genwNJdfeFnHnaxXQ==} - dependencies: - isomorphic-fetch: 3.0.0 - isomorphic-ws: 4.0.1_ws@7.5.7 - strict-event-emitter-types: 2.0.0 - ws: 7.5.7 - transitivePeerDependencies: - - bufferutil - - encoding - - utf-8-validate - dev: false - /@primer/primitives/7.4.1: resolution: {integrity: sha512-cos7zQ6tgTtbQzF1gymiuQPcccqkHpccQCaahMRdqHqJP7kiG9/lbq+u13UdrAFJ8iJEyORfHXKd+bwhQf4svw==} dev: false - /@proload/core/0.2.2: - resolution: {integrity: sha512-HYQEblYXIpW77kvGyW4penEl9D9e9MouPhTqVaDz9+QVFliYjsq18inTfnfTa81s3oraPVtTk60tqCWOf2fKGQ==} + /@volar/shared/0.32.0: + resolution: {integrity: sha512-RzpoyRAJlEjqAi0rsrqHn5aRJ+xi58JrXa+NCNuJOuGLhUKbPyR9n8JUI+mF4h01opYl3C/s8qYmWQQBOpBUUg==} dependencies: - deepmerge: 4.2.2 - escalade: 3.1.1 - dev: true + upath: 2.0.1 + vscode-html-languageservice: 4.2.2 + vscode-jsonrpc: 8.0.0-next.6 + vscode-uri: 3.0.3 + dev: false - /@proload/plugin-tsm/0.1.1_@proload+core@0.2.2: - resolution: {integrity: sha512-qfGegg6I3YBCZDjYR9xb41MTc2EfL0sQQmw49Z/yi9OstIpUa/67MBy4AuNhoyG9FuOXia9gPoeBk5pGnBOGtA==} - peerDependencies: - '@proload/core': ^0.2.1 + /ansi-styles/3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} dependencies: - '@proload/core': 0.2.2 - tsm: 2.2.1 + color-convert: 1.9.3 dev: true - /@rollup/pluginutils/4.1.2: - resolution: {integrity: sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==} - engines: {node: '>= 8.0.0'} + /babel-plugin-jsx-dom-expressions/0.32.0_@babel+core@7.17.5: + resolution: {integrity: sha512-Tv5mKTCEB3LFEPpFSEFhdRShF5LU6+OuoGPXWZZPakmo5h2bru10e0SvGQTAHFpr+MvFWtXFDx1StC+qR6XR+Q==} dependencies: - estree-walker: 2.0.2 - picomatch: 2.3.1 + '@babel/helper-module-imports': 7.16.0 + '@babel/plugin-syntax-jsx': 7.16.7_@babel+core@7.17.5 + '@babel/types': 7.17.0 + html-entities: 2.3.2 + transitivePeerDependencies: + - '@babel/core' dev: true - /@sveltejs/vite-plugin-svelte/1.0.0-next.38_svelte@3.46.4+vite@2.8.4: - resolution: {integrity: sha512-epYAVZvfpiDZwB4Whe5AALk3zF5odKFf8Vx4q2tth+QuXmr0GLZ13ri02zINS6pHRCx+GjtOqCEEwMaPAfPcgQ==} - engines: {node: ^14.13.1 || >= 16} - peerDependencies: - diff-match-patch: ^1.0.5 - svelte: ^3.44.0 - vite: ^2.7.0 - peerDependenciesMeta: - diff-match-patch: - optional: true + /babel-preset-solid/1.3.6_@babel+core@7.17.5: + resolution: {integrity: sha512-UTSrdMpDnJjeFZBHQ7FU8c43LiT6RmIa5oM2IzMhhVmRjKw6PXbw3oG0NGMOYzMLxZ6CQ+Q/xu0hEZOIP1Ivaw==} dependencies: - '@rollup/pluginutils': 4.1.2 - debug: 4.3.3 - kleur: 4.1.4 - magic-string: 0.25.7 - svelte: 3.46.4 - svelte-hmr: 0.14.9_svelte@3.46.4 - vite: 2.8.4_sass@1.49.9 + babel-plugin-jsx-dom-expressions: 0.32.0_@babel+core@7.17.5 transitivePeerDependencies: - - supports-color + - '@babel/core' dev: true - /@ts-morph/common/0.11.1: - resolution: {integrity: sha512-7hWZS0NRpEsNV8vWJzg7FEz6V8MaLNeJOmwmghqUXTpzk16V1LLZhdo+4QvE/+zv4cVci0OviuJFnqhEfoV3+g==} + /browserslist/4.19.3: + resolution: {integrity: sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true dependencies: - fast-glob: 3.2.11 - minimatch: 3.1.2 - mkdirp: 1.0.4 - path-browserify: 1.0.1 + caniuse-lite: 1.0.30001312 + electron-to-chromium: 1.4.73 + escalade: 3.1.1 + node-releases: 2.0.2 + picocolors: 1.0.0 dev: true - /@types/acorn/4.0.6: - resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} - dependencies: - '@types/estree': 0.0.51 + /caniuse-lite/1.0.30001312: + resolution: {integrity: sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==} dev: true - /@types/babel__core/7.1.18: - resolution: {integrity: sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==} + /chalk/2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} dependencies: - '@babel/parser': 7.17.3 - '@babel/types': 7.17.0 - '@types/babel__generator': 7.6.4 - '@types/babel__template': 7.4.1 - '@types/babel__traverse': 7.14.2 + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 dev: true - /@types/babel__generator/7.6.4: - resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} + /color-convert/1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: - '@babel/types': 7.17.0 + color-name: 1.1.3 dev: true - /@types/babel__template/7.4.1: - resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} - dependencies: - '@babel/parser': 7.17.3 - '@babel/types': 7.17.0 + /color-name/1.1.3: + resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} dev: true - /@types/babel__traverse/7.14.2: - resolution: {integrity: sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==} + /convert-source-map/1.8.0: + resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} dependencies: - '@babel/types': 7.17.0 + safe-buffer: 5.1.2 dev: true - /@types/debug/4.1.7: - resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} - dependencies: - '@types/ms': 0.7.31 - dev: true + /crelt/1.0.5: + resolution: {integrity: sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==} + dev: false - /@types/estree-jsx/0.0.1: - resolution: {integrity: sha512-gcLAYiMfQklDCPjQegGn0TBAn9it05ISEsEhlKQUddIk7o2XDokOcTN7HBO8tznM0D9dGezvHEfRZBfZf6me0A==} + /debug/4.3.3: + resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: - '@types/estree': 0.0.51 + ms: 2.1.2 dev: true - /@types/estree/0.0.50: - resolution: {integrity: sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==} + /electron-to-chromium/1.4.73: + resolution: {integrity: sha512-RlCffXkE/LliqfA5m29+dVDPB2r72y2D2egMMfIy3Le8ODrxjuZNVo4NIC2yPL01N4xb4nZQLwzi6Z5tGIGLnA==} dev: true - /@types/estree/0.0.51: - resolution: {integrity: sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==} + /esbuild-android-arm64/0.14.23: + resolution: {integrity: sha512-k9sXem++mINrZty1v4FVt6nC5BQCFG4K2geCIUUqHNlTdFnuvcqsY7prcKZLFhqVC1rbcJAr9VSUGFL/vD4vsw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true dev: true + optional: true - /@types/hast/2.3.4: - resolution: {integrity: sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==} - dependencies: - '@types/unist': 2.0.6 + /esbuild-darwin-64/0.14.23: + resolution: {integrity: sha512-lB0XRbtOYYL1tLcYw8BoBaYsFYiR48RPrA0KfA/7RFTr4MV7Bwy/J4+7nLsVnv9FGuQummM3uJ93J3ptaTqFug==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true dev: true + optional: true - /@types/json5/0.0.30: - resolution: {integrity: sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA==} + /esbuild-darwin-arm64/0.14.23: + resolution: {integrity: sha512-yat73Z/uJ5tRcfRiI4CCTv0FSnwErm3BJQeZAh+1tIP0TUNh6o+mXg338Zl5EKChD+YGp6PN+Dbhs7qa34RxSw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true dev: true + optional: true - /@types/mdast/3.0.10: - resolution: {integrity: sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==} - dependencies: - '@types/unist': 2.0.6 + /esbuild-freebsd-64/0.14.23: + resolution: {integrity: sha512-/1xiTjoLuQ+LlbfjJdKkX45qK/M7ARrbLmyf7x3JhyQGMjcxRYVR6Dw81uH3qlMHwT4cfLW4aEVBhP1aNV7VsA==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true dev: true + optional: true - /@types/mdurl/1.0.2: - resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} + /esbuild-freebsd-arm64/0.14.23: + resolution: {integrity: sha512-uyPqBU/Zcp6yEAZS4LKj5jEE0q2s4HmlMBIPzbW6cTunZ8cyvjG6YWpIZXb1KK3KTJDe62ltCrk3VzmWHp+iLg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true dev: true + optional: true - /@types/ms/0.7.31: - resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} + /esbuild-linux-32/0.14.23: + resolution: {integrity: sha512-37R/WMkQyUfNhbH7aJrr1uCjDVdnPeTHGeDhZPUNhfoHV0lQuZNCKuNnDvlH/u/nwIYZNdVvz1Igv5rY/zfrzQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true dev: true + optional: true - /@types/nlcst/1.0.0: - resolution: {integrity: sha512-3TGCfOcy8R8mMQ4CNSNOe3PG66HttvjcLzCoOpvXvDtfWOTi+uT/rxeOKm/qEwbM4SNe1O/PjdiBK2YcTjU4OQ==} - dependencies: - '@types/unist': 2.0.6 - dev: true - - /@types/node/17.0.21: - resolution: {integrity: sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==} - dev: true - - /@types/parse5/6.0.3: - resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==} - dev: true - - /@types/pug/2.0.6: - resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==} - dev: true - - /@types/resolve/1.20.1: - resolution: {integrity: sha512-Ku5+GPFa12S3W26Uwtw+xyrtIpaZsGYHH6zxNbZlstmlvMYSZRzOwzwsXbxlVUbHyUucctSyuFtu6bNxwYomIw==} - dev: true - - /@types/sass/1.43.1: - resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} - dependencies: - '@types/node': 17.0.21 - dev: true - - /@types/unist/2.0.6: - resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} - dev: true - - /@types/yargs-parser/20.2.1: - resolution: {integrity: sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==} - dev: true - - /@typescript/vfs/1.3.5: - resolution: {integrity: sha512-pI8Saqjupf9MfLw7w2+og+fmb0fZS0J6vsKXXrp4/PDXEFvntgzXmChCXC/KefZZS0YGS6AT8e0hGAJcTsdJlg==} - dependencies: - debug: 4.3.3 - transitivePeerDependencies: - - supports-color - dev: false - - /@vitejs/plugin-vue/2.2.2_vite@2.8.4+vue@3.2.31: - resolution: {integrity: sha512-3C0s45VOwIFEDU+2ownJOpb0zD5fnjXWaHVOLID2R1mYOlAx3doNBFnNbVjaZvpke/L7IdPJXjpyYpXZToDKig==} - engines: {node: '>=12.0.0'} - peerDependencies: - vite: ^2.5.10 - vue: ^3.2.25 - dependencies: - vite: 2.8.4_sass@1.49.9 - vue: 3.2.31 - dev: true - - /@volar/shared/0.32.0: - resolution: {integrity: sha512-RzpoyRAJlEjqAi0rsrqHn5aRJ+xi58JrXa+NCNuJOuGLhUKbPyR9n8JUI+mF4h01opYl3C/s8qYmWQQBOpBUUg==} - dependencies: - upath: 2.0.1 - vscode-html-languageservice: 4.2.2 - vscode-jsonrpc: 8.0.0-next.6 - vscode-uri: 3.0.3 - dev: false - - /@vue/compiler-core/3.2.31: - resolution: {integrity: sha512-aKno00qoA4o+V/kR6i/pE+aP+esng5siNAVQ422TkBNM6qA4veXiZbSe8OTXHXquEi/f6Akc+nLfB4JGfe4/WQ==} - dependencies: - '@babel/parser': 7.17.3 - '@vue/shared': 3.2.31 - estree-walker: 2.0.2 - source-map: 0.6.1 - dev: true - - /@vue/compiler-dom/3.2.31: - resolution: {integrity: sha512-60zIlFfzIDf3u91cqfqy9KhCKIJgPeqxgveH2L+87RcGU/alT6BRrk5JtUso0OibH3O7NXuNOQ0cDc9beT0wrg==} - dependencies: - '@vue/compiler-core': 3.2.31 - '@vue/shared': 3.2.31 - dev: true - - /@vue/compiler-sfc/3.2.31: - resolution: {integrity: sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ==} - dependencies: - '@babel/parser': 7.17.3 - '@vue/compiler-core': 3.2.31 - '@vue/compiler-dom': 3.2.31 - '@vue/compiler-ssr': 3.2.31 - '@vue/reactivity-transform': 3.2.31 - '@vue/shared': 3.2.31 - estree-walker: 2.0.2 - magic-string: 0.25.7 - postcss: 8.4.7 - source-map: 0.6.1 - dev: true - - /@vue/compiler-ssr/3.2.31: - resolution: {integrity: sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw==} - dependencies: - '@vue/compiler-dom': 3.2.31 - '@vue/shared': 3.2.31 - dev: true - - /@vue/reactivity-transform/3.2.31: - resolution: {integrity: sha512-uS4l4z/W7wXdI+Va5pgVxBJ345wyGFKvpPYtdSgvfJfX/x2Ymm6ophQlXXB6acqGHtXuBqNyyO3zVp9b1r0MOA==} - dependencies: - '@babel/parser': 7.17.3 - '@vue/compiler-core': 3.2.31 - '@vue/shared': 3.2.31 - estree-walker: 2.0.2 - magic-string: 0.25.7 - dev: true - - /@vue/reactivity/3.2.31: - resolution: {integrity: sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw==} - dependencies: - '@vue/shared': 3.2.31 - dev: true - - /@vue/runtime-core/3.2.31: - resolution: {integrity: sha512-Kcog5XmSY7VHFEMuk4+Gap8gUssYMZ2+w+cmGI6OpZWYOEIcbE0TPzzPHi+8XTzAgx1w/ZxDFcXhZeXN5eKWsA==} - dependencies: - '@vue/reactivity': 3.2.31 - '@vue/shared': 3.2.31 - dev: true - - /@vue/runtime-dom/3.2.31: - resolution: {integrity: sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g==} - dependencies: - '@vue/runtime-core': 3.2.31 - '@vue/shared': 3.2.31 - csstype: 2.6.19 - dev: true - - /@vue/server-renderer/3.2.31_vue@3.2.31: - resolution: {integrity: sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg==} - peerDependencies: - vue: 3.2.31 - dependencies: - '@vue/compiler-ssr': 3.2.31 - '@vue/shared': 3.2.31 - vue: 3.2.31 - dev: true - - /@vue/shared/3.2.31: - resolution: {integrity: sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==} - dev: true - - /@web/parse5-utils/1.3.0: - resolution: {integrity: sha512-Pgkx3ECc8EgXSlS5EyrgzSOoUbM6P8OKS471HLAyvOBcP1NCBn0to4RN/OaKASGq8qa3j+lPX9H14uA5AHEnQg==} - engines: {node: '>=10.0.0'} - dependencies: - '@types/parse5': 6.0.3 - parse5: 6.0.1 - dev: true - - /ansi-regex/6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - dev: true - - /ansi-styles/3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: true - - /anymatch/3.1.2: - resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - - /argparse/1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - - /array-iterate/1.1.4: - resolution: {integrity: sha512-sNRaPGh9nnmdC8Zf+pT3UqP8rnWj5Hf9wiFGsX3wUQ2yVSIhO2ShFwCoceIPpB41QF6i2OEmrHmCo36xronCVA==} - dev: true - - /assert/2.0.0: - resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} - dependencies: - es6-object-assign: 1.1.0 - is-nan: 1.3.2 - object-is: 1.1.5 - util: 0.12.4 - dev: true - - /astro/0.23.2_sass@1.49.9+typescript@4.5.5: - resolution: {integrity: sha512-NoVZxRXDW/PLSsEQLdsiBub+AeVq8EAzc2Lg+XdHegvoeQnGsYrvrzLIxbztRHZIeOuY+lbgf8MlwgVnOrQY4g==} - engines: {node: ^14.15.0 || >=16.0.0, npm: '>=6.14.0'} - hasBin: true - dependencies: - '@astrojs/compiler': 0.11.4 - '@astrojs/language-server': 0.8.8 - '@astrojs/markdown-remark': 0.6.2 - '@astrojs/prism': 0.4.0 - '@astrojs/renderer-preact': 0.5.0_@babel+core@7.17.5 - '@astrojs/renderer-react': 0.5.0_@babel+core@7.17.5 - '@astrojs/renderer-svelte': 0.4.0_083b6655da0eff7d18040e168afb0094 - '@astrojs/renderer-vue': 0.4.0_vite@2.8.4 - '@astropub/webapi': 0.10.14 - '@babel/core': 7.17.5 - '@babel/traverse': 7.17.3 - '@proload/core': 0.2.2 - '@proload/plugin-tsm': 0.1.1_@proload+core@0.2.2 - '@types/babel__core': 7.1.18 - '@types/debug': 4.1.7 - '@types/yargs-parser': 20.2.1 - '@web/parse5-utils': 1.3.0 - ci-info: 3.3.0 - common-ancestor-path: 1.0.1 - eol: 0.9.1 - es-module-lexer: 0.9.3 - esbuild: 0.13.7 - estree-walker: 3.0.1 - fast-glob: 3.2.11 - fast-xml-parser: 4.0.3 - html-entities: 2.3.2 - htmlparser2: 7.2.0 - kleur: 4.1.4 - magic-string: 0.25.7 - micromorph: 0.0.2 - mime: 3.0.0 - parse5: 6.0.1 - path-to-regexp: 6.2.0 - postcss: 8.4.7 - prismjs: 1.27.0 - rehype-slug: 5.0.1 - resolve: 1.22.0 - rollup: 2.68.0 - semver: 7.3.5 - send: 0.17.2 - serialize-javascript: 6.0.0 - shiki: 0.10.1 - shorthash: 0.0.2 - slash: 4.0.0 - sourcemap-codec: 1.4.8 - srcset-parse: 1.1.0 - string-width: 5.1.0 - strip-ansi: 7.0.1 - supports-esm: 1.0.0 - tsconfig-resolver: 3.0.1 - vite: 2.8.4_sass@1.49.9 - yargs-parser: 21.0.0 - zod: 3.12.0 - transitivePeerDependencies: - - coffeescript - - diff-match-patch - - less - - node-sass - - pug - - sass - - stylus - - sugarss - - supports-color - - ts-node - - typescript - dev: true - - /available-typed-arrays/1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} - engines: {node: '>= 0.4'} - dev: true - - /babel-plugin-jsx-dom-expressions/0.32.0: - resolution: {integrity: sha512-Tv5mKTCEB3LFEPpFSEFhdRShF5LU6+OuoGPXWZZPakmo5h2bru10e0SvGQTAHFpr+MvFWtXFDx1StC+qR6XR+Q==} - dependencies: - '@babel/helper-module-imports': 7.16.0 - '@babel/plugin-syntax-jsx': 7.16.7 - '@babel/types': 7.17.0 - html-entities: 2.3.2 - transitivePeerDependencies: - - '@babel/core' - dev: true - - /babel-preset-solid/1.3.6: - resolution: {integrity: sha512-UTSrdMpDnJjeFZBHQ7FU8c43LiT6RmIa5oM2IzMhhVmRjKw6PXbw3oG0NGMOYzMLxZ6CQ+Q/xu0hEZOIP1Ivaw==} - dependencies: - babel-plugin-jsx-dom-expressions: 0.32.0 - transitivePeerDependencies: - - '@babel/core' - dev: true - - /bail/2.0.2: - resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} - dev: true - - /balanced-match/1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /binary-extensions/2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - dev: true - - /brace-expansion/1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /braces/3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: true - - /browserslist/4.19.3: - resolution: {integrity: sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001312 - electron-to-chromium: 1.4.73 - escalade: 3.1.1 - node-releases: 2.0.2 - picocolors: 1.0.0 - dev: true - - /buffer-crc32/0.2.13: - resolution: {integrity: sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=} - dev: true - - /call-bind/1.0.2: - resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} - dependencies: - function-bind: 1.1.1 - get-intrinsic: 1.1.1 - dev: true - - /caniuse-lite/1.0.30001312: - resolution: {integrity: sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==} - dev: true - - /ccount/2.0.1: - resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - dev: true - - /chalk/2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: true - - /character-entities-html4/2.1.0: - resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} - dev: true - - /character-entities-legacy/3.0.0: - resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} - dev: true - - /character-entities/2.0.1: - resolution: {integrity: sha512-OzmutCf2Kmc+6DrFrrPS8/tDh2+DpnrfzdICHWhcVC9eOd0N1PXmQEE1a8iM4IziIAG+8tmTq3K+oo0ubH6RRQ==} - dev: true - - /character-reference-invalid/2.0.1: - resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} - dev: true - - /chokidar/3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.2 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /ci-info/3.3.0: - resolution: {integrity: sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==} - dev: true - - /code-block-writer/10.1.1: - resolution: {integrity: sha512-67ueh2IRGst/51p0n6FvPrnRjAGHY5F8xdjkgrYE7DDzpJe6qA07RYQ9VcoUeo5ATOjSOiWpSL3SWBRRbempMw==} - dev: true - - /color-convert/1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - dev: true - - /color-name/1.1.3: - resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} - dev: true - - /comma-separated-tokens/2.0.2: - resolution: {integrity: sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg==} - dev: true - - /common-ancestor-path/1.0.1: - resolution: {integrity: sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==} - dev: true - - /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - dev: true - - /convert-source-map/1.8.0: - resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} - dependencies: - safe-buffer: 5.1.2 - dev: true - - /crelt/1.0.5: - resolution: {integrity: sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==} - dev: false - - /csstype/2.6.19: - resolution: {integrity: sha512-ZVxXaNy28/k3kJg0Fou5MiYpp88j7H9hLZp8PDC3jV0WFjfH5E9xHb56L0W59cPbKbcHXeP4qyT8PrHp8t6LcQ==} - dev: true - - /debounce-async/0.0.2: - resolution: {integrity: sha512-iSDXfVl3aVGmukEnBQshFAzooCsKdZb1KmdbivsY4zeFEzT9IfEQdys1/wHIZovXZskF6MQpstnMOxQojLVjsw==} - dev: false - - /debug/2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - dependencies: - ms: 2.0.0 - dev: true - - /debug/4.3.3: - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - - /decode-named-character-reference/1.0.1: - resolution: {integrity: sha512-YV/0HQHreRwKb7uBopyIkLG17jG6Sv2qUchk9qSoVJ2f+flwRsPNBO0hAnjt6mTNYUT+vw9Gy2ihXg4sUWPi2w==} - dependencies: - character-entities: 2.0.1 - dev: true - - /deepmerge/4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} - engines: {node: '>=0.10.0'} - dev: true - - /define-properties/1.1.3: - resolution: {integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==} - engines: {node: '>= 0.4'} - dependencies: - object-keys: 1.1.1 - dev: true - - /depd/1.1.2: - resolution: {integrity: sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=} - engines: {node: '>= 0.6'} - dev: true - - /dequal/2.0.2: - resolution: {integrity: sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug==} - engines: {node: '>=6'} - dev: true - - /destroy/1.0.4: - resolution: {integrity: sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=} - dev: true - - /detect-indent/6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - dev: true - - /diff/5.0.0: - resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} - engines: {node: '>=0.3.1'} - dev: true - - /dom-serializer/1.3.2: - resolution: {integrity: sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==} - dependencies: - domelementtype: 2.2.0 - domhandler: 4.3.0 - entities: 2.2.0 - dev: true - - /domelementtype/2.2.0: - resolution: {integrity: sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==} - dev: true - - /domhandler/4.3.0: - resolution: {integrity: sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==} - engines: {node: '>= 4'} - dependencies: - domelementtype: 2.2.0 - dev: true - - /domutils/2.8.0: - resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} - dependencies: - dom-serializer: 1.3.2 - domelementtype: 2.2.0 - domhandler: 4.3.0 - dev: true - - /eastasianwidth/0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - dev: true - - /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} - dev: true - - /electron-to-chromium/1.4.73: - resolution: {integrity: sha512-RlCffXkE/LliqfA5m29+dVDPB2r72y2D2egMMfIy3Le8ODrxjuZNVo4NIC2yPL01N4xb4nZQLwzi6Z5tGIGLnA==} - dev: true - - /emmet/2.3.6: - resolution: {integrity: sha512-pLS4PBPDdxuUAmw7Me7+TcHbykTsBKN/S9XJbUOMFQrNv9MoshzyMFK/R57JBm94/6HSL4vHnDeEmxlC82NQ4A==} - dependencies: - '@emmetio/abbreviation': 2.2.3 - '@emmetio/css-abbreviation': 2.1.4 - dev: true - - /emoji-regex/9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - dev: true - - /encodeurl/1.0.2: - resolution: {integrity: sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=} - engines: {node: '>= 0.8'} - dev: true - - /entities/2.2.0: - resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} - dev: true - - /entities/3.0.1: - resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==} - engines: {node: '>=0.12'} - dev: true - - /eol/0.9.1: - resolution: {integrity: sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg==} - dev: true - - /es-abstract/1.19.1: - resolution: {integrity: sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - get-intrinsic: 1.1.1 - get-symbol-description: 1.0.0 - has: 1.0.3 - has-symbols: 1.0.2 - internal-slot: 1.0.3 - is-callable: 1.2.4 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.1 - is-string: 1.0.7 - is-weakref: 1.0.2 - object-inspect: 1.12.0 - object-keys: 1.1.1 - object.assign: 4.1.2 - string.prototype.trimend: 1.0.4 - string.prototype.trimstart: 1.0.4 - unbox-primitive: 1.0.1 - dev: true - - /es-module-lexer/0.9.3: - resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} - dev: true - - /es-to-primitive/1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} - dependencies: - is-callable: 1.2.4 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - dev: true - - /es6-object-assign/1.1.0: - resolution: {integrity: sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=} - dev: true - - /es6-promise/3.3.1: - resolution: {integrity: sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=} - dev: true - - /esbuild-android-arm64/0.13.7: - resolution: {integrity: sha512-yqCTKzmm3jiUXgi0yeKhvwZCZTqClUXwwMRAntcM9u/xvXhmpw0V0Z4qDEpnkmF2NCMzmJRH+DAAQ5whuf3CYA==} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-android-arm64/0.14.23: - resolution: {integrity: sha512-k9sXem++mINrZty1v4FVt6nC5BQCFG4K2geCIUUqHNlTdFnuvcqsY7prcKZLFhqVC1rbcJAr9VSUGFL/vD4vsw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-64/0.13.7: - resolution: {integrity: sha512-MvsgMUWzq5FxoeJLSavw3rgQbaC55A8QTI1U2/8MWamtAeDKyzWQnglcsF0/TkjGLaKEqS0ZLo8akJ8q34BCtw==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-64/0.14.23: - resolution: {integrity: sha512-lB0XRbtOYYL1tLcYw8BoBaYsFYiR48RPrA0KfA/7RFTr4MV7Bwy/J4+7nLsVnv9FGuQummM3uJ93J3ptaTqFug==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-arm64/0.13.7: - resolution: {integrity: sha512-tuP+dpIzXj17UC17VkHFDAH5nB7MajJK7sF8Fz4iVo8cml8YXj3MeNtjjLmx9YFvPs4XW3hFw1eqZJ06h2ssIA==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-arm64/0.14.23: - resolution: {integrity: sha512-yat73Z/uJ5tRcfRiI4CCTv0FSnwErm3BJQeZAh+1tIP0TUNh6o+mXg338Zl5EKChD+YGp6PN+Dbhs7qa34RxSw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-64/0.13.7: - resolution: {integrity: sha512-p07TrpkCJJyAXXCXFm2IpAvyASUTcuT0OF43riEsgjuRJmtaNBOUENecr2B2k/zd9wkGz6UyxxtnFntaBttkDg==} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-64/0.14.23: - resolution: {integrity: sha512-/1xiTjoLuQ+LlbfjJdKkX45qK/M7ARrbLmyf7x3JhyQGMjcxRYVR6Dw81uH3qlMHwT4cfLW4aEVBhP1aNV7VsA==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-arm64/0.13.7: - resolution: {integrity: sha512-MCtfBRkE1GwAnjVoWPYoZ+S/+zanzWxAJVER1/8jmWobCXJG0w+YM2IXQ2fN4T9U96RusFWQDMJVoACnqhIAzg==} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-arm64/0.14.23: - resolution: {integrity: sha512-uyPqBU/Zcp6yEAZS4LKj5jEE0q2s4HmlMBIPzbW6cTunZ8cyvjG6YWpIZXb1KK3KTJDe62ltCrk3VzmWHp+iLg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-32/0.13.7: - resolution: {integrity: sha512-HM4d16XbqToo93LPrgzkiLgX3Xgr9Mw67tEM8vjhHDx18JnaZqPdIsl5ZfCqRGHlLUq+GdFKl6+dH7WlsiWMCA==} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-32/0.14.23: - resolution: {integrity: sha512-37R/WMkQyUfNhbH7aJrr1uCjDVdnPeTHGeDhZPUNhfoHV0lQuZNCKuNnDvlH/u/nwIYZNdVvz1Igv5rY/zfrzQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-64/0.13.7: - resolution: {integrity: sha512-krgiIEyqcS0kfTjptGEQzdYwiEmmqpmiZHlKqZILVuU5BaIVWCBMmVx20HH9waJw1yT0Ao4fZTZ9kg8s/pKAYA==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-64/0.14.23: - resolution: {integrity: sha512-H0gztDP60qqr8zoFhAO64waoN5yBXkmYCElFklpd6LPoobtNGNnDe99xOQm28+fuD75YJ7GKHzp/MLCLhw2+vQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm/0.13.7: - resolution: {integrity: sha512-GOAt1brGG14mmQx2sRD3wHi3rih94OzhmDRVyo7JvlSmWOfEczPf7zL7YfmgjuktvvuLTERtTJzaih7nyCwPOg==} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm/0.14.23: - resolution: {integrity: sha512-x64CEUxi8+EzOAIpCUeuni0bZfzPw/65r8tC5cy5zOq9dY7ysOi5EVQHnzaxS+1NmV+/RVRpmrzGw1QgY2Xpmw==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm64/0.13.7: - resolution: {integrity: sha512-aM2BUTdbtzEUOuLqDusGCuWQRqc0JazgbA/6+Q9xhUgNLHGUMAsu4C5G0qPnJCTlWGZX+bcQYma6wFVEp9ibBg==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm64/0.14.23: - resolution: {integrity: sha512-c4MLOIByNHR55n3KoYf9hYDfBRghMjOiHLaoYLhkQkIabb452RWi+HsNgB41sUpSlOAqfpqKPFNg7VrxL3UX9g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-mips64le/0.13.7: - resolution: {integrity: sha512-+UJq6cxpc2ldaQFdpEDrBhqhluXsqCNlWiHccIjq25r+3YbFg0c/RJEypoVU7tjhGXUGWyWWQ7SLkzHYpf+Nsg==} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-mips64le/0.14.23: - resolution: {integrity: sha512-kHKyKRIAedYhKug2EJpyJxOUj3VYuamOVA1pY7EimoFPzaF3NeY7e4cFBAISC/Av0/tiV0xlFCt9q0HJ68IBIw==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-ppc64le/0.13.7: - resolution: {integrity: sha512-6zwpliO4ZZtodDYM1JJEmSMpkd07I8bnNOKoHe7TOs9VhylXJooHh5ObSbSvk3FxCBs+jL5bxb24p10/Cg4RGw==} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-ppc64le/0.14.23: - resolution: {integrity: sha512-7ilAiJEPuJJnJp/LiDO0oJm5ygbBPzhchJJh9HsHZzeqO+3PUzItXi+8PuicY08r0AaaOe25LA7sGJ0MzbfBag==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-riscv64/0.14.23: - resolution: {integrity: sha512-fbL3ggK2wY0D8I5raPIMPhpCvODFE+Bhb5QGtNP3r5aUsRR6TQV+ZBXIaw84iyvKC8vlXiA4fWLGhghAd/h/Zg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-s390x/0.14.23: - resolution: {integrity: sha512-GHMDCyfy7+FaNSO8RJ8KCFsnax8fLUsOrj9q5Gi2JmZMY0Zhp75keb5abTFCq2/Oy6KVcT0Dcbyo/bFb4rIFJA==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-netbsd-64/0.13.7: - resolution: {integrity: sha512-CfTHeTfJWlwjgfpApXYvECytLD6BzTWovLE0+28KT7bjU5fM4ieDYzRvjWjFAOB2X6DWpaoQnJAlhJirQBW0EQ==} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-netbsd-64/0.14.23: - resolution: {integrity: sha512-ovk2EX+3rrO1M2lowJfgMb/JPN1VwVYrx0QPUyudxkxLYrWeBxDKQvc6ffO+kB4QlDyTfdtAURrVzu3JeNdA2g==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-openbsd-64/0.13.7: - resolution: {integrity: sha512-qfW+f0MQfl72zVwgbV00I1kAP2zty+N031cNnQINcBmzHOSbEbaBQbUM0kawq+wdfgS/Xmppgf7nD1H8GWAvow==} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-openbsd-64/0.14.23: - resolution: {integrity: sha512-uYYNqbVR+i7k8ojP/oIROAHO9lATLN7H2QeXKt2H310Fc8FJj4y3Wce6hx0VgnJ4k1JDrgbbiXM8rbEgQyg8KA==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-sunos-64/0.13.7: - resolution: {integrity: sha512-fVRM9mV0wAYLt92IqzudxACMLJZRQFx1oJsNeU4fPFmUxIkYE4C7G7z9vqI2eu9bpDo1fA+3+5djo/T/28Mckg==} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /esbuild-sunos-64/0.14.23: - resolution: {integrity: sha512-hAzeBeET0+SbScknPzS2LBY6FVDpgE+CsHSpe6CEoR51PApdn2IB0SyJX7vGelXzlyrnorM4CAsRyb9Qev4h9g==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-32/0.13.7: - resolution: {integrity: sha512-v3csjeQtlHHWS1q/tE9rTRCSSU/fGvJVh1l7gkS93ysAaIMeC0j9Q0h2PxFpQ6yxuwftuDYfQdnkVGcqjkKM8A==} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-32/0.14.23: - resolution: {integrity: sha512-Kttmi3JnohdaREbk6o9e25kieJR379TsEWF0l39PQVHXq3FR6sFKtVPgY8wk055o6IB+rllrzLnbqOw/UV60EA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-64/0.13.7: - resolution: {integrity: sha512-vk+yv/vYpHZP0vxSaxaA4EMaicuxy4E435EXkbsgk5UgpcQgSP0CVlIeaqtgfSM3IwGnpbagOirRVqqZqxyMDQ==} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-64/0.14.23: - resolution: {integrity: sha512-JtIT0t8ymkpl6YlmOl6zoSWL5cnCgyLaBdf/SiU/Eg3C13r0NbHZWNT/RDEMKK91Y6t79kTs3vyRcNZbfu5a8g==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-arm64/0.13.7: - resolution: {integrity: sha512-0Fp+IeG5qWLCK+U6d8L9/SnXkI6f3JMtauSQ8HHzw3Fl0pZ+VImUAUWZ3g2fhthNqp+t8dB3n238CJD6XBn15w==} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-arm64/0.14.23: - resolution: {integrity: sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild/0.13.7: - resolution: {integrity: sha512-Ok3w+Pc9SNdNVEEJUUx9OvNZHwFyoKS0N+ceytfUB3wh/HxhRkOEc9dO8KR9AjfpFI82/Wg258GRDs1/8SFgKQ==} - hasBin: true - requiresBuild: true - optionalDependencies: - esbuild-android-arm64: 0.13.7 - esbuild-darwin-64: 0.13.7 - esbuild-darwin-arm64: 0.13.7 - esbuild-freebsd-64: 0.13.7 - esbuild-freebsd-arm64: 0.13.7 - esbuild-linux-32: 0.13.7 - esbuild-linux-64: 0.13.7 - esbuild-linux-arm: 0.13.7 - esbuild-linux-arm64: 0.13.7 - esbuild-linux-mips64le: 0.13.7 - esbuild-linux-ppc64le: 0.13.7 - esbuild-netbsd-64: 0.13.7 - esbuild-openbsd-64: 0.13.7 - esbuild-sunos-64: 0.13.7 - esbuild-windows-32: 0.13.7 - esbuild-windows-64: 0.13.7 - esbuild-windows-arm64: 0.13.7 - dev: true - - /esbuild/0.14.23: - resolution: {integrity: sha512-XjnIcZ9KB6lfonCa+jRguXyRYcldmkyZ99ieDksqW/C8bnyEX299yA4QH2XcgijCgaddEZePPTgvx/2imsq7Ig==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - esbuild-android-arm64: 0.14.23 - esbuild-darwin-64: 0.14.23 - esbuild-darwin-arm64: 0.14.23 - esbuild-freebsd-64: 0.14.23 - esbuild-freebsd-arm64: 0.14.23 - esbuild-linux-32: 0.14.23 - esbuild-linux-64: 0.14.23 - esbuild-linux-arm: 0.14.23 - esbuild-linux-arm64: 0.14.23 - esbuild-linux-mips64le: 0.14.23 - esbuild-linux-ppc64le: 0.14.23 - esbuild-linux-riscv64: 0.14.23 - esbuild-linux-s390x: 0.14.23 - esbuild-netbsd-64: 0.14.23 - esbuild-openbsd-64: 0.14.23 - esbuild-sunos-64: 0.14.23 - esbuild-windows-32: 0.14.23 - esbuild-windows-64: 0.14.23 - esbuild-windows-arm64: 0.14.23 - dev: true - - /escalade/3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true - - /escape-html/1.0.3: - resolution: {integrity: sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=} - dev: true - - /escape-string-regexp/1.0.5: - resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} - engines: {node: '>=0.8.0'} - dev: true - - /escape-string-regexp/5.0.0: - resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} - engines: {node: '>=12'} - dev: true - - /esprima/4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: true - - /estree-util-is-identifier-name/2.0.0: - resolution: {integrity: sha512-aXXZFVMnBBDRP81vS4YtAYJ0hUkgEsXea7lNKWCOeaAquGb1Jm2rcONPB5fpzwgbNxulTvrWuKnp9UElUGAKeQ==} - dev: true - - /estree-util-visit/1.1.0: - resolution: {integrity: sha512-3lXJ4Us9j8TUif9cWcQy81t9p5OLasnDuuhrFiqb+XstmKC1d1LmrQWYsY49/9URcfHE64mPypDBaNK9NwWDPQ==} - dependencies: - '@types/estree-jsx': 0.0.1 - '@types/unist': 2.0.6 - dev: true - - /estree-walker/2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true - - /estree-walker/3.0.1: - resolution: {integrity: sha512-woY0RUD87WzMBUiZLx8NsYr23N5BKsOMZHhu2hoNRVh6NXGfoiT1KOL8G3UHlJAnEDGmfa5ubNA/AacfG+Kb0g==} - dev: true - - /etag/1.8.1: - resolution: {integrity: sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=} - engines: {node: '>= 0.6'} - dev: true - - /events/3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - dev: false - - /extend-shallow/2.0.1: - resolution: {integrity: sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=} - engines: {node: '>=0.10.0'} - dependencies: - is-extendable: 0.1.1 - dev: true - - /extend/3.0.2: - resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - dev: true - - /fast-glob/3.2.11: - resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} - engines: {node: '>=8.6.0'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.4 - dev: true - - /fast-xml-parser/4.0.3: - resolution: {integrity: sha512-xhQbg3a/EYNHwK0cxIG1nZmVkHX/0tWihamn5pU4Mhd9KEVE2ga8ZJiqEUgB2sApElvAATOdMTLjgqIpvYDUkQ==} - hasBin: true - dependencies: - strnum: 1.0.5 - dev: true - - /fastq/1.13.0: - resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} - dependencies: - reusify: 1.0.4 - dev: true - - /fill-range/7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - - /foreach/2.0.5: - resolution: {integrity: sha1-C+4AUBiusmDQo6865ljdATbsG5k=} - dev: true - - /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} - engines: {node: '>= 0.6'} - dev: true - - /fs.realpath/1.0.0: - resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} - dev: true - - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true - - /gensync/1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - dev: true - - /get-intrinsic/1.1.1: - resolution: {integrity: sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.2 - dev: true - - /get-symbol-description/1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.1.1 - dev: true - - /github-slugger/1.4.0: - resolution: {integrity: sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==} - dev: true - - /glob-parent/5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob/7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /globals/11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - dev: true - - /graceful-fs/4.2.9: - resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==} - dev: true - - /gray-matter/4.0.3: - resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} - engines: {node: '>=6.0'} - dependencies: - js-yaml: 3.14.1 - kind-of: 6.0.3 - section-matter: 1.0.0 - strip-bom-string: 1.0.0 - dev: true - - /has-bigints/1.0.1: - resolution: {integrity: sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==} - dev: true - - /has-flag/3.0.0: - resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=} - engines: {node: '>=4'} - dev: true - - /has-package-exports/1.2.3: - resolution: {integrity: sha512-lkLLwrNNaRsmwj+TylZJh1o3YlzLfgrl9fZKOAMj4MHjbvt7wy1J0icE6jD36dzkA0aQGoNuqY0hVN2uuPfPBA==} - dependencies: - '@ljharb/has-package-exports-patterns': 0.0.1 - dev: true - - /has-symbols/1.0.2: - resolution: {integrity: sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==} - engines: {node: '>= 0.4'} - dev: true - - /has-tostringtag/1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.2 - dev: true - - /has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: true - - /hast-to-hyperscript/10.0.1: - resolution: {integrity: sha512-dhIVGoKCQVewFi+vz3Vt567E4ejMppS1haBRL6TEmeLeJVB1i/FJIIg/e6s1Bwn0g5qtYojHEKvyGA+OZuyifw==} - dependencies: - '@types/unist': 2.0.6 - comma-separated-tokens: 2.0.2 - property-information: 6.1.1 - space-separated-tokens: 2.0.1 - style-to-object: 0.3.0 - unist-util-is: 5.1.1 - web-namespaces: 2.0.1 - dev: true - - /hast-util-from-parse5/7.1.0: - resolution: {integrity: sha512-m8yhANIAccpU4K6+121KpPP55sSl9/samzQSQGpb0mTExcNh2WlvjtMwSWFhg6uqD4Rr6Nfa8N6TMypQM51rzQ==} - dependencies: - '@types/hast': 2.3.4 - '@types/parse5': 6.0.3 - '@types/unist': 2.0.6 - hastscript: 7.0.2 - property-information: 6.1.1 - vfile: 5.3.0 - vfile-location: 4.0.1 - web-namespaces: 2.0.1 - dev: true - - /hast-util-has-property/2.0.0: - resolution: {integrity: sha512-4Qf++8o5v14us4Muv3HRj+Er6wTNGA/N9uCaZMty4JWvyFKLdhULrv4KE1b65AthsSO9TXSZnjuxS8ecIyhb0w==} - dev: true - - /hast-util-heading-rank/2.1.0: - resolution: {integrity: sha512-w+Rw20Q/iWp2Bcnr6uTrYU6/ftZLbHKhvc8nM26VIWpDqDMlku2iXUVTeOlsdoih/UKQhY7PHQ+vZ0Aqq8bxtQ==} - dependencies: - '@types/hast': 2.3.4 - dev: true - - /hast-util-is-element/2.1.2: - resolution: {integrity: sha512-thjnlGAnwP8ef/GSO1Q8BfVk2gundnc2peGQqEg2kUt/IqesiGg/5mSwN2fE7nLzy61pg88NG6xV+UrGOrx9EA==} - dependencies: - '@types/hast': 2.3.4 - '@types/unist': 2.0.6 - dev: true - - /hast-util-parse-selector/3.1.0: - resolution: {integrity: sha512-AyjlI2pTAZEOeu7GeBPZhROx0RHBnydkQIXlhnFzDi0qfXTmGUWoCYZtomHbrdrheV4VFUlPcfJ6LMF5T6sQzg==} - dependencies: - '@types/hast': 2.3.4 - dev: true - - /hast-util-raw/7.2.1: - resolution: {integrity: sha512-wgtppqXVdXzkDXDFclLLdAyVUJSKMYYi6LWIAbA8oFqEdwksYIcPGM3RkKV1Dfn5GElvxhaOCs0jmCOMayxd3A==} - dependencies: - '@types/hast': 2.3.4 - '@types/parse5': 6.0.3 - hast-util-from-parse5: 7.1.0 - hast-util-to-parse5: 7.0.0 - html-void-elements: 2.0.1 - parse5: 6.0.1 - unist-util-position: 4.0.1 - unist-util-visit: 4.1.0 - vfile: 5.3.0 - web-namespaces: 2.0.1 - zwitch: 2.0.2 - dev: true - - /hast-util-to-html/8.0.3: - resolution: {integrity: sha512-/D/E5ymdPYhHpPkuTHOUkSatxr4w1ZKrZsG0Zv/3C2SRVT0JFJG53VS45AMrBtYk0wp5A7ksEhiC8QaOZM95+A==} - dependencies: - '@types/hast': 2.3.4 - ccount: 2.0.1 - comma-separated-tokens: 2.0.2 - hast-util-is-element: 2.1.2 - hast-util-whitespace: 2.0.0 - html-void-elements: 2.0.1 - property-information: 6.1.1 - space-separated-tokens: 2.0.1 - stringify-entities: 4.0.2 - unist-util-is: 5.1.1 - dev: true - - /hast-util-to-parse5/7.0.0: - resolution: {integrity: sha512-YHiS6aTaZ3N0Q3nxaY/Tj98D6kM8QX5Q8xqgg8G45zR7PvWnPGPP0vcKCgb/moIydEJ/QWczVrX0JODCVeoV7A==} - dependencies: - '@types/hast': 2.3.4 - '@types/parse5': 6.0.3 - hast-to-hyperscript: 10.0.1 - property-information: 6.1.1 - web-namespaces: 2.0.1 - zwitch: 2.0.2 - dev: true - - /hast-util-to-string/2.0.0: - resolution: {integrity: sha512-02AQ3vLhuH3FisaMM+i/9sm4OXGSq1UhOOCpTLLQtHdL3tZt7qil69r8M8iDkZYyC0HCFylcYoP+8IO7ddta1A==} - dependencies: - '@types/hast': 2.3.4 - dev: true - - /hast-util-whitespace/2.0.0: - resolution: {integrity: sha512-Pkw+xBHuV6xFeJprJe2BBEoDV+AvQySaz3pPDRUs5PNZEMQjpXJJueqrpcHIXxnWTcAGi/UOCgVShlkY6kLoqg==} - dev: true - - /hastscript/7.0.2: - resolution: {integrity: sha512-uA8ooUY4ipaBvKcMuPehTAB/YfFLSSzCwFSwT6ltJbocFUKH/GDHLN+tflq7lSRf9H86uOuxOFkh1KgIy3Gg2g==} - dependencies: - '@types/hast': 2.3.4 - comma-separated-tokens: 2.0.2 - hast-util-parse-selector: 3.1.0 - property-information: 6.1.1 - space-separated-tokens: 2.0.1 - dev: true - - /html-entities/2.3.2: - resolution: {integrity: sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==} - dev: true - - /html-void-elements/2.0.1: - resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==} - dev: true - - /htmlparser2/7.2.0: - resolution: {integrity: sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==} - dependencies: - domelementtype: 2.2.0 - domhandler: 4.3.0 - domutils: 2.8.0 - entities: 3.0.1 - dev: true - - /http-errors/1.8.1: - resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} - engines: {node: '>= 0.6'} - dependencies: - depd: 1.1.2 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 1.5.0 - toidentifier: 1.0.1 - dev: true - - /immutable/4.0.0: - resolution: {integrity: sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==} - dev: true - - /inflight/1.0.6: - resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits/2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /inline-style-parser/0.1.1: - resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==} - dev: true - - /internal-slot/1.0.3: - resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.1.1 - has: 1.0.3 - side-channel: 1.0.4 - dev: true - - /is-alphabetical/2.0.1: - resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} - dev: true - - /is-alphanumerical/2.0.1: - resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} - dependencies: - is-alphabetical: 2.0.1 - is-decimal: 2.0.1 - dev: true - - /is-arguments/1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-bigint/1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - dependencies: - has-bigints: 1.0.1 - dev: true - - /is-binary-path/2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.2.0 - dev: true - - /is-boolean-object/1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-buffer/2.0.5: - resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} - engines: {node: '>=4'} - dev: true - - /is-callable/1.2.4: - resolution: {integrity: sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==} - engines: {node: '>= 0.4'} - dev: true - - /is-core-module/2.8.1: - resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==} - dependencies: - has: 1.0.3 - dev: true - - /is-date-object/1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-decimal/2.0.1: - resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} - dev: true - - /is-extendable/0.1.1: - resolution: {integrity: sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=} - engines: {node: '>=0.10.0'} - dev: true - - /is-extglob/2.1.1: - resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} - engines: {node: '>=0.10.0'} - dev: true - - /is-generator-function/1.0.10: - resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-glob/4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: true - - /is-hexadecimal/2.0.1: - resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} - dev: true - - /is-nan/1.3.2: - resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - dev: true - - /is-negative-zero/2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} - dev: true - - /is-number-object/1.0.6: - resolution: {integrity: sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true - - /is-plain-obj/4.0.0: - resolution: {integrity: sha512-NXRbBtUdBioI73y/HmOhogw/U5msYPC9DAtGkJXeFcFWSFZw0mCUsPxk/snTuJHzNKA8kLBK4rH97RMB1BfCXw==} - engines: {node: '>=12'} - dev: true - - /is-regex/1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-shared-array-buffer/1.0.1: - resolution: {integrity: sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==} - dev: true - - /is-string/1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-symbol/1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.2 - dev: true - - /is-typed-array/1.1.8: - resolution: {integrity: sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-abstract: 1.19.1 - foreach: 2.0.5 - has-tostringtag: 1.0.0 - dev: true - - /is-weakref/1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - dependencies: - call-bind: 1.0.2 - dev: true - - /isomorphic-fetch/3.0.0: - resolution: {integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==} - dependencies: - node-fetch: 2.6.7 - whatwg-fetch: 3.6.2 - transitivePeerDependencies: - - encoding - dev: false - - /isomorphic-ws/4.0.1_ws@7.5.7: - resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} - peerDependencies: - ws: '*' - dependencies: - ws: 7.5.7 - dev: false - - /js-tokens/4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true - - /js-yaml/3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - dev: true - - /jsesc/2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} - hasBin: true - dev: true - - /json5/2.2.0: - resolution: {integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==} - engines: {node: '>=6'} - hasBin: true - dependencies: - minimist: 1.2.5 - dev: true - - /jsonc-parser/2.3.1: - resolution: {integrity: sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==} - dev: true - - /jsonc-parser/3.0.0: - resolution: {integrity: sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==} - dev: true - - /kind-of/6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - dev: true - - /kleur/4.1.4: - resolution: {integrity: sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==} - engines: {node: '>=6'} - dev: true - - /lilconfig/2.0.4: - resolution: {integrity: sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==} - engines: {node: '>=10'} - dev: true - - /lodash.debounce/4.0.8: - resolution: {integrity: sha1-gteb/zCmfEAF/9XiUVMArZyk168=} - dev: false - - /lodash/4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true - - /longest-streak/3.0.1: - resolution: {integrity: sha512-cHlYSUpL2s7Fb3394mYxwTYj8niTaNHUCLr0qdiCXQfSjfuA7CKofpX2uSwEfFDQ0EB7JcnMnm+GjbqqoinYYg==} - dev: true - - /loose-envify/1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - dependencies: - js-tokens: 4.0.0 - dev: true - - /lru-cache/6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 - - /lz-string/1.4.4: - resolution: {integrity: sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=} - hasBin: true - dev: true - - /magic-string/0.25.7: - resolution: {integrity: sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==} - dependencies: - sourcemap-codec: 1.4.8 - dev: true - - /markdown-table/3.0.2: - resolution: {integrity: sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA==} - dev: true - - /marked/4.0.12: - resolution: {integrity: sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==} - engines: {node: '>= 12'} - hasBin: true - dev: false - - /mdast-util-definitions/5.1.0: - resolution: {integrity: sha512-5hcR7FL2EuZ4q6lLMUK5w4lHT2H3vqL9quPvYZ/Ku5iifrirfMHiGdhxdXMUbUkDmz5I+TYMd7nbaxUhbQkfpQ==} - dependencies: - '@types/mdast': 3.0.10 - '@types/unist': 2.0.6 - unist-util-visit: 3.1.0 - dev: true - - /mdast-util-find-and-replace/2.1.0: - resolution: {integrity: sha512-1w1jbqAd13oU78QPBf5223+xB+37ecNtQ1JElq2feWols5oEYAl+SgNDnOZipe7NfLemoEt362yUS15/wip4mw==} - dependencies: - escape-string-regexp: 5.0.0 - unist-util-is: 5.1.1 - unist-util-visit-parents: 4.1.1 - dev: true - - /mdast-util-from-markdown/1.2.0: - resolution: {integrity: sha512-iZJyyvKD1+K7QX1b5jXdE7Sc5dtoTry1vzV28UZZe8Z1xVnB/czKntJ7ZAkG0tANqRnBF6p3p7GpU1y19DTf2Q==} - dependencies: - '@types/mdast': 3.0.10 - '@types/unist': 2.0.6 - decode-named-character-reference: 1.0.1 - mdast-util-to-string: 3.1.0 - micromark: 3.0.10 - micromark-util-decode-numeric-character-reference: 1.0.0 - micromark-util-decode-string: 1.0.2 - micromark-util-normalize-identifier: 1.0.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - unist-util-stringify-position: 3.0.0 - uvu: 0.5.3 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-gfm-autolink-literal/1.0.2: - resolution: {integrity: sha512-FzopkOd4xTTBeGXhXSBU0OCDDh5lUj2rd+HQqG92Ld+jL4lpUfgX2AT2OHAVP9aEeDKp7G92fuooSZcYJA3cRg==} - dependencies: - '@types/mdast': 3.0.10 - ccount: 2.0.1 - mdast-util-find-and-replace: 2.1.0 - micromark-util-character: 1.1.0 - dev: true - - /mdast-util-gfm-footnote/1.0.1: - resolution: {integrity: sha512-p+PrYlkw9DeCRkTVw1duWqPRHX6Ywh2BNKJQcZbCwAuP/59B0Lk9kakuAd7KbQprVO4GzdW8eS5++A9PUSqIyw==} - dependencies: - '@types/mdast': 3.0.10 - mdast-util-to-markdown: 1.3.0 - micromark-util-normalize-identifier: 1.0.0 - dev: true - - /mdast-util-gfm-strikethrough/1.0.1: - resolution: {integrity: sha512-zKJbEPe+JP6EUv0mZ0tQUyLQOC+FADt0bARldONot/nefuISkaZFlmVK4tU6JgfyZGrky02m/I6PmehgAgZgqg==} - dependencies: - '@types/mdast': 3.0.10 - mdast-util-to-markdown: 1.3.0 - dev: true - - /mdast-util-gfm-table/1.0.3: - resolution: {integrity: sha512-B/tgpJjND1qIZM2WZst+NYnb0notPE6m0J+YOe3NOHXyEmvK38ytxaOsgz4BvrRPQQcNbRrTzSHMPnBkj1fCjg==} - dependencies: - markdown-table: 3.0.2 - mdast-util-to-markdown: 1.3.0 - dev: true - - /mdast-util-gfm-task-list-item/1.0.1: - resolution: {integrity: sha512-KZ4KLmPdABXOsfnM6JHUIjxEvcx2ulk656Z/4Balw071/5qgnhz+H1uGtf2zIGnrnvDC8xR4Fj9uKbjAFGNIeA==} - dependencies: - '@types/mdast': 3.0.10 - mdast-util-to-markdown: 1.3.0 - dev: true - - /mdast-util-gfm/2.0.0: - resolution: {integrity: sha512-wMwejlTN3EQADPFuvxe8lmGsay3+f6gSJKdAHR6KBJzpcxvsjJSILB9K6u6G7eQLC7iOTyVIHYGui9uBc9r1Tg==} - dependencies: - mdast-util-gfm-autolink-literal: 1.0.2 - mdast-util-gfm-footnote: 1.0.1 - mdast-util-gfm-strikethrough: 1.0.1 - mdast-util-gfm-table: 1.0.3 - mdast-util-gfm-task-list-item: 1.0.1 - dev: true - - /mdast-util-mdx-expression/1.2.0: - resolution: {integrity: sha512-wb36oi09XxqO9RVqgfD+xo8a7xaNgS+01+k3v0GKW0X0bYbeBmUZz22Z/IJ8SuphVlG+DNgNo9VoEaUJ3PKfJQ==} - dependencies: - '@types/estree-jsx': 0.0.1 - '@types/hast': 2.3.4 - '@types/mdast': 3.0.10 - mdast-util-from-markdown: 1.2.0 - mdast-util-to-markdown: 1.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-mdx-jsx/1.2.0: - resolution: {integrity: sha512-5+ot/kfxYd3ChgEMwsMUO71oAfYjyRI3pADEK4I7xTmWLGQ8Y7ghm1CG36zUoUvDPxMlIYwQV/9DYHAUWdG4dA==} - dependencies: - '@types/estree-jsx': 0.0.1 - '@types/mdast': 3.0.10 - mdast-util-to-markdown: 1.3.0 - parse-entities: 4.0.0 - stringify-entities: 4.0.2 - unist-util-remove-position: 4.0.1 - unist-util-stringify-position: 3.0.0 - vfile-message: 3.1.0 - dev: true - - /mdast-util-to-hast/12.1.1: - resolution: {integrity: sha512-qE09zD6ylVP14jV4mjLIhDBOrpFdShHZcEsYvvKGABlr9mGbV7mTlRWdoFxL/EYSTNDiC9GZXy7y8Shgb9Dtzw==} - dependencies: - '@types/hast': 2.3.4 - '@types/mdast': 3.0.10 - '@types/mdurl': 1.0.2 - mdast-util-definitions: 5.1.0 - mdurl: 1.0.1 - micromark-util-sanitize-uri: 1.0.0 - unist-builder: 3.0.0 - unist-util-generated: 2.0.0 - unist-util-position: 4.0.1 - unist-util-visit: 4.1.0 - dev: true - - /mdast-util-to-markdown/1.3.0: - resolution: {integrity: sha512-6tUSs4r+KK4JGTTiQ7FfHmVOaDrLQJPmpjD6wPMlHGUVXoG9Vjc3jIeP+uyBWRf8clwB2blM+W7+KrlMYQnftA==} - dependencies: - '@types/mdast': 3.0.10 - '@types/unist': 2.0.6 - longest-streak: 3.0.1 - mdast-util-to-string: 3.1.0 - micromark-util-decode-string: 1.0.2 - unist-util-visit: 4.1.0 - zwitch: 2.0.2 - dev: true - - /mdast-util-to-string/3.1.0: - resolution: {integrity: sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA==} - dev: true - - /mdurl/1.0.1: - resolution: {integrity: sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=} - dev: true - - /merge2/1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - dev: true - - /micromark-core-commonmark/1.0.6: - resolution: {integrity: sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==} - dependencies: - decode-named-character-reference: 1.0.1 - micromark-factory-destination: 1.0.0 - micromark-factory-label: 1.0.2 - micromark-factory-space: 1.0.0 - micromark-factory-title: 1.0.2 - micromark-factory-whitespace: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-chunked: 1.0.0 - micromark-util-classify-character: 1.0.0 - micromark-util-html-tag-name: 1.0.0 - micromark-util-normalize-identifier: 1.0.0 - micromark-util-resolve-all: 1.0.0 - micromark-util-subtokenize: 1.0.2 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-extension-gfm-autolink-literal/1.0.3: - resolution: {integrity: sha512-i3dmvU0htawfWED8aHMMAzAVp/F0Z+0bPh3YrbTPPL1v4YAlCZpy5rBO5p0LPYiZo0zFVkoYh7vDU7yQSiCMjg==} - dependencies: - micromark-util-character: 1.1.0 - micromark-util-sanitize-uri: 1.0.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-extension-gfm-footnote/1.0.3: - resolution: {integrity: sha512-bn62pC5y39rIo2g1RqZk1NhF7T7cJLuJlbevunQz41U0iPVCdVOFASe5/L1kke+DFKSgfCRhv24+o42cZ1+ADw==} - dependencies: - micromark-core-commonmark: 1.0.6 - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-normalize-identifier: 1.0.0 - micromark-util-sanitize-uri: 1.0.0 - micromark-util-symbol: 1.0.1 - uvu: 0.5.3 - dev: true - - /micromark-extension-gfm-strikethrough/1.0.4: - resolution: {integrity: sha512-/vjHU/lalmjZCT5xt7CcHVJGq8sYRm80z24qAKXzaHzem/xsDYb2yLL+NNVbYvmpLx3O7SYPuGL5pzusL9CLIQ==} - dependencies: - micromark-util-chunked: 1.0.0 - micromark-util-classify-character: 1.0.0 - micromark-util-resolve-all: 1.0.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-extension-gfm-table/1.0.5: - resolution: {integrity: sha512-xAZ8J1X9W9K3JTJTUL7G6wSKhp2ZYHrFk5qJgY/4B33scJzE2kpfRL6oiw/veJTbt7jiM/1rngLlOKPWr1G+vg==} - dependencies: - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-extension-gfm-tagfilter/1.0.1: - resolution: {integrity: sha512-Ty6psLAcAjboRa/UKUbbUcwjVAv5plxmpUTy2XC/3nJFL37eHej8jrHrRzkqcpipJliuBH30DTs7+3wqNcQUVA==} - dependencies: - micromark-util-types: 1.0.2 - dev: true - - /micromark-extension-gfm-task-list-item/1.0.3: - resolution: {integrity: sha512-PpysK2S1Q/5VXi72IIapbi/jliaiOFzv7THH4amwXeYXLq3l1uo8/2Be0Ac1rEwK20MQEsGH2ltAZLNY2KI/0Q==} - dependencies: - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-extension-gfm/2.0.1: - resolution: {integrity: sha512-p2sGjajLa0iYiGQdT0oelahRYtMWvLjy8J9LOCxzIQsllMCGLbsLW+Nc+N4vi02jcRJvedVJ68cjelKIO6bpDA==} - dependencies: - micromark-extension-gfm-autolink-literal: 1.0.3 - micromark-extension-gfm-footnote: 1.0.3 - micromark-extension-gfm-strikethrough: 1.0.4 - micromark-extension-gfm-table: 1.0.5 - micromark-extension-gfm-tagfilter: 1.0.1 - micromark-extension-gfm-task-list-item: 1.0.3 - micromark-util-combine-extensions: 1.0.0 - micromark-util-types: 1.0.2 - dev: true - - /micromark-extension-mdx-expression/1.0.3: - resolution: {integrity: sha512-TjYtjEMszWze51NJCZmhv7MEBcgYRgb3tJeMAJ+HQCAaZHHRBaDCccqQzGizR/H4ODefP44wRTgOn2vE5I6nZA==} - dependencies: - micromark-factory-mdx-expression: 1.0.6 - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-events-to-acorn: 1.0.4 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-extension-mdx-jsx/1.0.3: - resolution: {integrity: sha512-VfA369RdqUISF0qGgv2FfV7gGjHDfn9+Qfiv5hEwpyr1xscRj/CiVRkU7rywGFCO7JwJ5L0e7CJz60lY52+qOA==} - dependencies: - '@types/acorn': 4.0.6 - estree-util-is-identifier-name: 2.0.0 - micromark-factory-mdx-expression: 1.0.6 - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - vfile-message: 3.1.0 - dev: true - - /micromark-factory-destination/1.0.0: - resolution: {integrity: sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==} - dependencies: - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - dev: true - - /micromark-factory-label/1.0.2: - resolution: {integrity: sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==} - dependencies: - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-factory-mdx-expression/1.0.6: - resolution: {integrity: sha512-WRQIc78FV7KrCfjsEf/sETopbYjElh3xAmNpLkd1ODPqxEngP42eVRGbiPEQWpRV27LzqW+XVTvQAMIIRLPnNA==} - dependencies: - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-events-to-acorn: 1.0.4 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - unist-util-position-from-estree: 1.1.1 - uvu: 0.5.3 - vfile-message: 3.1.0 - dev: true - - /micromark-factory-space/1.0.0: - resolution: {integrity: sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==} - dependencies: - micromark-util-character: 1.1.0 - micromark-util-types: 1.0.2 - dev: true - - /micromark-factory-title/1.0.2: - resolution: {integrity: sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==} - dependencies: - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-factory-whitespace/1.0.0: - resolution: {integrity: sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==} - dependencies: - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - dev: true - - /micromark-util-character/1.1.0: - resolution: {integrity: sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==} - dependencies: - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - dev: true - - /micromark-util-chunked/1.0.0: - resolution: {integrity: sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==} - dependencies: - micromark-util-symbol: 1.0.1 - dev: true - - /micromark-util-classify-character/1.0.0: - resolution: {integrity: sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==} - dependencies: - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - dev: true - - /micromark-util-combine-extensions/1.0.0: - resolution: {integrity: sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==} - dependencies: - micromark-util-chunked: 1.0.0 - micromark-util-types: 1.0.2 - dev: true - - /micromark-util-decode-numeric-character-reference/1.0.0: - resolution: {integrity: sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==} - dependencies: - micromark-util-symbol: 1.0.1 - dev: true - - /micromark-util-decode-string/1.0.2: - resolution: {integrity: sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==} - dependencies: - decode-named-character-reference: 1.0.1 - micromark-util-character: 1.1.0 - micromark-util-decode-numeric-character-reference: 1.0.0 - micromark-util-symbol: 1.0.1 - dev: true - - /micromark-util-encode/1.0.1: - resolution: {integrity: sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==} - dev: true - - /micromark-util-events-to-acorn/1.0.4: - resolution: {integrity: sha512-dpo8ecREK5s/KMph7jJ46RLM6g7N21CMc9LAJQbDLdbQnTpijigkSJPTIfLXZ+h5wdXlcsQ+b6ufAE9v76AdgA==} - dependencies: - '@types/acorn': 4.0.6 - '@types/estree': 0.0.50 - estree-util-visit: 1.1.0 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - vfile-message: 3.1.0 - dev: true - - /micromark-util-html-tag-name/1.0.0: - resolution: {integrity: sha512-NenEKIshW2ZI/ERv9HtFNsrn3llSPZtY337LID/24WeLqMzeZhBEE6BQ0vS2ZBjshm5n40chKtJ3qjAbVV8S0g==} - dev: true - - /micromark-util-normalize-identifier/1.0.0: - resolution: {integrity: sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==} - dependencies: - micromark-util-symbol: 1.0.1 - dev: true - - /micromark-util-resolve-all/1.0.0: - resolution: {integrity: sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==} - dependencies: - micromark-util-types: 1.0.2 - dev: true - - /micromark-util-sanitize-uri/1.0.0: - resolution: {integrity: sha512-cCxvBKlmac4rxCGx6ejlIviRaMKZc0fWm5HdCHEeDWRSkn44l6NdYVRyU+0nT1XC72EQJMZV8IPHF+jTr56lAg==} - dependencies: - micromark-util-character: 1.1.0 - micromark-util-encode: 1.0.1 - micromark-util-symbol: 1.0.1 - dev: true - - /micromark-util-subtokenize/1.0.2: - resolution: {integrity: sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==} - dependencies: - micromark-util-chunked: 1.0.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - dev: true - - /micromark-util-symbol/1.0.1: - resolution: {integrity: sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==} - dev: true - - /micromark-util-types/1.0.2: - resolution: {integrity: sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==} - dev: true - - /micromark/3.0.10: - resolution: {integrity: sha512-ryTDy6UUunOXy2HPjelppgJ2sNfcPz1pLlMdA6Rz9jPzhLikWXv/irpWV/I2jd68Uhmny7hHxAlAhk4+vWggpg==} - dependencies: - '@types/debug': 4.1.7 - debug: 4.3.3 - decode-named-character-reference: 1.0.1 - micromark-core-commonmark: 1.0.6 - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-chunked: 1.0.0 - micromark-util-combine-extensions: 1.0.0 - micromark-util-decode-numeric-character-reference: 1.0.0 - micromark-util-encode: 1.0.1 - micromark-util-normalize-identifier: 1.0.0 - micromark-util-resolve-all: 1.0.0 - micromark-util-sanitize-uri: 1.0.0 - micromark-util-subtokenize: 1.0.2 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.3 - transitivePeerDependencies: - - supports-color - dev: true - - /micromatch/4.0.4: - resolution: {integrity: sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==} - engines: {node: '>=8.6'} - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - dev: true - - /micromorph/0.0.2: - resolution: {integrity: sha512-hfy/OA8rtwI/vPRm4L6a3/u6uDvqsPmTok7pPmtfv2a7YfaTVfxd9HX2Kdn/SZ8rGMKkKVJ9A0WcBnzs0bjLXw==} - dev: true - - /mime/1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} - hasBin: true - dev: true - - /mime/3.0.0: - resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} - engines: {node: '>=10.0.0'} - hasBin: true - dev: true - - /min-indent/1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - dev: true - - /minimatch/3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimist/1.2.5: - resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} - dev: true - - /mkdirp/0.5.5: - resolution: {integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==} - hasBin: true - dependencies: - minimist: 1.2.5 - dev: true - - /mkdirp/1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - dev: true - - /mri/1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - dev: true - - /ms/2.0.0: - resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=} - dev: true - - /ms/2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - - /ms/2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - - /nanoid/3.3.1: - resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - /nlcst-to-string/2.0.4: - resolution: {integrity: sha512-3x3jwTd6UPG7vi5k4GEzvxJ5rDA7hVUIRNHPblKuMVP9Z3xmlsd9cgLcpAMkc5uPOBna82EeshROFhsPkbnTZg==} - dev: true - - /nlcst-to-string/3.1.0: - resolution: {integrity: sha512-Y8HQWKw/zrHTCnu2zcFBN1dV6vN0NUG7s5fkEj380G8tF3R+vA2KG+tDl2QoHVQCTHGHVXwoni2RQkDSFQb1PA==} - dependencies: - '@types/nlcst': 1.0.0 - dev: true - - /node-fetch/2.6.7: - resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 - dev: false - - /node-releases/2.0.2: - resolution: {integrity: sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==} - dev: true - - /normalize-path/3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - - /object-assign/4.1.1: - resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} - engines: {node: '>=0.10.0'} - dev: true - - /object-inspect/1.12.0: - resolution: {integrity: sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==} - dev: true - - /object-is/1.1.5: - resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - dev: true - - /object-keys/1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: true - - /object.assign/4.1.2: - resolution: {integrity: sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - has-symbols: 1.0.2 - object-keys: 1.1.1 - dev: true - - /on-finished/2.3.0: - resolution: {integrity: sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=} - engines: {node: '>= 0.8'} - dependencies: - ee-first: 1.1.1 - dev: true - - /once/1.4.0: - resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} - dependencies: - wrappy: 1.0.2 - dev: true - - /parse-entities/4.0.0: - resolution: {integrity: sha512-5nk9Fn03x3rEhGaX1FU6IDwG/k+GxLXlFAkgrbM1asuAFl3BhdQWvASaIsmwWypRNcZKHPYnIuOSfIWEyEQnPQ==} - dependencies: - '@types/unist': 2.0.6 - character-entities: 2.0.1 - character-entities-legacy: 3.0.0 - character-reference-invalid: 2.0.1 - decode-named-character-reference: 1.0.1 - is-alphanumerical: 2.0.1 - is-decimal: 2.0.1 - is-hexadecimal: 2.0.1 - dev: true - - /parse-latin/5.0.0: - resolution: {integrity: sha512-Ht+4/+AUySMS5HKGAiQpBmkFsHSoGrj6Y83flLCa5OIBdtsVkO3UD4OtboJ0O0vZiOznH02x8qlwg9KLUVXuNg==} - dependencies: - nlcst-to-string: 2.0.4 - unist-util-modify-children: 2.0.0 - unist-util-visit-children: 1.1.4 - dev: true - - /parse5/6.0.1: - resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} - dev: true - - /path-browserify/1.0.1: - resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - dev: true - - /path-is-absolute/1.0.1: - resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} - engines: {node: '>=0.10.0'} - dev: true - - /path-parse/1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true - - /path-to-regexp/6.2.0: - resolution: {integrity: sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==} - dev: true - - /picocolors/1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true - - /picomatch/2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true - - /postcss-load-config/3.1.3: - resolution: {integrity: sha512-5EYgaM9auHGtO//ljHH+v/aC/TQ5LHXtL7bQajNAUBKUVKiYE8rYpFms7+V26D9FncaGe2zwCoPQsFKb5zF/Hw==} - engines: {node: '>= 10'} - peerDependencies: - ts-node: '>=9.0.0' - peerDependenciesMeta: - ts-node: - optional: true - dependencies: - lilconfig: 2.0.4 - yaml: 1.10.2 - dev: true - - /postcss/8.4.7: - resolution: {integrity: sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.1 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - - /preact-render-to-string/5.1.20_preact@10.6.6: - resolution: {integrity: sha512-ivh2oOGzth0o7XqbatWUQ81WQGoJwSqDKP5z917SoqTWYCAr7dlBzMv3SAMTAu3Gr5g47BJwrvyO44H2Y10ubg==} - peerDependencies: - preact: '>=10' - dependencies: - preact: 10.6.6 - pretty-format: 3.8.0 - dev: true - - /preact/10.6.6: - resolution: {integrity: sha512-dgxpTFV2vs4vizwKohYKkk7g7rmp1wOOcfd4Tz3IB3Wi+ivZzsn/SpeKJhRENSE+n8sUfsAl4S3HiCVT923ABw==} - dev: true - - /pretty-format/3.8.0: - resolution: {integrity: sha1-v77VbV6ad2ZF9LH/eqGjrE+jw4U=} - dev: true - - /prismjs/1.27.0: - resolution: {integrity: sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==} - engines: {node: '>=6'} - dev: true - - /property-information/6.1.1: - resolution: {integrity: sha512-hrzC564QIl0r0vy4l6MvRLhafmUowhO/O3KgVSoXIbbA2Sz4j8HGpJc6T2cubRVwMwpdiG/vKGfhT4IixmKN9w==} - dev: true - - /queue-microtask/1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - dev: true - - /randombytes/2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: true - - /range-parser/1.2.1: - resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} - engines: {node: '>= 0.6'} - dev: true - - /react-dom/17.0.2_react@17.0.2: - resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} - peerDependencies: - react: 17.0.2 - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react: 17.0.2 - scheduler: 0.20.2 - dev: true - - /react/17.0.2: - resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - dev: true - - /readdirp/3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - dev: true - - /rehype-raw/6.1.1: - resolution: {integrity: sha512-d6AKtisSRtDRX4aSPsJGTfnzrX2ZkHQLE5kiUuGOeEoLpbEulFF4hj0mLPbsa+7vmguDKOVVEQdHKDSwoaIDsQ==} - dependencies: - '@types/hast': 2.3.4 - hast-util-raw: 7.2.1 - unified: 10.1.1 - dev: true - - /rehype-slug/5.0.1: - resolution: {integrity: sha512-X5v3wV/meuOX9NFcGhJvUpEjIvQl2gDvjg3z40RVprYFt7q3th4qMmYLULiu3gXvbNX1ppx+oaa6JyY1W67pTA==} - dependencies: - '@types/hast': 2.3.4 - github-slugger: 1.4.0 - hast-util-has-property: 2.0.0 - hast-util-heading-rank: 2.1.0 - hast-util-to-string: 2.0.0 - unified: 10.1.1 - unist-util-visit: 4.1.0 - dev: true - - /rehype-stringify/9.0.3: - resolution: {integrity: sha512-kWiZ1bgyWlgOxpqD5HnxShKAdXtb2IUljn3hQAhySeak6IOQPPt6DeGnsIh4ixm7yKJWzm8TXFuC/lPfcWHJqw==} - dependencies: - '@types/hast': 2.3.4 - hast-util-to-html: 8.0.3 - unified: 10.1.1 - dev: true - - /remark-gfm/3.0.1: - resolution: {integrity: sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==} - dependencies: - '@types/mdast': 3.0.10 - mdast-util-gfm: 2.0.0 - micromark-extension-gfm: 2.0.1 - unified: 10.1.1 - dev: true - - /remark-parse/10.0.1: - resolution: {integrity: sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==} - dependencies: - '@types/mdast': 3.0.10 - mdast-util-from-markdown: 1.2.0 - unified: 10.1.1 - transitivePeerDependencies: - - supports-color - dev: true - - /remark-rehype/10.1.0: - resolution: {integrity: sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==} - dependencies: - '@types/hast': 2.3.4 - '@types/mdast': 3.0.10 - mdast-util-to-hast: 12.1.1 - unified: 10.1.1 - dev: true - - /remark-smartypants/2.0.0: - resolution: {integrity: sha512-Rc0VDmr/yhnMQIz8n2ACYXlfw/P/XZev884QU1I5u+5DgJls32o97Vc1RbK3pfumLsJomS2yy8eT4Fxj/2MDVA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - retext: 8.1.0 - retext-smartypants: 5.1.0 - unist-util-visit: 4.1.0 - dev: true - - /resolve/1.22.0: - resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} - hasBin: true - dependencies: - is-core-module: 2.8.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /retext-latin/3.1.0: - resolution: {integrity: sha512-5MrD1tuebzO8ppsja5eEu+ZbBeUNCjoEarn70tkXOS7Bdsdf6tNahsv2bY0Z8VooFF6cw7/6S+d3yI/TMlMVVQ==} - dependencies: - '@types/nlcst': 1.0.0 - parse-latin: 5.0.0 - unherit: 3.0.0 - unified: 10.1.1 - dev: true - - /retext-smartypants/5.1.0: - resolution: {integrity: sha512-P+VS0YlE96T2MRAlFHaTUhPrq1Rls+1GCvIytBvbo7wcgmRxC9xHle0/whTYpRqWirV9WaUm5mXmh1dKnskGWQ==} - dependencies: - '@types/nlcst': 1.0.0 - nlcst-to-string: 3.1.0 - unified: 10.1.1 - unist-util-visit: 4.1.0 - dev: true - - /retext-stringify/3.1.0: - resolution: {integrity: sha512-767TLOaoXFXyOnjx/EggXlb37ZD2u4P1n0GJqVdpipqACsQP+20W+BNpMYrlJkq7hxffnFk+jc6mAK9qrbuB8w==} - dependencies: - '@types/nlcst': 1.0.0 - nlcst-to-string: 3.1.0 - unified: 10.1.1 - dev: true - - /retext/8.1.0: - resolution: {integrity: sha512-N9/Kq7YTn6ZpzfiGW45WfEGJqFf1IM1q8OsRa1CGzIebCJBNCANDRmOrholiDRGKo/We7ofKR4SEvcGAWEMD3Q==} - dependencies: - '@types/nlcst': 1.0.0 - retext-latin: 3.1.0 - retext-stringify: 3.1.0 - unified: 10.1.1 - dev: true - - /reusify/1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true - - /rimraf/2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true - dependencies: - glob: 7.2.0 - dev: true - - /rollup/2.68.0: - resolution: {integrity: sha512-XrMKOYK7oQcTio4wyTz466mucnd8LzkiZLozZ4Rz0zQD+HeX4nUK4B8GrTX/2EvN2/vBF/i2WnaXboPxo0JylA==} - engines: {node: '>=10.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /run-parallel/1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - dependencies: - queue-microtask: 1.2.3 - dev: true - - /sade/1.8.1: - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} - engines: {node: '>=6'} - dependencies: - mri: 1.2.0 - dev: true - - /safe-buffer/5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: true - - /safe-buffer/5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true - - /sander/0.5.1: - resolution: {integrity: sha1-dB4kXiMfB8r7b98PEzrfohalAq0=} - dependencies: - es6-promise: 3.3.1 - graceful-fs: 4.2.9 - mkdirp: 0.5.5 - rimraf: 2.7.1 - dev: true - - /sass/1.49.9: - resolution: {integrity: sha512-YlYWkkHP9fbwaFRZQRXgDi3mXZShslVmmo+FVK3kHLUELHHEYrCmL1x6IUjC7wLS6VuJSAFXRQS/DxdsC4xL1A==} - engines: {node: '>=12.0.0'} - hasBin: true - dependencies: - chokidar: 3.5.3 - immutable: 4.0.0 - source-map-js: 1.0.2 - dev: true - - /scheduler/0.20.2: - resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - dev: true - - /section-matter/1.0.0: - resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} - engines: {node: '>=4'} - dependencies: - extend-shallow: 2.0.1 - kind-of: 6.0.3 - dev: true - - /semver/6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: true - - /semver/7.3.5: - resolution: {integrity: sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - - /send/0.17.2: - resolution: {integrity: sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==} - engines: {node: '>= 0.8.0'} - dependencies: - debug: 2.6.9 - depd: 1.1.2 - destroy: 1.0.4 - encodeurl: 1.0.2 - escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 - http-errors: 1.8.1 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.3.0 - range-parser: 1.2.1 - statuses: 1.5.0 - dev: true - - /serialize-javascript/6.0.0: - resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} - dependencies: - randombytes: 2.1.0 - dev: true - - /setprototypeof/1.2.0: - resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - dev: true - - /shiki/0.10.1: - resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} - dependencies: - jsonc-parser: 3.0.0 - vscode-oniguruma: 1.6.2 - vscode-textmate: 5.2.0 - dev: true - - /shorthash/0.0.2: - resolution: {integrity: sha1-WbJo7sveWQOLMNogK8+93rLEpOs=} - dev: true - - /side-channel/1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.1.1 - object-inspect: 1.12.0 + /esbuild-linux-64/0.14.23: + resolution: {integrity: sha512-H0gztDP60qqr8zoFhAO64waoN5yBXkmYCElFklpd6LPoobtNGNnDe99xOQm28+fuD75YJ7GKHzp/MLCLhw2+vQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true dev: true + optional: true - /slash/4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + /esbuild-linux-arm/0.14.23: + resolution: {integrity: sha512-x64CEUxi8+EzOAIpCUeuni0bZfzPw/65r8tC5cy5zOq9dY7ysOi5EVQHnzaxS+1NmV+/RVRpmrzGw1QgY2Xpmw==} engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true dev: true + optional: true - /solid-js/1.3.9: - resolution: {integrity: sha512-BZyDen2oj3XA8g8xe0hhVIzGP2d+TV2dn3w90lXjNYLxveAXeN4aA5pxdO4vn7FKd0e0p4nqWtbWtG7NyaPs2A==} - dev: true - - /sorcery/0.10.0: - resolution: {integrity: sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=} - hasBin: true - dependencies: - buffer-crc32: 0.2.13 - minimist: 1.2.5 - sander: 0.5.1 - sourcemap-codec: 1.4.8 - dev: true - - /source-map-js/1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - dev: true - - /source-map/0.5.7: - resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=} - engines: {node: '>=0.10.0'} - dev: true - - /source-map/0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - - /source-map/0.7.3: - resolution: {integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==} - engines: {node: '>= 8'} - dev: true - - /sourcemap-codec/1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + /esbuild-linux-arm64/0.14.23: + resolution: {integrity: sha512-c4MLOIByNHR55n3KoYf9hYDfBRghMjOiHLaoYLhkQkIabb452RWi+HsNgB41sUpSlOAqfpqKPFNg7VrxL3UX9g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true dev: true + optional: true - /space-separated-tokens/2.0.1: - resolution: {integrity: sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw==} + /esbuild-linux-mips64le/0.14.23: + resolution: {integrity: sha512-kHKyKRIAedYhKug2EJpyJxOUj3VYuamOVA1pY7EimoFPzaF3NeY7e4cFBAISC/Av0/tiV0xlFCt9q0HJ68IBIw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true dev: true + optional: true - /sprintf-js/1.0.3: - resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=} + /esbuild-linux-ppc64le/0.14.23: + resolution: {integrity: sha512-7ilAiJEPuJJnJp/LiDO0oJm5ygbBPzhchJJh9HsHZzeqO+3PUzItXi+8PuicY08r0AaaOe25LA7sGJ0MzbfBag==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true dev: true + optional: true - /srcset-parse/1.1.0: - resolution: {integrity: sha512-JWp4cG2eybkvKA1QUHGoNK6JDEYcOnSuhzNGjZuYUPqXreDl/VkkvP2sZW7Rmh+icuCttrR9ccb2WPIazyM/Cw==} + /esbuild-linux-riscv64/0.14.23: + resolution: {integrity: sha512-fbL3ggK2wY0D8I5raPIMPhpCvODFE+Bhb5QGtNP3r5aUsRR6TQV+ZBXIaw84iyvKC8vlXiA4fWLGhghAd/h/Zg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true dev: true + optional: true - /statuses/1.5.0: - resolution: {integrity: sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=} - engines: {node: '>= 0.6'} + /esbuild-linux-s390x/0.14.23: + resolution: {integrity: sha512-GHMDCyfy7+FaNSO8RJ8KCFsnax8fLUsOrj9q5Gi2JmZMY0Zhp75keb5abTFCq2/Oy6KVcT0Dcbyo/bFb4rIFJA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true dev: true + optional: true - /strict-event-emitter-types/2.0.0: - resolution: {integrity: sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==} - dev: false - - /string-width/5.1.0: - resolution: {integrity: sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==} + /esbuild-netbsd-64/0.14.23: + resolution: {integrity: sha512-ovk2EX+3rrO1M2lowJfgMb/JPN1VwVYrx0QPUyudxkxLYrWeBxDKQvc6ffO+kB4QlDyTfdtAURrVzu3JeNdA2g==} engines: {node: '>=12'} - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.0.1 + cpu: [x64] + os: [netbsd] + requiresBuild: true dev: true + optional: true - /string.prototype.trimend/1.0.4: - resolution: {integrity: sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 + /esbuild-openbsd-64/0.14.23: + resolution: {integrity: sha512-uYYNqbVR+i7k8ojP/oIROAHO9lATLN7H2QeXKt2H310Fc8FJj4y3Wce6hx0VgnJ4k1JDrgbbiXM8rbEgQyg8KA==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true dev: true + optional: true - /string.prototype.trimstart/1.0.4: - resolution: {integrity: sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 + /esbuild-sunos-64/0.14.23: + resolution: {integrity: sha512-hAzeBeET0+SbScknPzS2LBY6FVDpgE+CsHSpe6CEoR51PApdn2IB0SyJX7vGelXzlyrnorM4CAsRyb9Qev4h9g==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true dev: true + optional: true - /stringify-entities/4.0.2: - resolution: {integrity: sha512-MTxTVcEkorNtBbNpoFJPEh0kKdM6+QbMjLbaxmvaPMmayOXdr/AIVIIJX7FReUVweRBFJfZepK4A4AKgwuFpMQ==} - dependencies: - character-entities-html4: 2.1.0 - character-entities-legacy: 3.0.0 + /esbuild-windows-32/0.14.23: + resolution: {integrity: sha512-Kttmi3JnohdaREbk6o9e25kieJR379TsEWF0l39PQVHXq3FR6sFKtVPgY8wk055o6IB+rllrzLnbqOw/UV60EA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true dev: true + optional: true - /strip-ansi/7.0.1: - resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==} + /esbuild-windows-64/0.14.23: + resolution: {integrity: sha512-JtIT0t8ymkpl6YlmOl6zoSWL5cnCgyLaBdf/SiU/Eg3C13r0NbHZWNT/RDEMKK91Y6t79kTs3vyRcNZbfu5a8g==} engines: {node: '>=12'} - dependencies: - ansi-regex: 6.0.1 + cpu: [x64] + os: [win32] + requiresBuild: true dev: true + optional: true - /strip-bom-string/1.0.0: - resolution: {integrity: sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=} - engines: {node: '>=0.10.0'} + /esbuild-windows-arm64/0.14.23: + resolution: {integrity: sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true dev: true + optional: true - /strip-bom/4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} - engines: {node: '>=8'} + /esbuild/0.14.23: + resolution: {integrity: sha512-XjnIcZ9KB6lfonCa+jRguXyRYcldmkyZ99ieDksqW/C8bnyEX299yA4QH2XcgijCgaddEZePPTgvx/2imsq7Ig==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + esbuild-android-arm64: 0.14.23 + esbuild-darwin-64: 0.14.23 + esbuild-darwin-arm64: 0.14.23 + esbuild-freebsd-64: 0.14.23 + esbuild-freebsd-arm64: 0.14.23 + esbuild-linux-32: 0.14.23 + esbuild-linux-64: 0.14.23 + esbuild-linux-arm: 0.14.23 + esbuild-linux-arm64: 0.14.23 + esbuild-linux-mips64le: 0.14.23 + esbuild-linux-ppc64le: 0.14.23 + esbuild-linux-riscv64: 0.14.23 + esbuild-linux-s390x: 0.14.23 + esbuild-netbsd-64: 0.14.23 + esbuild-openbsd-64: 0.14.23 + esbuild-sunos-64: 0.14.23 + esbuild-windows-32: 0.14.23 + esbuild-windows-64: 0.14.23 + esbuild-windows-arm64: 0.14.23 dev: true - /strip-indent/3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - dependencies: - min-indent: 1.0.1 + /escalade/3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} dev: true - /strnum/1.0.5: - resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} + /escape-string-regexp/1.0.5: + resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} + engines: {node: '>=0.8.0'} dev: true - /style-mod/4.0.0: - resolution: {integrity: sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==} + /events/3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} dev: false - /style-to-object/0.3.0: - resolution: {integrity: sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==} - dependencies: - inline-style-parser: 0.1.1 - dev: true - - /supports-color/5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - dev: true - - /supports-esm/1.0.0: - resolution: {integrity: sha512-96Am8CDqUaC0I2+C/swJ0yEvM8ZnGn4unoers/LSdE4umhX7mELzqyLzx3HnZAluq5PXIsGMKqa7NkqaeHMPcg==} - dependencies: - has-package-exports: 1.2.3 - dev: true - - /supports-preserve-symlinks-flag/1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true dev: true + optional: true - /svelte-hmr/0.14.9_svelte@3.46.4: - resolution: {integrity: sha512-bKE9+4qb4sAnA+TKHiYurUl970rjA0XmlP9TEP7K/ncyWz3m81kA4HOgmlZK/7irGK7gzZlaPDI3cmf8fp/+tg==} - peerDependencies: - svelte: '>=3.19.0' - dependencies: - svelte: 3.46.4 + /function-bind/1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true - /svelte-preprocess/4.10.4_b7271f2ed782f08978c4d0e2d2ea2757: - resolution: {integrity: sha512-fuwol0N4UoHsNQolLFbMqWivqcJ9N0vfWO9IuPAiX/5okfoGXURyJ6nECbuEIv0nU3M8Xe2I1ONNje2buk7l6A==} - engines: {node: '>= 9.11.2'} - requiresBuild: true - peerDependencies: - '@babel/core': ^7.10.2 - coffeescript: ^2.5.1 - less: ^3.11.3 || ^4.0.0 - node-sass: '*' - postcss: ^7 || ^8 - postcss-load-config: ^2.1.0 || ^3.0.0 - pug: ^3.0.0 - sass: ^1.26.8 - stylus: ^0.55.0 - sugarss: ^2.0.0 - svelte: ^3.23.0 - typescript: ^3.9.5 || ^4.0.0 - peerDependenciesMeta: - '@babel/core': - optional: true - coffeescript: - optional: true - less: - optional: true - node-sass: - optional: true - postcss: - optional: true - postcss-load-config: - optional: true - pug: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - typescript: - optional: true - dependencies: - '@babel/core': 7.17.5 - '@types/pug': 2.0.6 - '@types/sass': 1.43.1 - detect-indent: 6.1.0 - magic-string: 0.25.7 - postcss: 8.4.7 - postcss-load-config: 3.1.3 - sass: 1.49.9 - sorcery: 0.10.0 - strip-indent: 3.0.0 - svelte: 3.46.4 - typescript: 4.5.5 + /gensync/1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} dev: true - /svelte/3.46.4: - resolution: {integrity: sha512-qKJzw6DpA33CIa+C/rGp4AUdSfii0DOTCzj/2YpSKKayw5WGSS624Et9L1nU1k2OVRS9vaENQXp2CVZNU+xvIg==} - engines: {node: '>= 8'} + /globals/11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} dev: true - /to-fast-properties/2.0.0: - resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} + /has-flag/3.0.0: + resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=} engines: {node: '>=4'} dev: true - /to-regex-range/5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + /has/1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} dependencies: - is-number: 7.0.0 + function-bind: 1.1.1 dev: true - /toidentifier/1.0.1: - resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} - engines: {node: '>=0.6'} + /html-entities/2.3.2: + resolution: {integrity: sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==} dev: true - /tr46/0.0.3: - resolution: {integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=} - dev: false + /is-core-module/2.8.1: + resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==} + dependencies: + has: 1.0.3 + dev: true - /trough/2.1.0: - resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} + /is-what/4.1.7: + resolution: {integrity: sha512-DBVOQNiPKnGMxRMLIYSwERAS5MVY1B7xYiGnpgctsOFvVDz9f9PFXXxMcTOHuoqYp4NK9qFYQaIC1NRRxLMpBQ==} + engines: {node: '>=12.13'} dev: true - /ts-morph/12.2.0: - resolution: {integrity: sha512-WHXLtFDcIRwoqaiu0elAoZ/AmI+SwwDafnPKjgJmdwJ2gRVO0jMKBt88rV2liT/c6MTsXyuWbGFiHe9MRddWJw==} + /isomorphic-fetch/3.0.0: + resolution: {integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==} dependencies: - '@ts-morph/common': 0.11.1 - code-block-writer: 10.1.1 + node-fetch: 2.6.7 + whatwg-fetch: 3.6.2 + transitivePeerDependencies: + - encoding + dev: false + + /isomorphic-ws/4.0.1: + resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} + peerDependencies: + ws: '*' + dev: false + + /js-tokens/4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true - /tsconfig-resolver/3.0.1: - resolution: {integrity: sha512-ZHqlstlQF449v8glscGRXzL6l2dZvASPCdXJRWG4gHEZlUVx2Jtmr+a2zeVG4LCsKhDXKRj5R3h0C/98UcVAQg==} - dependencies: - '@types/json5': 0.0.30 - '@types/resolve': 1.20.1 - json5: 2.2.0 - resolve: 1.22.0 - strip-bom: 4.0.0 - type-fest: 0.13.1 + /jsesc/2.5.2: + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} + hasBin: true dev: true - /tsm/2.2.1: - resolution: {integrity: sha512-qvJB0baPnxQJolZru11mRgGTdNlx17WqgJnle7eht3Vhb+VUR4/zFA5hFl6NqRe7m8BD9w/6yu0B2XciRrdoJA==} - engines: {node: '>=12'} + /json5/2.2.0: + resolution: {integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==} + engines: {node: '>=6'} hasBin: true dependencies: - esbuild: 0.14.23 + minimist: 1.2.5 dev: true - /type-fest/0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - dev: true + /jsonc-parser/3.0.0: + resolution: {integrity: sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==} + dev: false - /typescript/4.5.5: - resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==} - engines: {node: '>=4.2.0'} - hasBin: true + /lru-cache/6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: false - /unbox-primitive/1.0.1: - resolution: {integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==} + /merge-anything/5.0.2: + resolution: {integrity: sha512-POPQBWkBC0vxdgzRJ2Mkj4+2NTKbvkHo93ih+jGDhNMLzIw+rYKjO7949hOQM2X7DxMHH1uoUkwWFLIzImw7gA==} + engines: {node: '>=12.13'} dependencies: - function-bind: 1.1.1 - has-bigints: 1.0.1 - has-symbols: 1.0.2 - which-boxed-primitive: 1.0.2 + is-what: 4.1.7 + ts-toolbelt: 9.6.0 dev: true - /unherit/3.0.0: - resolution: {integrity: sha512-UmvIQZGEc9qdLIQ8mv8/61n6PiMgfbOoASPKHpCvII5srShCQSa6jSjBjlZOR4bxt2XnT6uo6csmPKRi+zQ0Jg==} + /minimist/1.2.5: + resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} dev: true - /unified/10.1.1: - resolution: {integrity: sha512-v4ky1+6BN9X3pQrOdkFIPWAaeDsHPE1svRDxq7YpTc2plkIqFMwukfqM+l0ewpP9EfwARlt9pPFAeWYhHm8X9w==} - dependencies: - '@types/unist': 2.0.6 - bail: 2.0.2 - extend: 3.0.2 - is-buffer: 2.0.5 - is-plain-obj: 4.0.0 - trough: 2.1.0 - vfile: 5.3.0 + /ms/2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /nanoid/3.3.1: + resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true dev: true - /unist-builder/3.0.0: - resolution: {integrity: sha512-GFxmfEAa0vi9i5sd0R2kcrI9ks0r82NasRq5QHh2ysGngrc6GiqD5CDf1FjPenY4vApmFASBIIlk/jj5J5YbmQ==} + /node-fetch/2.6.7: + resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true dependencies: - '@types/unist': 2.0.6 + whatwg-url: 5.0.0 + dev: false + + /node-releases/2.0.2: + resolution: {integrity: sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==} dev: true - /unist-util-generated/2.0.0: - resolution: {integrity: sha512-TiWE6DVtVe7Ye2QxOVW9kqybs6cZexNwTwSMVgkfjEReqy/xwGpAXb99OxktoWwmL+Z+Epb0Dn8/GNDYP1wnUw==} + /path-parse/1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true - /unist-util-is/5.1.1: - resolution: {integrity: sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ==} + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true - /unist-util-map/3.0.0: - resolution: {integrity: sha512-kyPbOAlOPZpytdyquF1g6qYpAjkpMpSPtR7TAj4SOQWSJfQ/LN+IFI2oWBvkxzhsPKxiMKZcgpp5ihZLLvNl6g==} + /postcss/8.4.7: + resolution: {integrity: sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A==} + engines: {node: ^10 || ^12 || >=14} dependencies: - '@types/unist': 2.0.6 + nanoid: 3.3.1 + picocolors: 1.0.0 + source-map-js: 1.0.2 dev: true - /unist-util-modify-children/2.0.0: - resolution: {integrity: sha512-HGrj7JQo9DwZt8XFsX8UD4gGqOsIlCih9opG6Y+N11XqkBGKzHo8cvDi+MfQQgiZ7zXRUiQREYHhjOBHERTMdg==} + /resolve/1.22.0: + resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} + hasBin: true dependencies: - array-iterate: 1.1.4 + is-core-module: 2.8.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 dev: true - /unist-util-position-from-estree/1.1.1: - resolution: {integrity: sha512-xtoY50b5+7IH8tFbkw64gisG9tMSpxDjhX9TmaJJae/XuxQ9R/Kc8Nv1eOsf43Gt4KV/LkriMy9mptDr7XLcaw==} - dependencies: - '@types/unist': 2.0.6 + /rollup/2.68.0: + resolution: {integrity: sha512-XrMKOYK7oQcTio4wyTz466mucnd8LzkiZLozZ4Rz0zQD+HeX4nUK4B8GrTX/2EvN2/vBF/i2WnaXboPxo0JylA==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 dev: true - /unist-util-position/4.0.1: - resolution: {integrity: sha512-mgy/zI9fQ2HlbOtTdr2w9lhVaiFUHWQnZrFF2EUoVOqtAUdzqMtNiD99qA5a1IcjWVR8O6aVYE9u7Z2z1v0SQA==} + /safe-buffer/5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: true - /unist-util-remove-position/4.0.1: - resolution: {integrity: sha512-0yDkppiIhDlPrfHELgB+NLQD5mfjup3a8UYclHruTJWmY74je8g+CIFr79x5f6AkmzSwlvKLbs63hC0meOMowQ==} - dependencies: - '@types/unist': 2.0.6 - unist-util-visit: 4.1.0 + /semver/6.3.0: + resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + hasBin: true dev: true - /unist-util-stringify-position/3.0.0: - resolution: {integrity: sha512-SdfAl8fsDclywZpfMDTVDxA2V7LjtRDTOFd44wUJamgl6OlVngsqWjxvermMYf60elWHbxhuRCZml7AnuXCaSA==} + /semver/7.3.5: + resolution: {integrity: sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==} + engines: {node: '>=10'} + hasBin: true dependencies: - '@types/unist': 2.0.6 - dev: true + lru-cache: 6.0.0 + dev: false - /unist-util-visit-children/1.1.4: - resolution: {integrity: sha512-sA/nXwYRCQVRwZU2/tQWUqJ9JSFM1X3x7JIOsIgSzrFHcfVt6NkzDtKzyxg2cZWkCwGF9CO8x4QNZRJRMK8FeQ==} + /solid-js/1.3.9: + resolution: {integrity: sha512-BZyDen2oj3XA8g8xe0hhVIzGP2d+TV2dn3w90lXjNYLxveAXeN4aA5pxdO4vn7FKd0e0p4nqWtbWtG7NyaPs2A==} dev: true - /unist-util-visit-parents/4.1.1: - resolution: {integrity: sha512-1xAFJXAKpnnJl8G7K5KgU7FY55y3GcLIXqkzUj5QF/QVP7biUm0K0O2oqVkYsdjzJKifYeWn9+o6piAK2hGSHw==} + /solid-refresh/0.4.0_solid-js@1.3.9: + resolution: {integrity: sha512-5XCUz845n/sHPzKK2i2G2EeV61tAmzv6SqzqhXcPaYhrgzVy7nKTQaBpKK8InKrriq9Z2JFF/mguIU00t/73xw==} + peerDependencies: + solid-js: ^1.3.0 dependencies: - '@types/unist': 2.0.6 - unist-util-is: 5.1.1 + '@babel/generator': 7.17.3 + '@babel/helper-module-imports': 7.16.7 + '@babel/types': 7.17.0 + solid-js: 1.3.9 dev: true - /unist-util-visit-parents/5.1.0: - resolution: {integrity: sha512-y+QVLcY5eR/YVpqDsLf/xh9R3Q2Y4HxkZTp7ViLDU6WtJCEcPmRzW1gpdWDCDIqIlhuPDXOgttqPlykrHYDekg==} - dependencies: - '@types/unist': 2.0.6 - unist-util-is: 5.1.1 + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} dev: true - /unist-util-visit/3.1.0: - resolution: {integrity: sha512-Szoh+R/Ll68QWAyQyZZpQzZQm2UPbxibDvaY8Xc9SUtYgPsDzx5AWSk++UUt2hJuow8mvwR+rG+LQLw+KsuAKA==} - dependencies: - '@types/unist': 2.0.6 - unist-util-is: 5.1.1 - unist-util-visit-parents: 4.1.1 + /source-map/0.5.7: + resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=} + engines: {node: '>=0.10.0'} dev: true - /unist-util-visit/4.1.0: - resolution: {integrity: sha512-n7lyhFKJfVZ9MnKtqbsqkQEk5P1KShj0+//V7mAcoI6bpbUjh3C/OG8HVD+pBihfh6Ovl01m8dkcv9HNqYajmQ==} - dependencies: - '@types/unist': 2.0.6 - unist-util-is: 5.1.1 - unist-util-visit-parents: 5.1.0 - dev: true + /strict-event-emitter-types/2.0.0: + resolution: {integrity: sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==} + dev: false - /upath/2.0.1: - resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} - engines: {node: '>=4'} + /style-mod/4.0.0: + resolution: {integrity: sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==} dev: false - /util/0.12.4: - resolution: {integrity: sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==} + /supports-color/5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} dependencies: - inherits: 2.0.4 - is-arguments: 1.1.1 - is-generator-function: 1.0.10 - is-typed-array: 1.1.8 - safe-buffer: 5.2.1 - which-typed-array: 1.1.7 + has-flag: 3.0.0 dev: true - /uvu/0.5.3: - resolution: {integrity: sha512-brFwqA3FXzilmtnIyJ+CxdkInkY/i4ErvP7uV0DnUVxQcQ55reuHphorpF+tZoVHK2MniZ/VJzI7zJQoc9T9Yw==} - engines: {node: '>=8'} - hasBin: true - dependencies: - dequal: 2.0.2 - diff: 5.0.0 - kleur: 4.1.4 - sade: 1.8.1 + /supports-preserve-symlinks-flag/1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} dev: true - /vfile-location/4.0.1: - resolution: {integrity: sha512-JDxPlTbZrZCQXogGheBHjbRWjESSPEak770XwWPfw5mTc1v1nWGLB/apzZxsx8a0SJVfF8HK8ql8RD308vXRUw==} - dependencies: - '@types/unist': 2.0.6 - vfile: 5.3.0 + /to-fast-properties/2.0.0: + resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} + engines: {node: '>=4'} dev: true - /vfile-message/3.1.0: - resolution: {integrity: sha512-4QJbBk+DkPEhBXq3f260xSaWtjE4gPKOfulzfMFF8ZNwaPZieWsg3iVlcmF04+eebzpcpeXOOFMfrYzJHVYg+g==} - dependencies: - '@types/unist': 2.0.6 - unist-util-stringify-position: 3.0.0 + /tr46/0.0.3: + resolution: {integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=} + dev: false + + /ts-toolbelt/9.6.0: + resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==} dev: true - /vfile/5.3.0: - resolution: {integrity: sha512-Tj44nY/48OQvarrE4FAjUfrv7GZOYzPbl5OD65HxVKwLJKMPU7zmfV8cCgCnzKWnSfYG2f3pxu+ALqs7j22xQQ==} + /typescript/4.5.5: + resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + + /upath/2.0.1: + resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} + engines: {node: '>=4'} + dev: false + + /vite-plugin-solid/2.2.5: + resolution: {integrity: sha512-SJkXdVnrPnhAWzs8Vi/+9oViUfx6TiQo8y1FFlDiyUdZR4nxTyGmRzz4xx+CC75GJL3hgDWac/zYA6sYq8SQAg==} dependencies: - '@types/unist': 2.0.6 - is-buffer: 2.0.5 - unist-util-stringify-position: 3.0.0 - vfile-message: 3.1.0 + '@babel/core': 7.17.5 + '@babel/preset-typescript': 7.16.7_@babel+core@7.17.5 + babel-preset-solid: 1.3.6_@babel+core@7.17.5 + merge-anything: 5.0.2 + solid-js: 1.3.9 + solid-refresh: 0.4.0_solid-js@1.3.9 + vite: 2.8.4 + transitivePeerDependencies: + - less + - sass + - stylus + - supports-color dev: true - /vite/2.8.4_sass@1.49.9: + /vite/2.8.4: resolution: {integrity: sha512-GwtOkkaT2LDI82uWZKcrpRQxP5tymLnC7hVHHqNkhFNknYr0hJUlDLfhVRgngJvAy3RwypkDCWtTKn1BjO96Dw==} engines: {node: '>=12.2.0'} hasBin: true @@ -3932,65 +1177,34 @@ packages: postcss: 8.4.7 resolve: 1.22.0 rollup: 2.68.0 - sass: 1.49.9 optionalDependencies: fsevents: 2.3.2 dev: true - /vscode-css-languageservice/5.1.13: - resolution: {integrity: sha512-FA0foqMzMmEoO0WJP+MjoD4dRERhKS+Ag+yBrtmWQDmw2OuZ1R/5FkvI/XdTkCpHmTD9VMczugpHRejQyTXCNQ==} + /vscode-html-languageservice/4.2.2: + resolution: {integrity: sha512-4ICwlpplGbiNQq6D/LZr4qLbPZuMmnSQeX/57UAYP7jD1LOvKeru4lVI+f6d6Eyd7uS46nLJ5DUY4AAlq35C0g==} dependencies: vscode-languageserver-textdocument: 1.0.4 vscode-languageserver-types: 3.16.0 vscode-nls: 5.0.0 vscode-uri: 3.0.3 - dev: true - - /vscode-emmet-helper/2.1.2: - resolution: {integrity: sha512-Fy6UNawSgxE3Kuqi54vSXohf03iOIrp1A74ReAgzvGP9Yt7fUAvkqF6No2WAc34/w0oWAHAeqoBNqmKKWh6U5w==} - deprecated: This package has been renamed to @vscode/emmet-helper, please update to the new name - dependencies: - emmet: 2.3.6 - jsonc-parser: 2.3.1 - vscode-languageserver-textdocument: 1.0.4 - vscode-languageserver-types: 3.16.0 - vscode-nls: 5.0.0 - vscode-uri: 2.1.2 - dev: true - - /vscode-html-languageservice/3.2.0: - resolution: {integrity: sha512-aLWIoWkvb5HYTVE0kI9/u3P0ZAJGrYOSAAE6L0wqB9radKRtbJNrF9+BjSUFyCgBdNBE/GFExo35LoknQDJrfw==} - dependencies: - vscode-languageserver-textdocument: 1.0.4 - vscode-languageserver-types: 3.16.0-next.2 - vscode-nls: 5.0.0 - vscode-uri: 2.1.2 - dev: true + dev: false - /vscode-html-languageservice/4.2.2: - resolution: {integrity: sha512-4ICwlpplGbiNQq6D/LZr4qLbPZuMmnSQeX/57UAYP7jD1LOvKeru4lVI+f6d6Eyd7uS46nLJ5DUY4AAlq35C0g==} + /vscode-json-languageservice/4.2.0: + resolution: {integrity: sha512-XNawv0Vdy/sUK0S+hGf7cq/qsVAbIniGJr89TvZOqMCNJmpgKTy1e8PL1aWW0uy6BfWMG7vxa5lZb3ypuFtuGQ==} dependencies: + jsonc-parser: 3.0.0 vscode-languageserver-textdocument: 1.0.4 vscode-languageserver-types: 3.16.0 vscode-nls: 5.0.0 vscode-uri: 3.0.3 dev: false - /vscode-jsonrpc/6.0.0: - resolution: {integrity: sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==} - engines: {node: '>=8.0.0 || >=10.0.0'} - /vscode-jsonrpc/8.0.0-next.6: resolution: {integrity: sha512-6Ld3RYjygn5Ih7CkAtcAwiDQC+rakj2O+PnASfNyYv3sLmm44eJpEKzuPUN30Iy2UB09AZg8T6LBKWTJTEJDVw==} engines: {node: '>=14.0.0'} dev: false - /vscode-languageserver-protocol/3.16.0: - resolution: {integrity: sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==} - dependencies: - vscode-jsonrpc: 6.0.0 - vscode-languageserver-types: 3.16.0 - /vscode-languageserver-protocol/3.17.0-next.14: resolution: {integrity: sha512-iangobY8dL6sFZkOx4OhRPJM9gN0I1caUsOVR+MnPozsqQUtwMXmbIcfaIf0Akp0pd3KhJDPf/tdwRX68QGeeA==} dependencies: @@ -4000,42 +1214,19 @@ packages: /vscode-languageserver-textdocument/1.0.4: resolution: {integrity: sha512-/xhqXP/2A2RSs+J8JNXpiiNVvvNM0oTosNVmQnunlKvq9o4mupHOBAnnzH0lwIPKazXKvAKsVp1kr+H/K4lgoQ==} + dev: false /vscode-languageserver-types/3.16.0: resolution: {integrity: sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==} - - /vscode-languageserver-types/3.16.0-next.2: - resolution: {integrity: sha512-QjXB7CKIfFzKbiCJC4OWC8xUncLsxo19FzGVp/ADFvvi87PlmBSCAtZI5xwGjF5qE0xkLf0jjKUn3DzmpDP52Q==} - dev: true + dev: false /vscode-languageserver-types/3.17.0-next.7: resolution: {integrity: sha512-KH4zdG1qBXxoso61ChgpeoZYyHGJo8bV7Jv4I+fwQ1Ryy59JAxoZ9GAbhR5TeeafHctLcg6RFvY3m8Jqfu17cg==} dev: false - /vscode-languageserver/6.1.1: - resolution: {integrity: sha512-DueEpkUAkD5XTR4MLYNr6bQIp/UFR0/IPApgXU3YfCBCB08u2sm9hRCs6DxYZELkk++STPjpcjksR2H8qI3cDQ==} - hasBin: true - dependencies: - vscode-languageserver-protocol: 3.16.0 - dev: true - - /vscode-languageserver/7.0.0: - resolution: {integrity: sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==} - hasBin: true - dependencies: - vscode-languageserver-protocol: 3.16.0 - dev: false - /vscode-nls/5.0.0: resolution: {integrity: sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==} - - /vscode-oniguruma/1.6.2: - resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} - dev: true - - /vscode-textmate/5.2.0: - resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} - dev: true + dev: false /vscode-typescript-languageservice/0.32.0: resolution: {integrity: sha512-RdFJKbQcN6FQ3Vpx3ggM7XJpTDmmMG3MTAJy+IHn9RpuoQLF8z8gKpTsLAJeiPKXi1WTJjHnl1PT+ndNA3ujig==} @@ -4048,31 +1239,14 @@ packages: vscode-nls: 5.0.0 dev: false - /vscode-uri/2.1.2: - resolution: {integrity: sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==} - dev: true - /vscode-uri/3.0.3: resolution: {integrity: sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA==} - - /vue/3.2.31: - resolution: {integrity: sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw==} - dependencies: - '@vue/compiler-dom': 3.2.31 - '@vue/compiler-sfc': 3.2.31 - '@vue/runtime-dom': 3.2.31 - '@vue/server-renderer': 3.2.31_vue@3.2.31 - '@vue/shared': 3.2.31 - dev: true + dev: false /w3c-keyname/2.2.4: resolution: {integrity: sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==} dev: false - /web-namespaces/2.0.1: - resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} - dev: true - /webidl-conversions/3.0.1: resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=} dev: false @@ -4088,62 +1262,6 @@ packages: webidl-conversions: 3.0.1 dev: false - /which-boxed-primitive/1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.6 - is-string: 1.0.7 - is-symbol: 1.0.4 - dev: true - - /which-typed-array/1.1.7: - resolution: {integrity: sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-abstract: 1.19.1 - foreach: 2.0.5 - has-tostringtag: 1.0.0 - is-typed-array: 1.1.8 - dev: true - - /wrappy/1.0.2: - resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} - dev: true - - /ws/7.5.7: - resolution: {integrity: sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==} - engines: {node: '>=8.3.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: false - /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - - /yaml/1.10.2: - resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} - engines: {node: '>= 6'} - dev: true - - /yargs-parser/21.0.0: - resolution: {integrity: sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==} - engines: {node: '>=12'} - dev: true - - /zod/3.12.0: - resolution: {integrity: sha512-w+mmntgEL4hDDL5NLFdN6Fq2DSzxfmlSoJqiYE1/CApO8EkOCxvJvRYEVf8Vr/lRs3i6gqoiyFM6KRcWqqdBzQ==} - dev: true - - /zwitch/2.0.2: - resolution: {integrity: sha512-JZxotl7SxAJH0j7dN4pxsTV6ZLXoLdGME+PsjkL/DaBrVryK9kTGq06GfKrwcSOqypP+fdXGoCHE36b99fWVoA==} - dev: true + dev: false diff --git a/public/assets/logo.svg b/public/assets/logo.svg deleted file mode 100644 index d751556..0000000 --- a/public/assets/logo.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index 1f53798..0000000 --- a/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: / diff --git a/public/workers/tsserver.js b/public/workers/tsserver.js deleted file mode 100644 index c08e22d..0000000 --- a/public/workers/tsserver.js +++ /dev/null @@ -1,86 +0,0 @@ -var _a; -importScripts("https://unpkg.com/@typescript/vfs@1.3.5/dist/vfs.globals.js"); -importScripts("https://cdnjs.cloudflare.com/ajax/libs/typescript/4.4.4/typescript.min.js"); -importScripts("https://unpkg.com/@okikio/emitter@2.1.7/lib/api.js"); -var { createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment } = globalThis.tsvfs; -var ts = globalThis.ts; // as TS -var EventEmitter = globalThis.emitter.EventEmitter; -var _emitter = new EventEmitter(); -globalThis.localStorage = (_a = globalThis.localStorage) !== null && _a !== void 0 ? _a : {}; -(async () => { - const compilerOpts = { - target: ts.ScriptTarget.ES2021, - module: ts.ScriptTarget.ES2020, - "lib": [ - "es2021", - "es2020", - "dom", - "webworker" - ], - "esModuleInterop": true, - }; - let initialText = "const hello = 'hi'"; - _emitter.once("updateText", (details) => { - initialText = details.text.join("\n"); - }); - const fsMap = await createDefaultMapFromCDN(compilerOpts, ts.version, false, ts); - const ENTRY_POINT = "index.ts"; - fsMap.set(ENTRY_POINT, initialText); - const system = createSystem(fsMap); - const env = createVirtualTypeScriptEnvironment(system, [ENTRY_POINT], ts, compilerOpts); - // You can then interact with the languageService to introspect the code - postMessage({ - event: "ready", - details: [] - }); - _emitter.on("updateText", (details) => { - env.updateFile(ENTRY_POINT, [].concat(details.text).join("\n")); - // console.log(details.text) - }); - _emitter.on("autocomplete-request", ({ pos }) => { - let result = env.languageService.getCompletionsAtPosition(ENTRY_POINT, pos, {}); - postMessage({ - event: "autocomplete-results", - details: result - }); - }); - _emitter.on("tooltip-request", ({ pos }) => { - var _a; - let result = env.languageService.getQuickInfoAtPosition(ENTRY_POINT, pos); - postMessage({ - event: "tooltip-results", - details: result ? { - result, - tootltipText: ts.displayPartsToString(result.displayParts) + - (((_a = result.documentation) === null || _a === void 0 ? void 0 : _a.length) ? "\n" + ts.displayPartsToString(result.documentation) : "") - } : { result, tooltipText: "" } - }); - }); - _emitter.on("lint-request", () => { - let SyntacticDiagnostics = env.languageService.getSyntacticDiagnostics(ENTRY_POINT); - let SemanticDiagnostic = env.languageService.getSemanticDiagnostics(ENTRY_POINT); - let SuggestionDiagnostics = env.languageService.getSuggestionDiagnostics(ENTRY_POINT); - let result = [].concat(SyntacticDiagnostics, SemanticDiagnostic, SuggestionDiagnostics); - postMessage({ - event: "lint-results", - details: result.map(v => { - let from = v.start; - let to = v.start + v.length; - // let codeActions = env.languageService.getCodeFixesAtPosition(ENTRY_POINT, from, to, [v.category], {}, {}); - let diag = ({ - from, - to, - message: v.messageText, - source: v === null || v === void 0 ? void 0 : v.source, - severity: ["warning", "error", "info", "info"][v.category], - // actions: codeActions as any as Diagnostic["actions"] - }); - return diag; - }) - }); - }); -})(); -addEventListener('message', ({ data }) => { - let { event, details } = data; - _emitter.emit(event, details); -}); \ No newline at end of file diff --git a/public/workers/tsserver.ts b/public/workers/tsserver.ts deleted file mode 100644 index 2e1db81..0000000 --- a/public/workers/tsserver.ts +++ /dev/null @@ -1,108 +0,0 @@ -importScripts("https://unpkg.com/@typescript/vfs@1.3.5/dist/vfs.globals.js"); -importScripts("https://cdnjs.cloudflare.com/ajax/libs/typescript/4.4.4/typescript.min.js"); -importScripts("https://unpkg.com/@okikio/emitter@2.1.7/lib/api.js"); - -export type VFS = typeof import("@typescript/vfs"); -export type EVENT_EMITTER = import("@okikio/emitter").EventEmitter; -export type Diagnostic = import("@codemirror/lint").Diagnostic; - -var { createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment } = globalThis.tsvfs as VFS; -var ts = globalThis.ts; // as TS - -var EventEmitter = globalThis.emitter.EventEmitter; -var _emitter: EVENT_EMITTER = new EventEmitter(); - -globalThis.localStorage = globalThis.localStorage ?? {} as Storage; - -(async () => { - const compilerOpts = { - target: ts.ScriptTarget.ES2021, - module: ts.ModuleKind.ES2020, - "lib": [ - "es2021", - "es2020", - "dom", - "webworker" - ], - "esModuleInterop": true, - }; - - let initialText = "const hello = 'hi'"; - _emitter.once("updateText", (details) => { - initialText = details.text.join("\n"); - }); - - const fsMap = await createDefaultMapFromCDN(compilerOpts, ts.version, false, ts) - const ENTRY_POINT = "index.ts"; - fsMap.set(ENTRY_POINT, initialText); - - const system = createSystem(fsMap); - const env = createVirtualTypeScriptEnvironment(system, [ENTRY_POINT], ts, compilerOpts); - - // You can then interact with the languageService to introspect the code - postMessage({ - event: "ready", - details: [] - }); - - _emitter.on("updateText", (details) => { - env.updateFile(ENTRY_POINT, [].concat(details.text).join("\n")); - // console.log(details.text) - }); - - _emitter.on("autocomplete-request", ({ pos }) => { - let result = env.languageService.getCompletionsAtPosition(ENTRY_POINT, pos, {}); - - postMessage({ - event: "autocomplete-results", - details: result - }) - }) - - _emitter.on("tooltip-request", ({ pos }) => { - let result = env.languageService.getQuickInfoAtPosition(ENTRY_POINT, pos); - - postMessage({ - event: "tooltip-results", - details: result ? { - result, - tootltipText: ts.displayPartsToString(result.displayParts) + - (result.documentation?.length ? "\n" + ts.displayPartsToString(result.documentation) : "") - } : { result, tooltipText: "" } - }) - }) - - _emitter.on("lint-request", () => { - let SyntacticDiagnostics = env.languageService.getSyntacticDiagnostics(ENTRY_POINT); - let SemanticDiagnostic = env.languageService.getSemanticDiagnostics(ENTRY_POINT); - let SuggestionDiagnostics = env.languageService.getSuggestionDiagnostics(ENTRY_POINT); - - type Diagnostics = typeof SyntacticDiagnostics & typeof SemanticDiagnostic & typeof SuggestionDiagnostics; - let result: Diagnostics = [].concat(SyntacticDiagnostics, SemanticDiagnostic, SuggestionDiagnostics); - - postMessage({ - event: "lint-results", - details: result.map(v => { - let from = v.start; - let to = v.start + v.length; - // let codeActions = env.languageService.getCodeFixesAtPosition(ENTRY_POINT, from, to, [v.category], {}, {}); - - let diag: Diagnostic = ({ - from, - to, - message: v.messageText as string, - source: v?.source, - severity: ["warning", "error", "info", "info"][v.category] as Diagnostic["severity"], - // actions: codeActions as any as Diagnostic["actions"] - }); - - return diag; - }) - }) - }) -})(); - -addEventListener('message', ({ data }: MessageEvent<{ event: string, details: any }>) => { - let { event, details } = data; - _emitter.emit(event, details); -}); \ No newline at end of file diff --git a/public/workers/worker.ts b/public/workers/worker.ts deleted file mode 100644 index d3bcdfe..0000000 --- a/public/workers/worker.ts +++ /dev/null @@ -1,316 +0,0 @@ -// Simple JSON LS in Web Worker that provides completion and hover. -// Includes a schema for `tsconfig.json`. -import { - createConnection, - BrowserMessageReader, - BrowserMessageWriter, - TextDocumentSyncKind, -} from "vscode-languageserver/browser"; -import { TextDocument } from 'vscode-languageserver-textdocument'; -import { - createLanguageService, - LanguageServiceHost -} from "vscode-typescript-languageservice"; - -import type { VersionedTextDocumentIdentifier } from "vscode-languageserver/browser"; - -type TS = typeof import('typescript/lib/tsserverlibrary'); -import type { VirtualTypeScriptEnvironment } from "@typescript/vfs"; -import type { System, CompilerOptions, CustomTransformers } from "typescript"; - -importScripts("https://unpkg.com/@typescript/vfs@1.3.5/dist/vfs.globals.js"); -// importScripts("https://cdnjs.cloudflare.com/ajax/libs/typescript/4.4.4/typescript.min.js"); -importScripts("https://unpkg.com/typescript@4.4.4/lib/tsserverlibrary.js") - -export type VFS = typeof import("@typescript/vfs"); -export type Diagnostic = import("@codemirror/lint").Diagnostic; - -var { createDefaultMapFromCDN, createSystem, createVirtualCompilerHost, createVirtualLanguageServiceHost } = globalThis.tsvfs as VFS; -var ts = globalThis.ts as TS; - -globalThis.localStorage = globalThis.localStorage ?? {} as Storage; -/** - * Makes a virtual copy of the TypeScript environment. This is the main API you want to be using with - * @typescript/vfs. A lot of the other exposed functions are used by this function to get set up. - * - * @param sys an object which conforms to the TS Sys (a shim over read/write access to the fs) - * @param rootFiles a list of files which are considered inside the project - * @param ts a copy pf the TypeScript module - * @param compilerOptions the options for this compiler run - * @param customTransformers custom transformers for this compiler run - */ - -function createVirtualTypeScriptEnvironment( - sys: System, - rootFiles: string[], - ts: TS, - compilerOptions: CompilerOptions = {}, - customTransformers?: CustomTransformers -): VirtualTypeScriptEnvironment & { languageServiceHost: LanguageServiceHost } { - const mergedCompilerOpts = { ...defaultCompilerOptions(ts), ...compilerOptions } - - const { languageServiceHost, updateFile } = createVirtualLanguageServiceHost( - sys, - rootFiles, - mergedCompilerOpts, - ts, - customTransformers - ) - const languageService = ts.createLanguageService(languageServiceHost) - const diagnostics = languageService.getCompilerOptionsDiagnostics() - - if (diagnostics.length) { - const compilerHost = createVirtualCompilerHost(sys, compilerOptions, ts) - throw new Error(ts.formatDiagnostics(diagnostics, compilerHost.compilerHost)) - } - - return { - // @ts-ignore - name: "vfs", - sys, - languageService, - languageServiceHost, - getSourceFile: fileName => languageService.getProgram()?.getSourceFile(fileName), - - createFile: (fileName, content) => { - updateFile(ts.createSourceFile(fileName, content, mergedCompilerOpts.target!, false)) - }, - updateFile: (fileName, content, optPrevTextSpan) => { - const prevSourceFile = languageService.getProgram()!.getSourceFile(fileName) - if (!prevSourceFile) { - throw new Error("Did not find a source file for " + fileName) - } - const prevFullContents = prevSourceFile.text - - // TODO: Validate if the default text span has a fencepost error? - const prevTextSpan = optPrevTextSpan ?? ts.createTextSpan(0, prevFullContents.length) - const newText = - prevFullContents.slice(0, prevTextSpan.start) + - content + - prevFullContents.slice(prevTextSpan.start + prevTextSpan.length) - const newSourceFile = ts.updateSourceFile(prevSourceFile, newText, { - span: prevTextSpan, - newLength: content.length, - }) - - updateFile(newSourceFile) - }, - } -} - -/** The default compiler options if TypeScript could ever change the compiler options */ -const defaultCompilerOptions = (ts: TS): CompilerOptions => { - return { - ...ts.getDefaultCompilerOptions(), - jsx: ts.JsxEmit.React, - strict: true, - esModuleInterop: true, - module: ts.ModuleKind.ESNext, - suppressOutputPathCheck: true, - skipLibCheck: true, - skipDefaultLibCheck: true, - moduleResolution: ts.ModuleResolutionKind.NodeJs, - } -} - -(async () => { - const compilerOpts = { - target: ts.ScriptTarget.ES2021, - module: ts.ModuleKind.ES2020, - "lib": [ - "es2021", - "es2020", - "dom", - "webworker" - ], - "esModuleInterop": true, - }; - - let initialText = "const hello = 'hi'"; - - const fsMap = await createDefaultMapFromCDN(compilerOpts, ts.version, false, ts) - const ENTRY_POINT = "index.ts"; - - // const docs = new Map(); - // docs.set(ENTRY_POINT, TextDocument.create(ENTRY_POINT, "ts", Number(ts.version), initialText)); - fsMap.set(ENTRY_POINT, initialText); - - const system = createSystem(fsMap); - const env = createVirtualTypeScriptEnvironment(system, [ENTRY_POINT], ts, compilerOpts); - const tsls = createLanguageService(ts, env.languageServiceHost, env.languageService); - - const worker: Worker = self as any; - const conn = createConnection( - new BrowserMessageReader(worker), - new BrowserMessageWriter(worker) - ); - - const getDiagnostics = (textDocument: VersionedTextDocumentIdentifier) => { - return conn.sendDiagnostics({ - uri: textDocument.uri, - version: textDocument.version || 0, - diagnostics: tsls.doValidation(textDocument.uri, { - declaration: true, - semantic: true, - suggestion: true, - syntactic: true, - }) - }); - }; - - conn.onInitialize(() => { - return { - capabilities: { - textDocumentSync: TextDocumentSyncKind.Incremental, - completionProvider: { - triggerCharacters: ['"', ":", "'", " ", ".", ","], - }, - hoverProvider: true, - - definitionProvider: true, - typeDefinitionProvider: true, - - referencesProvider: true, - - foldingRangeProvider: true, - codeActionProvider: true, - - documentFormattingProvider: true, - documentRangeFormattingProvider: true, - - documentHighlightProvider: true, - - documentSymbolProvider: true, - workspaceSymbolProvider: true, - - renameProvider: true, - - signatureHelpProvider: { - triggerCharacters: ["(", ","], - }, - }, - }; - }); - - conn.onDidOpenTextDocument(({ textDocument: { uri, languageId, version, text } }) => { - let textDocument = TextDocument.create(uri, languageId, version, text); - // docs.set(uri, textDocument); - // fsMap.set(uri, text); - env.createFile(uri, text); - getDiagnostics(textDocument); - }); - - conn.onDidChangeTextDocument(({ textDocument, contentChanges }) => { - if (fsMap.has(textDocument.uri)) { - // const doc = docs.get(textDocument.uri); - // docs.set(textDocument.uri, TextDocument.update( - // doc, - // contentChanges, - // textDocument.version || 0 - // )); - // fsMap.set(textDocument.uri, contentChanges[0].text); - - env.updateFile(textDocument.uri, contentChanges[0].text); - getDiagnostics(textDocument); - } - }); - - conn.onSignatureHelp(({ textDocument, position, context }) => { - - // env.getSourceFile(textDocument.uri) - if (!fsMap.has(textDocument.uri)) return null; - return tsls.getSignatureHelp(textDocument.uri, position, context); - }); - - conn.onCompletion(({ textDocument, position, context }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.doComplete(textDocument.uri, position, context as unknown); - }); - - conn.onCompletionResolve((item) => { - if (!item) return null; - return tsls.doCompletionResolve(item); - }); - - conn.onHover(({ textDocument, position }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.doHover(textDocument.uri, position); - }); - - conn.onDocumentFormatting(({ textDocument, options }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.doFormatting(textDocument.uri, options); - }); - - conn.onDocumentRangeFormatting(({ textDocument, range, options }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.doFormatting(textDocument.uri, options, range); - }); - - conn.onTypeDefinition(({ textDocument, position }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.findTypeDefinition(textDocument.uri, position); - }); - - conn.onDefinition(({ textDocument, position }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.findDefinition(textDocument.uri, position); - }); - - conn.onReferences(({ textDocument, position }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.findReferences(textDocument.uri, position); - }); - - conn.onCodeAction(({ textDocument, range, context }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.getCodeActions(textDocument.uri, range, context); - }); - - conn.onCodeActionResolve((action) => { - if (!action) return null; - return tsls.doCodeActionResolve(action); - }); - - conn.onDocumentSymbol(({ textDocument }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.findDocumentSymbols(textDocument.uri); - }); - - conn.onDefinition(({ textDocument, position }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.findDefinition(textDocument.uri, position); - }); - - conn.onFoldingRanges(({ textDocument }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.getFoldingRanges(textDocument.uri); - }); - - conn.onPrepareRename(({ textDocument, position }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.prepareRename(textDocument.uri, position); - }); - - conn.onRenameRequest(({ textDocument, position, newName }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.doRename(textDocument.uri, position, newName); - }); - - conn.onDocumentSymbol(({ textDocument }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.findDocumentSymbols(textDocument.uri); - }); - - conn.onWorkspaceSymbol(({ query }) => { - if (!query) return null; - return tsls.findWorkspaceSymbols(query); - }); - - conn.onDocumentHighlight(({ textDocument, position }) => { - if (!fsMap.has(textDocument.uri)) return null; - return tsls.findDocumentHighlights(textDocument.uri, position); - }); - - conn.listen(); -})(); \ No newline at end of file diff --git a/snowpack.config.mjs b/snowpack.config.mjs deleted file mode 100644 index fbe07aa..0000000 --- a/snowpack.config.mjs +++ /dev/null @@ -1,29 +0,0 @@ -// Snowpack Configuration File -// See all supported options: https://www.snowpack.dev/reference/configuration - -/** @type {import("snowpack").SnowpackUserConfig } */ -export default { - optimize: { - bundle: true, - minify: true, - keepNames: true, - target: 'es2020', - }, - mount: { - /* ... */ - }, - plugins: [ - /* ... */ - ], - packageOptions: { - // exclude: ["typescript"], - polyfillNode: true - /* ... */ - }, - devOptions: { - /* ... */ - }, - buildOptions: { - /* ... */ - }, -}; diff --git a/public/favicon.svg b/src/assets/favicon.svg similarity index 100% rename from public/favicon.svg rename to src/assets/favicon.svg diff --git a/src/components/Editor.tsx b/src/components/Editor.tsx index fddfb5b..1d279d7 100644 --- a/src/components/Editor.tsx +++ b/src/components/Editor.tsx @@ -1,164 +1,19 @@ import { onMount } from "solid-js"; - -// import { EventEmitter } from "@okikio/emitter"; -// import { EditorView } from "@codemirror/view"; -// import { autocompletion, completeFromList, startCompletion } from "@codemirror/autocomplete"; -// import { hoverTooltip } from "@codemirror/tooltip"; -// import { Diagnostic, linter } from "@codemirror/lint"; -// import { keymap } from "@codemirror/view"; - -// import debounce from "lodash.debounce"; -// import debounceAsync from "debounce-async"; -// const asyncdebounce = debounceAsync.default; - -// import type { CompletionContext, CompletionResult, Completion } from "@codemirror/autocomplete"; -// import type { ViewUpdate } from "@codemirror/view"; -// import type { Tooltip } from "@codemirror/tooltip"; -// const emitter = new EventEmitter(); - import Codemirror from "./codemirror"; -// @ts-ignore -import TSServer from "./tsserver.ts?worker"; - import { languageServer } from './lsps'; export const ls = languageServer({ - serverWorker: new TSServer(), //new Worker(new URL('./tsserver.js', import.meta.url), { type: 'module', name: "ts-server" }), + // json-server + serverWorker: new Worker(new URL('./tsserver.ts', import.meta.url), { type: 'module', name: "ts-server" }), rootUri: 'file:///', - documentUri: `file:///index.ts`, - languageId: 'ts' // As defined at https://microsoft.github.io/language-server-protocol/specification#textDocumentItem. + documentUri: `file:///index.ts`, // tsconfig.json + languageId: 'ts' // json // As defined at https://microsoft.github.io/language-server-protocol/specification#textDocumentItem. }); -export default ({ children }) => { +export default () => { let editorEl: HTMLDivElement; onMount(() => { - // let tsServer = new Worker( - // new URL("/workers/tsserver.js", import.meta.url), - // { name: "ts-server" } - // ); - - let editor = Codemirror(editorEl, [ - ls - // EditorView.updateListener.of(debounce((update: ViewUpdate) => { - // if (update.docChanged) { - // tsServer.postMessage({ - // event: "updateText", - // details: update.state.doc, - // }); - // } - // }, 150)), - - // autocompletion({ - // activateOnTyping: true, - // override: [ - // asyncdebounce(async (ctx: CompletionContext): Promise => { - // const { pos } = ctx; - - // try { - // tsServer.postMessage({ - // event: "autocomplete-request", - // details: { pos } - // }); - - // const completions = await new Promise((resolve) => { - // emitter.on("autocomplete-results", (completions) => { - // resolve(completions); - // }); - // }); - - // if (!completions) { - // console.log("Unable to get completions", { pos }); - // return null; - // } - - // return completeFromList( - // // @ts-ignore - // completions.entries.map((c, i) => { - // let suggestions: Completion = ({ - // type: c.kind, - // label: c.name, - // // TODO:: populate details and info - // boost: 1 / Number(c.sortText), - // }) - - // return suggestions; - // }) - // )(ctx); - // } catch (e) { - // console.log("Unable to get completions", { pos, error: e }); - // return null; - // } - // }, 200), - // ], - // }), - - // hoverTooltip( - // async ({ state }: EditorView, pos: number): Promise => { - // tsServer.postMessage({ - // event: "tooltip-request", - // details: { pos } - // }); - - // const { result: quickInfo, tootltipText } = await new Promise((resolve) => { - // emitter.on("tooltip-results", (completions) => { - // resolve(completions); - // }); - // }); - - // if (!quickInfo) return null; - - // return { - // pos, - // create() { - // const dom = document.createElement("div"); - // dom.setAttribute("class", "cm-quickinfo-tooltip"); - // dom.textContent = tootltipText; - - // return { dom }; - // }, - // }; - // }, - // { - // hideOnChange: true, - - // } - // ), - - // linter(async (view: EditorView): Promise => { - // tsServer.postMessage({ - // event: "lint-request", - // details: [] - // }); - - // const diagnostics = await new Promise((resolve) => { - // emitter.on("lint-results", (completions) => { - // resolve(completions); - // }); - // }); - - // if (!diagnostics) return null; - // return diagnostics as Diagnostic[]; - // }, { - // delay: 400 - // }), - ]); - - // emitter.on("ready", () => { - // console.log("ts-server is ready"); - - // tsServer.postMessage({ - // event: "updateText", - // details: editor.state.doc, - // }); - // }); - - // tsServer.addEventListener( - // "message", - // ({ data }: MessageEvent<{ event: string; details: any }>) => { - // let { event, details } = data; - // emitter.emit(event, details); - // } - // ); + Codemirror(editorEl, [ls]); }); return
; diff --git a/src/components/Transport.ts b/src/components/Transport.ts deleted file mode 100644 index 93cc943..0000000 --- a/src/components/Transport.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { - JSONRPCRequestData, - IJSONRPCNotificationResponse, - IJSONRPCResponse, - } from "./Request"; - - import StrictEventEmitter from "strict-event-emitter-types"; - import { EventEmitter } from "events"; - import { JSONRPCError } from "./Error"; - import { TransportRequestManager } from "./TransportRequestManager"; - - interface ITransportEvents { - pending: (data: JSONRPCRequestData) => void; - notification: (data: IJSONRPCNotificationResponse) => void; - response: (data: IJSONRPCResponse) => void; - error: (data: JSONRPCError) => void; - } - - type TransportEventName = keyof ITransportEvents; - export type TransportEventChannel = StrictEventEmitter; - - export abstract class Transport { - protected transportRequestManager: TransportRequestManager; - constructor() { - this.transportRequestManager = new TransportRequestManager(); - // add a noop for the error event to not require handling the error event - // tslint:disable-next-line:no-empty - this.transportRequestManager.transportEventChannel.on("error", () => { }); - } - - public abstract connect(): Promise; - public abstract close(): void; - public abstract sendData(data: JSONRPCRequestData, timeout?: number | null): Promise; - - public subscribe(event: TransportEventName, handler: ITransportEvents[TransportEventName]) { - this.transportRequestManager.transportEventChannel.addListener(event, handler); - } - public unsubscribe(event?: TransportEventName, handler?: ITransportEvents[TransportEventName]) { - if (!event) { - return this.transportRequestManager.transportEventChannel.removeAllListeners(); - } - if (event && handler) { - this.transportRequestManager.transportEventChannel.removeListener(event, handler); - } - } - protected parseData(data: JSONRPCRequestData) { - if (data instanceof Array) { - return data.map((batch) => batch.request.request); - } - return data.request; - } - } - - export type promiseResolve = (r?: {} | PromiseLike<{}> | undefined) => void; - export type promiseReject = (r?: any) => void; - export interface IRequestPromise { - resolve: promiseResolve; - reject: promiseReject; - } - - export type NotificationResponse = "notification"; - export type RequestResponse = "response"; - export type BadResponse = "error"; - - export type TransportResponse = JSONRPCError | undefined; - - interface IHttpTransportResponse { - type: "http"; - id?: string | number; - error?: Error; - payload: string; - } - - interface IWSTransportResponse { - type: "ws"; - payload: string; - } - - export type TransportResponseData = IHttpTransportResponse | IWSTransportResponse; \ No newline at end of file diff --git a/src/components/TransportRequestManager.ts b/src/components/TransportRequestManager.ts deleted file mode 100644 index cde6460..0000000 --- a/src/components/TransportRequestManager.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { - JSONRPCRequestData, IJSONRPCRequest, - IJSONRPCNotification, IJSONRPCNotificationResponse, - IJSONRPCResponse, IBatchRequest, IJSONRPCData, -} from "./Request"; -import { EventEmitter } from "events"; -import { JSONRPCError, ERR_TIMEOUT, ERR_UNKNOWN, ERR_MISSIING_ID, convertJSONToRPCError } from "./Error"; -import { promiseResolve, promiseReject, TransportEventChannel, TransportResponse, IRequestPromise } from "./Transport"; -export interface IPendingRequest { - resolve: promiseResolve; - reject: promiseReject; -} -export class TransportRequestManager { - public transportEventChannel: TransportEventChannel; - private pendingRequest: { - [id: string]: IPendingRequest; - }; - private pendingBatchRequest: { - [id: string]: boolean; - }; - constructor() { - this.pendingRequest = {}; - this.pendingBatchRequest = {}; - this.transportEventChannel = new EventEmitter(); - } - public addRequest(data: JSONRPCRequestData, timeout: number | null): Promise { - this.transportEventChannel.emit("pending", data); - if (data instanceof Array) { - this.addBatchReq(data, timeout); - return Promise.resolve(); - } - return this.addReq(data.internalID, timeout); - } - - public settlePendingRequest(request: IJSONRPCData[], error?: Error) { - request.forEach((req) => { - const resolver = this.pendingRequest[req.internalID]; - delete this.pendingBatchRequest[req.internalID]; - if (resolver === undefined) { - return; - } - if (error) { - resolver.reject(error); - return; - } - resolver.resolve(); - // Notifications have no response and should clear their own pending requests - if (req.request.id === null || req.request.id === undefined) { - delete this.pendingRequest[req.internalID]; - } - }); - } - - public isPendingRequest(id: string | number): boolean { - return this.pendingRequest.hasOwnProperty(id) - } - - public resolveResponse(payload: string, emitError: boolean = true): TransportResponse { - let data: any = payload; - try { - data = JSON.parse(payload); - if (this.checkJSONRPC(data) === false) { - return; // ignore messages that are not conforming to JSON-RPC - } - if (data instanceof Array) { - return this.resolveBatch(data, emitError); - } - return this.resolveRes(data, emitError); - } catch (e) { - const err = new JSONRPCError("Bad response format", ERR_UNKNOWN, payload); - if (emitError) { - this.transportEventChannel.emit("error", err); - } - return err; - } - } - - private addBatchReq(batches: IBatchRequest[], timeout: number | null) { - batches.forEach((batch) => { - const { resolve, reject } = batch; - const { internalID } = batch.request; - this.pendingBatchRequest[internalID] = true; - this.pendingRequest[internalID] = { resolve, reject }; - }); - return Promise.resolve(); - } - private addReq(id: string | number, timeout: number | null) { - return new Promise((resolve, reject) => { - if (timeout !== null && timeout) { - this.setRequestTimeout(id, timeout, reject); - } - this.pendingRequest[id] = { resolve, reject }; - }); - } - private checkJSONRPC(data: any) { - let payload = [data]; - if (data instanceof Array) { - payload = data; - } - return payload.every((datum) => (datum.result !== undefined || datum.error !== undefined || datum.method !== undefined)); - } - - private processResult(payload: any, prom: IRequestPromise) { - if (payload.error) { - const err = convertJSONToRPCError(payload); - prom.reject(err); - return; - } - prom.resolve(payload.result); - } - private resolveBatch(payload: (IJSONRPCRequest | IJSONRPCNotification)[], emitError: boolean): TransportResponse { - const results = payload.map((datum) => { - return this.resolveRes(datum, emitError); - }); - const errors = results.filter((result) => result); - if (errors.length > 0) { - return errors[0]; - } - return undefined; - } - - private resolveRes(data: IJSONRPCNotificationResponse | IJSONRPCResponse, emitError: boolean): TransportResponse { - const { id, error } = data; - - const status = this.pendingRequest[id as string]; - if (status) { - delete this.pendingRequest[id as string]; - this.processResult(data, status); - this.transportEventChannel.emit("response", data as IJSONRPCResponse); - return; - } - if (id === undefined && error === undefined) { - this.transportEventChannel.emit("notification", data as IJSONRPCNotificationResponse); - return; - } - let err; - if (error) { - err = convertJSONToRPCError(data); - } - if (emitError && error && err) { - this.transportEventChannel.emit("error", err); - } - return err; - } - - private setRequestTimeout(id: string | number, timeout: number, reject: promiseReject) { - setTimeout(() => { - delete this.pendingRequest[id]; - reject(new JSONRPCError(`Request timeout request took longer than ${timeout} ms to resolve`, ERR_TIMEOUT)); - }, timeout); - } -} \ No newline at end of file diff --git a/src/components/basic.tsx b/src/components/basic.tsx deleted file mode 100644 index b74e371..0000000 --- a/src/components/basic.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { createSignal } from 'solid-js'; - -export default function Counter({ children }) { - const [count, setCount] = createSignal(0); - const add = () => setCount(count() + 1); - const subtract = () => setCount(count() - 1); - - return ( - <> -
- -
{count()}
- -
-
{children}
- - ); -} diff --git a/src/components/codemirror.ts b/src/components/codemirror.ts index deb132b..b9386a6 100644 --- a/src/components/codemirror.ts +++ b/src/components/codemirror.ts @@ -7,6 +7,19 @@ import { THEME, HIGHTLIGHT_STYLE } from "./editor-theme"; import type { Extension } from "@codemirror/state"; +/* + +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + } +} +*/ const initalText = `\ // Click Run for the Bundled + Minified + Gzipped package size export * from "@okikio/animate"; diff --git a/src/components/editor-basic-setup.ts b/src/components/editor-basic-setup.ts index d8b4442..1bd56b6 100644 --- a/src/components/editor-basic-setup.ts +++ b/src/components/editor-basic-setup.ts @@ -1,4 +1,4 @@ -import {keymap, highlightSpecialChars, drawSelection, highlightActiveLine} from "@codemirror/view" +import {keymap, highlightSpecialChars, drawSelection, highlightActiveLine, dropCursor} from "@codemirror/view" import {Extension, EditorState} from "@codemirror/state" import {history, historyKeymap} from "@codemirror/history" import {foldGutter, foldKeymap} from "@codemirror/fold" @@ -27,6 +27,7 @@ import {lintKeymap} from "@codemirror/lint" /// - [the undo history](#history.history) /// - [a fold gutter](#fold.foldGutter) /// - [custom selection drawing](#view.drawSelection) +/// - [drop cursor](#view.dropCursor) /// - [multiple selections](#state.EditorState^allowMultipleSelections) /// - [reindentation on input](#language.indentOnInput) /// - [the default highlight style](#highlight.defaultHighlightStyle) (as fallback) @@ -49,16 +50,17 @@ import {lintKeymap} from "@codemirror/lint" /// take this package's source (which is just a bunch of imports and /// an array literal), copy it into your own code, and adjust it as /// desired. -export const BASIC_SETUP: Extension = [ +export const BASIC_SETUP: Extension = [ lineNumbers(), highlightActiveLineGutter(), highlightSpecialChars(), - history(), + history(), foldGutter({ openText: "expand_more", closedText: "chevron_right" }), drawSelection(), + dropCursor(), EditorState.allowMultipleSelections.of(true), indentOnInput(), defaultHighlightStyle.fallback, diff --git a/src/components/index.tsx b/src/components/index.tsx new file mode 100644 index 0000000..0535fd0 --- /dev/null +++ b/src/components/index.tsx @@ -0,0 +1,5 @@ +/* @refresh reload */ +import { render } from 'solid-js/web'; +import Editor from './Editor'; + +render(() => , document.getElementById('root') as HTMLElement); \ No newline at end of file diff --git a/src/components/json-server.ts b/src/components/json-server.ts new file mode 100644 index 0000000..eb90e16 --- /dev/null +++ b/src/components/json-server.ts @@ -0,0 +1,92 @@ +// Simple JSON LS in Web Worker that provides completion and hover. +// Includes a schema for `tsconfig.json`. +import { + createProtocolConnection, + BrowserMessageReader, + BrowserMessageWriter, + } from "vscode-languageserver-protocol/browser"; + import { + CompletionRequest, + DidChangeTextDocumentNotification, + DidOpenTextDocumentNotification, + HoverRequest, + InitializeRequest, + InitializeResult, + TextDocumentSyncKind, + } from "vscode-languageserver-protocol"; + import { getLanguageService, TextDocument } from "vscode-json-languageservice"; + + const jsonService = getLanguageService({ + async schemaRequestService(url: string) { + const res = await fetch(url); + return res.text(); + }, + }); + jsonService.configure({ + schemas: [ + { + // "name": "tsconfig.json", + // description: "TypeScript compiler configuration file", + uri: "https://json.schemastore.org/tsconfig", + fileMatch: ["tsconfig.json"], + }, + ], + }); + + const docs: { [uri: string]: TextDocument } = {}; + + const worker: Worker = self as any; + const conn = createProtocolConnection( + new BrowserMessageReader(worker), + new BrowserMessageWriter(worker) + ); + conn.onRequest( + InitializeRequest.type, + (params): InitializeResult => { + return { + capabilities: { + textDocumentSync: TextDocumentSyncKind.Incremental, + completionProvider: { + triggerCharacters: ['"', ":"], + }, + hoverProvider: true, + }, + }; + } + ); + conn.onNotification( + DidOpenTextDocumentNotification.type, + ({ textDocument: { uri, languageId, version, text } }) => { + docs[uri] = TextDocument.create(uri, languageId, version, text); + } + ); + conn.onNotification( + DidChangeTextDocumentNotification.type, + ({ textDocument, contentChanges }) => { + const doc = docs[textDocument.uri]; + if (doc) { + docs[textDocument.uri] = TextDocument.update( + doc, + contentChanges, + textDocument.version || 0 + ); + } + } + ); + conn.onRequest(CompletionRequest.type, async ({ textDocument, position }) => { + const doc = docs[textDocument.uri]; + if (!doc) return null; + + return jsonService.doComplete( + doc, + position, + jsonService.parseJSONDocument(doc) + ); + }); + conn.onRequest(HoverRequest.type, async ({ textDocument, position }) => { + const doc = docs[textDocument.uri]; + if (!doc) return null; + + return jsonService.doHover(doc, position, jsonService.parseJSONDocument(doc)); + }); + conn.listen(); \ No newline at end of file diff --git a/src/components/lsps.ts b/src/components/lsps.ts index dd972b4..6186cfe 100644 --- a/src/components/lsps.ts +++ b/src/components/lsps.ts @@ -5,10 +5,9 @@ import { hoverTooltip } from '@codemirror/tooltip'; import { EditorView, ViewPlugin } from '@codemirror/view'; import { RequestManager, - Client, - // WebSocketTransport, -} from '@open-rpc/client-js'; -import { PostMessageWorkerTransport } from "./PostMessageWorkerTransport"; + Client +} from '../open-rpc-client-js'; +import { PostMessageWorkerTransport } from "../open-rpc-client-js/transports/PostMessageWorkerTransport"; import { DiagnosticSeverity, CompletionItemKind, @@ -91,17 +90,9 @@ class LanguageServerPlugin implements PluginValue { this.languageId = this.view.state.facet(languageId); this.documentVersion = 0; this.changesTimeout = 0; - // const transport = new PostMessageWorkerTransport("http://localhost:8545"); - // // @ts-ignore - // const client = new Client(new RequestManager([transport])); - // const result = await client.request({method: "addition", params: [2, 2]}); this.transport = new PostMessageWorkerTransport( this.view.state.facet(serverWorker) ); - // new WebSocketTransport( - // this.view.state.facet(serverUri) - // ); - // @ts-ignore this.requestManager = new RequestManager([this.transport]); this.client = new Client(this.requestManager); this.client.onNotification((data) => { diff --git a/src/components/tsserver.ts b/src/components/tsserver.ts index b429dc8..52d6b83 100644 --- a/src/components/tsserver.ts +++ b/src/components/tsserver.ts @@ -1,2 +1,7 @@ -import "typescript/lib/tsserver"; +import "../../node_modules/typescript/lib/tsserver"; +// @ts-ignore +console.log(globalThis) +globalThis.addEventListener("message", ({ data }) => { + console.log(data) +}) export { }; \ No newline at end of file diff --git a/src/open-rpc-client-js/Client.ts b/src/open-rpc-client-js/Client.ts new file mode 100644 index 0000000..76ce0f4 --- /dev/null +++ b/src/open-rpc-client-js/Client.ts @@ -0,0 +1,100 @@ +import RequestManager from "./RequestManager"; +import { JSONRPCError } from "./Error"; +import { IClient, RequestArguments, NotificationArguments } from "./ClientInterface"; +import { IJSONRPCNotification } from "./Request"; + +/** + * OpenRPC Client JS is a browser-compatible JSON-RPC client with multiple transports and + * multiple request managers to enable features like round-robin or fallback-by-position. + * + * @example + * ```typescript + * import { RequestManager, HTTPTransport, Client } from '@open-rpc/client-js'; + * const transport = new HTTPTransport('http://localhost:3333'); + * const client = new Client(new RequestManager([transport])); + * const result = await client.request({method: 'addition', params: [2, 2]}); + * // => { jsonrpc: '2.0', id: 1, result: 4 } + * ``` + * + */ +class Client implements IClient { + public requestManager: RequestManager; + constructor(requestManager: RequestManager) { + this.requestManager = requestManager; + } + + /** + * Initiates [[RequestManager.startBatch]] in order to build a batch call. + * + * Subsequent calls to [[Client.request]] will be added to the batch. Once [[Client.stopBatch]] is called, the + * promises for the [[Client.request]] will then be resolved. If the [[RequestManager]] already has a batch in + * progress, this method is a noop. + * + * @example + * myClient.startBatch(); + * myClient.request({method: "foo", params: ["bar"]}).then(() => console.log('foobar')); + * myClient.request({method: "foo", params: ["baz"]}).then(() => console.log('foobaz')); + * myClient.stopBatch(); + */ + public startBatch(): void { + return this.requestManager.startBatch(); + } + + /** + * Initiates [[RequestManager.stopBatch]] in order to finalize and send the batch to the underlying transport. + * + * [[Client.stopBatch]] will send the [[Client.request]] calls made since the last [[Client.startBatch]] call. For + * that reason, [[Client.startBatch]] MUST be called before [[Client.stopBatch]]. + * + * @example + * myClient.startBatch(); + * myClient.request({method: "foo", params: ["bar"]}).then(() => console.log('foobar')); + * myClient.request({method: "foo", params: ["baz"]}).then(() => console.log('foobaz')); + * myClient.stopBatch(); + */ + public stopBatch(): void { + return this.requestManager.stopBatch(); + } + + /** + * A JSON-RPC call is represented by sending a Request object to a Server. + * + * @param requestObject.method A String containing the name of the method to be invoked. Method names that begin with the word rpc + * followed by a period character (U+002E or ASCII 46) are reserved for rpc-internal methods and extensions and + * MUST NOT be used for anything else. + * @param requestObject.params A Structured value that holds the parameter values to be used during the invocation of the method. + * + * @example + * myClient.request({method: "foo", params: ["bar"]}).then(() => console.log('foobar')); + */ + public async request(requestObject: RequestArguments, timeout?: number) { + if (this.requestManager.connectPromise) { + await this.requestManager.connectPromise; + } + return this.requestManager.request(requestObject, false, timeout); + } + + public async notify(requestObject: NotificationArguments) { + if (this.requestManager.connectPromise) { + await this.requestManager.connectPromise; + } + return this.requestManager.request(requestObject, true, null); + } + + public onNotification(callback: (data: IJSONRPCNotification) => void) { + this.requestManager.requestChannel.addListener("notification", callback); + } + + public onError(callback: (data: JSONRPCError) => void) { + this.requestManager.requestChannel.addListener("error", callback); + } + + /** + * Close connection + */ + public close() { + this.requestManager.close(); + } +} + +export default Client; diff --git a/src/open-rpc-client-js/ClientInterface.ts b/src/open-rpc-client-js/ClientInterface.ts new file mode 100644 index 0000000..1c2d166 --- /dev/null +++ b/src/open-rpc-client-js/ClientInterface.ts @@ -0,0 +1,19 @@ +import { IJSONRPCNotification } from "./Request"; + +interface Arguments { + readonly method: string; + readonly params?: readonly unknown[] | object; +} + +export type RequestArguments = Arguments; + +export type NotificationArguments = Arguments; + +export type JSONRPCMessage = RequestArguments | NotificationArguments; + +export interface IClient { + request(args: RequestArguments): Promise; + notify(args: NotificationArguments): Promise; + close(): void; + onNotification(callback: (data: IJSONRPCNotification) => void): void; +} diff --git a/src/components/Error.ts b/src/open-rpc-client-js/Error.ts similarity index 99% rename from src/components/Error.ts rename to src/open-rpc-client-js/Error.ts index cab7c88..d8d3ae2 100644 --- a/src/components/Error.ts +++ b/src/open-rpc-client-js/Error.ts @@ -21,4 +21,4 @@ export const convertJSONToRPCError = (payload: any): JSONRPCError => { return new JSONRPCError(message, code, data); } return new JSONRPCError("Unknown error", ERR_UNKNOWN, payload); -}; \ No newline at end of file +}; diff --git a/src/components/Request.ts b/src/open-rpc-client-js/Request.ts similarity index 99% rename from src/components/Request.ts rename to src/open-rpc-client-js/Request.ts index 65b67d0..8d33f28 100644 --- a/src/components/Request.ts +++ b/src/open-rpc-client-js/Request.ts @@ -86,4 +86,4 @@ export const getNotifications = (data: JSONRPCRequestData): IJSONRPCData[] => { return [data]; } return []; -}; \ No newline at end of file +}; diff --git a/src/open-rpc-client-js/RequestManager.ts b/src/open-rpc-client-js/RequestManager.ts new file mode 100644 index 0000000..3fcd44b --- /dev/null +++ b/src/open-rpc-client-js/RequestManager.ts @@ -0,0 +1,122 @@ +import { Transport } from "./transports/Transport"; +import { IJSONRPCRequest, IJSONRPCNotification, IBatchRequest } from "./Request"; +import { JSONRPCError } from "./Error"; +import StrictEventEmitter from "strict-event-emitter-types"; +import { EventEmitter } from "events"; +import { JSONRPCMessage } from "./ClientInterface"; + +export type RequestChannel = StrictEventEmitter; + +export interface IRequestEvents { + "error": (err: JSONRPCError) => void; + "notification": (data: any) => void; +} +export type RequestID = string | number; + +export type INextRequestID = () => RequestID; +export const defaultNextRequest = () => { + let lastId = -1; + return () => ++lastId; +} +/* +** Naive Request Manager, only use 1st transport. + * A more complex request manager could try each transport. + * If a transport fails, or times out, move on to the next. + */ + +class RequestManager { + public transports: Transport[]; + public connectPromise: Promise; + public batch: IBatchRequest[] = []; + public requestChannel: RequestChannel; + private requests: any; + private batchStarted: boolean = false; + private lastId: number = -1; + private nextID: INextRequestID; + + constructor(transports: Transport[], nextID:INextRequestID = defaultNextRequest()) { + this.transports = transports; + this.requests = {}; + this.connectPromise = this.connect(); + this.requestChannel = new EventEmitter(); + this.nextID = nextID; + } + + public connect(): Promise { + return Promise.all(this.transports.map(async (transport) => { + transport.subscribe("error", this.handleError.bind(this)); + transport.subscribe("notification", this.handleNotification.bind(this)); + await transport.connect(); + })); + } + public getPrimaryTransport(): Transport { + return this.transports[0]; + } + + public async request(requestObject: JSONRPCMessage, notification: boolean = false, timeout?: number | null): Promise { + const internalID = this.nextID().toString(); + const id = notification ? null : internalID; + // naively grab first transport and use it + const payload = {request: this.makeRequest(requestObject.method, requestObject.params || [], id) , internalID}; + if (this.batchStarted) { + const result = new Promise((resolve, reject) => { + this.batch.push({ resolve, reject, request: payload }); + }); + return result; + } + return this.getPrimaryTransport().sendData(payload, timeout); + } + + public close(): void { + this.requestChannel.removeAllListeners(); + this.transports.forEach((transport) => { + transport.unsubscribe(); + transport.close(); + }); + } + + /** + * Begins a batch call by setting the [[RequestManager.batchStarted]] flag to `true`. + * + * [[RequestManager.batch]] is a singleton - only one batch can exist at a given time, per [[RequestManager]]. + * + */ + public startBatch(): void { + this.batchStarted = true; + } + + public stopBatch(): void { + if (this.batchStarted === false) { + throw new Error("cannot end that which has never started"); + } + + if (this.batch.length === 0) { + this.batchStarted = false; + return; + } + + this.getPrimaryTransport().sendData(this.batch); + this.batch = []; + this.batchStarted = false; + } + + private makeRequest( method: string, + params: any[] | object, + id?: number | string | null): IJSONRPCRequest | IJSONRPCNotification { + if (id) { + return { jsonrpc: "2.0", id, method, params }; + } + return { jsonrpc: "2.0", method, params }; + } + + private handleError(data: JSONRPCError) { + this.requestChannel.emit("error", data); + } + + private handleNotification(data: any) { + this.requestChannel.emit("notification", data); + } + +} + +export default RequestManager; diff --git a/src/open-rpc-client-js/index.ts b/src/open-rpc-client-js/index.ts new file mode 100644 index 0000000..b47516e --- /dev/null +++ b/src/open-rpc-client-js/index.ts @@ -0,0 +1,20 @@ +import RequestManager from "./RequestManager"; +import EventEmitterTransport from "./transports/EventEmitterTransport"; +import HTTPTransport from "./transports/HTTPTransport"; +import WebSocketTransport from "./transports/WebSocketTransport"; +import PostMessageWindowTransport from "./transports/PostMessageWindowTransport"; +import PostMessageIframeTransport from "./transports/PostMessageIframeTransport"; +import { JSONRPCError } from "./Error"; +import Client from "./Client"; + +export default Client; +export { + Client, + RequestManager, + HTTPTransport, + EventEmitterTransport, + WebSocketTransport, + JSONRPCError, + PostMessageWindowTransport, + PostMessageIframeTransport, +}; diff --git a/src/open-rpc-client-js/transports/EventEmitterTransport.ts b/src/open-rpc-client-js/transports/EventEmitterTransport.ts new file mode 100644 index 0000000..9583581 --- /dev/null +++ b/src/open-rpc-client-js/transports/EventEmitterTransport.ts @@ -0,0 +1,45 @@ +import { EventEmitter } from "events"; +import { Transport } from "./Transport"; +import { JSONRPCRequestData, getNotifications } from "../Request"; +import { JSONRPCError, ERR_UNKNOWN } from "../Error"; + +class EventEmitterTransport extends Transport { + public connection: EventEmitter; + private reqUri: string; + private resUri: string; + + constructor(destEmitter: EventEmitter, reqUri: string, resUri: string) { + super(); + this.connection = destEmitter; + this.reqUri = reqUri; + this.resUri = resUri; + } + + public connect(): Promise { + this.connection.on(this.resUri, (data: any) => { + this.transportRequestManager.resolveResponse(data); + }); + return Promise.resolve(); + } + + public sendData(data: JSONRPCRequestData, timeout: number | null = null): Promise { + const prom = this.transportRequestManager.addRequest(data, timeout); + const notifications = getNotifications(data); + const parsedData = this.parseData(data); + try { + this.connection.emit(this.reqUri, parsedData); + this.transportRequestManager.settlePendingRequest(notifications); + return prom; + } catch (e) { + const responseErr = new JSONRPCError(e.message, ERR_UNKNOWN, e); + this.transportRequestManager.settlePendingRequest(notifications, responseErr); + return Promise.reject(responseErr); + } + } + + public close() { + this.connection.removeAllListeners(); + } +} + +export default EventEmitterTransport; diff --git a/src/open-rpc-client-js/transports/HTTPTransport.ts b/src/open-rpc-client-js/transports/HTTPTransport.ts new file mode 100644 index 0000000..ba8122f --- /dev/null +++ b/src/open-rpc-client-js/transports/HTTPTransport.ts @@ -0,0 +1,80 @@ +import fetch from "isomorphic-fetch"; +import { Transport } from "./Transport"; +import { JSONRPCRequestData, getNotifications, getBatchRequests } from "../Request"; +import { ERR_UNKNOWN, JSONRPCError } from "../Error"; + +type CredentialsOption = "omit" | "same-origin" | "include" + +interface HTTPTransportOptions { + credentials?: CredentialsOption + headers?: Record +} + +class HTTPTransport extends Transport { + public uri: string; + private readonly credentials?: CredentialsOption; + private readonly headers: Headers + constructor(uri: string, options?: HTTPTransportOptions) { + super(); + this.uri = uri; + // @ts-ignore + this.credentials = options && options.credentials; + this.headers = HTTPTransport.setupHeaders(options && options.headers) + } + public connect(): Promise { + return Promise.resolve(); + } + + public async sendData(data: JSONRPCRequestData, timeout: number | null = null): Promise { + const prom = this.transportRequestManager.addRequest(data, timeout); + const notifications = getNotifications(data); + const batch = getBatchRequests(data); + try { + const result = await fetch(this.uri, { + method: "POST", + headers: this.headers, + body: JSON.stringify(this.parseData(data)), + credentials: this.credentials, + }); + // requirements are that notifications are successfully sent + this.transportRequestManager.settlePendingRequest(notifications); + if (this.onlyNotifications(data)) { + return Promise.resolve(); + } + const body = await result.text(); + const responseErr = this.transportRequestManager.resolveResponse(body); + if (responseErr) { + // requirements are that batch requuests are successfully resolved + // this ensures that individual requests within the batch request are settled + this.transportRequestManager.settlePendingRequest(batch, responseErr); + return Promise.reject(responseErr); + } + } catch (e) { + const responseErr = new JSONRPCError(e.message, ERR_UNKNOWN, e); + this.transportRequestManager.settlePendingRequest(notifications, responseErr); + this.transportRequestManager.settlePendingRequest(getBatchRequests(data), responseErr); + return Promise.reject(responseErr); + } + return prom; + } + + // tslint:disable-next-line:no-empty + public close(): void { } + + private onlyNotifications = (data: JSONRPCRequestData) => { + if (data instanceof Array) { + return data.every((datum) => datum.request.request.id === null || datum.request.request.id === undefined); + } + return (data.request.id === null || data.request.id === undefined); + } + + private static setupHeaders(headerOptions?: Record): Headers { + const headers = new Headers(headerOptions) + // Overwrite header options to ensure correct content type. + headers.set("Content-Type", "application/json") + return headers + } +} + +export default HTTPTransport; +export {HTTPTransport, HTTPTransportOptions, CredentialsOption} diff --git a/src/open-rpc-client-js/transports/PostMessageIframeTransport.ts b/src/open-rpc-client-js/transports/PostMessageIframeTransport.ts new file mode 100644 index 0000000..8b3f91d --- /dev/null +++ b/src/open-rpc-client-js/transports/PostMessageIframeTransport.ts @@ -0,0 +1,63 @@ +import { Transport } from "./Transport"; +import { JSONRPCRequestData, IJSONRPCData, getNotifications } from "../Request"; + +class PostMessageIframeTransport extends Transport { + public uri: string; + public frame: undefined | null | Window; + public postMessageID: string; + + constructor(uri: string) { + super(); + this.uri = uri; + this.postMessageID = `post-message-transport-${Math.random()}`; + } + public createWindow(uri: string): Promise { + return new Promise((resolve, reject) => { + let frame: Window | null; + const iframe = document.createElement("iframe"); + iframe.setAttribute("id", this.postMessageID); + iframe.setAttribute("width", "0px"); + iframe.setAttribute("height", "0px"); + iframe.setAttribute("style", "visiblity:hidden;border:none;outline:none;"); + iframe.addEventListener("load", () => { + resolve(frame); + }); + iframe.setAttribute("src", uri); + window.document.body.appendChild(iframe); + frame = iframe.contentWindow; + }); + } + private messageHandler = (ev: MessageEvent) => { + this.transportRequestManager.resolveResponse(JSON.stringify(ev.data)); + } + public connect(): Promise { + const urlRegex = /^(http|https):\/\/.*$/; + return new Promise(async (resolve, reject) => { + if (!urlRegex.test(this.uri)) { + reject(new Error("Bad URI")); + } + this.frame = await this.createWindow(this.uri); + window.addEventListener("message", this.messageHandler); + resolve(); + }); + } + + public async sendData(data: JSONRPCRequestData, timeout: number | null = 5000): Promise { + const prom = this.transportRequestManager.addRequest(data, null); + const notifications = getNotifications(data); + if (this.frame) { + this.frame.postMessage((data as IJSONRPCData).request, "*"); + this.transportRequestManager.settlePendingRequest(notifications); + } + return prom; + } + + public close(): void { + const el = document.getElementById(this.postMessageID); + el?.remove(); + window.removeEventListener("message", this.messageHandler); + } + +} + +export default PostMessageIframeTransport; diff --git a/src/open-rpc-client-js/transports/PostMessageWindowTransport.ts b/src/open-rpc-client-js/transports/PostMessageWindowTransport.ts new file mode 100644 index 0000000..1ad2fbb --- /dev/null +++ b/src/open-rpc-client-js/transports/PostMessageWindowTransport.ts @@ -0,0 +1,73 @@ +import { Transport } from "./Transport"; +import { JSONRPCRequestData, IJSONRPCData, getNotifications } from "../Request"; + +const openPopup = (url: string) => { + const width = 400; + const height = window.screen.height; + const left = 0; + const top = 0; + + return window.open( + url, + "inspector:popup", + `left=${left},top=${top},width=${width},height=${height},resizable,scrollbars=yes,status=1`, + ); +}; + +class PostMessageTransport extends Transport { + public uri: string; + public frame: undefined | null | Window; + public postMessageID: string; + + constructor(uri: string) { + super(); + this.uri = uri; + this.postMessageID = `post-message-transport-${Math.random()}`; + } + + public createWindow(uri: string): Promise { + return new Promise((resolve, reject) => { + let frame: Window | null; + frame = openPopup(uri); + setTimeout(() => { + resolve(frame); + }, 3000); + }); + } + + private messageHandler = (ev: MessageEvent) => { + this.transportRequestManager.resolveResponse(JSON.stringify(ev.data)); + } + + public connect(): Promise { + const urlRegex = /^(http|https):\/\/.*$/; + return new Promise(async (resolve, reject) => { + if (!urlRegex.test(this.uri)) { + reject(new Error("Bad URI")); + } + this.frame = await this.createWindow(this.uri); + window.addEventListener("message", this.messageHandler); + resolve(); + }); + } + + public async sendData(data: JSONRPCRequestData, timeout: number | undefined = 5000): Promise { + const prom = this.transportRequestManager.addRequest(data, null); + const notifications = getNotifications(data); + if (this.frame) { + this.frame.postMessage((data as IJSONRPCData).request, this.uri); + this.transportRequestManager.settlePendingRequest(notifications); + } + return prom; + } + + public close(): void { + if (this.frame) { + window.removeEventListener("message", this.messageHandler); + (this.frame as Window).close(); + } + } + +} + +export default PostMessageTransport; diff --git a/src/components/PostMessageWorkerTransport.ts b/src/open-rpc-client-js/transports/PostMessageWorkerTransport.ts similarity index 84% rename from src/components/PostMessageWorkerTransport.ts rename to src/open-rpc-client-js/transports/PostMessageWorkerTransport.ts index 7d2df38..8960014 100644 --- a/src/components/PostMessageWorkerTransport.ts +++ b/src/open-rpc-client-js/transports/PostMessageWorkerTransport.ts @@ -1,5 +1,5 @@ import { Transport } from "./Transport"; -import { JSONRPCRequestData, IJSONRPCData, getNotifications } from "./Request"; +import { JSONRPCRequestData, IJSONRPCData, getNotifications } from "../Request"; export class PostMessageWorkerTransport extends Transport { public uri: string; @@ -22,6 +22,7 @@ export class PostMessageWorkerTransport extends Transport { }); } private messageHandler = (ev: MessageEvent) => { + console.log("Message Handler", ev.data) this.transportRequestManager.resolveResponse(JSON.stringify(ev.data)); } public connect(): Promise { @@ -32,6 +33,7 @@ export class PostMessageWorkerTransport extends Transport { // reject(new Error("Bad URI")); // } // this.worker = await this.createWorker(this.uri); + // this.worker.postMessage(["--useSingleInferredProject", "--locale=en"]); this.worker.addEventListener("message", this.messageHandler); resolve(); } catch (err) { @@ -51,9 +53,11 @@ export class PostMessageWorkerTransport extends Transport { } public close(): void { - const el = document.getElementById(this.postMessageID); - el?.remove(); + // const el = document.getElementById(this.postMessageID); + // el?.remove(); this.worker.removeEventListener("message", this.messageHandler); + this.worker.terminate(); + } } diff --git a/src/open-rpc-client-js/transports/Transport.ts b/src/open-rpc-client-js/transports/Transport.ts new file mode 100644 index 0000000..d18d3d2 --- /dev/null +++ b/src/open-rpc-client-js/transports/Transport.ts @@ -0,0 +1,79 @@ +import { + JSONRPCRequestData, + IJSONRPCNotificationResponse, + IJSONRPCResponse, +} from "../Request"; + +import StrictEventEmitter from "strict-event-emitter-types"; +import { EventEmitter } from "events"; +import { JSONRPCError } from "../Error"; +import { TransportRequestManager } from "./TransportRequestManager"; + +interface ITransportEvents { + pending: (data: JSONRPCRequestData) => void; + notification: (data: IJSONRPCNotificationResponse) => void; + response: (data: IJSONRPCResponse) => void; + error: (data: JSONRPCError) => void; +} + +type TransportEventName = keyof ITransportEvents; +export type TransportEventChannel = StrictEventEmitter; + +export abstract class Transport { + protected transportRequestManager: TransportRequestManager; + constructor() { + this.transportRequestManager = new TransportRequestManager(); + // add a noop for the error event to not require handling the error event + // tslint:disable-next-line:no-empty + this.transportRequestManager.transportEventChannel.on("error", () => { }); + } + + public abstract connect(): Promise; + public abstract close(): void; + public abstract async sendData(data: JSONRPCRequestData, timeout?: number | null): Promise; + + public subscribe(event: TransportEventName, handler: ITransportEvents[TransportEventName]) { + this.transportRequestManager.transportEventChannel.addListener(event, handler); + } + public unsubscribe(event?: TransportEventName, handler?: ITransportEvents[TransportEventName]) { + if (!event) { + return this.transportRequestManager.transportEventChannel.removeAllListeners(); + } + if (event && handler) { + this.transportRequestManager.transportEventChannel.removeListener(event, handler); + } + } + protected parseData(data: JSONRPCRequestData) { + if (data instanceof Array) { + return data.map((batch) => batch.request.request); + } + return data.request; + } +} + +export type promiseResolve = (r?: {} | PromiseLike<{}> | undefined) => void; +export type promiseReject = (r?: any) => void; +export interface IRequestPromise { + resolve: promiseResolve; + reject: promiseReject; +} + +export type NotificationResponse = "notification"; +export type RequestResponse = "response"; +export type BadResponse = "error"; + +export type TransportResponse = JSONRPCError | undefined; + +interface IHttpTransportResponse { + type: "http"; + id?: string | number; + error?: Error; + payload: string; +} + +interface IWSTransportResponse { + type: "ws"; + payload: string; +} + +export type TransportResponseData = IHttpTransportResponse | IWSTransportResponse; diff --git a/src/open-rpc-client-js/transports/TransportRequestManager.ts b/src/open-rpc-client-js/transports/TransportRequestManager.ts new file mode 100644 index 0000000..03d679f --- /dev/null +++ b/src/open-rpc-client-js/transports/TransportRequestManager.ts @@ -0,0 +1,152 @@ +import { + JSONRPCRequestData, IJSONRPCRequest, + IJSONRPCNotification, IJSONRPCNotificationResponse, + IJSONRPCResponse, IBatchRequest, IJSONRPCData, +} from "../Request"; +import { EventEmitter } from "events"; +import { JSONRPCError, ERR_TIMEOUT, ERR_UNKNOWN, ERR_MISSIING_ID, convertJSONToRPCError } from "../Error"; +import { promiseResolve, promiseReject, TransportEventChannel, TransportResponse, IRequestPromise } from "./Transport"; +export interface IPendingRequest { + resolve: promiseResolve; + reject: promiseReject; +} +export class TransportRequestManager { + public transportEventChannel: TransportEventChannel; + private pendingRequest: { + [id: string]: IPendingRequest; + }; + private pendingBatchRequest: { + [id: string]: boolean; + }; + constructor() { + this.pendingRequest = {}; + this.pendingBatchRequest = {}; + this.transportEventChannel = new EventEmitter(); + } + public addRequest(data: JSONRPCRequestData, timeout: number | null): Promise { + this.transportEventChannel.emit("pending", data); + if (data instanceof Array) { + this.addBatchReq(data, timeout); + return Promise.resolve(); + } + return this.addReq(data.internalID, timeout); + } + + public settlePendingRequest(request: IJSONRPCData[], error?: Error) { + request.forEach((req) => { + const resolver = this.pendingRequest[req.internalID]; + delete this.pendingBatchRequest[req.internalID]; + if (resolver === undefined) { + return; + } + if (error) { + resolver.reject(error); + return; + } + resolver.resolve(); + // Notifications have no response and should clear their own pending requests + if(req.request.id === null || req.request.id === undefined){ + delete this.pendingRequest[req.internalID]; + } + }); + } + + public isPendingRequest(id: string | number): boolean { + return this.pendingRequest.hasOwnProperty(id) + } + + public resolveResponse(payload: string, emitError: boolean = true): TransportResponse { + let data: any = payload; + try { + data = JSON.parse(payload); + if (this.checkJSONRPC(data) === false) { + return; // ignore messages that are not conforming to JSON-RPC + } + if (data instanceof Array) { + return this.resolveBatch(data, emitError); + } + return this.resolveRes(data, emitError); + } catch (e) { + const err = new JSONRPCError("Bad response format", ERR_UNKNOWN, payload); + if (emitError) { + this.transportEventChannel.emit("error", err); + } + return err; + } + } + + private addBatchReq(batches: IBatchRequest[], timeout: number | null) { + batches.forEach((batch) => { + const { resolve, reject } = batch; + const { internalID } = batch.request; + this.pendingBatchRequest[internalID] = true; + this.pendingRequest[internalID] = { resolve, reject }; + }); + return Promise.resolve(); + } + private addReq(id: string | number, timeout: number | null) { + return new Promise((resolve, reject) => { + if (timeout !== null && timeout) { + this.setRequestTimeout(id, timeout, reject); + } + this.pendingRequest[id] = { resolve, reject }; + }); + } + private checkJSONRPC(data: any) { + let payload = [data]; + if (data instanceof Array) { + payload = data; + } + return payload.every((datum) => (datum.result !== undefined || datum.error !== undefined || datum.method !== undefined)); + } + + private processResult(payload: any, prom: IRequestPromise) { + if (payload.error) { + const err = convertJSONToRPCError(payload); + prom.reject(err); + return; + } + prom.resolve(payload.result); + } + private resolveBatch(payload: (IJSONRPCRequest | IJSONRPCNotification)[], emitError: boolean): TransportResponse { + const results = payload.map((datum) => { + return this.resolveRes(datum, emitError); + }); + const errors = results.filter((result) => result); + if (errors.length > 0) { + return errors[0]; + } + return undefined; + } + + private resolveRes(data: IJSONRPCNotificationResponse | IJSONRPCResponse, emitError: boolean): TransportResponse { + const { id, error } = data; + + const status = this.pendingRequest[id as string]; + if (status) { + delete this.pendingRequest[id as string]; + this.processResult(data, status); + this.transportEventChannel.emit("response", data as IJSONRPCResponse); + return; + } + if (id === undefined && error === undefined) { + this.transportEventChannel.emit("notification", data as IJSONRPCNotificationResponse); + return; + } + let err; + if (error) { + err = convertJSONToRPCError(data); + } + if (emitError && error && err) { + this.transportEventChannel.emit("error", err); + } + return err; + } + + private setRequestTimeout(id: string | number, timeout: number, reject: promiseReject) { + setTimeout(() => { + delete this.pendingRequest[id]; + reject(new JSONRPCError(`Request timeout request took longer than ${timeout} ms to resolve`, ERR_TIMEOUT)); + }, timeout); + } +} diff --git a/src/open-rpc-client-js/transports/WebSocketTransport.ts b/src/open-rpc-client-js/transports/WebSocketTransport.ts new file mode 100644 index 0000000..9c38d79 --- /dev/null +++ b/src/open-rpc-client-js/transports/WebSocketTransport.ts @@ -0,0 +1,49 @@ +import WS from "isomorphic-ws"; +import { Transport } from "./Transport"; +import { JSONRPCRequestData, getNotifications, getBatchRequests } from "../Request"; +import { JSONRPCError, ERR_UNKNOWN } from "../Error"; + +class WebSocketTransport extends Transport { + public connection: WS; + public uri: string; + + constructor(uri: string) { + super(); + this.uri = uri; + this.connection = new WS(uri); + } + public connect(): Promise { + return new Promise((resolve, reject) => { + const cb = () => { + this.connection.removeEventListener("open", cb); + resolve(); + }; + this.connection.addEventListener("open", cb); + this.connection.addEventListener("message", (message: { data: string }) => { + const { data } = message; + this.transportRequestManager.resolveResponse(data); + }); + }); + } + + public async sendData(data: JSONRPCRequestData, timeout: number | null = 5000): Promise { + let prom = this.transportRequestManager.addRequest(data, timeout); + const notifications = getNotifications(data); + this.connection.send(JSON.stringify(this.parseData(data)), (err?: Error) => { + if (err) { + const jsonError = new JSONRPCError(err.message, ERR_UNKNOWN, err); + this.transportRequestManager.settlePendingRequest(notifications, jsonError); + this.transportRequestManager.settlePendingRequest(getBatchRequests(data), jsonError); + prom = Promise.reject(jsonError); + } + this.transportRequestManager.settlePendingRequest(notifications); + }); + return prom; + } + + public close(): void { + this.connection.close(); + } +} + +export default WebSocketTransport; diff --git a/src/pages/index.astro b/src/pages/index.astro deleted file mode 100644 index 542d649..0000000 --- a/src/pages/index.astro +++ /dev/null @@ -1,60 +0,0 @@ ---- -import Editor from '../components/Editor.tsx'; -// Component Script: -// You can write any JavaScript/TypeScript that you'd like here. -// It will run during the build, but never in the browser. -// All variables are available to use in the HTML template below. -let title = 'Codemirror Test'; - -// Full Astro Component Syntax: -// https://docs.astro.build/core-concepts/astro-components/ ---- - - - - - {title} - - - - - - - - - - - - diff --git a/tsconfig.json b/tsconfig.json index 7f61520..0c1076b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,11 @@ { "compilerOptions": { + "allowSyntheticDefaultImports": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + "types": [ + "vite/client" + ], "moduleResolution": "node", "target": "ES2021", "module": "ES2022", diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..02edc08 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite'; +import solidPlugin from 'vite-plugin-solid'; + +export default defineConfig({ + plugins: [solidPlugin()], + build: { + target: 'esnext', + polyfillDynamicImport: false, + }, +}); \ No newline at end of file -- knotmirror 0.0.1