{"draft":null,"from":174,"to":175,"files":[{"path":"src/engine/view.ts","added":31,"removed":0,"diff":"--- a/src/engine/view.ts\n+++ b/src/engine/view.ts\n@@ -29,6 +29,7 @@\n \n /** A visible line of a projected file. */\n export interface VisibleLine {\n+\treadonly textChunks?: () => Iterable<string>;\n \treadonly id: LineId;\n \treadonly text: string;\n \treadonly atom: AtomId;\n@@ -542,6 +543,36 @@\n \t\treturn true;\n \t}\n \n+\t*lineChunks(path: string): IterableIterator<() => Iterable<string>> {\n+\t\tfor (const n of this.#file(path).vis) yield () => this.graph.textChunks(n);\n+\t}\n+\n+\t/** Visible lines without retaining their text in the view cache. */\n+\t*visibleLines(path: string): IterableIterator<VisibleLine> {\n+\t\tconst graph = this.graph;\n+\t\tfor (const n of this.#file(path).vis)\n+\t\t\tyield { id: graph.lineIdOf(n), text: graph.textOf(n), atom: graph.idOfSeq(graph.writerSeqOf(n)) };\n+\t}\n+\n+\t/** Atom-building line handles; text is loaded only when requested. */\n+\tbuildLines(path: string): readonly VisibleLine[] {\n+\t\tconst graph = this.graph;\n+\t\tconst vis = this.#file(path).vis;\n+\t\tconst lines: VisibleLine[] = new Array(vis.length);\n+\t\tfor (let i = 0; i < vis.length; i++) {\n+\t\t\tconst n = vis[i]!;\n+\t\t\tlines[i] = {\n+\t\t\t\tid: graph.lineIdOf(n),\n+\t\t\t\ttextChunks: () => graph.textChunks(n),\n+\t\t\t\tget text() {\n+\t\t\t\t\treturn graph.textOf(n);\n+\t\t\t\t},\n+\t\t\t\tatom: graph.idOfSeq(graph.writerSeqOf(n)),\n+\t\t\t};\n+\t\t}\n+\t\treturn lines;\n+\t}\n+\n \t/** Visible lines with their ids. */\n \tlines(path: string): readonly VisibleLine[] {\n \t\tif (this.#linesCache?.path === path) return this.#linesCache.lines;"}],"unmatched":[]}