chat: add safe hybrid Markdown editing with strict CSP
ci / linux-arm64-cross (push) Successful in 3m22s
ci / linux-x64 (push) Successful in 3m32s

This commit is contained in:
omar committed 2026-11-02 11:32:31 +03:00
1 parent 3ee2bef7ce
commit f618d8bce9
43 files changed
+18079 -241

No files matched your search

+8 -4
View File
@@ -5,6 +5,7 @@
* near offset 4873300; defaults from workflowSettings class `Xe` and appearanceSettings class `qe`).
*
* Official key → TeamsPeach key default
* workflowSettings.useRichTextEditor → chatRichTextEditor true
* appearanceSettings.chat_input_toolbar_visibility → chatToolbarVisibility 'always-visible'
* appearanceSettings.chat_mermaid_autoload_mode → chatMermaidAutoload 'only-simple'
* workflowSettings.openIncomingChats → chatOpenIncoming true
@@ -13,10 +14,12 @@
* workflowSettings.autoDownloadImages → autoDownloadImages false
* chat-server ignore list (per myTeamSpeak chat connection) → chatIgnoredUsers [] (local, keyed by client UID)
*
* Not modelled because TeamsPeach has no backing feature: useRichTextEditor (the composer is a plain
* textarea), autoAcceptIncomingDirectChats (TS6-server decentral chat invitations), useChatsHistory and
* sort_contacts_alphabetically / show_offline_contacts / group_offline_contacts (myTeamSpeak contacts and
* group chats).
* chatRichTextEditor switches the one composer editor between hybrid Markdown preview and raw source
* (main.js@1298380 default true, @3520977 hybridMarkdown enablePreview:useRichTextEditing).
*
* Not modelled because TeamsPeach has no backing feature: autoAcceptIncomingDirectChats (TS6-server
* decentral chat invitations), useChatsHistory and sort_contacts_alphabetically / show_offline_contacts /
* group_offline_contacts (myTeamSpeak contacts and group chats).
*/
const MAX_IGNORED_USERS = 1000;
@@ -48,6 +51,7 @@ function validIgnoredUsers(list) {
}
const CHAT_SCHEMA = {
chatRichTextEditor: { default: true, check: isBool },
chatToolbarVisibility: { default: 'always-visible', check: (v) => v === 'inactive' || v === 'dynamic' || v === 'always-visible' },
chatMermaidAutoload: { default: 'only-simple', check: (v) => v === 'never' || v === 'only-simple' },
chatOpenIncoming: { default: true, check: isBool },
+3 -1
View File
@@ -15,6 +15,7 @@
<link rel="stylesheet" href="styles/privacy.css">
<link rel="stylesheet" href="styles/information-panels.css">
<link rel="stylesheet" href="styles/chat-options.css">
<link rel="stylesheet" href="styles/chat-editor.css">
<link rel="stylesheet" href="styles/keybinds.css">
<link rel="stylesheet" href="styles/whisper.css">
<link rel="stylesheet" href="styles/contacts.css">
@@ -492,7 +493,8 @@
<button id="chat-format-more" class="composer-tool is-overflow" type="button" aria-haspopup="menu" aria-expanded="false" hidden><svg class="icon" aria-hidden="true"><use href="#i-chevron-right"/></svg><span class="composer-tool-text" data-i18n="chat.toolbar.more">More</span></button>
</div>
<div class="composer-row">
<textarea id="chat-input" rows="1" aria-label="Message" data-i18n-aria-label="ui.message" placeholder="Message" data-i18n-placeholder="ui.message"></textarea>
<!-- chat-input render @3561667: TSChatInputTextarea hosts one CodeMirror view (hybrid/raw, main.js@3520977); its contentDOM is #chat-input -->
<div id="chat-editor" class="composer-editor ts-chat-input"></div>
<div class="composer-actions">
<button id="chat-emoji" class="icon-btn" type="button" aria-label="Emoji" data-i18n-aria-label="chat.emoji.label" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-chat-emoji"/></svg></button>
<button id="chat-attach" class="icon-btn" type="button" aria-label="Attach file" data-i18n-aria-label="chat.attachment.label" hidden><svg class="icon" aria-hidden="true"><use href="#i-attachment"/></svg></button>
+1 -1
View File
@@ -927,7 +927,7 @@ async function closeSettings() {
S.view = 'main';
renderConnection();
chat.onViewChanged();
(isConnected() ? $('#chat-input') : $('#connect-address')).focus();
(isConnected() ? chat.composerEditor() : $('#connect-address')).focus();
}
// ---------- diagnostics for automated smoke runs (read-only) ----------
+35 -23
View File
@@ -23,33 +23,44 @@ export const SNIPPETS = {
callout: ['> [!NOTE]\n> ', ''], escape: ['\\', ''], entity: ['&', ';'], url: ['https://', ''],
};
/** The text change for snippet `id` over [start, end): `insert` replaces [from, to), then [start, end) is selected. */
export function formatSelection(value, start, end, id) {
const snippet = SNIPPETS[id]; if (!snippet) return null;
const [prefix, suffix, , lines] = snippet;
const selected = value.slice(start, end);
if (selected && !lines && value.slice(Math.max(0, start - prefix.length), start) === prefix && value.slice(end, end + suffix.length) === suffix) {
return { value: value.slice(0, start - prefix.length) + selected + value.slice(end + suffix.length), start: start - prefix.length, end: end - prefix.length };
return { from: start - prefix.length, to: end + suffix.length, insert: selected, start: start - prefix.length, end: end - prefix.length };
}
const text = lines ? selected.split('\n').map((line, i) => `${id === 'ol' ? `${i + 1}. ` : prefix}${line}`).join('\n') : prefix + selected + suffix;
return { value: value.slice(0, start) + text + value.slice(end), start: start + prefix.length, end: start + text.length - suffix.length };
return { from: start, to: end, insert: text, start: start + prefix.length, end: start + text.length - suffix.length };
}
export function initChatComposer({ onChange, attach }) {
const input = $('#chat-input');
/** `editor` is the chat-editor.js adapter; every edit is a text transaction on its single CodeMirror view. */
export function initChatComposer({ editor, onChange, attach }) {
const bar = $('#chat-format-bar');
let menu = null;
let completion = null;
const close = () => {
menu?.remove(); menu = null; completion = null;
for (const button of bar.querySelectorAll('[aria-expanded]')) button.setAttribute('aria-expanded', 'false');
input.removeAttribute('aria-controls'); input.removeAttribute('aria-activedescendant');
editor.removeAttribute('aria-controls'); editor.removeAttribute('aria-activedescendant');
$('#chat-emoji')?.setAttribute('aria-expanded', 'false');
};
const apply = (id, range) => {
if (input.disabled) return;
const result = formatSelection(input.value, range?.start ?? input.selectionStart, range?.end ?? input.selectionEnd, id);
if (!result) return;
input.value = result.value; input.setSelectionRange(result.start, result.end); close(); onChange(); input.focus();
const edit = (change) => {
editor.setRangeText(change.insert, change.from, change.to, 'preserve');
editor.setSelectionRange(change.start, change.end); close(); onChange(); editor.focus();
};
const apply = (id) => {
if (editor.disabled) return;
const change = formatSelection(editor.value, editor.selectionStart, editor.selectionEnd, id);
if (change) edit(change);
};
// A slash command replaces its typed "/name" token with the snippet; the caret lands inside the snippet.
const applySlash = (id, range) => {
if (editor.disabled) return;
const value = editor.value;
const change = formatSelection(value.slice(0, range.start) + value.slice(range.end), range.start, range.start, id);
if (change) edit({ ...change, from: range.start, to: range.end });
};
const more = $('#chat-format-more');
const tools = [...bar.querySelectorAll('button[data-format], button[data-format-group]')];
@@ -101,40 +112,41 @@ export function initChatComposer({ onChange, attach }) {
if (button.dataset.formatGroup) showMenu(button, groupEntries(button.dataset.formatGroup));
});
// Slash commands insert formatting snippets, never execute native commands or fake Matrix actions.
input.addEventListener('input', () => {
editor.addEventListener('input', () => {
close();
const before = input.value.slice(0, input.selectionStart);
const before = editor.value.slice(0, editor.selectionStart);
const match = /(?:^|\n)\/([a-z0-9-]*)$/i.exec(before);
if (!match) return;
const ids = Object.keys(SNIPPETS).filter((id) => id.startsWith(match[1])).slice(0, 12);
if (!ids.length) return;
const range = { start: input.selectionStart - match[1].length - 1, end: input.selectionStart };
const range = { start: editor.selectionStart - match[1].length - 1, end: editor.selectionStart };
menu = h('div', { class: 'ts-autocomplete-list', role: 'listbox', id: 'chat-slash-completion' });
completion = { ids, range, index: 0 };
ids.forEach((id, i) => {
const button = h('button', { type: 'button', role: 'option', id: `chat-slash-${i}`, 'aria-selected': String(i === 0), text: `/${id} — ${t(`chat.snippet.${id}`)}` });
button.addEventListener('mousedown', (e) => e.preventDefault());
button.addEventListener('click', () => apply(id, range)); menu.append(button);
button.addEventListener('click', () => applySlash(id, range)); menu.append(button);
});
bar.before(menu); input.setAttribute('aria-controls', menu.id); input.setAttribute('aria-activedescendant', 'chat-slash-0');
bar.before(menu); editor.setAttribute('aria-controls', menu.id); editor.setAttribute('aria-activedescendant', 'chat-slash-0');
});
input.addEventListener('keydown', (e) => {
// Capture phase on the editor's own content element: runs before CodeMirror's keymap and the send listener.
editor.addEventListener('keydown', (e) => {
if (e.key === 'Escape') { close(); return; }
if (!completion || e.isComposing) return;
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
e.preventDefault();
e.preventDefault(); e.stopImmediatePropagation();
completion.index = (completion.index + (e.key === 'ArrowDown' ? 1 : completion.ids.length - 1)) % completion.ids.length;
[...menu.children].forEach((node, i) => node.setAttribute('aria-selected', String(i === completion.index)));
input.setAttribute('aria-activedescendant', `chat-slash-${completion.index}`);
editor.setAttribute('aria-activedescendant', `chat-slash-${completion.index}`);
} else if (e.key === 'Enter' || e.key === 'Tab') {
e.preventDefault(); e.stopImmediatePropagation(); apply(completion.ids[completion.index], completion.range);
e.preventDefault(); e.stopImmediatePropagation(); applySlash(completion.ids[completion.index], completion.range);
}
}, true);
$('#chat-attach')?.addEventListener('click', attach);
$('#chat-emoji')?.addEventListener('click', () => {
if (menu?.classList.contains('chat-emoji-picker')) { close(); return; }
close();
const range = { start: input.selectionStart, end: input.selectionEnd };
const range = { start: editor.selectionStart, end: editor.selectionEnd };
const search = h('input', { type: 'search', 'aria-label': t('chat.emoji.search'), placeholder: t('chat.emoji.search') });
const list = h('div', { class: 'ts-autocomplete-list' });
menu = h('div', { class: 'chat-emoji-picker' }, search, list);
@@ -144,15 +156,15 @@ export function initChatComposer({ onChange, attach }) {
if (!name.includes(query)) continue;
const button = h('button', { type: 'button', text: unicode, title: `:${name}:`, 'aria-label': name });
button.addEventListener('click', () => {
if (input.disabled) return;
input.setRangeText(`:${name}:`, range.start, range.end, 'end'); close(); onChange(); input.focus();
if (editor.disabled) return;
editor.setRangeText(`:${name}:`, range.start, range.end, 'end'); close(); onChange(); editor.focus();
});
list.append(button); if (++count === 80) break;
}
};
search.addEventListener('input', draw); bar.before(menu); draw(); search.focus(); $('#chat-emoji').setAttribute('aria-expanded', 'true');
});
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && menu) { close(); input.focus(); } });
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && menu) { close(); editor.focus(); } });
document.addEventListener('pointerdown', (e) => { if (menu && !menu.contains(e.target) && !e.target.closest('#chat-format-bar, #chat-emoji')) close(); });
return close;
}
+190
View File
@@ -0,0 +1,190 @@
// Hybrid (rich-text) preview for the chat editor, the account-free counterpart of the official
// `hybridMarkdown({ enablePreview: useRichTextEditing })` CodeMirror extension (main.js @3520977).
// The document is parsed with the same dialect parser as sent messages (markdown/parse.js) and every
// top-level block the selection does not touch is replaced by its message rendering (markdown/render.js);
// the block holding the cursor or any selected text stays raw source. The source text is never rewritten:
// widgets are display-only, so typing, IME, undo and the clipboard always operate on the exact raw text.
// Rendered previews never navigate, load server images or run actions: links lose their href, server
// image buttons are disabled, spoilers are shown revealed and nothing in a widget is focusable.
import { Decoration, EditorSelection, EditorView, StateField, WidgetType, keymap } from '../vendor/codemirror/codemirror.js';
import { parseMarkdown } from './markdown/parse.js';
import { renderMarkdownBlock, renderMarkdownFootnotes } from './markdown/render.js';
// Chat messages are limited to 8 KiB of UTF-8, so a longer draft is never sent as-is; past this many
// UTF-16 units the editor stays raw instead of re-parsing on every keystroke.
export const PREVIEW_MAX_LENGTH = 16384;
const skipLines = (key, value) => (key === 'lines' ? undefined : value);
/**
* Top-level source blocks of `text` as `{ from, to, kind, node, key }` with 0-based document line indexes
* (`to` exclusive), in document order. `key` identifies the rendering, independent of where the block is.
* Lines outside every block (blank lines, link reference definitions) are not listed.
*/
export function previewBlocks(text) {
if (text.length > PREVIEW_MAX_LENGTH) return [];
const doc = parseMarkdown(text);
if (doc.tooComplex) return [];
const blocks = [];
const add = (kind, node) => {
const [from, to] = node.lines;
if (to > from) blocks.push({ from, to, kind, node, key: `${kind}:${to - from}:${JSON.stringify(node, skipLines)}` });
};
for (const node of doc.children) if (node.lines) add('block', node);
for (const note of doc.footnotes) if (note.lines) add('footnote', note);
return blocks.sort((a, b) => a.from - b.from);
}
/** Removes every navigation, network and focus affordance from a rendered message fragment. */
function inert(root) {
for (const a of root.querySelectorAll('a')) {
a.removeAttribute('href');
delete a.dataset.href;
}
for (const spoiler of root.querySelectorAll('.md-spoiler')) {
spoiler.removeAttribute('tabindex');
spoiler.removeAttribute('role');
spoiler.removeAttribute('aria-expanded');
spoiler.classList.add('revealed');
}
for (const button of root.querySelectorAll('.md-ts3image-load')) button.disabled = true;
for (const node of root.querySelectorAll('summary, [tabindex]')) node.tabIndex = -1;
}
class BlockWidget extends WidgetType {
constructor(block) {
super();
this.block = block;
}
eq(other) {
return other.block.key === this.block.key;
}
toDOM(view) {
const wrap = document.createElement('div');
wrap.className = 'tp-chat-editor-block ts-parsed-text-content';
const { kind, node } = this.block;
const rendered = kind === 'footnote' ? renderMarkdownFootnotes([node]) : renderMarkdownBlock(node);
if (rendered) wrap.append(rendered);
inert(wrap);
const lineCount = this.block.to - this.block.from;
wrap.addEventListener('mousedown', (event) => {
// Diagram load/retry buttons render locally in the sandboxed frame; everything else edits.
if (event.button !== 0 || event.target.closest?.('button:not(:disabled)')) return;
event.preventDefault();
if (view.state.readOnly) return;
const rect = wrap.getBoundingClientRect();
const row = rect.height > 0 ? Math.floor(((event.clientY - rect.top) / rect.height) * lineCount) : 0;
const first = view.state.doc.lineAt(view.posAtDOM(wrap)).number;
const line = view.state.doc.line(Math.min(view.state.doc.lines, first + Math.max(0, Math.min(lineCount - 1, row))));
view.dispatch({ selection: EditorSelection.cursor(line.to), scrollIntoView: true, userEvent: 'select.pointer' });
view.focus();
});
// Math and diagrams finish asynchronously; keep CodeMirror's height map in step with them.
const observer = new ResizeObserver(() => view.requestMeasure());
observer.observe(wrap);
wrap.tpObserver = observer;
return wrap;
}
destroy(dom) {
dom.tpObserver?.disconnect();
}
ignoreEvent() {
return true;
}
}
const blocksField = StateField.define({
create: (state) => previewBlocks(state.doc.toString()),
update: (blocks, tr) => (tr.docChanged ? previewBlocks(tr.state.doc.toString()) : blocks),
});
const definitionLine = Decoration.line({ class: 'tp-chat-editor-definition' });
function decorate(state) {
const { doc, selection } = state;
const blocks = state.field(blocksField);
const ranges = [];
let next = 0;
for (const block of blocks) {
// Non-blank lines between blocks are source the message does not show (reference definitions).
for (let i = next; i < block.from; i += 1) {
const line = doc.line(i + 1);
if (line.text.trim()) ranges.push(definitionLine.range(line.from));
}
next = block.to;
const from = doc.line(block.from + 1).from;
const to = doc.line(Math.min(block.to, doc.lines)).to;
if (selection.ranges.some((r) => r.from <= to && r.to >= from)) continue;
ranges.push(Decoration.replace({ widget: new BlockWidget(block), block: true }).range(from, to));
}
for (let i = next; i < doc.lines; i += 1) {
const line = doc.line(i + 1);
if (line.text.trim()) ranges.push(definitionLine.range(line.from));
}
return Decoration.set(ranges, true);
}
const decorationsField = StateField.define({
create: decorate,
update: (decorations, tr) => (tr.docChanged || tr.selection ? decorate(tr.state) : decorations),
provide: (field) => EditorView.decorations.from(field),
});
function rendered(state, pos) {
let found = false;
state.field(decorationsField).between(pos, pos, (from, to, value) => {
if (value.spec.widget) found = true;
return !found;
});
return found;
}
/**
* Up/Down into a rendered block lands on the adjacent source line (same column) so the block opens for
* editing there; CodeMirror's own vertical motion would treat the whole widget as one line.
*/
function vertical(forward, extend) {
return (view) => {
const { state } = view;
const range = state.selection.main;
const line = state.doc.lineAt(range.head);
const target = line.number + (forward ? 1 : -1);
if (target < 1 || target > state.doc.lines) return false;
// Inside a wrapped line the normal visual motion applies.
if (state.doc.lineAt(view.moveVertically(range, forward).head).number === line.number) return false;
const next = state.doc.line(target);
if (!rendered(state, next.from)) return false;
const head = next.from + Math.min(range.head - line.from, next.length);
view.dispatch({
selection: extend ? EditorSelection.range(range.anchor, head) : EditorSelection.cursor(head),
scrollIntoView: true,
userEvent: 'select',
});
return true;
};
}
const previewKeymap = keymap.of([
{ key: 'ArrowDown', run: vertical(true, false), shift: vertical(true, true) },
{ key: 'ArrowUp', run: vertical(false, false), shift: vertical(false, true) },
]);
const previewTheme = EditorView.baseTheme({
// flow-root keeps rendered margins inside the widget, so CodeMirror measures the height it shows.
'.tp-chat-editor-block': { display: 'flow-root', whiteSpace: 'normal', cursor: 'text', userSelect: 'none' },
});
/** The hybrid preview extension; absent, the same editor shows raw source only. */
export function chatPreview() {
return [
blocksField,
decorationsField,
previewKeymap,
previewTheme,
EditorView.editorAttributes.of({ class: 'tp-chat-editor-hybrid' }),
];
}
+271
View File
@@ -0,0 +1,271 @@
// Chat message editor: one CodeMirror 6 view (vendored core, see scripts/vendor-chat-libs.mjs) that shows
// either raw source or the hybrid preview, like the official composer (main.js @3520977 createEditorState,
// @6389722 hybrid/raw switch through compartments with history, keymap and wrapping kept).
//
// createChatEditor(host) fills the empty `host` element and returns an adapter with the textarea-like
// surface the chat composer uses. The editable element is `.cm-content#chat-input`. Contract:
// - 'input' listeners live on the adapter (it is an EventTarget): fired once per microtask after USER edits
// (typing, IME commit, paste, cut, drop, undo/redo, Shift+Enter), never synchronously inside a
// CodeMirror update and never for programmatic value/setRangeText/reset (textarea semantics).
// - Every other event type is registered on the content element with the given options.
// - Plain Enter is not bound, so the chat's own keydown listener sends; Shift+Enter inserts a newline.
// - Settings (preview, disabled, placeholder, attributes) are no-ops when unchanged, keep the document,
// selection and undo history, and are deferred to a microtask if requested during an update.
// - Positions are UTF-16 offsets into the exact source text (line breaks normalised to \n, as a textarea).
import {
Annotation, Compartment, EditorSelection, EditorState, EditorView, history, historyKeymap, insertNewline,
keymap, placeholder as placeholderExtension, standardKeymap,
} from '../vendor/codemirror/codemirror.js';
import { chatPreview } from './chat-editor-preview.js';
const programmatic = Annotation.define();
const chatKeymap = [
{ key: 'Shift-Enter', run: insertNewline },
...standardKeymap.filter((binding) => binding.key !== 'Enter'),
...historyKeymap,
];
// Neutralises CodeMirror's default look (monospace, black caret, focus outline, padding) so the
// composer's stylesheet decides it; selection and caret stay native, as in a textarea.
const editorTheme = EditorView.theme({
'&': { color: 'inherit', backgroundColor: 'transparent' },
'&.cm-focused': { outline: 'none' },
'.cm-scroller': { fontFamily: 'inherit', lineHeight: 'inherit' },
'.cm-content': { padding: '0', caretColor: 'currentColor' },
'.cm-line': { padding: '0' },
});
const disabledExtension = [
EditorView.editable.of(false),
EditorState.readOnly.of(true),
EditorView.contentAttributes.of({ 'aria-disabled': 'true' }),
EditorView.editorAttributes.of({ class: 'tp-chat-editor-disabled' }),
];
// A dropped file would otherwise be read as text into the draft; files are attached explicitly instead.
const ignoreFileDrops = EditorView.domEventHandlers({
drop: (event) => Boolean(event.dataTransfer?.files?.length),
});
const normalize = (text) => String(text ?? '').replace(/\r\n?/g, '\n');
const clamp = (value, max) => Math.min(Math.max(0, Math.trunc(Number(value)) || 0), max);
class ChatEditor extends EventTarget {
#view;
#preview = new Compartment();
#disabled = new Compartment();
#placeholder = new Compartment();
#attributes = new Compartment();
#settings = { preview: true, disabled: false, placeholder: '', attributes: {} };
#inputQueued = false;
#destroyed = false;
constructor(host) {
super();
this.#view = new EditorView({ state: this.#createState('') });
host.replaceChildren(this.#view.dom);
}
#extensions() {
const { preview, disabled, placeholder, attributes } = this.#settings;
return [
this.#preview.of(preview ? chatPreview() : []),
this.#disabled.of(disabled ? disabledExtension : []),
this.#placeholder.of(placeholder ? placeholderExtension(placeholder) : []),
this.#attributes.of(EditorView.contentAttributes.of({ ...attributes })),
EditorView.contentAttributes.of({ id: 'chat-input', spellcheck: 'true' }),
history(),
keymap.of(chatKeymap),
EditorView.lineWrapping,
ignoreFileDrops,
editorTheme,
EditorView.updateListener.of((update) => {
if (update.transactions.some((tr) => tr.docChanged && !tr.annotation(programmatic))) this.#queueInput();
}),
];
}
#createState(text) {
const doc = normalize(text);
return EditorState.create({ doc, selection: EditorSelection.cursor(doc.length), extensions: this.#extensions() });
}
#queueInput() {
if (this.#inputQueued) return;
this.#inputQueued = true;
queueMicrotask(() => {
this.#inputQueued = false;
if (!this.#destroyed) this.dispatchEvent(new Event('input'));
});
}
/** Runs `fn` now, or right after the update in progress (CodeMirror forbids re-entrant updates). */
#whenIdle(fn) {
if (this.#destroyed) return;
if (this.#view.updateState === 0) fn();
else queueMicrotask(() => this.#whenIdle(fn));
}
#dispatch(spec) {
this.#whenIdle(() => this.#view.dispatch({ ...spec, annotations: programmatic.of(true) }));
}
#reconfigure(compartment, extension) {
this.#dispatch({ effects: compartment.reconfigure(extension) });
}
get dom() { return this.#view.dom; }
get contentDOM() { return this.#view.contentDOM; }
get value() { return this.#view.state.doc.toString(); }
/** Replaces the text as one undoable change (only the differing middle) and puts the caret at the end. */
set value(text) {
const next = normalize(text);
this.#whenIdle(() => {
const current = this.#view.state.doc.toString();
if (current === next) return;
let start = 0;
const limit = Math.min(current.length, next.length);
while (start < limit && current.charCodeAt(start) === next.charCodeAt(start)) start += 1;
let end = 0;
while (end < limit - start && current.charCodeAt(current.length - 1 - end) === next.charCodeAt(next.length - 1 - end)) end += 1;
this.#view.dispatch({
changes: { from: start, to: current.length - end, insert: next.slice(start, next.length - end) },
selection: EditorSelection.cursor(next.length),
scrollIntoView: this.#view.hasFocus,
annotations: programmatic.of(true),
});
});
}
get selectionStart() { return this.#view.state.selection.main.from; }
get selectionEnd() { return this.#view.state.selection.main.to; }
get selectionDirection() {
const { anchor, head } = this.#view.state.selection.main;
return head < anchor ? 'backward' : 'forward';
}
setSelectionRange(start, end, direction = 'none') {
this.#whenIdle(() => {
const length = this.#view.state.doc.length;
const to = clamp(end, length);
const from = Math.min(clamp(start, length), to);
const selection = direction === 'backward' ? EditorSelection.single(to, from) : EditorSelection.single(from, to);
this.#view.dispatch({ selection, scrollIntoView: this.#view.hasFocus, annotations: programmatic.of(true) });
});
}
/** HTMLTextAreaElement.setRangeText: replaces [start, end) (default: the selection). */
setRangeText(text, start, end, selectionMode = 'preserve') {
const insert = normalize(text);
this.#whenIdle(() => {
const { state } = this.#view;
const main = state.selection.main;
const length = state.doc.length;
const from = start === undefined ? main.from : clamp(start, length);
const to = end === undefined ? main.to : clamp(end, length);
if (from > to) throw new DOMException('The start offset is greater than the end offset.', 'IndexSizeError');
const newEnd = from + insert.length;
const delta = insert.length - (to - from);
let selection;
if (selectionMode === 'select') selection = EditorSelection.single(from, newEnd);
else if (selectionMode === 'start') selection = EditorSelection.cursor(from);
else if (selectionMode === 'end') selection = EditorSelection.cursor(newEnd);
else {
// Spec "preserve": ends after the range shift, ends inside it snap to its start / new end.
const selStart = main.from > to ? main.from + delta : main.from > from ? from : main.from;
const selEnd = main.to > to ? main.to + delta : main.to > from ? newEnd : main.to;
selection = main.head < main.anchor ? EditorSelection.single(selEnd, selStart) : EditorSelection.single(selStart, selEnd);
}
this.#view.dispatch({ changes: { from, to, insert }, selection, scrollIntoView: this.#view.hasFocus, annotations: programmatic.of(true) });
});
}
get disabled() { return this.#settings.disabled; }
set disabled(value) {
const disabled = Boolean(value);
if (disabled === this.#settings.disabled) return;
this.#settings.disabled = disabled;
this.#reconfigure(this.#disabled, disabled ? disabledExtension : []);
if (disabled && this.#view.hasFocus) this.#view.contentDOM.blur();
}
get placeholder() { return this.#settings.placeholder; }
set placeholder(value) {
const text = String(value ?? '');
if (text === this.#settings.placeholder) return;
this.#settings.placeholder = text;
this.#reconfigure(this.#placeholder, text ? placeholderExtension(text) : []);
}
get preview() { return this.#settings.preview; }
setPreview(enabled) {
const preview = Boolean(enabled);
if (preview === this.#settings.preview) return;
this.#settings.preview = preview;
this.#reconfigure(this.#preview, preview ? chatPreview() : []);
}
getAttribute(name) { return this.#view.contentDOM.getAttribute(name); }
hasAttribute(name) { return this.#view.contentDOM.hasAttribute(name); }
/** Content-element attributes go through CodeMirror, which would otherwise drop or overwrite them. */
setAttribute(name, value) {
const key = String(name).toLowerCase();
const text = String(value);
if (this.#settings.attributes[key] === text) return;
this.#settings.attributes = { ...this.#settings.attributes, [key]: text };
this.#reconfigure(this.#attributes, EditorView.contentAttributes.of({ ...this.#settings.attributes }));
}
removeAttribute(name) {
const key = String(name).toLowerCase();
if (!Object.hasOwn(this.#settings.attributes, key)) return;
const { [key]: _removed, ...rest } = this.#settings.attributes;
this.#settings.attributes = rest;
this.#reconfigure(this.#attributes, EditorView.contentAttributes.of({ ...rest }));
}
addEventListener(type, listener, options) {
if (type === 'input') super.addEventListener(type, listener, options);
else this.#view.contentDOM.addEventListener(type, listener, options);
}
removeEventListener(type, listener, options) {
if (type === 'input') super.removeEventListener(type, listener, options);
else this.#view.contentDOM.removeEventListener(type, listener, options);
}
focus() {
if (!this.#settings.disabled && !this.#destroyed) this.#view.focus();
}
/** New conversation: replaces the document and drops undo history and selection with it. */
reset(value = '') {
this.#whenIdle(() => this.#view.setState(this.#createState(value)));
}
resize() {
if (!this.#destroyed) this.#view.requestMeasure();
}
destroy() {
if (this.#destroyed) return;
this.#destroyed = true;
this.#view.destroy();
}
}
/** Creates the chat editor inside the empty `host` element (`#chat-editor`). */
export function createChatEditor(host) {
return new ChatEditor(host);
}
+4 -2
View File
@@ -1,6 +1,6 @@
// Settings > Chats in the official order (client_ui/main.js settings component near 4873300): Text Editing
// (toolbar visibility, diagram auto-load, Markdown Help), Options, Ignored Users. Preference semantics live in
// chat-options.js; schema and defaults in app/main/chat-prefs.js.
// (rich text editor, toolbar visibility, diagram auto-load, Markdown Help), Options, Ignored Users. Preference
// semantics live in chat-options.js; schema and defaults in app/main/chat-prefs.js.
import { S } from './state.js';
import { tp } from './core.js';
import { h, icon } from './dom.js';
@@ -93,6 +93,8 @@ export function initChatSettings(changed) {
host.replaceChildren(
contactSettingsSection(save),
section(t('settings.chat.text_edit'), [
// render@4879468: the subtitle shows the source enabled/disabled strings verbatim.
toggle('chatRichTextEditor', 'settings.chat.text_edit.rich_text', 'settings.chat.text_edit.rich_text.enabled', 'settings.chat.text_edit.rich_text.disabled'),
inlineRow(t('settings.chat.toolbar'), t('settings.chat.toolbar.info'),
segmented('chatToolbarVisibility', 'settings.chat.toolbar', [['inactive', 'settings.chat.text_edit.toolbar_visibility.inactive'], ['dynamic', 'settings.chat.text_edit.toolbar_visibility.dynamic'], ['always-visible', 'settings.chat.text_edit.toolbar_visibility.always_visible']])),
inlineRow(t('settings.chat.diagrams'), t('settings.chat.diagrams.info'),
+32 -19
View File
@@ -9,6 +9,7 @@ import { setMermaidAutoload } from './markdown/mermaid.js';
import { handleMarkdownClick, handleMarkdownKey } from './chat-markdown-help.js';
import { requestServerFileDownload, fetchServerImage, chooseAndUploadChatAttachments, canAttachFiles } from './files.js';
import { initChatComposer } from './chat-composer.js';
import { createChatEditor } from './chat-editor.js';
import { notify } from './notifications.js';
import { initChatSettings, setIgnoredUser } from './chat-settings.js';
import { formatClock, showsMessage, opensIncoming, isIgnoredText, isIgnoredUid } from './chat-options.js';
@@ -24,6 +25,8 @@ let controls;
let privateInfo;
let lastBadge = -1;
let closeComposer = () => {};
// The single composer editor (chat-editor.js adapter); its contentDOM is #chat-input.
let editor = null;
const imageUrls = new Set();
function stateFor(conn) {
@@ -115,9 +118,11 @@ async function restore(state) {
export function initChat() {
$('#chat-form').addEventListener('submit', (e) => { e.preventDefault(); void send(); });
const input = $('#chat-input');
input.addEventListener('input', () => { if (displayed) displayed.draft = input.value; autosize(); updateComposer(); });
input.addEventListener('keydown', (e) => {
editor = createChatEditor($('#chat-editor'));
editor.setPreview(richTextEditing());
editor.addEventListener('input', () => { if (displayed) displayed.draft = editor.value; updateComposer(); });
// Plain Enter is not in CodeMirror's keymap: this listener sends; Shift+Enter stays a newline.
editor.addEventListener('keydown', (e) => {
if (e.key === 'Enter' && !e.shiftKey && !e.isComposing && !e.defaultPrevented) { e.preventDefault(); void send(); }
});
$('#chat-tabs')?.addEventListener('keydown', onTabKey);
@@ -135,13 +140,13 @@ export function initChat() {
$('#chat-log').before(controls);
$('#chat-log').addEventListener('click', handleMarkdownClick);
$('#chat-log').addEventListener('keydown', handleMarkdownKey);
closeComposer = initChatComposer({ onChange: () => { if (displayed) displayed.draft = input.value; autosize(); updateComposer(); }, attach });
closeComposer = initChatComposer({ editor, onChange: () => { if (displayed) displayed.draft = editor.value; updateComposer(); }, attach });
$('#chat-form').append(h('div', { id: 'chat-start-prompt', class: 'chat-start-prompt', hidden: true }, icon('mode-chat'), h('span')));
on('appearance-changed', renderLog);
on('server_event', onChannelEvent);
onLanguageChange(renderLog);
initChatSettings(() => { renderLog(); updateComposer(); });
input.addEventListener('focus', updateComposer);
editor.addEventListener('focus', updateComposer);
$('#chat-form').addEventListener('focusout', () => queueMicrotask(updateComposer));
const composer = $('#chat-form');
const log = $('#chat-log');
@@ -171,7 +176,10 @@ export function initChat() {
onViewChanged();
}
function autosize() { const input = $('#chat-input'); input.style.height = 'auto'; input.style.height = `${Math.min(input.scrollHeight, 160)}px`; }
/** workflowSettings.useRichTextEditor (default true): hybrid Markdown preview, otherwise raw source. */
function richTextEditing() { return S.prefs?.chatRichTextEditor !== false; }
/** The composer adapter for callers that move focus into the chat (app.js) or inspect it. */
export function composerEditor() { return editor; }
function partner(chat) { return chat.state.conn.snap?.clients.find((c) => c.uid === chat.scope?.key) ?? null; }
function tabTitle(chat) {
if (chat.kind === 'channel') return chat.state.conn.snap?.channels.find((c) => String(c.id) === chat.scope?.key)?.name ?? chat.nickname ?? t('ui.channel');
@@ -186,8 +194,7 @@ function canSend(chat) {
async function send() {
const chat = current();
const input = $('#chat-input');
const text = input.value.replace(/\s+$/u, '');
const text = editor.value.replace(/\s+$/u, '');
if (!text.trim() || !canSend(chat)) return;
if (new TextEncoder().encode(text).length > 8192) { toast(() => t('ui.message.exceeds.8.kib'), 'error'); return; }
const conn = chat.state.conn;
@@ -200,7 +207,7 @@ async function send() {
if (!isAlive(conn) || conn.session !== session) return;
notify('message_sent', conn);
chat.draft = '';
if (current() === chat && input.value.replace(/\s+$/u, '') === text) { input.value = ''; autosize(); }
if (current() === chat && editor.value.replace(/\s+$/u, '') === text) editor.value = '';
} catch (err) { report(err); }
finally { chat.sending = false; if (current() === chat) updateComposer(); }
}
@@ -313,7 +320,7 @@ function revealChat(chat) {
}
function select(state, key) {
if (!state.chats.has(key)) return;
if (displayed) displayed.draft = $('#chat-input').value;
if (displayed) displayed.draft = editor.value;
state.active = key;
emit('set-view', 'main');
onViewChanged();
@@ -512,12 +519,13 @@ function rowFor(chat, msg, prev) {
li.append(body); return li;
}
export function updateComposer() {
const input = $('#chat-input'); if (!input) return;
if (!editor) return;
const chat = current(); const enabled = canSend(chat);
input.disabled = !enabled; $('#chat-send').disabled = !enabled || !input.value.trim();
editor.setPreview(richTextEditing());
editor.disabled = !enabled; $('#chat-send').disabled = !enabled || !editor.value.trim();
const prompt = $('#chat-start-prompt');
if (prompt) {
prompt.hidden = !enabled || Boolean(chat?.messages.length) || Boolean(input.value);
prompt.hidden = !enabled || Boolean(chat?.messages.length) || Boolean(editor.value);
prompt.lastElementChild.textContent = t('chat.input.start_conversation');
}
for (const button of document.querySelectorAll('#chat-format-bar button, #chat-emoji, #chat-attach')) button.disabled = !enabled;
@@ -525,7 +533,8 @@ export function updateComposer() {
if (attachment) attachment.hidden = !canAttachFiles(chat?.state.conn);
const toolbar = $('#chat-format-bar');
if (toolbar) toolbar.hidden = S.prefs?.chatToolbarVisibility === 'inactive' || (S.prefs?.chatToolbarVisibility === 'dynamic' && !$('#chat-form').contains(document.activeElement));
input.placeholder = !enabled ? t('ui.not.connected') : t('chat.sendMessage');
editor.placeholder = !enabled ? t('ui.not.connected') : t('chat.sendMessage');
editor.setAttribute('aria-label', t('ui.message'));
}
export function onSnapshot(conn) {
const state = stateFor(conn); if (!state) return;
@@ -541,10 +550,14 @@ export function onSnapshot(conn) {
}
}
export function onViewChanged() {
if (displayed !== current()) closeComposer();
if (displayed && $('#chat-input')) displayed.draft = $('#chat-input').value;
displayed = current();
if ($('#chat-input')) { $('#chat-input').value = displayed?.draft ?? ''; autosize(); }
const next = current();
if (displayed !== next) closeComposer();
if (displayed && editor) displayed.draft = editor.value;
// Only a different conversation replaces the document and clears undo/selection; re-rendering the same
// conversation keeps the live editor state.
const changed = displayed !== next;
displayed = next;
if (editor && changed) editor.reset(next?.draft ?? '');
if (displayed && S.view === 'main') displayed.unread = 0;
renderTabs(); renderLog(); badge();
if (displayed && !displayed.loaded) void loadPage(displayed);
@@ -585,6 +598,6 @@ async function attach() {
const query = new URLSearchParams({ port: endpoint.port || '9987', serverUID: serverUid, channel: String(file.channelId), path: file.path, filename: file.name, size: String(file.size), isDir: '0' });
chat.draft += `${chat.draft ? '\n' : ''}ts3file://${endpoint.hostname}?${query}`;
}
if (current() === chat) { $('#chat-input').value = chat.draft; autosize(); }
if (current() === chat) { editor.value = chat.draft; updateComposer(); }
} catch (err) { report(err); }
}
+160 -156
View File
@@ -156,7 +156,7 @@ class Parser {
// all, every definition in document order (the Markdown Help "Footnote Definition" example).
for (const label of this.footnoteOrder.length > 0 ? this.footnoteOrder : [...this.footnoteDefs.keys()]) {
const def = this.footnoteDefs.get(label);
if (def) notes.push({ label, number: notes.length + 1, children: def.children });
if (def) notes.push({ label, number: notes.length + 1, children: def.children, lines: def.lines });
}
return { type: 'doc', children, footnotes: notes };
}
@@ -166,165 +166,169 @@ class Parser {
const out = [];
let i = 0;
while (i < lines.length) {
const line = lines[i];
this.count();
if (isBlank(line)) { i += 1; continue; }
// Fenced code (``` or ~~~); ```mermaid is a diagram.
const fence = FENCE.exec(line);
if (fence && !(fence[2][0] === '`' && fence[3].includes('`'))) {
const marker = fence[2];
const indent = fence[1].length;
const body = [];
let j = i + 1;
for (; j < lines.length; j += 1) {
const close = FENCE.exec(lines[j]);
if (close && close[2][0] === marker[0] && close[2].length >= marker.length && !close[3].trim()) break;
body.push(lines[j].replace(new RegExp(`^[ \\t]{0,${indent}}`), ''));
}
const lang = fence[3].trim().split(/\s+/)[0] ?? '';
const content = body.join('\n');
out.push(lang.toLowerCase() === 'mermaid' ? { type: 'mermaid', text: content } : { type: 'code', lang: unescapeText(lang), text: content });
i = j + 1;
continue;
}
// $$ math block: needs a closing $$ and some content, otherwise the line is plain text.
if (line.trim() === '$$') {
let j = i + 1;
while (j < lines.length && lines[j].trim() !== '$$') j += 1;
const content = lines.slice(i + 1, j).filter((l) => l.length > 0);
if (j < lines.length && content.length > 0) {
out.push({ type: 'math_block', text: content.join('\n') });
i = j + 1;
continue;
}
}
// :::details Title / :::left|center|right|justify … ::: (the close needs the same colon count).
const colon = COLON_FENCE.exec(line);
if (colon) {
const keyword = colon[2].toLowerCase();
const header = colon[3] ?? '';
const isDetails = keyword === 'details';
const isAlign = ['left', 'center', 'right', 'justify'].includes(keyword);
if ((isDetails || (isAlign && !header)) && !header.includes(':::')) {
const count = colon[1].length;
let j = i + 1;
while (j < lines.length && !new RegExp(`^[ \\t]*:{${count}}[ \\t]*$`).test(lines[j])) j += 1;
const inner = this.parseBlocks(lines.slice(i + 1, j), depth + 1);
if (isDetails) out.push({ type: 'details', summary: header ? this.parseInline(header, depth + 1) : [], children: inner });
else out.push({ type: 'align', align: keyword, children: inner });
i = j + 1;
continue;
}
}
// BBCode block mode: an opening tag alone on its line, its closing tag alone on a later line.
const bbOpen = /^[ \t]*\[([a-z]+)(?:[= ]([^\]\n]*))?\][ \t]*$/i.exec(line);
if (bbOpen) {
const tag = bbOpen[1].toLowerCase();
if (tag === 'hr') {
out.push({ type: 'hr' });
i += 1;
continue;
}
if (BB_PAIRED.has(tag) && (bbOpen[2] === undefined || BB_PARAM.has(tag))) {
const closeRe = new RegExp(`^[ \\t]*\\[/${tag}\\][ \\t]*$`, 'i');
let j = i + 1;
while (j < lines.length && !closeRe.test(lines[j])) j += 1;
if (j < lines.length && j > i + 1 && lines.slice(i + 1, j).some((l) => l.trim())) {
out.push(bbBlock(tag, (bbOpen[2] ?? '').trim(), this.parseBlocks(lines.slice(i + 1, j), depth + 1)));
i = j + 1;
continue;
}
}
}
// Blockquote: every quoted line needs its own `>` (strict, no lazy continuation).
if (/^[ \t]{0,3}>/.test(line)) {
const inner = [];
let j = i;
for (; j < lines.length && /^[ \t]{0,3}>/.test(lines[j]); j += 1) inner.push(lines[j].replace(/^[ \t]{0,3}> ?/, ''));
let callout = null;
const rest = [];
for (const l of inner) {
const marker = /^\s*\[!([A-Za-z]+)\]\s*$/.exec(l);
const type = marker && CALLOUTS.get(marker[1].toUpperCase());
if (type) {
if (!callout) callout = { type, title: CALLOUT_TITLES[type] };
continue;
}
rest.push(l);
}
out.push({ type: 'blockquote', callout, children: this.parseBlocks(rest, depth + 1) });
i = j;
continue;
}
if (isThematicBreak(line)) { out.push({ type: 'hr' }); i += 1; continue; }
const atx = ATX.exec(line);
if (atx) {
out.push({ type: 'heading', level: atx[1].length, children: this.parseInline(atx[2] ?? '', depth + 1) });
i += 1;
continue;
}
const marker = listMarker(line);
if (marker) {
const { list, next } = this.parseList(lines, i, marker.kind, marker.from, depth);
out.push(list);
i = next;
continue;
}
const fn = FOOTNOTE_DEF.exec(line);
if (fn) {
const body = [fn[2]];
let j = i + 1;
while (j < lines.length && !isBlank(lines[j]) && leadingSpaces(lines[j]) > 0) body.push(lines[j].trim()), (j += 1);
if (!this.footnoteDefs.has(fn[1])) this.footnoteDefs.set(fn[1], { children: this.parseInline(body.join(' '), depth + 1) });
i = j;
continue;
}
const def = LINK_DEF.exec(line);
if (def && !def[1].startsWith('^')) { i += 1; continue; }
// GFM table: header row with pipes followed by a delimiter row.
if (line.includes('|') && i + 1 < lines.length && isTableDelimiter(lines[i + 1])) {
const align = splitRow(lines[i + 1]).map((c) => {
const t = c.trim();
if (t.startsWith(':') && t.endsWith(':')) return 'center';
if (t.endsWith(':')) return 'right';
if (t.startsWith(':')) return 'left';
return null;
});
const header = splitRow(line).map((c) => this.parseInline(c.trim(), depth + 1));
const rows = [];
let j = i + 2;
for (; j < lines.length && !isBlank(lines[j]) && lines[j].includes('|'); j += 1) {
rows.push(splitRow(lines[j]).map((c) => this.parseInline(c.trim(), depth + 1)));
}
out.push({ type: 'table', align, header, rows });
i = j;
continue;
}
// Setext heading: a text line underlined by === or ---.
if (i + 1 < lines.length && isSetextUnderline(lines[i + 1])) {
out.push({ type: 'heading', level: lines[i + 1].trim()[0] === '=' ? 1 : 2, children: this.parseInline(line.trim(), depth + 1) });
i += 2;
continue;
}
out.push({ type: 'paragraph', children: this.parseInline(line.replace(/^[ \t]+/, '').replace(/[ \t]+$/, ''), depth + 1) });
i += 1;
const before = out.length;
const next = this.parseBlock(lines, i, depth, out);
// Source span [first line, end line) of the block within `lines`; at depth 0 these are document
// lines, which the chat editor's preview uses to map rendered blocks back to their source.
if (out.length > before) out[before].lines = [i, Math.min(next, lines.length)];
i = next;
}
return out;
}
/** Parses the block that starts at line `i` (pushing at most one node) and returns the next line index. */
parseBlock(lines, i, depth, out) {
const line = lines[i];
this.count();
if (isBlank(line)) return i + 1;
// Fenced code (``` or ~~~); ```mermaid is a diagram.
const fence = FENCE.exec(line);
if (fence && !(fence[2][0] === '`' && fence[3].includes('`'))) {
const marker = fence[2];
const indent = fence[1].length;
const body = [];
let j = i + 1;
for (; j < lines.length; j += 1) {
const close = FENCE.exec(lines[j]);
if (close && close[2][0] === marker[0] && close[2].length >= marker.length && !close[3].trim()) break;
body.push(lines[j].replace(new RegExp(`^[ \\t]{0,${indent}}`), ''));
}
const lang = fence[3].trim().split(/\s+/)[0] ?? '';
const content = body.join('\n');
out.push(lang.toLowerCase() === 'mermaid' ? { type: 'mermaid', text: content } : { type: 'code', lang: unescapeText(lang), text: content });
return j + 1;
}
// $$ math block: needs a closing $$ and some content, otherwise the line is plain text.
if (line.trim() === '$$') {
let j = i + 1;
while (j < lines.length && lines[j].trim() !== '$$') j += 1;
const content = lines.slice(i + 1, j).filter((l) => l.length > 0);
if (j < lines.length && content.length > 0) {
out.push({ type: 'math_block', text: content.join('\n') });
return j + 1;
}
}
// :::details Title / :::left|center|right|justify … ::: (the close needs the same colon count).
const colon = COLON_FENCE.exec(line);
if (colon) {
const keyword = colon[2].toLowerCase();
const header = colon[3] ?? '';
const isDetails = keyword === 'details';
const isAlign = ['left', 'center', 'right', 'justify'].includes(keyword);
if ((isDetails || (isAlign && !header)) && !header.includes(':::')) {
const count = colon[1].length;
let j = i + 1;
while (j < lines.length && !new RegExp(`^[ \\t]*:{${count}}[ \\t]*$`).test(lines[j])) j += 1;
const inner = this.parseBlocks(lines.slice(i + 1, j), depth + 1);
if (isDetails) out.push({ type: 'details', summary: header ? this.parseInline(header, depth + 1) : [], children: inner });
else out.push({ type: 'align', align: keyword, children: inner });
return j + 1;
}
}
// BBCode block mode: an opening tag alone on its line, its closing tag alone on a later line.
const bbOpen = /^[ \t]*\[([a-z]+)(?:[= ]([^\]\n]*))?\][ \t]*$/i.exec(line);
if (bbOpen) {
const tag = bbOpen[1].toLowerCase();
if (tag === 'hr') {
out.push({ type: 'hr' });
return i + 1;
}
if (BB_PAIRED.has(tag) && (bbOpen[2] === undefined || BB_PARAM.has(tag))) {
const closeRe = new RegExp(`^[ \\t]*\\[/${tag}\\][ \\t]*$`, 'i');
let j = i + 1;
while (j < lines.length && !closeRe.test(lines[j])) j += 1;
if (j < lines.length && j > i + 1 && lines.slice(i + 1, j).some((l) => l.trim())) {
out.push(bbBlock(tag, (bbOpen[2] ?? '').trim(), this.parseBlocks(lines.slice(i + 1, j), depth + 1)));
return j + 1;
}
}
}
// Blockquote: every quoted line needs its own `>` (strict, no lazy continuation).
if (/^[ \t]{0,3}>/.test(line)) {
const inner = [];
let j = i;
for (; j < lines.length && /^[ \t]{0,3}>/.test(lines[j]); j += 1) inner.push(lines[j].replace(/^[ \t]{0,3}> ?/, ''));
let callout = null;
const rest = [];
for (const l of inner) {
const marker = /^\s*\[!([A-Za-z]+)\]\s*$/.exec(l);
const type = marker && CALLOUTS.get(marker[1].toUpperCase());
if (type) {
if (!callout) callout = { type, title: CALLOUT_TITLES[type] };
continue;
}
rest.push(l);
}
out.push({ type: 'blockquote', callout, children: this.parseBlocks(rest, depth + 1) });
return j;
}
if (isThematicBreak(line)) {
out.push({ type: 'hr' });
return i + 1;
}
const atx = ATX.exec(line);
if (atx) {
out.push({ type: 'heading', level: atx[1].length, children: this.parseInline(atx[2] ?? '', depth + 1) });
return i + 1;
}
const marker = listMarker(line);
if (marker) {
const { list, next } = this.parseList(lines, i, marker.kind, marker.from, depth);
out.push(list);
return next;
}
const fn = FOOTNOTE_DEF.exec(line);
if (fn) {
const body = [fn[2]];
let j = i + 1;
while (j < lines.length && !isBlank(lines[j]) && leadingSpaces(lines[j]) > 0) body.push(lines[j].trim()), (j += 1);
if (!this.footnoteDefs.has(fn[1])) {
this.footnoteDefs.set(fn[1], { children: this.parseInline(body.join(' '), depth + 1), lines: depth === 0 ? [i, j] : null });
}
return j;
}
const def = LINK_DEF.exec(line);
if (def && !def[1].startsWith('^')) return i + 1;
// GFM table: header row with pipes followed by a delimiter row.
if (line.includes('|') && i + 1 < lines.length && isTableDelimiter(lines[i + 1])) {
const align = splitRow(lines[i + 1]).map((c) => {
const t = c.trim();
if (t.startsWith(':') && t.endsWith(':')) return 'center';
if (t.endsWith(':')) return 'right';
if (t.startsWith(':')) return 'left';
return null;
});
const header = splitRow(line).map((c) => this.parseInline(c.trim(), depth + 1));
const rows = [];
let j = i + 2;
for (; j < lines.length && !isBlank(lines[j]) && lines[j].includes('|'); j += 1) {
rows.push(splitRow(lines[j]).map((c) => this.parseInline(c.trim(), depth + 1)));
}
out.push({ type: 'table', align, header, rows });
return j;
}
// Setext heading: a text line underlined by === or ---.
if (i + 1 < lines.length && isSetextUnderline(lines[i + 1])) {
out.push({ type: 'heading', level: lines[i + 1].trim()[0] === '=' ? 1 : 2, children: this.parseInline(line.trim(), depth + 1) });
return i + 2;
}
out.push({ type: 'paragraph', children: this.parseInline(line.replace(/^[ \t]+/, '').replace(/[ \t]+$/, ''), depth + 1) });
return i + 1;
}
/** Strict single-line list items; deeper markers (≥ marker + 2 columns) open a nested list. */
parseList(lines, i, kind, baseIndent, depth) {
const items = [];
+15
View File
@@ -396,3 +396,18 @@ export function renderMarkdownInto(target, source, options = {}) {
&& doc.children[0].children.every((c) => c.type === 'emoji' || (c.type === 'text' && !c.value.trim()));
return { onlyEmoji };
}
/**
* Renders one top-level block of a `parseMarkdown` tree (chat editor preview). Reference links and
* footnote numbers are resolved document-wide by the parser, so a block looks as it will in the message.
*/
export function renderMarkdownBlock(node, options = {}) {
return new DomRenderer(options).block(node);
}
/** Renders footnote definitions as the message's footnote section, numbered from the first note. */
export function renderMarkdownFootnotes(notes, options = {}) {
const section = new DomRenderer(options).footnotes(notes);
if (section && notes[0].number !== 1) section.firstChild.start = notes[0].number;
return section;
}
+3
View File
@@ -1676,6 +1676,9 @@
"settings.chat.ignored_users": "Ignored Users",
"settings.chat.ignored_users.empty": "No ignored users",
"settings.chat.ignored_users.empty.info": "You can set other chat users as Ignored, meaning TeamSpeak will ignore any invites and messages from them",
"settings.chat.text_edit.rich_text": "Use Rich Text Editor",
"settings.chat.text_edit.rich_text.disabled": "See and change the style of text as you type.",
"settings.chat.text_edit.rich_text.enabled": "See exactly the text you have typed, including text style marks.",
"settings.chat.text_edit.toolbar_visibility.inactive": "Hidden",
"settings.chat.text_edit.toolbar_visibility.dynamic": "Dynamic",
"settings.chat.text_edit.toolbar_visibility.always_visible": "Always Visible",
+3
View File
@@ -1678,6 +1678,9 @@
"settings.chat.ignored_users": "Игнорируемые пользователи",
"settings.chat.ignored_users.empty": "Нет игнорируемых пользователей",
"settings.chat.ignored_users.empty.info": "Ты можешь установить для других пользователей чата статус \"Игнорируемые\" и TeamSpeak будет игнорировать любые приглашения и сообщения от них",
"settings.chat.text_edit.rich_text": "Использовать редактор форматированного текста",
"settings.chat.text_edit.rich_text.disabled": "Просматривай и меняй стиль текста по мере его ввода.",
"settings.chat.text_edit.rich_text.enabled": "Текст, который ты вводишь, отображается с применением форматирования в реальном времени.",
"settings.chat.text_edit.toolbar_visibility.inactive": "Скрыта",
"settings.chat.text_edit.toolbar_visibility.dynamic": "Динамически",
"settings.chat.text_edit.toolbar_visibility.always_visible": "Всегда видна",
+1 -17
View File
@@ -1255,23 +1255,7 @@ html[data-chat-style="compact"] .msg .msg-body::before { display: none; }
.composer-tool:hover { background: color-mix(in srgb, var(--tsv-bg) 65%, transparent); border-bottom-color: var(--tsv-tint); color: var(--tsv-tint); --tsv-icon-base: var(--tsv-tint); }
.composer-tool:active, .composer-tool[aria-expanded="true"] { background: color-mix(in srgb, var(--tsv-bg) 80%, transparent); }
.composer-row { display: flex; align-items: stretch; }
.composer textarea {
flex: 1;
min-height: 34px;
max-height: 250px;
padding: 8px 10px;
border: 0;
border-radius: var(--tsv-border-radius-large);
background: transparent;
color: var(--tsv-font-color);
font-size: var(--tsv-font-size-content);
line-height: var(--tsv-line-height-content);
/* source -.025rem resolves against the source's fixed 15px root (main.css@1034 `body,html{font-size:15px}`) */
letter-spacing: -0.375px;
resize: none;
}
.composer textarea { font-weight: 400; }
.composer textarea:focus-visible { outline: none; }
/* the input itself (#chat-editor, one CodeMirror view): styles/chat-editor.css */
.composer-actions { flex: none; display: flex; align-items: center; height: var(--tsv-bar-element-height); margin: auto 3px 4px auto; }
/* source `.ts-chat-input-container-actions *{margin:auto 3px}`: 24px buttons, glyph inset 3px from the left */
.composer-actions .icon-btn { width: 24px; height: 26px; margin: auto 3px; padding: 0; justify-items: start; color: var(--tsv-tint); }
+34
View File
@@ -0,0 +1,34 @@
/* Chat composer editor: one CodeMirror view in #chat-editor (chat-editor.js), contentDOM #chat-input.
Source: TSChatInputTextarea `.ts-chat-input` (main.css@212291), its inner editor (@205434) and the
CodeMirror overrides scoped to it (@205985-206823). The engine's JS theme only neutralises CodeMirror
defaults; every visible value here is the source's. */
.composer-editor {
display: flex;
flex: 1;
flex-direction: column;
min-width: 0;
min-height: 34px;
max-height: 250px;
padding: var(--tsv-padding-v) var(--tsv-padding-h-small);
border: none;
background-color: transparent;
color: var(--tsv-font-color);
font-size: var(--tsv-font-size-content);
font-weight: 400;
line-height: var(--tsv-line-height-content);
/* source -.025rem resolves against the source's fixed 15px root (main.css@1034 `body,html{font-size:15px}`) */
letter-spacing: -0.375px;
outline: none;
}
#chat-editor .cm-editor { flex-shrink: 1; min-height: 0; background: transparent; color: var(--tsv-font-color); outline: none; }
#chat-editor .cm-editor.cm-focused { outline: none; }
#chat-editor .cm-scroller { font-family: inherit; line-height: inherit; overflow: auto; }
#chat-editor .cm-content { padding: 0; white-space: pre-wrap; caret-color: var(--tsv-font-color); }
#chat-editor .cm-content:focus-visible { outline: none; }
/* `.is-empty:before{content:attr(data-placeholder)}` (main.css@205743): subtitle colour, content size */
#chat-editor .cm-placeholder { color: var(--tsv-font-subtitle-color); font-size: var(--tsv-font-size-content); pointer-events: none; }
#chat-editor .tp-chat-editor-disabled .cm-content { cursor: default; }
/* Raw `[id]: url` definitions stay editable source; they are not message content. */
#chat-editor .cm-line.tp-chat-editor-definition { color: var(--tsv-font-subtitle-color); }
/* Rendered inactive blocks reuse the message markdown rules (.ts-parsed-text-content) without extra spacing. */
#chat-editor .tp-chat-editor-block { margin: 0; }
+96
View File
@@ -25,6 +25,46 @@
"integrity": "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==",
"location": "node_modules/@chevrotain/types"
},
{
"name": "@codemirror/commands",
"version": "6.11.1",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.11.1.tgz",
"integrity": "sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==",
"location": "node_modules/@codemirror/commands"
},
{
"name": "@codemirror/language",
"version": "6.13.1",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.13.1.tgz",
"integrity": "sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==",
"location": "node_modules/@codemirror/language"
},
{
"name": "@codemirror/state",
"version": "6.7.6",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.6.tgz",
"integrity": "sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==",
"location": "node_modules/@codemirror/state"
},
{
"name": "@codemirror/streamparser",
"version": "6.0.0",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@codemirror/streamparser/-/streamparser-6.0.0.tgz",
"integrity": "sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==",
"location": "node_modules/@codemirror/streamparser"
},
{
"name": "@codemirror/view",
"version": "6.43.15",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.15.tgz",
"integrity": "sha512-HHsfpqFeHyXLs983pSRe38Xajs0vFWZQ2BuX0m7Ki8w3jZ5iD8cuR3lBz2/5/X53Dhf32SBHKh6rtSTB6tKeGw==",
"location": "node_modules/@codemirror/view"
},
{
"name": "@iconify/types",
"version": "2.0.0",
@@ -41,6 +81,38 @@
"integrity": "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w==",
"location": "node_modules/@iconify/utils"
},
{
"name": "@lezer/common",
"version": "1.5.5",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.5.tgz",
"integrity": "sha512-Pw7PVCndruF1pb3ebCxpSVpkMHSDjwRCLcTRw+RizUKco5QbWylwq2g4lnG/RYN7yTTQDXE9F77MwtkAyphrjg==",
"location": "node_modules/@lezer/common"
},
{
"name": "@lezer/highlight",
"version": "1.2.5",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.5.tgz",
"integrity": "sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==",
"location": "node_modules/@lezer/highlight"
},
{
"name": "@lezer/lr",
"version": "1.4.12",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.12.tgz",
"integrity": "sha512-On9HU4oMMiHPMkQDgoTnGahjgG5n/MkN38CgG77sMraKLL+3JBbeQNi1FcCXV9QRqwF9/BUXP3caHyJC1fBOTQ==",
"location": "node_modules/@lezer/lr"
},
{
"name": "@marijn/find-cluster-break",
"version": "1.0.4",
"license": "MIT",
"resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.4.tgz",
"integrity": "sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ==",
"location": "node_modules/@marijn/find-cluster-break"
},
{
"name": "@mermaid-js/parser",
"version": "1.2.1",
@@ -337,6 +409,14 @@
"integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==",
"location": "node_modules/cose-base"
},
{
"name": "crelt",
"version": "1.0.7",
"license": "MIT",
"resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.7.tgz",
"integrity": "sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==",
"location": "node_modules/crelt"
},
{
"name": "cytoscape",
"version": "3.34.4",
@@ -889,6 +969,14 @@
"integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==",
"location": "node_modules/strictdom"
},
{
"name": "style-mod",
"version": "4.1.4",
"license": "MIT",
"resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.4.tgz",
"integrity": "sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==",
"location": "node_modules/style-mod"
},
{
"name": "stylis",
"version": "4.4.0",
@@ -920,6 +1008,14 @@
"resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz",
"integrity": "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==",
"location": "node_modules/uuid"
},
{
"name": "w3c-keyname",
"version": "2.2.8",
"license": "MIT",
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
"integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==",
"location": "node_modules/w3c-keyname"
}
]
}
+133
View File
@@ -164,6 +164,139 @@
"sha256": "3ca9d4afd21425087cf31893b8f9f63c81b0b8408db5e343ca76e5f8aa26ab9a"
}
]
},
{
"name": "codemirror",
"bundler": "esbuild@0.28.2",
"exports": {
"@codemirror/state": [
"Annotation",
"Compartment",
"EditorSelection",
"EditorState",
"StateField"
],
"@codemirror/view": [
"Decoration",
"EditorView",
"WidgetType",
"keymap",
"placeholder"
],
"@codemirror/commands": [
"history",
"historyKeymap",
"insertNewline",
"standardKeymap"
]
},
"patches": [
"style-mod: use constructed stylesheets on Document as well as ShadowRoot; no inline style element under the application CSP"
],
"bundled": [
{
"name": "@codemirror/commands",
"version": "6.11.1",
"license": "MIT"
},
{
"name": "@codemirror/language",
"version": "6.13.1",
"license": "MIT"
},
{
"name": "@codemirror/state",
"version": "6.7.6",
"license": "MIT"
},
{
"name": "@codemirror/view",
"version": "6.43.15",
"license": "MIT"
},
{
"name": "@lezer/common",
"version": "1.5.5",
"license": "MIT"
},
{
"name": "@lezer/highlight",
"version": "1.2.5",
"license": "MIT"
},
{
"name": "@marijn/find-cluster-break",
"version": "1.0.4",
"license": "MIT"
},
{
"name": "style-mod",
"version": "4.1.4",
"license": "MIT"
},
{
"name": "w3c-keyname",
"version": "2.2.8",
"license": "MIT"
}
],
"files": [
{
"path": "codemirror/codemirror.js",
"generated": true,
"sha256": "4d1ae27dba70188a37a581a48d20ff4cfc2c8f81783db1a3157a4d91637381f0"
},
{
"path": "codemirror/package.json",
"generated": true,
"sha256": "3ca9d4afd21425087cf31893b8f9f63c81b0b8408db5e343ca76e5f8aa26ab9a"
},
{
"path": "codemirror/licenses/@codemirror__commands.LICENSE",
"from": "@codemirror/commands/LICENSE",
"sha256": "05c6130cda97e7600ca91427a41e8a065efcf82365fc0293e7de80faec494c07"
},
{
"path": "codemirror/licenses/@codemirror__language.LICENSE",
"from": "@codemirror/language/LICENSE",
"sha256": "05c6130cda97e7600ca91427a41e8a065efcf82365fc0293e7de80faec494c07"
},
{
"path": "codemirror/licenses/@codemirror__state.LICENSE",
"from": "@codemirror/state/LICENSE",
"sha256": "05c6130cda97e7600ca91427a41e8a065efcf82365fc0293e7de80faec494c07"
},
{
"path": "codemirror/licenses/@codemirror__view.LICENSE",
"from": "@codemirror/view/LICENSE",
"sha256": "05c6130cda97e7600ca91427a41e8a065efcf82365fc0293e7de80faec494c07"
},
{
"path": "codemirror/licenses/@lezer__common.LICENSE",
"from": "@lezer/common/LICENSE",
"sha256": "568902fb66eaf1f11750e966b33fd7b5d7c618e65af09f35ef843635bcf5f1ba"
},
{
"path": "codemirror/licenses/@lezer__highlight.LICENSE",
"from": "@lezer/highlight/LICENSE",
"sha256": "568902fb66eaf1f11750e966b33fd7b5d7c618e65af09f35ef843635bcf5f1ba"
},
{
"path": "codemirror/licenses/@marijn__find-cluster-break.LICENSE",
"from": "@marijn/find-cluster-break/LICENSE",
"sha256": "9360b00fdd091f05c783b568bdd46c679c41b72415599252de98949462ea1acb"
},
{
"path": "codemirror/licenses/style-mod.LICENSE",
"from": "style-mod/LICENSE",
"sha256": "cb4474e26547397169061d3586c00022cda5330a1b64fa13e872319f3b63aff1"
},
{
"path": "codemirror/licenses/w3c-keyname.LICENSE",
"from": "w3c-keyname/LICENSE",
"sha256": "869c30f368eb08735e779027b9f4bc9fea2f39624351856aebe42741f0bc0884"
}
]
}
]
}
+307 -1
View File
@@ -1,5 +1,5 @@
Chat renderer dependency notices
The npm workspace inventory below conservatively includes build/type-only dependencies as well as runtime bundled dependencies.
The npm workspace inventory below conservatively includes build/type-only dependencies as well as runtime bundled dependencies; devDependencies (build tools such as esbuild) are not redistributed and are excluded.
DOMPurify is redistributed under its Apache-2.0 option. No official TeamSpeak bundle is redistributed.
===== @antfu/install-pkg@2.1.0 (MIT) =====
@@ -261,6 +261,136 @@ SOFTWARE.
limitations under the License.
===== @codemirror/commands@6.11.1 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @codemirror/language@6.13.1 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @codemirror/state@6.7.6 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @codemirror/streamparser@6.0.0 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @codemirror/view@6.43.15 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @iconify/types@2.0.0 (MIT) =====
--- license.txt ---
@@ -311,6 +441,110 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
===== @lezer/common@1.5.5 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @lezer/highlight@1.2.5 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @lezer/lr@1.4.12 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @marijn/find-cluster-break@1.0.4 (MIT) =====
--- LICENSE ---
MIT License
Copyright (C) 2024 by Marijn Haverbeke <marijn@haverbeke.berlin>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== @mermaid-js/parser@1.2.1 (MIT) =====
--- LICENSE ---
@@ -1275,6 +1509,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
===== crelt@1.0.7 (MIT) =====
--- LICENSE ---
Copyright (C) 2020 by Marijn Haverbeke <marijn@haverbeke.berlin>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== cytoscape@3.34.4 (MIT) =====
--- LICENSE ---
@@ -3904,6 +4162,30 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
===== style-mod@4.1.4 (MIT) =====
--- LICENSE ---
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===== stylis@4.4.0 (MIT) =====
--- LICENSE ---
@@ -3995,3 +4277,27 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
===== w3c-keyname@2.2.8 (MIT) =====
--- LICENSE ---
Copyright (C) 2016 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,21 @@
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,21 @@
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,21 @@
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,21 @@
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,21 @@
MIT License
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,21 @@
MIT License
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,21 @@
MIT License
Copyright (C) 2024 by Marijn Haverbeke <marijn@haverbeke.berlin>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,19 @@
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,19 @@
Copyright (C) 2016 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+3
View File
@@ -0,0 +1,3 @@
{
"type": "module"
}