Improve editor, plugin updates, and window transfers for 0.1.41

This commit is contained in:
Knotty Wyvern
2026-10-21 10:42:44 -07:00
parent 68e86ab6eb
commit 42dd0fa711
56 changed files with 2313 additions and 221 deletions
+10
View File
@@ -60,6 +60,16 @@ export function copyTableCells(source: string, range: CellRange): string {
return Array.from({ length: bottom - top + 1 }, (_, r) => Array.from({ length: right - left + 1 }, (_, c) => quote(table.rows[sourceRow(top + r)]?.cells[left + c]?.text || "")).join("\t")).join("\n");
}
export function copyTableMarkdown(source: string, range: CellRange): string {
const table = parseMarkdownTable(source);
if (!table) return "";
const { top, bottom, left, right } = bounds(range);
const rows = Array.from({ length: bottom - top + 1 }, (_, r) =>
`| ${Array.from({ length: right - left + 1 }, (_, c) => table.rows[sourceRow(top + r)]?.cells[left + c]?.text || "").join(" | ")} |`);
rows.splice(1, 0, `| ${Array.from({ length: right - left + 1 }, () => "---").join(" | ")} |`);
return rows.join("\n");
}
// Parse quoted spreadsheet TSV, including embedded tabs/newlines, or a Markdown table.
export function clipboardCells(text: string): string[][] {
const table = parseMarkdownTable(text);