import type { BlockEditProps, BlockReadProps } from "../types.js"; import type { DiffData } from "./diff.config.js"; /** * GitHub-style before/after diff block. The read renderer computes a line-level * diff, then renders it either unified (one column, `+`/`−` gutters) or split * (side-by-side). Long unchanged runs collapse into an expandable "N unchanged * lines" row (progressive disclosure). The read surface keeps the GitHub diff * shape while using the framework Tailwind theme tokens, so it follows each * host app's light/dark appearance instead of bringing its own palette. * * Lives in core so any app can register the dev-doc block. The line differ is * inlined (a small LCS-based `diffLines`) rather than pulling the `diff` package * into core; the output shape (`{ value, added, removed }` change records) is * identical to what the read renderer consumed before. * * Editing is panel-driven (config-style, like the HTML block): two monospace * textareas (Before / After) plus filename, language, and mode controls. */ interface Change { value: string; added?: boolean; removed?: boolean; } /** * A minimal line-level diff producing jsdiff-compatible `Change[]` records * (`{ value }` for context, `{ value, added: true }`, `{ value, removed: true }`). * Uses a classic LCS table over line tokens; the inputs here are short code * snippets so the O(n·m) table is fine. Removed lines are emitted before added * lines within a change region, matching jsdiff's ordering. */ export declare function diffLines(before: string, after: string): Change[]; declare function DiffRead({ data, blockId, title, summary, ctx, }: BlockReadProps): import("react").JSX.Element; declare function DiffEdit({ data, onChange, editable }: BlockEditProps): import("react").JSX.Element; export { DiffRead, DiffEdit }; //# sourceMappingURL=DiffBlock.d.ts.map