TypeScript
perf(web): highlight code with @pierre/highlights instead of Shiki (#23178)
mariad228f1f2c8e4
diff --git a/apps/web/src/components/chat/HighlightedCodeLines.tsx b/apps/web/src/components/chat/HighlightedCodeLines.tsxindex f0f971681c1..a3efb3b82ca 100644--- a/apps/web/src/components/chat/HighlightedCodeLines.tsx+++ b/apps/web/src/components/chat/HighlightedCodeLines.tsx@@ -1,10 +1,11 @@-import type { DiffsHighlighter } from "@pierre/diffs";import { toHtml } from "hast-util-to-html";import { toJsxRuntime } from "hast-util-to-jsx-runtime";import { cloneElement, isValidElement, memo, type DOMAttributes } from "react";import { Fragment, jsx, jsxs } from "react/jsx-runtime";-type HighlightedRoot = ReturnType<DiffsHighlighter["codeToHast"]>;+import type { highlightCodeToHast } from "../../lib/incrementalHighlighting";++type HighlightedRoot = ReturnType<typeof highlightCodeToHast>;type HighlightedNode = HighlightedRoot["children"][number];const runtime = { Fragment, jsx, jsxs };diff --git a/apps/web/src/components/chat/MarkdownCodeBlock.tsx b/apps/web/src/components/chat/MarkdownCodeBlock.tsxindex 2a0dd80354f..0540998dd61 100644--- a/apps/web/src/components/chat/MarkdownCodeBlock.tsx+++ b/apps/web/src/components/chat/MarkdownCodeBlock.tsx@@ -5,7 +5,10 @@ import React, { use, useEffect, useRef, useState, type ReactNode } from "react";import { getClientSettings } from "../../hooks/useSettings";import type { DiffThemeName } from "../../lib/diffRendering";-import { createIncrementalHighlightedDocument } from "../../lib/incrementalHighlighting";+import {+ createIncrementalHighlightedDocument,+ highlightCodeToHast,+} from "../../lib/incrementalHighlighting";import { LRUCache } from "../../lib/lruCache";import { getSyntaxHighlighterPromise } from "../../lib/syntaxHighlighting";import { cn } from "../../lib/utils";@@ -353,11 +356,12 @@ function UncachedShikiCodeBlock({const incrementalHighlight = preserveLines? createIncrementalHighlightedDocument(highlighter, language, themeName): null;+ useEffect(() => () => incrementalHighlight?.dispose(), [incrementalHighlight]);const highlighted = (() => {try {if (incrementalHighlight) return incrementalHighlight(code);return preserveLines- ? highlighter.codeToHast(code, { lang: language, theme: themeName })+ ? highlightCodeToHast(highlighter, code, language, themeName): highlighter.codeToHtml(code, { lang: language, theme: themeName });} catch (error) {console.warn(@@ -365,7 +369,7 @@ function UncachedShikiCodeBlock({error instanceof Error ? error.message : error,);return preserveLines- ? highlighter.codeToHast(code, { lang: "text", theme: themeName })+ ? highlightCodeToHast(highlighter, code, "text", themeName): highlighter.codeToHtml(code, { lang: "text", theme: themeName });}})();diff --git a/apps/web/src/components/diffs/AnnotatableCodeView.browser.test.tsx b/apps/web/src/components/diffs/AnnotatableCodeView.browser.test.tsxindex 24b6ee5b8f5..8725a6a0074 100644--- a/apps/web/src/components/diffs/AnnotatableCodeView.browser.test.tsx+++ b/apps/web/src/components/diffs/AnnotatableCodeView.browser.test.tsx@@ -40,7 +40,7 @@ vi.mock("./StyledDiffCodeView", () => ({) : null}{item.annotations?.map((annotation) => (<div key={`${annotation.side}:${annotation.lineNumber}`}>- {props.renderAnnotation?.(annotation, item)}+ {props.renderAnnotation?.(annotation, item.fileDiff, item)}</div>))}</section>diff --git a/apps/web/src/components/diffs/AnnotatableCodeView.tsx b/apps/web/src/components/diffs/AnnotatableCodeView.tsxindex 36dd6af3c78..7baae1853b2 100644--- a/apps/web/src/components/diffs/AnnotatableCodeView.tsx+++ b/apps/web/src/components/diffs/AnnotatableCodeView.tsx@@ -285,7 +285,7 @@ export function AnnotatableCodeView({? renderHeaderPrefix(item.fileDiff, item.id, item.collapsed === true): null}- renderAnnotation={(annotation) => {+ renderAnnotation={(...[annotation]) => {const hasDraft = annotation.metadata.entries.some((entry) => entry.kind === "draft");return (<divdiff --git a/apps/web/src/components/diffs/useReviewFilePatches.ts b/apps/web/src/components/diffs/useReviewFilePatches.tsindex bec85ea0d7f..fb0bb6fc083 100644--- a/apps/web/src/components/diffs/useReviewFilePatches.ts+++ b/apps/web/src/components/diffs/useReviewFilePatches.ts@@ -111,6 +111,8 @@ export function useReviewFilePatches({hunks: [],additionLines: [],deletionLines: [],+ additionCharacterCount: 0,+ deletionCharacterCount: 0,splitLineCount: 0,unifiedLineCount: 0,isPartial: true,diff --git a/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx b/apps/web/src/components/pullRequest/PullRequestCodeTab.tsxindex 4fcc5813084..430f696a12b 100644--- a/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx+++ b/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx@@ -3,7 +3,7 @@ import {sourceControlClients,} from "@t3tools/client-runtime/source-control-clients";import type { CodeViewItem, DiffLineAnnotation, SelectedLineRange } from "@pierre/diffs";-import type { CodeViewDiffItem, CodeViewHandle } from "@pierre/diffs/react";+import type { CodeViewAnnotationArgs, CodeViewDiffItem, CodeViewHandle } from "@pierre/diffs/react";import type {EnvironmentId,PullRequestDetailView,@@ -934,7 +934,7 @@ function PullRequestCodeTab({/>);- const renderAnnotation = (annotation: ReviewAnnotation) => (+ const renderAnnotation = (...[annotation]: CodeViewAnnotationArgs<ReviewAnnotationGroup>) => (<div className="py-1 font-sans text-foreground">{annotation.metadata.threads.map(renderThreadCard)}{annotation.metadata.pending.map((comment) => (diff --git a/apps/web/src/components/settings/CaptureShortcutConfig.tsx b/apps/web/src/components/settings/CaptureShortcutConfig.tsxindex 3b4a7c07d7c..68dfc94a682 100644--- a/apps/web/src/components/settings/CaptureShortcutConfig.tsx+++ b/apps/web/src/components/settings/CaptureShortcutConfig.tsx@@ -12,6 +12,7 @@ import * as Cause from "effect/Cause";import { useState } from "react";import { getDesktopSnapShotBridge } from "../../lib/desktopSnapShot";import { resolveDiffThemeName } from "../../lib/diffRendering";+import { PREFERRED_HIGHLIGHTER } from "../../lib/syntaxHighlighting";import { useRenderedAppearance } from "../../hooks/useTheme";import { useCopyToClipboard } from "../../hooks/useCopyToClipboard";import { Button } from "../ui/button";@@ -181,6 +182,7 @@ export function CaptureShortcutConfig({diffStyle: "unified",theme: resolveDiffThemeName(resolvedTheme),overflow: "wrap",+ preferredHighlighter: PREFERRED_HIGHLIGHTER,}}/></div>diff --git a/apps/web/src/index.css b/apps/web/src/index.cssindex eeb66215733..0f1f4b2b1f8 100644--- a/apps/web/src/index.css+++ b/apps/web/src/index.css@@ -1721,7 +1721,7 @@ code {inherited sizes on unrelated pre surfaces (terminal previews, approvals).Inline code stays relative to its sentence so it never towers over prose;diffs and file previews take the size through --diffs-font-size. */-.chat-markdown .chat-markdown-shiki .shiki,+.chat-markdown .chat-markdown-shiki :is(.shiki, .diffs),.chat-markdown .chat-markdown-codeblock pre,:is(.chat-markdown, .composer-tiptap) pre code {font-size: var(--font-size-code, inherit);@@ -2100,7 +2100,7 @@ code {overflow-wrap: anywhere;}-:is(.chat-markdown, .composer-tiptap) .chat-markdown-shiki .shiki {+:is(.chat-markdown, .composer-tiptap) .chat-markdown-shiki :is(.shiki, .diffs) {background: transparent !important;}diff --git a/apps/web/src/lib/incrementalHighlighting.test.ts b/apps/web/src/lib/incrementalHighlighting.test.tsindex 5a97ec08470..5da693e0b38 100644--- a/apps/web/src/lib/incrementalHighlighting.test.ts+++ b/apps/web/src/lib/incrementalHighlighting.test.ts@@ -1,6 +1,6 @@import { toHtml } from "hast-util-to-html";-import { getSharedHighlighter } from "@pierre/diffs";-import { describe, expect, it } from "vite-plus/test";+import { disposeHighlighter, getSharedHighlighter } from "@pierre/diffs";+import { afterAll, beforeAll, describe, expect, it } from "vite-plus/test";import { createIncrementalHighlightedDocument } from "./incrementalHighlighting";@@ -18,65 +18,91 @@ const samples = {sql: "SELECT 'multi\nline'\nFROM table_name;\n",} as const;-const highlighterPromise = getSharedHighlighter({+const highlighterOptions = {langs: Object.keys(samples) as Array<keyof typeof samples>,themes: ["pierre-dark", "pierre-light"],- preferredHighlighter: "shiki-wasm",-});+};-describe("incremental code highlighting", () => {- it.each(Object.entries(samples))(- "matches full HTML at every streaming prefix in %s",- async (language, code) => {- const highlighter = await highlighterPromise;- for (const theme of ["pierre-dark", "pierre-light"] as const) {- const highlight = createIncrementalHighlightedDocument(highlighter, language, theme);- for (let end = 0; end <= code.length; end++) {- const text = code.slice(0, end);- expect(toHtml(highlight(text)), `${theme}, prefix ${end}`).toBe(- highlighter.codeToHtml(text, { lang: language, theme }),- );+describe.each(["shiki-wasm", "highlights"] as const)(+ "incremental code highlighting (%s)",+ (engine) => {+ beforeAll(() => disposeHighlighter());+ afterAll(() => disposeHighlighter());+ it.each(Object.entries(samples))(+ "matches full HTML at every streaming prefix in %s",+ async (language, code) => {+ const highlighter = await getSharedHighlighter({+ ...highlighterOptions,+ preferredHighlighter: engine,+ });+ for (const theme of ["pierre-dark", "pierre-light"] as const) {+ const highlight = createIncrementalHighlightedDocument(highlighter, language, theme);+ for (let end = 0; end <= code.length; end++) {+ const text = code.slice(0, end);+ expect(toHtml(highlight(text)), `${theme}, prefix ${end}`).toBe(+ highlighter.codeToHtml(text, { lang: language, theme }),+ );+ }+ highlight.dispose();}- }- },- );-- it("resets after edits and truncation, including edits to a completed line", async () => {- const highlighter = await highlighterPromise;- const highlight = createIncrementalHighlightedDocument(- highlighter,- "typescript",- "pierre-dark",+ },);- const inputs = [- "/* open\ncomment\n",- "/* open\ncomment\n*/\nconst x = 1;",- "const edited = 2;\nconst x = 1;",- "const edited = 2;\nconst x = 10;",- "const edited = 2;\n",- "",- "\n\n\nconst fresh = true;\n",- ];- for (const text of inputs) {- expect(toHtml(highlight(text))).toBe(- highlighter.codeToHtml(text, { lang: "typescript", theme: "pierre-dark" }),++ it("resets after edits and truncation, including edits to a completed line", async () => {+ const highlighter = await getSharedHighlighter({+ ...highlighterOptions,+ preferredHighlighter: engine,+ });+ const highlight = createIncrementalHighlightedDocument(+ highlighter,+ "typescript",+ "pierre-dark",);- }- });+ const inputs = [+ "/* open\ncomment\n",+ "/* open\ncomment\n*/\nconst x = 1;",+ "const edited = 2;\nconst x = 1;",+ "const edited = 2;\nconst x = 10;",+ "const edited = 2;\n",+ "",+ "\n\n\nconst fresh = true;\n",+ ];+ for (const text of inputs) {+ expect(toHtml(highlight(text))).toBe(+ highlighter.codeToHtml(text, { lang: "typescript", theme: "pierre-dark" }),+ );+ }+ highlight.dispose();+ });- it("preserves partial CRLF and CR line endings", async () => {- const highlighter = await highlighterPromise;- const highlight = createIncrementalHighlightedDocument(- highlighter,- "typescript",- "pierre-dark",- );- const code = "/* multi\r\nline */\r\nconst x = 1;\r\n";- for (let end = 0; end <= code.length; end++) {- const text = code.slice(0, end);- expect(toHtml(highlight(text))).toBe(- highlighter.codeToHtml(text, { lang: "typescript", theme: "pierre-dark" }),+ // MarkdownCodeBlock creates the document outside its plain-text fallback.+ it("creates a document for a language the highlighter has not loaded", async () => {+ const highlighter = await getSharedHighlighter({+ ...highlighterOptions,+ preferredHighlighter: engine,+ });+ expect(() =>+ createIncrementalHighlightedDocument(highlighter, "cobol", "pierre-dark").dispose(),+ ).not.toThrow();+ });++ it("preserves partial CRLF and CR line endings", async () => {+ const highlighter = await getSharedHighlighter({+ ...highlighterOptions,+ preferredHighlighter: engine,+ });+ const highlight = createIncrementalHighlightedDocument(+ highlighter,+ "typescript",+ "pierre-dark",);- }- });-});+ const code = "/* multi\r\nline */\r\nconst x = 1;\r\n";+ for (let end = 0; end <= code.length; end++) {+ const text = code.slice(0, end);+ expect(toHtml(highlight(text))).toBe(+ highlighter.codeToHtml(text, { lang: "typescript", theme: "pierre-dark" }),+ );+ }+ });+ },+);diff --git a/apps/web/src/lib/incrementalHighlighting.ts b/apps/web/src/lib/incrementalHighlighting.tsindex adc52e6ed89..6f10798dfea 100644--- a/apps/web/src/lib/incrementalHighlighting.ts+++ b/apps/web/src/lib/incrementalHighlighting.ts@@ -1,70 +1,109 @@-import type { DiffsHighlighter } from "@pierre/diffs";+import {+ renderTokenLines,+ type DiffsHighlighter,+ type ThemedToken,+ type TokensResult,+} from "@pierre/diffs";import type { DiffThemeName } from "./diffRendering";-function codeChildren(root: ReturnType<DiffsHighlighter["codeToHast"]>) {- const pre = root.children.find((node) => node.type === "element" && node.tagName === "pre");- if (pre?.type !== "element") throw new Error("Missing highlighted pre element");- const code = pre.children.find((node) => node.type === "element" && node.tagName === "code");- if (code?.type !== "element") throw new Error("Missing highlighted code element");- return code.children;+function highlightedDocument(+ result: TokensResult,+ lines = renderTokenLines(result.tokens, {}),+): { type: "root"; children: ReturnType<typeof renderTokenLines> } {+ return {+ type: "root" as const,+ children: [+ {+ type: "element" as const,+ tagName: "pre",+ properties: {+ class: "diffs",+ style:+ result.rootStyle === false+ ? undefined+ : (result.rootStyle ??+ [+ result.fg != null ? `color:${result.fg}` : "",+ result.bg != null ? `background-color:${result.bg}` : "",+ ]+ .filter(Boolean)+ .join(";")),+ tabIndex: 0,+ },+ children: [+ {+ type: "element" as const,+ tagName: "code",+ properties: {},+ children: lines.flatMap((line, index) =>+ index === 0 ? [line] : [{ type: "text" as const, value: "\n" }, line],+ ),+ },+ ],+ },+ ],+ };+}++export function highlightCodeToHast(+ highlighter: DiffsHighlighter,+ code: string,+ language: string,+ theme: DiffThemeName,+) {+ return highlightedDocument(highlighter.codeToTokens(code, { lang: language, theme }));}export function createIncrementalHighlightedDocument(highlighter: DiffsHighlighter,language: string,theme: DiffThemeName,-): (code: string) => ReturnType<DiffsHighlighter["codeToHast"]> {+) {const options = { lang: language, theme };- const newline = { type: "text" as const, value: "\n" };- let cached:- | {- prefix: string;- state: ReturnType<DiffsHighlighter["getLastGrammarState"]>;- children: ReturnType<typeof codeChildren>;- }- | undefined;+ let shell: TokensResult | undefined;+ let tokenizer: ReturnType<DiffsHighlighter["createStreamTokenizer"]> | undefined;+ let previous = "";+ const completedLines: ReturnType<typeof renderTokenLines> = [];++ function dispose() {+ tokenizer?.dispose();+ tokenizer = undefined;+ previous = "";+ completedLines.length = 0;+ }- return (code: string) => {- // Plain text and ANSI do not have a TextMate grammar state. A CR at the end- // of a chunk can still become a CRLF, so keep that input on the full path.- if (- !language ||- ["text", "plaintext", "plain", "txt", "ansi"].includes(language) ||- code.includes("\r")- ) {- return highlighter.codeToHast(code, options);- }- if (cached && !code.startsWith(cached.prefix)) cached = undefined;- const end = code.lastIndexOf("\n") + 1;- if (end > (cached?.prefix.length ?? 0)) {- // Omit the final newline: Shiki would tokenize an extra empty line and- // advance the grammar state twice before we process the following line.- const root = highlighter.codeToHast(code.slice(cached?.prefix.length ?? 0, end - 1), {- ...options,- ...(cached ? { grammarState: cached.state } : {}),- });- const state = highlighter.getLastGrammarState(root);- if (!state) {- cached = undefined;- return highlighter.codeToHast(code, options);+ return Object.assign(+ (code: string) => {+ // ANSI and partial CRLF sequences need the full-source normalization path.+ if (language === "ansi" || code.includes("\r")) {+ dispose();+ return highlightCodeToHast(highlighter, code, language, theme);}- cached = {- prefix: code.slice(0, end),- state,- children: [...(cached ? [...cached.children, newline] : []), ...codeChildren(root)],- };- }- const prefix = cached;- if (!prefix) return highlighter.codeToHast(code, options);- return highlighter.codeToHast(code.slice(prefix.prefix.length), {- ...options,- grammarState: prefix.state,- transformers: [- {- code: (node) => ({ ...node, children: [...prefix.children, newline, ...node.children] }),- },- ],- });- };+ if (!code.startsWith(previous)) dispose();+ // Created on first use so an unknown language throws inside the caller's fallback.+ shell ??= highlighter.codeToTokens("", options);+ tokenizer ??= highlighter.createStreamTokenizer(options);+ const update = tokenizer.enqueue(code.slice(previous.length));+ if (update instanceof Promise) {+ dispose();+ void update.catch(() => {});+ return highlightCodeToHast(highlighter, code, language, theme);+ }+ previous = code;+ let line: ThemedToken[] = [];+ for (const token of update.stable) {+ if (token.content === "\n") {+ completedLines.push(...renderTokenLines([line], {}));+ line = [];+ } else line.push(token);+ }+ // Completed line nodes retain their identity while the final line changes.+ return highlightedDocument(shell, [+ ...completedLines,+ ...renderTokenLines([update.unstable], {}),+ ]);+ },+ { dispose },+ );}diff --git a/apps/web/src/lib/syntaxHighlighting.ts b/apps/web/src/lib/syntaxHighlighting.tsindex 37d29cfda26..d85f0923c16 100644--- a/apps/web/src/lib/syntaxHighlighting.ts+++ b/apps/web/src/lib/syntaxHighlighting.ts@@ -8,12 +8,11 @@ import {import { resolveDiffThemeName } from "./diffRendering";/**- * Always highlight with the Oniguruma WASM engine — the JS regex engine can- * backtrack catastrophically and hang the tokenizing thread. The shared- * highlighter is a first-caller-wins singleton, so every creation site must- * pass this value.+ * Highlights' hand-written WASM lexers tokenize large files 10-40x faster than+ * Shiki and never backtrack like Shiki's JS regex engine. Only one highlighter+ * type can be active per thread, so every creation site must pass this value.*/-export const PREFERRED_HIGHLIGHTER: HighlighterTypes = "shiki-wasm";+export const PREFERRED_HIGHLIGHTER: HighlighterTypes = "highlights";const highlighterPromiseCache = new Map<string, Promise<DiffsHighlighter>>();diff --git a/patches/@pierre%[email protected] b/patches/@pierre%[email protected]similarity index 90%rename from patches/@pierre%[email protected]rename to patches/@pierre%[email protected]index a944c6355a2..dba0acc7eb6 100644--- a/patches/@pierre%[email protected]+++ b/patches/@pierre%[email protected]@@ -1,5 +1,5 @@diff --git a/dist/components/CodeView.d.ts b/dist/components/CodeView.d.ts-index cc32d28..3a46bf4 100644+index 234ec4baa4..274ff5e32b 100644--- a/dist/components/CodeView.d.ts+++ b/dist/components/CodeView.d.ts@@ -158,6 +158,12 @@ interface CodeViewOptions<LAnnotation, Caret> extends CodeViewPassThroughOptions@@ -15,7 +15,7 @@ index cc32d28..3a46bf4 100644/** Render a non-virtualized element at the very start of the scroll content,* before the first item. It is always rendered and scrolls with the content.* Return the same element across calls and mutate it in place to update;-@@ -268,6 +274,13 @@ declare class CodeView<LAnnotation = undefined, Caret = undefined> {+@@ -269,6 +275,13 @@ declare class CodeView<LAnnotation = undefined, Caret = undefined> {getSelectedLines(): CodeViewLineSelection | null;clearSelectedLines(options?: SelectionWriteOptions): void;getItem(itemId: string): CodeViewItem<LAnnotation> | undefined;@@ -30,10 +30,10 @@ index cc32d28..3a46bf4 100644* Returns the editor while this item is being edited. Partial diffs get an* editor after their files load; scrolling away or collapsing keeps it.diff --git a/dist/components/CodeView.js b/dist/components/CodeView.js-index 140f94f..96fc774 100644+index ee5c91c5ab..7d0a2901e4 100644--- a/dist/components/CodeView.js+++ b/dist/components/CodeView.js-@@ -16,6 +16,7 @@ import { prefersReducedMotion } from "../utils/prefersReducedMotion.js";+@@ -18,6 +18,7 @@ import { resolvePreferredHighlighter } from "../utils/resolvePreferredHighlighteimport { roundToDevicePixel } from "../utils/roundToDevicePixel.js";import { VirtualizedFile } from "./VirtualizedFile.js";import { VirtualizedFileDiff } from "./VirtualizedFileDiff.js";@@ -41,7 +41,7 @@ index 140f94f..96fc774 100644//#region src/components/CodeView.tsconst CODE_VIEW_DIFF_OPTION_KEYS = ["theme",-@@ -114,6 +115,8 @@ function defineItemOption(target, key, get) {+@@ -116,6 +117,8 @@ function defineItemOption(target, key, get) {}const DEFAULT_SCROLL_INTERACTION_RESTORE_DELAY_MS = 120;const SUB_PIXEL_TOLERANCE = 1;@@ -50,16 +50,16 @@ index 140f94f..96fc774 100644const SCROLLING_CODE_OVERFLOW_FIX_VARIABLE = "--diffs-overflow-override";function createScrollRebaseConfig(containerHeight, triggerTop, targetTop) {return {-@@ -211,6 +214,8 @@ var CodeView = class CodeView {+@@ -213,6 +216,8 @@ var CodeView = class CodeView {isReadySubscription;pendingHighlighterTheme;- isContainerManaged;+ isComponentManaged;+ search = new CodeViewSearch(this);+ pendingSearchReveal;- constructor(options = { theme: DEFAULT_THEMES }, workerManager, isContainerManaged = false) {+ slotSnapshotStale = false;+ constructor(options = { theme: DEFAULT_THEMES }, workerManager, isComponentManaged = false) {this.options = options;- this.computeMetricsCache(options.itemMetrics);-@@ -392,6 +397,7 @@ var CodeView = class CodeView {+@@ -395,6 +400,7 @@ var CodeView = class CodeView {this.root.addEventListener("touchstart", this.clearPendingScroll, { passive: true });this.root.addEventListener("pointerdown", this.clearPendingScroll, { passive: true });this.root.addEventListener("keydown", this.clearPendingScroll, { passive: true });@@ -67,15 +67,15 @@ index 140f94f..96fc774 100644this.resizeObserver.observe(this.root);this.render(true);window.__INSTANCE = this;-@@ -464,6 +470,7 @@ var CodeView = class CodeView {+@@ -467,6 +473,7 @@ var CodeView = class CodeView {this.heightDirty = true;this.resetRenderState();- if (!this.isContainerManaged) this.flushSlotCoordinator();+ if (!this.isComponentManaged) this.flushSlotCoordinator();+ this.search.refresh();if (failed) throw failure;}cleanUp() {-@@ -485,6 +492,8 @@ var CodeView = class CodeView {+@@ -488,6 +495,8 @@ var CodeView = class CodeView {this.root?.removeEventListener("touchstart", this.clearPendingScroll);this.root?.removeEventListener("pointerdown", this.clearPendingScroll);this.root?.removeEventListener("keydown", this.clearPendingScroll);@@ -84,7 +84,7 @@ index 140f94f..96fc774 100644this.root?.style.removeProperty("overflow-anchor");this.container?.remove();this.stickyOffset.remove();-@@ -626,6 +635,137 @@ var CodeView = class CodeView {+@@ -629,6 +638,137 @@ var CodeView = class CodeView {getItem(itemId) {return this.idToItem.get(itemId)?.item;}@@ -222,7 +222,7 @@ index 140f94f..96fc774 100644/*** Returns the editor while this item is being edited. Partial diffs get an* editor after their files load; scrolling away or collapsing keeps it.-@@ -645,6 +785,7 @@ var CodeView = class CodeView {+@@ -648,6 +788,7 @@ var CodeView = class CodeView {this.render();this.syncItemEditors();this.syncSelection();@@ -230,7 +230,7 @@ index 140f94f..96fc774 100644return true;}updateItemId(oldId, newId) {-@@ -678,6 +819,7 @@ var CodeView = class CodeView {+@@ -681,6 +822,7 @@ var CodeView = class CodeView {this.renamePendingScrollTarget(oldId, newId);this.renamePendingLayoutAnchor(oldId, newId);this.render();@@ -238,7 +238,7 @@ index 140f94f..96fc774 100644return true;}addItem(input) {-@@ -687,6 +829,7 @@ var CodeView = class CodeView {+@@ -690,6 +832,7 @@ var CodeView = class CodeView {this.appendItemsInternal(inputs);this.syncItemEditors();this.syncSelection();@@ -246,7 +246,7 @@ index 140f94f..96fc774 100644}removeItem(itemId) {const item = this.idToItem.get(itemId);-@@ -709,6 +852,7 @@ var CodeView = class CodeView {+@@ -712,6 +855,7 @@ var CodeView = class CodeView {for (const removedItem of removedItemsById?.values() ?? []) removedItem.instance.cleanUp();}this.syncSelection();@@ -254,7 +254,7 @@ index 140f94f..96fc774 100644}/*** Append new records to the viewer while preserving existing layout state.-@@ -1330,6 +1474,10 @@ var CodeView = class CodeView {+@@ -1334,6 +1478,10 @@ var CodeView = class CodeView {item.item = nextItem;item.version = nextItem.version;item.renderedOptionsRevision = -1;@@ -265,7 +265,7 @@ index 140f94f..96fc774 100644return true;}getMaxScrollTopForHeight(scrollHeight) {-@@ -1710,6 +1858,10 @@ var CodeView = class CodeView {+@@ -1714,6 +1862,10 @@ var CodeView = class CodeView {this.updateStickyPositioning();this.validateStickyContainerHeight();this.fixContainerFocus();@@ -276,7 +276,7 @@ index 140f94f..96fc774 100644if (fitPerfectly || this.scrollAnimation != null) this.render();};flushManagers(updatedItems) {-@@ -1804,7 +1956,8 @@ var CodeView = class CodeView {+@@ -1808,7 +1960,8 @@ var CodeView = class CodeView {this.notifyScroll();this.render();};@@ -286,7 +286,7 @@ index 140f94f..96fc774 100644this.pendingScrollTarget = void 0;this.pendingLayoutAnchor = void 0;this.scrollAnimation = void 0;-@@ -2066,7 +2219,12 @@ var CodeView = class CodeView {+@@ -2071,7 +2224,12 @@ var CodeView = class CodeView {const item = this.items[index];if (item == null) throw new Error("CodeView.recomputeLayout: invalid item index");item.top = runningTop;@@ -300,7 +300,7 @@ index 140f94f..96fc774 100644else item.height = item.instance.updateCodeViewLayout(item.item.file, runningTop, reset, item.item.annotations ?? []);runningTop += item.height;if (index < this.items.length - 1) runningTop += layout.gap;-@@ -2086,6 +2244,27 @@ var CodeView = class CodeView {+@@ -2091,6 +2249,27 @@ var CodeView = class CodeView {return this.getLayout().gap + this.itemMetricsCache.diffHeaderHeight;}};@@ -330,7 +330,7 @@ index 140f94f..96fc774 100644if (item.type === "diff") return item.instance.updateCodeViewLayout(item.item.fileDiff, item.top, void 0, item.item.annotations ?? []);diff --git a/dist/components/CodeViewSearch.js b/dist/components/CodeViewSearch.jsnew file mode 100644-index 0000000..29370ad+index 0000000000..29370adf88--- /dev/null+++ b/dist/components/CodeViewSearch.js@@ -0,0 +1,360 @@@@ -695,22 +695,32 @@ index 0000000..29370ad++//# sourceMappingURL=CodeViewSearch.js.mapdiff --git a/dist/components/FileDiff.js b/dist/components/FileDiff.js-index 6f66bd3..3125fac 100644+index 12f4f8949f..e33a5ed319 100644--- a/dist/components/FileDiff.js+++ b/dist/components/FileDiff.js-@@ -1,5 +1,6 @@--import { CUSTOM_HEADER_SLOT_ID, DEFAULT_THEMES, EMPTY_RENDER_RANGE, HEADER_FILENAME_SUFFIX_SLOT_ID, HEADER_METADATA_SLOT_ID, HEADER_PREFIX_SLOT_ID } from "../constants.js";-+import { CUSTOM_HEADER_SLOT_ID, DEFAULT_THEMES, HEADER_FILENAME_SUFFIX_SLOT_ID, HEADER_METADATA_SLOT_ID, HEADER_PREFIX_SLOT_ID } from "../constants.js";+@@ -1,6 +1,7 @@+-import { CUSTOM_HEADER_SLOT_ID, DEFAULT_THEMES, EMPTY_LINE_ANNOTATIONS, EMPTY_RENDER_RANGE, HEADER_FILENAME_SUFFIX_SLOT_ID, HEADER_METADATA_SLOT_ID, HEADER_PREFIX_SLOT_ID } from "../constants.js";++import { CUSTOM_HEADER_SLOT_ID, DEFAULT_THEMES, EMPTY_LINE_ANNOTATIONS, HEADER_FILENAME_SUFFIX_SLOT_ID, HEADER_METADATA_SLOT_ID, HEADER_PREFIX_SLOT_ID } from "../constants.js";+ import { HighlighterDisposedError } from "../highlighter/highlighterType.js";import { getThemes } from "../utils/getThemes.js";+import { getHighlighterThemeStyles } from "../utils/getHighlighterThemeStyles.js";import { getHighlighterIfLoaded, getSharedHighlighter } from "../highlighter/shared_highlighter.js";import { dequeueRender, queueRender } from "../managers/UniversalRenderingManager.js";import { areThemesEqual } from "../utils/areThemesEqual.js";-@@ -691,11 +692,20 @@ var FileDiff = class {+@@ -724,7 +725,7 @@ var FileDiff = class {+ if (expandUnchanged) this.loadFilesIfNecessary();+ this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options));+ this.syncInteractionOptions();+- this.prepareRenderData(this.hunksRenderer.getDiffForNextRender(workingDiff));++ this.prepareRenderData(collapsed ? workingDiff : this.hunksRenderer.getDiffForNextRender(workingDiff));+ const { disableErrorHandling = false, disableFileHeader = false } = this.options;+ if (disableFileHeader) {+ if (this.headerElement != null) {+@@ -740,11 +741,22 @@ var FileDiff = class {this.removeRenderedCode();this.clearAuxiliaryNodes();try {-- const hunksResult = this.hunksRenderer.renderDiff(latestDiff, EMPTY_RENDER_RANGE);+- const hunksResult = this.hunksRenderer.renderDiff(workingDiff, EMPTY_RENDER_RANGE);- if (hunksResult != null) this.applyThemeState(fileContainer, hunksResult.themeStyles, themeType, hunksResult.baseThemeType);- if (hunksResult?.headerElement != null) this.applyHeaderToDOM(hunksResult.headerElement, fileContainer, hunksResult.fileDiff);+ // An empty render range still highlights the full diff. Headers only need the theme.@@ -720,24 +730,26 @@ index 6f66bd3..3125fac 100644+ else getSharedHighlighter({+ themes: getThemes(theme),+ langs: ["text"],-+ preferredHighlighter: this.workerManager?.getPreferredHighlighter() ?? this.options.preferredHighlighter++ preferredHighlighter: resolvePreferredHighlighter(this.workerManager, this.options)+ }).then(() => {+ if (this.enabled && this.fileContainer === fileContainer && this.options.collapsed && areThemesEqual(theme, this.getTheme())) this.rerender();-+ }).catch((error) => console.error(error));-+ if (!disableFileHeader) this.applyHeaderToDOM(this.hunksRenderer.renderHeader(latestDiff), fileContainer, latestDiff);++ }).catch((error) => {++ if (!(error instanceof HighlighterDisposedError)) console.error(error);++ });++ if (!disableFileHeader) this.applyHeaderToDOM(this.hunksRenderer.renderHeader(workingDiff), fileContainer, workingDiff);this.renderSeparators([]);-- this.renderedDiff = hunksResult?.fileDiff ?? latestDiff;-+ this.renderedDiff = latestDiff;+- this.adoptRenderData(hunksResult?.fileDiff ?? workingDiff);++ this.adoptRenderData(workingDiff);this.injectUnsafeCSS();} catch (error) {if (disableErrorHandling) throw error;diff --git a/dist/components/VirtualizedFile.d.ts b/dist/components/VirtualizedFile.d.ts-index 5e68e35..79dcd88 100644+index 90ef575932..0fd262cbb7 100644--- a/dist/components/VirtualizedFile.d.ts+++ b/dist/components/VirtualizedFile.d.ts-@@ -49,7 +49,7 @@ declare class VirtualizedFile<LAnnotation = undefined, Caret = undefined> extend- setVisibility(visible: boolean): void;+@@ -50,7 +50,7 @@ declare class VirtualizedFile<LAnnotation = undefined, Caret = undefined> extendrerender(): void;+ protected get isComponentManaged(): boolean;syncGhostTextRows(): void;- applyDocumentChange(textDocument: TextDocument<'file', LAnnotation>, newLineAnnotations?: LineAnnotation<LAnnotation>[], shouldUpdateBuffer?: boolean): void;+ applyDocumentChange(textDocument: TextDocument<'file', LAnnotation>, newLineAnnotations?: LineAnnotation<LAnnotation>[], shouldUpdateBuffer?: boolean, startLine?: number): void;@@ -745,7 +757,7 @@ index 5e68e35..79dcd88 100644protected finalizeRender(): void;private updatePendingRender;diff --git a/dist/components/VirtualizedFile.js b/dist/components/VirtualizedFile.js-index d1f57cd..5908ad7 100644+index 95d4ca8fdf..24a980672d 100644--- a/dist/components/VirtualizedFile.js+++ b/dist/components/VirtualizedFile.js@@ -23,6 +23,7 @@ var VirtualizedFile = class extends File {@@ -756,8 +768,8 @@ index d1f57cd..5908ad7 100644ghostTextRows: NO_GHOST_TEXT_ROWS};pendingRender;-@@ -35,6 +36,8 @@ var VirtualizedFile = class extends File {- super(options, workerManager, isContainerManaged);+@@ -34,6 +35,8 @@ var VirtualizedFile = class extends File {+ super(options, workerManager, requestOwnerRender);this.virtualizer = virtualizer;this.metrics = metrics;+ const simpleVirtualizer = this.getSimpleVirtualizer();@@ -765,7 +777,7 @@ index d1f57cd..5908ad7 100644}setMetrics(metrics, force = false) {const nextMetrics = computeVirtualFileMetrics(metrics);-@@ -86,10 +89,12 @@ var VirtualizedFile = class extends File {+@@ -85,10 +88,12 @@ var VirtualizedFile = class extends File {if (this.isAdvancedMode()) throw new Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(themeType);}@@ -781,7 +793,7 @@ index d1f57cd..5908ad7 100644if (this.cache.checkpoints.length > 0) this.cache.checkpoints.length = 0;this.cache.ghostTextRows = NO_GHOST_TEXT_ROWS;if (this.renderRange != null && resetRenderRange) this.renderRange = void 0;-@@ -135,6 +140,13 @@ var VirtualizedFile = class extends File {+@@ -134,6 +139,13 @@ var VirtualizedFile = class extends File {if (this.code == null) return hasHeightChange;const content = this.code.children[1];if (!(content instanceof HTMLElement)) return hasHeightChange;@@ -795,7 +807,7 @@ index d1f57cd..5908ad7 100644if (this.renderRange != null && shouldRenderFileAnnotations(this.renderRange)) {const nextFileAnnotationHeight = measureFileAnnotationHeight(content) ?? 0;if (nextFileAnnotationHeight !== this.cache.fileAnnotationHeight) {-@@ -358,12 +370,12 @@ var VirtualizedFile = class extends File {+@@ -366,12 +378,12 @@ var VirtualizedFile = class extends File {codeView.instanceChanged(this, true);} else this.getSimpleVirtualizer()?.requestHeightReconcile(this);}@@ -811,29 +823,29 @@ index d1f57cd..5908ad7 100644if (!this.isSimpleMode()) this.computeApproximateSize(true);else if (shouldUpdateBuffer && previousRenderRange != null && file != null) {diff --git a/dist/components/VirtualizedFileDiff.js b/dist/components/VirtualizedFileDiff.js-index 96f970f..1bb59c6 100644+index eb34dd4a77..821bb0ab11 100644--- a/dist/components/VirtualizedFileDiff.js+++ b/dist/components/VirtualizedFileDiff.js-@@ -552,7 +552,7 @@ var VirtualizedFileDiff = class extends FileDiff {+@@ -551,7 +551,7 @@ var VirtualizedFileDiff = class extends FileDiff {rerender() {- if (!this.enabled || this.fileDiff == null && this.additionFile == null && this.deletionFile == null) return;- const latestDiff = this.getLatestDiff();-- const nextRenderDiff = latestDiff == null ? void 0 : this.hunksRenderer.getDiffForNextRender(latestDiff);-+ const nextRenderDiff = latestDiff == null || this.options.collapsed === true ? latestDiff : this.hunksRenderer.getDiffForNextRender(latestDiff);+ if (!this.enabled || this.getInputDiff() == null && this.additionFile == null && this.deletionFile == null) return;+ const workingDiff = this.getWorkingDiff();+- const nextRenderDiff = workingDiff == null ? void 0 : this.hunksRenderer.getDiffForNextRender(workingDiff);++ const nextRenderDiff = workingDiff == null || this.options.collapsed === true ? workingDiff : this.hunksRenderer.getDiffForNextRender(workingDiff);if (this.isSimpleMode()) this.pendingRender = void 0;this.forceRenderOverride = true;- this.virtualizer.instanceChanged(this, !areDiffTargetsEqual(this.getRenderedDiff(), nextRenderDiff));-@@ -724,7 +724,7 @@ var VirtualizedFileDiff = class extends FileDiff {+ if (this.isSimpleMode() && this.requestRender()) return;+@@ -731,7 +731,7 @@ var VirtualizedFileDiff = class extends FileDiff {const previousRenderedDiff = this.getRenderedDiff();const { pendingRender } = this;const previousLayoutDiff = pendingRender?.diff ?? previousRenderedDiff;-- const pendingRenderDiff = this.hunksRenderer.getDiffForNextRender(latestDiff);-+ const pendingRenderDiff = this.options.collapsed === true ? latestDiff : this.hunksRenderer.getDiffForNextRender(latestDiff);+- const pendingRenderDiff = this.hunksRenderer.getDiffForNextRender(workingDiff);++ const pendingRenderDiff = this.options.collapsed === true ? workingDiff : this.hunksRenderer.getDiffForNextRender(workingDiff);this.pendingRender = {- latestDiff,+ workingDiff,diff: pendingRenderDiffdiff --git a/dist/components/web-components.js b/dist/components/web-components.js-index 6e7b486..5b7290f 100644+index 6e7b486a02..5b7290f181 100644--- a/dist/components/web-components.js+++ b/dist/components/web-components.js@@ -2,8 +2,17 @@ import { DIFFS_TAG_NAME } from "../constants.js";@@ -867,10 +879,10 @@ index 6e7b486..5b7290f 100644connectedCallback() {const shadowRoot = this.shadowRoot ?? this.attachShadow({ mode: "open" });diff --git a/dist/editor/editor.js b/dist/editor/editor.js-index 8f04a6f..c203023 100644+index bf17cea32f..671e77b8cd 100644--- a/dist/editor/editor.js+++ b/dist/editor/editor.js-@@ -1899,7 +1899,11 @@ var Editor = class {+@@ -1903,7 +1903,11 @@ var Editor = class {changedDocumentLines: this.#isDiff && !didLineCountChange ? getChangedDocumentLines(textDocument, change) : void 0,documentLineCount: textDocument.lineCount});@@ -884,7 +896,7 @@ index 8f04a6f..c203023 100644if (newLineAnnotations != null) {this.#lineAnnotations = newLineAnnotations;diff --git a/dist/editor/searchPanel.d.ts b/dist/editor/searchPanel.d.ts-index 9542849..1c1a51f 100644+index 9542849786..1c1a51f56d 100644--- a/dist/editor/searchPanel.d.ts+++ b/dist/editor/searchPanel.d.ts@@ -15,6 +15,8 @@ interface SearchPanelOptions {@@ -897,7 +909,7 @@ index 9542849..1c1a51f 100644scrollToMatch: (nextMatch: MatchRange, retainFocus: boolean) => void;applyReplace: (edits: ResolvedTextEdit[]) => void;diff --git a/dist/editor/searchPanel.js b/dist/editor/searchPanel.js-index df1ba63..676751b 100644+index df1ba637c2..676751bb0e 100644--- a/dist/editor/searchPanel.js+++ b/dist/editor/searchPanel.js@@ -12,7 +12,7 @@ var SearchPanelWidget = class {@@ -919,7 +931,7 @@ index df1ba63..676751b 100644this.#inputElement.select();};diff --git a/dist/managers/ResizeManager.d.ts b/dist/managers/ResizeManager.d.ts-index 3efafc4..9e5b751 100644+index 3efafc4132..9e5b7511f9 100644--- a/dist/managers/ResizeManager.d.ts+++ b/dist/managers/ResizeManager.d.ts@@ -5,6 +5,8 @@ interface ResizeManagerSetupOptions {@@ -932,7 +944,7 @@ index 3efafc4..9e5b751 100644private static managersByElement;private static getResizeObserver;diff --git a/dist/managers/ResizeManager.js b/dist/managers/ResizeManager.js-index 9724cb1..14145d8 100644+index 9724cb1e34..14145d8329 100644--- a/dist/managers/ResizeManager.js+++ b/dist/managers/ResizeManager.js@@ -19,6 +19,7 @@ var ResizeManager = class ResizeManager {@@ -952,10 +964,10 @@ index 9724cb1..14145d8 100644}applyAnnotationUpdates(annotationUpdates) {diff --git a/dist/react/CodeView.d.ts b/dist/react/CodeView.d.ts-index e78e713..642b235 100644+index 12e12c50cd..684c7a89fa 100644--- a/dist/react/CodeView.d.ts+++ b/dist/react/CodeView.d.ts-@@ -56,6 +56,8 @@ interface CodeViewBaseProps<LAnnotation, Caret> {+@@ -57,6 +57,8 @@ interface CodeViewBaseProps<LAnnotation, Caret> {* is frozen; re-key the accepted value in place before accepting.*/onItemEditComplete?: CodeViewItemEditCompleteHandler<LAnnotation, Caret>;@@ -965,7 +977,7 @@ index e78e713..642b235 100644renderHeaderPrefix?(item: CodeViewItem<LAnnotation>): ReactNode;renderHeaderFilenameSuffix?(item: CodeViewItem<LAnnotation>): ReactNode;diff --git a/dist/react/CodeView.js b/dist/react/CodeView.js-index 84c7915..d1930bf 100644+index 4dfed6bd0a..ac35a5a455 100644--- a/dist/react/CodeView.js+++ b/dist/react/CodeView.js@@ -24,7 +24,7 @@ function createDefaultCache(controlled) {@@ -1030,7 +1042,7 @@ index 84c7915..d1930bf 100644if (hasGutterRenderer) managedOptions.renderGutterUtility = noopRender;if (hasCodeViewHeader) managedOptions.renderCodeViewHeader = noopRender;diff --git a/dist/utils/createFileHeaderElement.js b/dist/utils/createFileHeaderElement.js-index 39fe30e..600442e 100644+index 39fe30e47b..600442e3eb 100644--- a/dist/utils/createFileHeaderElement.js+++ b/dist/utils/createFileHeaderElement.js@@ -73,12 +73,12 @@ function createMetadataElement(fileDiff) {@@ -1049,10 +1061,10 @@ index 39fe30e..600442e 100644}));}diff --git a/package.json b/package.json-index d9dc7b5..3c37bae 100644+index 0cc43c4a7d..60b7d17d61 100644--- a/package.json+++ b/package.json-@@ -58,6 +58,18 @@+@@ -60,6 +60,18 @@"./worker/worker-portable.js": {"types": "./dist/worker/worker-portable.d.ts","import": "./dist/worker/worker-portable.js"diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 75a04ae377e..01cee349e51 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -264,7 +264,7 @@ overrides:expo-widgets: 58.0.20'@ff-labs/fff-node': 0.11.0'@legendapp/list': 3.3.5- '@pierre/diffs': 1.5.2+ '@pierre/diffs': 1.6.1'@react-native-ai/apple': 0.12.0'@react-native-menu/menu': 2.0.0'@react-navigation/native-stack': 7.21.0@@ -354,7 +354,7 @@ patchedDependencies:'@ff-labs/[email protected]': cc71fcec015f4d39bc96ae2e2bf6b0ca678124c722c66a7841efce9d34b5983c'@legendapp/[email protected]': 011a862a7116ec5b5f4bba17d37bc58c9b5a8f64a6a9f527345f316ce9c96e63'@muse-code/[email protected]': 7b495b607fc5d76b444c7c4d58821e839726a30e6f3c53564f0d59f2d5b42101- '@pierre/[email protected]': 2ec81ba1e8ce4681095a3473c2bf78e630417740c622720ef624febb467c25fc+ '@pierre/[email protected]': 4645364ddf113e48e8827f3b4966b3b1ff745317011e5a3d904e2d8672dee7dc'@react-native-ai/[email protected]': 2d09870c2848d185cb05b53ed823a46e12dba519324d8dd8e584e28731990f9d'@react-native-menu/[email protected]': 910ec1bf22aa85a96fcf12299cd823bc30f702dd9b2d77b564d10b9ed709f7f6'@react-navigation/[email protected]': 990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42@@ -537,8 +537,8 @@ importers:specifier: 'catalog:'version: 1.9.1'@pierre/diffs':- specifier: 1.5.2- version: 1.5.2(patch_hash=2ec81ba1e8ce4681095a3473c2bf78e630417740c622720ef624febb467c25fc)(@shikijs/[email protected])([email protected]([email protected]))([email protected])+ specifier: 1.6.1+ version: 1.6.1(patch_hash=4645364ddf113e48e8827f3b4966b3b1ff745317011e5a3d904e2d8672dee7dc)(@shikijs/[email protected])([email protected]([email protected]))([email protected])'@pierre/highlights':specifier: 'catalog:'version: 0.2.0@@ -1022,8 +1022,8 @@ importers:specifier: 'catalog:'version: 1.8.0'@pierre/diffs':- specifier: 1.5.2- version: 1.5.2(patch_hash=2ec81ba1e8ce4681095a3473c2bf78e630417740c622720ef624febb467c25fc)(@shikijs/[email protected])([email protected]([email protected]))([email protected])+ specifier: 1.6.1+ version: 1.6.1(patch_hash=4645364ddf113e48e8827f3b4966b3b1ff745317011e5a3d904e2d8672dee7dc)(@shikijs/[email protected])([email protected]([email protected]))([email protected])'@pierre/trees':specifier: 1.0.0-beta.6version: 1.0.0-beta.6(@pierre/[email protected])(@shikijs/[email protected])([email protected]([email protected]))([email protected])([email protected])@@ -1325,8 +1325,8 @@ importers:packages/client-runtime:dependencies:'@pierre/diffs':- specifier: 1.5.2- version: 1.5.2(patch_hash=2ec81ba1e8ce4681095a3473c2bf78e630417740c622720ef624febb467c25fc)(@shikijs/[email protected])([email protected]([email protected]))([email protected])+ specifier: 1.6.1+ version: 1.6.1(patch_hash=4645364ddf113e48e8827f3b4966b3b1ff745317011e5a3d904e2d8672dee7dc)(@shikijs/[email protected])([email protected]([email protected]))([email protected])'@t3tools/contracts':specifier: workspace:*version: link:../contracts@@ -5543,8 +5543,8 @@ packages:resolution: {integrity: sha512-ODOov0sGMJMf3jPonOkgGqPknTsu+DdQ7kD++gz8aI+aFMOMHFbWAA2taqXXVTdP+OTOQR/znGvSpmkeI0WTYQ==}engines: {node: '>=14.18.0'}- '@pierre/[email protected]':- resolution: {integrity: sha512-QVxIWQEnNoko22k63maERzozd29+FtaUNpRrZiw603WMe5R1mFSED+jMtPkcVP3SDYS1DWg5K7sa7sJbr3xkNQ==}+ '@pierre/[email protected]':+ resolution: {integrity: sha512-XTfLW4bFETyosZfFNUoyRh1zPE4tmAijOoxdHx4X805tlaq/7/fuQXIiJSm21+jLkDo8vn5elQ+2O4YtMTKM0Q==}peerDependencies:react: ^18.3.1 || ^19.0.0react-dom: ^18.3.1 || ^19.0.0@@ -5585,8 +5585,8 @@ packages:shiki:optional: true- '@pierre/[email protected]':- resolution: {integrity: sha512-WCI5Qd7iprDpISL9fBYOLe8RV53+b7mFNA3bPzl60/2CKCSrsKN8zEcep6Y3BAzvARlmca50zGjDodqPGiTUKA==}+ '@pierre/[email protected]':+ resolution: {integrity: sha512-RmXLLqtx31UGcR8kZyO5hGAQ1EXz6loT1Cu0BFAGsbnBboIxp2BlomkLfWyvdT4WZXnBGyu25onL1gKpFQuSUw==}peerDependencies:'@pierre/theme': ^1.1.0 || ^2.0.0'@shikijs/themes': ^3.0.0 || ^4.0.0@@ -6037,10 +6037,6 @@ packages:resolution: {integrity: sha512-RX8IHYeLv8Cu2W6ruc3RxUqWn0IYCqSrMBzi/uRGAmfyDNOnNO5BF/Px7o97n4XTpmFTo5GbRaazuOWj+2ak2w==}engines: {node: '>=20'}- '@shikijs/[email protected]':- resolution: {integrity: sha512-pKrYVNUr1oPjJvs76gkPPirDySx3GKG9O88P2Y3AQ+7AjSFws9Y+Ry/Q/6Yg6QpyigzjdQ6H5JAMNAvLXZ63dw==}- engines: {node: '>=20'}-'@shikijs/[email protected]':resolution: {integrity: sha512-VT/MKtlpOhEPZloSH3Pb9WCZEBDoQVMa9jedp5UAwmJOar1DVc9DRODAxmYPW9M93IK4ryuqRejFfmlvlVDemw==}engines: {node: '>=20'}@@ -15377,11 +15373,11 @@ snapshots:tslib: 2.8.1webcrypto-core: 1.9.2- '@pierre/[email protected](patch_hash=2ec81ba1e8ce4681095a3473c2bf78e630417740c622720ef624febb467c25fc)(@shikijs/[email protected])([email protected]([email protected]))([email protected])':+ '@pierre/[email protected](patch_hash=4645364ddf113e48e8827f3b4966b3b1ff745317011e5a3d904e2d8672dee7dc)(@shikijs/[email protected])([email protected]([email protected]))([email protected])':dependencies:+ '@pierre/highlights': 0.2.0'@pierre/theme': 2.0.0- '@pierre/theming': 1.0.1(@pierre/[email protected])(@shikijs/[email protected])([email protected]([email protected]))([email protected])([email protected])- '@shikijs/transformers': 4.2.0+ '@pierre/theming': 1.0.2(@pierre/[email protected])(@shikijs/[email protected])([email protected]([email protected]))([email protected])([email protected])diff: 9.0.0hast-util-to-html: 9.0.5lru_map: 0.4.1@@ -15406,7 +15402,7 @@ snapshots:react-dom: 19.3.0([email protected])shiki: 4.2.0- '@pierre/[email protected](@pierre/[email protected])(@shikijs/[email protected])([email protected]([email protected]))([email protected])([email protected])':+ '@pierre/[email protected](@pierre/[email protected])(@shikijs/[email protected])([email protected]([email protected]))([email protected])([email protected])':optionalDependencies:'@pierre/theme': 2.0.0'@shikijs/themes': 4.2.0@@ -15819,11 +15815,6 @@ snapshots:dependencies:'@shikijs/types': 4.2.0- '@shikijs/[email protected]':- dependencies:- '@shikijs/core': 4.2.0- '@shikijs/types': 4.2.0-'@shikijs/[email protected]':dependencies:'@shikijs/vscode-textmate': 10.0.2diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex 3abda4bd695..089f3fa479d 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -51,7 +51,7 @@ catalog:"@legendapp/list": 3.3.5"@noble/curves": 1.9.1"@noble/hashes": 1.8.0- "@pierre/diffs": 1.5.2+ "@pierre/diffs": 1.6.1"@pierre/highlights": 0.2.0"@tailwindcss/node": 4.3.3"@tailwindcss/oxide": 4.3.3@@ -220,6 +220,9 @@ minimumReleaseAgeExclude:- "@expo/[email protected]"+ - "@pierre/[email protected]"+ - "@pierre/[email protected]"+ - "@pierre/[email protected]"overrides:# Pin every patched package, including transitive dependencies, so lockfile-free@@ -235,7 +238,7 @@ overrides:expo-widgets: 58.0.20"@ff-labs/fff-node": 0.11.0"@legendapp/list": 3.3.5- "@pierre/diffs": 1.5.2+ "@pierre/diffs": 1.6.1"@react-native-ai/apple": 0.12.0"@react-native-menu/menu": 2.0.0"@react-navigation/native-stack": 7.21.0@@ -366,7 +369,7 @@ patchedDependencies:"@legendapp/[email protected]": patches/@[email protected]# Exports the dependency-light subpaths mobile and the web diff parser import, and keeps# measured wrapped-row heights above an edit (fileEditorVirtualization.test.ts).- "@pierre/[email protected]": patches/@pierre%[email protected]+ "@pierre/[email protected]": patches/@pierre%[email protected]"@react-native-ai/[email protected]": patches/@[email protected]"@react-native-menu/[email protected]": patches/@[email protected]"@react-navigation/[email protected]": patches/@react-navigation%[email protected]