Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
7f2615f
Editor (#601)
ije May 29, 2026
ff340f8
chore: update @pierre/diffs to `1.3.0-beta.1`
amadeus May 29, 2026
9774cd5
chore: update @pierre/diffs to `1.3.0-beta.2`
amadeus Jun 1, 2026
ba7c358
feat(editor): Add rounded selection (#757)
ije Jun 2, 2026
d73bc92
refactor(editor): refactor search panel (#759)
ije Jun 2, 2026
369f677
refactor(editor): Reshape search panel UI (#764)
ije Jun 3, 2026
917cee8
pref(editor): Introduce `postponeBackgroundTokenizeToNextFrame` metho…
ije Jun 5, 2026
7936686
Homepage Editor demo (#761)
mdo Jun 8, 2026
14452d1
chore: update @pierre/diffs to `1.3.0-beta.3`
amadeus Jun 9, 2026
12232fc
fix(diffs/editor): Add input support of `deleteSoftLineBackward` and…
ije Jun 9, 2026
829d48a
refactor(editor): realtime update on diff editing (#774)
ije Jun 9, 2026
81e2da7
refactor(diffs/editor): Rename "Quick Edit" to "Selection Action" (#790)
ije Jun 9, 2026
ad204fc
feat(diffs/editor): Add marker support (#787)
ije Jun 10, 2026
ba3d817
[diffs/editor] Fix cursor move (#799)
ije Jun 10, 2026
693b646
chore: bump @pierre/diffs to `1.3.0-beta.4`
amadeus Jun 11, 2026
78bd45a
[diffs] Removing BETA badge from Virtualization (#820)
amadeus Jun 16, 2026
3a0718b
[diffs/editor] refactor editor API (#804)
ije Jun 16, 2026
1123f2e
[diff/editor] Add Find-in-file replace support (#817)
ije Jun 16, 2026
0e829f5
chore: update @pierre/diffs to `1.3.0-beta.5`
amadeus Jun 16, 2026
98d8c41
[diff/editor] Add auto-surround feature (#813)
ije Jun 17, 2026
46b59ce
[diff/editor] Add `autoSurround` option in docs (#824)
ije Jun 17, 2026
0b8e3ef
fix(diffs): Handle IME composition input (#823)
necolas Jun 17, 2026
99487f7
[editor/diff] Update toggle icon size in search panel (#826)
ije Jun 17, 2026
89aea56
[diffs/editor] Support unified diff (#818)
ije Jun 17, 2026
e5fdfa6
New editor homepage demo (#795)
mdo Jun 17, 2026
7931709
[editor/diffs] Render marker popup in overlay element (#825)
ije Jun 17, 2026
7cb0211
fix(diffs): Add accessible name to editor textbox host (#829)
necolas Jun 17, 2026
8adb582
fix(diffs): Guard gutter pointerdown to mouse only
necolas Jun 17, 2026
450c4b5
perf(diffs): Skip redundant hunk recompute on line-count edits
necolas Jun 17, 2026
a4c45e8
fix(diffs): re-anchor caret after editor.applyEdits
necolas Jun 17, 2026
d2a8100
fix(diffs): move caret past text inserted at the caret
necolas Jun 17, 2026
a55dc5b
fix(diffs): Disable caret blink under reduced motion
necolas Jun 17, 2026
46e4e4c
fix(diffs): Cut collapsed editor selections by line
necolas Jun 17, 2026
49a55d6
Move methods to selection.ts
ije Jun 18, 2026
4bc8d26
fix(diffs): Correct editor selection, indent, and platform handling
necolas Jun 18, 2026
136b51d
Add new OG image for edit, update diffs OG (#838)
mdo Jun 18, 2026
8cece2f
fix(diffs): don't steal focus on programmatic applyEdits
necolas Jun 18, 2026
8bd8955
fix(diffs): ignore selectionchange while the editor is unfocused
necolas Jun 18, 2026
c97d9fc
fix(diffs): re-sync native selection on non-pointer refocus
necolas Jun 18, 2026
52a326c
perf(diffs): Reuse the compiled search regex across lines (#837)
necolas Jun 19, 2026
a776709
fix(diffs): Keep paste and cut as their own undo steps (#839)
necolas Jun 19, 2026
a6e0091
fix(diffs): re-measure character width after web font loads (#841)
necolas Jun 19, 2026
f2e402b
fix(diffs): count CR line breaks in edit change ranges (#844)
necolas Jun 19, 2026
6ec8137
fix(diffs): Measure tabs against tab stops, not a flat width (#842)
necolas Jun 19, 2026
8faa13d
fix(diffs): move caret and transpose by whole graphemes (#848)
necolas Jun 19, 2026
e15a035
Update edit mode docs
mdo Jun 18, 2026
7ba7ddd
feat(diffs): Add programmatic undo and redo to the editor
necolas Jun 18, 2026
7f3b0e3
Update docs
ije Jun 19, 2026
4704319
fix(diffs): memoize and round DOM text measurements (#847)
necolas Jun 19, 2026
50e1523
More edit CSS fixes (#845)
mdo Jun 19, 2026
e8fa6ce
[diff/editor] Fix emoji deletion (#856)
ije Jun 19, 2026
7928fc5
[diff/editor] Support 'insertLineBreak'(shift + enter) input type (#857)
ije Jun 19, 2026
5b0f916
fix(diffs): keep the caret line highlighted during selection
necolas Jun 19, 2026
c1b0094
fix(diffs): keep the editor active-line highlight silent
necolas Jun 19, 2026
d9b1300
chore(diffs): remove setSelectedLines interface comment
necolas Jun 19, 2026
2d4fd89
fix(diffs): use current selection for selection action
necolas Jun 19, 2026
e0833d9
fix(diffs): keep an editable line when the editor is emptied
necolas Jun 19, 2026
e3730cb
fix(diffs): keep an editable row when the old side is a blank line
necolas Jun 19, 2026
b61fadf
[diff/editor] Suppport custom clipboard provider (#865)
ije Jun 23, 2026
7970bbf
fix(diffs): align caret and selection on lines below a wrapping edit
necolas Jun 22, 2026
e707ec9
fix(diffs): keep viewport colors correct after an offscreen delete
necolas Jun 22, 2026
483810b
fix(diffs): normalize pasted text to the document line ending
necolas Jun 22, 2026
227bc14
fix expandSingleNewlineInsert function
ije Jun 23, 2026
487d0ff
perf(diffs): edit the piece table in place instead of rebuilding it
necolas Jun 22, 2026
b3c1c51
fix(diffs): keep edits rendered at a virtualized window's bottom
necolas Jun 22, 2026
e8aa84a
fix(diffs): align selection highlight with text in wrapped split diffs
necolas Jun 23, 2026
973c580
fix(diffs): ignore stale split-diff content offset after layout change
necolas Jun 23, 2026
018fcaa
[diffs] Filename Header Suffix Slot API (#874)
amadeus Jun 23, 2026
88edc4b
[diffs/editor] Add responsive for marker popup element (#879)
ije Jun 24, 2026
b8d1bfa
fix(diffs): keep editor edits visible across host re-renders
necolas Jun 23, 2026
c825dff
Some editor nits and updates (#873)
mdo Jun 24, 2026
e79a3d4
hotfix: main formatting update changes
amadeus Jun 24, 2026
32c8b71
hotfix: new let/const fix
amadeus Jun 24, 2026
a964805
Editor bug bash (#889)
mdo Jun 24, 2026
b5c83e2
[diffs/editor] Fix deletion by indent (#885)
ije Jun 25, 2026
2d729c5
Edit page mobile improvements (#892)
mdo Jun 25, 2026
8418b68
feat(diffs): align editor selection across additions and deletions
necolas Jun 25, 2026
b0f31fe
fix(diffs): clear `bufferBefore` and `bufferAfter` on reset (#895)
ije Jun 26, 2026
4eb1ea6
chore: update @pierre/diffs to `1.3.0-beta.6`
amadeus Jun 26, 2026
c1d8603
[playground] Sync diff editor with app theme in system mode
necolas Jun 25, 2026
f68efb2
[docs] Align theme terminology with @pierre/theming
necolas Jun 25, 2026
0bde541
[diffs/editor] fix multiple cursor animation not sync (#899)
ije Jun 26, 2026
eea5317
fix(diffs): Use virtual geometry for editor scrollToLine (#880)
tjni Jun 26, 2026
04c71f2
fix(diffs): keep scroll position stable when editing a unified diff
necolas Jun 26, 2026
7548f9c
fix(docs): reset agent demo scroll when switching files
necolas Jun 26, 2026
14eb012
refactor(diffs): Give diff hunk recompute a single owner per edit
necolas Jun 27, 2026
7a2cad2
[diffs] Dynamic FileDiff Hydration (#861)
amadeus Jun 29, 2026
ba4c5f8
bugfix: Allow VirtualizedFileDiff to accept FileDiffMetadata updates …
amadeus Jun 29, 2026
806257f
[diffs/editor] Fix some selection bug (#906)
ije Jun 30, 2026
1aaf1f8
[diffs] CodeView / WorkerPool Init Race Fix (#911)
amadeus Jun 30, 2026
e590693
diffs: stop @pierre/diffs/react from pulling the editor bundle (#913)
claude[bot] Jun 30, 2026
e2f6067
fix(diffs): delete to line start on Safari cmd+backspace
necolas Jun 30, 2026
c13eb3c
diffs: deflake editor active-line-highlight test (poll instead of fix…
claude[bot] Jun 30, 2026
59edc1b
fix(diffs): Stop the find demo from scrolling the page on load
necolas Jun 30, 2026
1b5a008
[diffs/editor] Improve HistoryDemo component's loading behavior (#912)
ije Jul 1, 2026
235456d
[diffs/editor] Fix diff rerener in edit mode (#878)
ije Jul 1, 2026
60cd2b0
Fullscreen AUI demo (#908)
mdo Jul 1, 2026
493816e
Blend the edit mode backgrounds (#909)
mdo Jul 1, 2026
14b70c8
diffs: align browser support with Intl.Segmenter (Firefox 125+) and g…
claude[bot] Jul 1, 2026
5eae653
[docs/diffs]: Update agent UI component (#929)
ije Jul 1, 2026
161d512
Couple chat demo tweaks (#931)
mdo Jul 1, 2026
774fdbd
fix(diffs): delete all editor text on Safari with select-all
necolas Jun 30, 2026
2e4ae48
chore: update @pierre/diffs to `1.3.0-beta.7`
amadeus Jul 2, 2026
518e543
[diffs/editor] Support `moveLineUp` and `moveLineDown` commands (#936)
ije Jul 3, 2026
5148e7a
fix(diffs): Preserve annotations across line edits
necolas Jul 2, 2026
66ff660
fix(diffs): Suppress repeated paste shortcuts
necolas Jul 2, 2026
c50a59b
[diffs] CodeView: Custom header / footer support (#926)
amadeus Jul 3, 2026
4cf6cda
[diff/editor] Add stale async editor-sync guards (#932)
ije Jul 6, 2026
80110c5
fix(diffs): place selection action above bottom-up selections (#922)
mdo Jul 6, 2026
fcf748e
[diffs/editor] Fix diff re-render bug in edit mode (#928)
ije Jul 7, 2026
e71142e
[diffs/edit] Update editor API (#942)
ije Jul 7, 2026
a6a1705
[diffs/editor] fix lineAnnotations rendering (#947)
ije Jul 7, 2026
090c1b4
[diffs/edit] impove preformance by removing `TextDocument.getText()` …
ije Jul 7, 2026
c52cd28
Playground Updates (#935)
amadeus Jul 7, 2026
0f554a5
[diffs/editor] Add match brackets (#940)
ije Jul 8, 2026
5e27e74
[diffs] Layout thrash experiments (#740)
amadeus Jul 8, 2026
116c710
Fix flakey test bug
amadeus Jul 8, 2026
13a6533
chore: update @pierre/diffs to `1.3.0-beta.8`
amadeus Jul 8, 2026
f103ace
Updates to the /edit features list (#949)
mdo Jul 8, 2026
6733359
Updated GH token flow (#930)
mdo Jul 8, 2026
ddd5e8d
Another attempt at fixing flaky tests
amadeus Jul 9, 2026
eaaafd1
Even more items to potentially help with flakey tests
amadeus Jul 9, 2026
2635213
Add playwright tests for diffs and edit mode (#927)
mdo Jul 9, 2026
ec224b3
fix(diffs): Keep redo correct after typing at an insert's left edge
necolas Jul 9, 2026
bac7df8
fix(diffs): Clear match highlights when the search is dismissed
necolas Jul 9, 2026
353e099
[diffs] Fix CodeView Partial Hydration Mutation (#953)
amadeus Jul 9, 2026
7528415
chore: update @pierre/diffs to `1.3.0-beta.9`
amadeus Jul 9, 2026
b4741fc
fix(diffs): Normalize CRLF editor insertions
necolas Jul 9, 2026
56eeb12
fix(diffs): honor Shift+Enter in search input
necolas Jul 9, 2026
1ae5bad
fix(diffs): Move wrapped carets by visual rows
necolas Jul 9, 2026
b129eec
refactor
ije Jul 10, 2026
5fa9f63
fix(diffs): Clear web font text width cache
necolas Jul 9, 2026
03fc0bd
fix(diffs): drop annotations deleted through EOF
necolas Jul 9, 2026
de237c0
fix(diffs): use per-edit EOF metadata for annotations
necolas Jul 9, 2026
be23fff
fix(diffs): Stop structural edits scanning to EOF
necolas Jul 9, 2026
682e856
fix(diffs): Keep shifted tokenizer states comparison-only
necolas Jul 9, 2026
37b4519
fix(diffs): Handle replace input command keys
necolas Jul 9, 2026
278f766
fix(diffs): Let IME commit in replace input
necolas Jul 9, 2026
dad1985
fix(diffs): Keep column-zero carets from matching prior brackets
necolas Jul 9, 2026
ac3f77b
[diffs/edit] Rename EditorProvider → EditProvider (#943)
ije Jul 10, 2026
111e56e
test(diffs): cover editor search and doc-boundary shortcuts
necolas Jul 10, 2026
dfc5627
test(diffs): cover selection remap, cut, and line-block helpers
necolas Jul 10, 2026
436ddf2
test(diffs): cover TextDocument text-access wrappers
necolas Jul 10, 2026
d06b3a9
test(diffs): cover search panel replace, wrap, and count states
necolas Jul 10, 2026
ae949a7
test(diffs): cover popover placement flipping and bounds
necolas Jul 10, 2026
3103f0b
test(diffs): cover unified line-annotation rendering
necolas Jul 10, 2026
5518eea
test(diffs): cover editor state, options, focus, and markers
necolas Jul 10, 2026
82f1972
fix(diffs): Reselect auto-surrounded quote text
necolas Jul 10, 2026
7fc7b5e
fix(diffs): Treat trailing tabs like spaces for word deletion
necolas Jul 10, 2026
547b6d9
fix(diffs): Keep NFD graphemes intact in editor measurement
necolas Jul 10, 2026
c5108a5
fix(diffs): Reposition marker popovers on scroll
necolas Jul 10, 2026
105d16c
fix(diffs): Keep scrolled popovers clear of gutter
necolas Jul 10, 2026
aee0b54
fix(diffs): Measure tab stops after CJK glyphs by pixels
necolas Jul 10, 2026
123afa0
fix(tests): looks like some broken tests
amadeus Jul 12, 2026
0502f0e
[diffs/edit] AI attempt at edit with collapsed regions (#970)
amadeus Jul 12, 2026
244d23c
[diffs/edit] Add some missing common edit commands (#975)
ije Jul 13, 2026
b16f8cf
[diffs/edit] Update docs (#974)
ije Jul 13, 2026
ae96537
[diffs/edit] Add persisted editor state caching (#976)
ije Jul 14, 2026
0946de8
Updated Playwright tests, modify edit mode popover flipping (#957)
mdo Jul 14, 2026
07b1967
test(diffs): align getPlacementBounds tests with code-box clip (#985)
mdo Jul 14, 2026
99dc870
Improve Test Coverage (#982)
fat Jul 14, 2026
0d1089a
[diffs/edit] Sanitize malformed position components in normalizePosit…
fat Jul 15, 2026
b491962
[diffs/edit] support paste in place (#983)
ije Jul 15, 2026
0c98f0d
[diffs/edit] Fix surrogate-pair edit boundaries (#989)
ije Jul 15, 2026
c16e215
[diffs/edit] Fix soft-wrap vertical caret motion (#996)
ije Jul 15, 2026
e58125d
[diffs/edit] Normalize inverted editor selections (#995)
ije Jul 15, 2026
97c7bc9
[diffs/edit] Fix search-replace capture expansion with lookaround (#994)
ije Jul 15, 2026
ee7a4df
[diffs/edit] Fix dedupe line edits and preserve blank lines on inden…
ije Jul 15, 2026
899d6c1
[diffs/edit] Fix the CRLF position round-trip bug (#993)
ije Jul 15, 2026
1691691
[diffs/edit] Fix batch edit ordering sensitivity (#991)
ije Jul 15, 2026
e528bd9
[diffs/edit] Fix PieceTable CRLF metadata and resulting search range …
ije Jul 15, 2026
5d1e847
[diffs/edit] Programmatic edits join the undo timeline like local edi…
fat Jul 15, 2026
c684bb3
chore: update @pierre/diffs to `1.3.0-beta.10`
amadeus Jul 15, 2026
c2d2343
Rename popup to popover to be more consistent (#984)
mdo Jul 16, 2026
bee47e6
[diffs/edit] Fix edit stack coalescing (#1000)
ije Jul 16, 2026
825e1fd
[diffs/edit] No more required props (except `useTokenTransform` (#979)
amadeus Jul 16, 2026
7516e72
[diffs/edit] Improve pieceTable performance (#1001)
ije Jul 17, 2026
5226afa
chore: update @pierre/diffs to `1.3.0-beta.11`
amadeus Jul 18, 2026
ee20386
[editor] Stabilize Dynamic Diff Parsing (#978)
amadeus Jul 18, 2026
a408d25
[diffs/edit] fix selection rounded corner rendering (#1007)
ije Jul 20, 2026
26253c4
[editor] Improve EditContext API (#1006)
amadeus Jul 20, 2026
e673abd
perf(diffs/edit): skip DOM lookups for offscreen editor lines (#1009)
ije Jul 21, 2026
8032948
docs(diffs): Document editable line annotations (#1003)
amadeus Jul 21, 2026
65ab7cf
perf(diffs/edit): Cut wrap-mode re-measurement on typing and scroll (…
ije Jul 21, 2026
94c7118
[diffs/edit] Add search-match viewport culling (#1008)
ije Jul 21, 2026
ca169fc
[diffs/edit] Clamp selection rendering to render window (#1010)
ije Jul 21, 2026
709d992
[diffs/edit]: keep virtual EOF caret anchored after line reinsertion …
ije Jul 21, 2026
25a7bff
fix(diffs): Keep programmatic selections from opening selection actio…
ije Jul 21, 2026
a3d6a68
Tweak token settings to readonly
amadeus Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Browser support targets for the entire monorepo
# Targets browsers with native light-dark() support (May 2024+)
# Bounded by native Intl.Segmenter support, which the diffs editor relies on:
# Firefox 125+ (Chrome 87+, Edge 87+, Safari 14.1+ — already covered below).
#
# Used by:
# - apps/docs (Next.js + Tailwind CSS v4)
Expand All @@ -8,4 +9,4 @@
chrome >= 123
edge >= 123
safari >= 17.5
firefox >= 120
firefox >= 125
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
run: >-
moon ci --include-relations --summary detailed :build demo:build
diffshub:build docs:build docs:build-trees-site path-store:build-demo
:test :typecheck trees:test-e2e root:lint root:lint-css
:test :typecheck trees:test-e2e diffs:test-e2e root:lint root:lint-css

actions-pinned:
name: Actions pinned to SHA
Expand Down
20 changes: 19 additions & 1 deletion apps/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,28 @@
<input id="wrap-lines" type="checkbox" />
Wrap
</label>
<label>
<input id="lag-radar" type="checkbox" />
Lag Radar
</label>
</div>
</div>
<div id="wrapper" class="wrapper" />
<div id="wrapper" class="wrapper"></div>
</div>
<!-- lag radar -->
<div
id="radar"
style="
display: none;
position: fixed;
bottom: 4px;
right: 4px;
width: 100px;
height: 100px;
z-index: 100;
pointer-events: none;
"
></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"type": "module",
"dependencies": {
"@pierre/diffs": "workspace:*",
"@pierre/icons": "catalog:",
"diff": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"shiki": "catalog:"
Expand Down
31 changes: 31 additions & 0 deletions apps/demo/src/codeViewDemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
type CodeViewOptions,
type DiffLineAnnotation,
type DiffsThemeNames,
type FileDiffContentsLoader,
type LineAnnotation,
type ParsedPatch,
type SelectedLineRange,
Expand All @@ -14,6 +15,9 @@ import {
import type { WorkerPoolManager } from '@pierre/diffs/worker';

import { FAKE_DIFF_LINE_ANNOTATIONS, type LineCommentMetadata } from './mocks/';
import { createHeaderFilenameSuffixBadge } from './utils/createHeaderFilenameSuffixBadge';

const RENDER_FILENAME_SUFFIX = false;

type CodeViewCommentMetadata =
| CodeViewSavedCommentMetadata
Expand Down Expand Up @@ -58,6 +62,7 @@ interface RenderDemoCodeViewOptions {
overflow: CodeViewOverflow;
theme: DiffsThemeNames | ThemesType;
themeType: CodeViewThemeType;
loadDiffFiles?: FileDiffContentsLoader;
workerManager?: WorkerPoolManager;
}

Expand All @@ -81,25 +86,51 @@ export function renderDemoCodeView(
overflow,
theme,
themeType,
loadDiffFiles,
workerManager,
}: RenderDemoCodeViewOptions
) {
setupCodeViewWrapper(wrapper);

const items = createCodeViewItems(parsedPatches);
const options: CodeViewOptions<CodeViewCommentMetadata> = {
// __devOnlyValidateItemHeights: true,
theme,
themeType,
diffStyle,
overflow,
loadDiffFiles,
renderAnnotation(annotation) {
return renderCodeViewAnnotation(annotation, viewer, items);
},
...(RENDER_FILENAME_SUFFIX
? {
renderHeaderFilenameSuffix() {
return createHeaderFilenameSuffixBadge('CodeView slot');
},
}
: null),
lineHoverHighlight: 'both',
expansionLineCount: 10,
enableLineSelection: true,
enableGutterUtility: true,
stickyHeaders: true,
// renderCodeViewHeader() {
// const el = document.createElement('div');
// el.textContent = 'CodeView header — scrolls with the content';
// el.style.padding = '20px';
// el.style.textAlign = 'center';
// el.style.borderBottom =
// '1px solid var(--color-border, rgba(128, 128, 128, 0.3))';
// return el;
// },
// renderCodeViewFooter() {
// const el = document.createElement('div');
// el.textContent = 'CodeView footer 🫶';
// el.style.padding = '40px';
// el.style.textAlign = 'center';
// return el;
// },
layout: { paddingTop: 10, paddingBottom: 24, gap: 12 },
onGutterUtilityClick(range, context) {
if (context.item.type !== 'diff') {
Expand Down
Loading