Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
788cb52
chore: empty commit for beta branch
amadeus May 29, 2026
60be5b7
Editor (#601)
ije May 29, 2026
4197d3f
chore: update @pierre/diffs to `1.3.0-beta.1`
amadeus May 29, 2026
b6f583d
chore: update @pierre/diffs to `1.3.0-beta.2`
amadeus Jun 1, 2026
6635b25
feat(editor): Add rounded selection (#757)
ije Jun 2, 2026
e9bcbc3
refactor(editor): refactor search panel (#759)
ije Jun 2, 2026
24ca26a
refactor(editor): Reshape search panel UI (#764)
ije Jun 3, 2026
826f3fb
pref(editor): Introduce `postponeBackgroundTokenizeToNextFrame` metho…
ije Jun 5, 2026
cbe9af4
Homepage Editor demo (#761)
mdo Jun 8, 2026
7351e83
chore: update @pierre/diffs to `1.3.0-beta.3`
amadeus Jun 9, 2026
689b4b5
fix(diffs/editor): Add input support of `deleteSoftLineBackward` and…
ije Jun 9, 2026
cf9d848
refactor(editor): realtime update on diff editing (#774)
ije Jun 9, 2026
f2fb5a3
refactor(diffs/editor): Rename "Quick Edit" to "Selection Action" (#790)
ije Jun 9, 2026
81e036d
feat(diffs/editor): Add marker support (#787)
ije Jun 10, 2026
ea59286
[diffs/editor] Fix cursor move (#799)
ije Jun 10, 2026
bcf82b4
chore: bump @pierre/diffs to `1.3.0-beta.4`
amadeus Jun 11, 2026
ca8539e
[diffs] Removing BETA badge from Virtualization (#820)
amadeus Jun 16, 2026
57b3eb2
[diffs/editor] refactor editor API (#804)
ije Jun 16, 2026
94cec5b
[diff/editor] Add Find-in-file replace support (#817)
ije Jun 16, 2026
cddd662
chore: update @pierre/diffs to `1.3.0-beta.5`
amadeus Jun 16, 2026
1a7cefb
[diff/editor] Add auto-surround feature (#813)
ije Jun 17, 2026
61eecc4
[diff/editor] Add `autoSurround` option in docs (#824)
ije Jun 17, 2026
3a14ac4
fix(diffs): Handle IME composition input (#823)
necolas Jun 17, 2026
14f873b
[editor/diff] Update toggle icon size in search panel (#826)
ije Jun 17, 2026
f71e057
[diffs/editor] Support unified diff (#818)
ije Jun 17, 2026
9da0aaa
New editor homepage demo (#795)
mdo Jun 17, 2026
8b8e804
[editor/diffs] Render marker popup in overlay element (#825)
ije Jun 17, 2026
409706e
fix(diffs): Add accessible name to editor textbox host (#829)
necolas Jun 17, 2026
076c7b9
fix(diffs): Guard gutter pointerdown to mouse only
necolas Jun 17, 2026
dc5c2ad
perf(diffs): Skip redundant hunk recompute on line-count edits
necolas Jun 17, 2026
b1aaca3
fix(diffs): re-anchor caret after editor.applyEdits
necolas Jun 17, 2026
eb2d627
fix(diffs): move caret past text inserted at the caret
necolas Jun 17, 2026
1fca004
fix(diffs): Disable caret blink under reduced motion
necolas Jun 17, 2026
0a6218b
fix(diffs): Cut collapsed editor selections by line
necolas Jun 17, 2026
c7f8f0b
Move methods to selection.ts
ije Jun 18, 2026
a8dc226
fix(diffs): Correct editor selection, indent, and platform handling
necolas Jun 18, 2026
67f12d5
Add new OG image for edit, update diffs OG (#838)
mdo Jun 18, 2026
0e8a5bb
fix(diffs): don't steal focus on programmatic applyEdits
necolas Jun 18, 2026
1fc3294
fix(diffs): ignore selectionchange while the editor is unfocused
necolas Jun 18, 2026
3981955
fix(diffs): re-sync native selection on non-pointer refocus
necolas Jun 18, 2026
f0e04aa
perf(diffs): Reuse the compiled search regex across lines (#837)
necolas Jun 19, 2026
56224bf
fix(diffs): Keep paste and cut as their own undo steps (#839)
necolas Jun 19, 2026
95c9bd1
fix(diffs): re-measure character width after web font loads (#841)
necolas Jun 19, 2026
5b988ee
fix(diffs): count CR line breaks in edit change ranges (#844)
necolas Jun 19, 2026
18536fd
fix(diffs): Measure tabs against tab stops, not a flat width (#842)
necolas Jun 19, 2026
22aca17
fix(diffs): move caret and transpose by whole graphemes (#848)
necolas Jun 19, 2026
12b3a47
Update edit mode docs
mdo Jun 18, 2026
3ff568d
feat(diffs): Add programmatic undo and redo to the editor
necolas Jun 18, 2026
b635c16
Update docs
ije Jun 19, 2026
be8d97b
fix(diffs): memoize and round DOM text measurements (#847)
necolas Jun 19, 2026
e1fde4c
More edit CSS fixes (#845)
mdo Jun 19, 2026
b99e3da
[diff/editor] Fix emoji deletion (#856)
ije Jun 19, 2026
4eae379
[diff/editor] Support 'insertLineBreak'(shift + enter) input type (#857)
ije Jun 19, 2026
ad717b2
fix(diffs): keep the caret line highlighted during selection
necolas Jun 19, 2026
eab5d7e
fix(diffs): keep the editor active-line highlight silent
necolas Jun 19, 2026
faeed0c
chore(diffs): remove setSelectedLines interface comment
necolas Jun 19, 2026
6bb37b4
fix(diffs): use current selection for selection action
necolas Jun 19, 2026
d17c883
fix(diffs): keep an editable line when the editor is emptied
necolas Jun 19, 2026
c55be32
fix(diffs): keep an editable row when the old side is a blank line
necolas Jun 19, 2026
f6cfd50
[diff/editor] Suppport custom clipboard provider (#865)
ije Jun 23, 2026
d0dfb84
fix(diffs): align caret and selection on lines below a wrapping edit
necolas Jun 22, 2026
b21a737
fix(diffs): keep viewport colors correct after an offscreen delete
necolas Jun 22, 2026
2df71d0
fix(diffs): normalize pasted text to the document line ending
necolas Jun 22, 2026
f556b35
fix expandSingleNewlineInsert function
ije Jun 23, 2026
6023a0d
perf(diffs): edit the piece table in place instead of rebuilding it
necolas Jun 22, 2026
829671e
fix(diffs): keep edits rendered at a virtualized window's bottom
necolas Jun 22, 2026
a5a29f4
fix(diffs): align selection highlight with text in wrapped split diffs
necolas Jun 23, 2026
9c5a92e
fix(diffs): ignore stale split-diff content offset after layout change
necolas Jun 23, 2026
9f09081
[diffs] Filename Header Suffix Slot API (#874)
amadeus Jun 23, 2026
34a9a8e
[diffs/editor] Add responsive for marker popup element (#879)
ije Jun 24, 2026
bd8bc98
fix(diffs): keep editor edits visible across host re-renders
necolas Jun 23, 2026
808c6bb
Some editor nits and updates (#873)
mdo Jun 24, 2026
d59b1f4
hotfix: main formatting update changes
amadeus Jun 24, 2026
1ea1572
hotfix: new let/const fix
amadeus Jun 24, 2026
da2129f
Editor bug bash (#889)
mdo Jun 24, 2026
3e82b23
[diffs/editor] Fix deletion by indent (#885)
ije Jun 25, 2026
74d1d77
Edit page mobile improvements (#892)
mdo Jun 25, 2026
f76fd4e
chore: bump @pierre/theming to `0.0.2`
amadeus Jun 26, 2026
5bfd5fa
feat(diffs): align editor selection across additions and deletions
necolas Jun 25, 2026
edce5c5
fix(diffs): clear `bufferBefore` and `bufferAfter` on reset (#895)
ije Jun 26, 2026
836623d
chore: update @pierre/diffs to `1.3.0-beta.6`
amadeus Jun 26, 2026
b0ad822
[playground] Sync diff editor with app theme in system mode
necolas Jun 25, 2026
484fc8f
[docs] Align theme terminology with @pierre/theming
necolas Jun 25, 2026
dea09fc
[diffs/editor] fix multiple cursor animation not sync (#899)
ije Jun 26, 2026
78e400c
fix(diffs): Use virtual geometry for editor scrollToLine (#880)
tjni Jun 26, 2026
06157ac
fix(diffs): keep scroll position stable when editing a unified diff
necolas Jun 26, 2026
c8a6d17
fix(docs): reset agent demo scroll when switching files
necolas Jun 26, 2026
acbe3ec
refactor(diffs): Give diff hunk recompute a single owner per edit
necolas Jun 27, 2026
5371d5a
[diffs] Dynamic FileDiff Hydration (#861)
amadeus Jun 29, 2026
28bc8a1
bugfix: Allow VirtualizedFileDiff to accept FileDiffMetadata updates …
amadeus Jun 29, 2026
cb2be0b
[diffs/editor] Fix some selection bug (#906)
ije Jun 30, 2026
b4f76e2
[diffs] CodeView / WorkerPool Init Race Fix (#911)
amadeus Jun 30, 2026
74ba1fa
diffs: stop @pierre/diffs/react from pulling the editor bundle (#913)
claude[bot] Jun 30, 2026
2853060
fix(diffs): delete to line start on Safari cmd+backspace
necolas Jun 30, 2026
44690c0
diffs: deflake editor active-line-highlight test (poll instead of fix…
claude[bot] Jun 30, 2026
fd7f710
Merge remote-tracking branch 'origin/main' into beta-1.3
amadeus Jun 30, 2026
906a905
fix(diffs): Stop the find demo from scrolling the page on load
necolas Jun 30, 2026
222be40
[diffs/editor] Improve HistoryDemo component's loading behavior (#912)
ije Jul 1, 2026
24e3ad9
[diffs/editor] Fix diff rerener in edit mode (#878)
ije Jul 1, 2026
dc820cf
Fullscreen AUI demo (#908)
mdo Jul 1, 2026
5ef6f8a
Blend the edit mode backgrounds (#909)
mdo Jul 1, 2026
db61a30
diffs: align browser support with Intl.Segmenter (Firefox 125+) and g…
claude[bot] Jul 1, 2026
1754331
[docs/diffs]: Update agent UI component (#929)
ije Jul 1, 2026
335950e
Couple chat demo tweaks (#931)
mdo Jul 1, 2026
3f46fe5
fix(diffs): delete all editor text on Safari with select-all
necolas Jun 30, 2026
f744991
Merge remote-tracking branch 'origin/main' into beta-1.3
amadeus Jul 2, 2026
cc5d897
chore: update @pierre/diffs to `1.3.0-beta.7`
amadeus Jul 2, 2026
3c77cfa
[diffs/editor] Support `moveLineUp` and `moveLineDown` commands (#936)
ije Jul 3, 2026
685461f
fix(diffs): Preserve annotations across line edits
necolas Jul 2, 2026
bb3a3d7
fix(diffs): Suppress repeated paste shortcuts
necolas Jul 2, 2026
5c39623
[diffs] CodeView: Custom header / footer support (#926)
amadeus Jul 3, 2026
98bea24
[diff/editor] Add stale async editor-sync guards (#932)
ije Jul 6, 2026
84b5573
fix(diffs): place selection action above bottom-up selections (#922)
mdo Jul 6, 2026
653b303
[diffs/editor] Fix diff re-render bug in edit mode (#928)
ije Jul 7, 2026
3550fcf
[diffs/edit] Update editor API (#942)
ije Jul 7, 2026
54731fa
[diffs/editor] fix lineAnnotations rendering (#947)
ije Jul 7, 2026
4923347
[diffs/edit] impove preformance by removing `TextDocument.getText()` …
ije Jul 7, 2026
9582061
Playground Updates (#935)
amadeus Jul 7, 2026
f73fb3f
[diffs/editor] Add match brackets (#940)
ije Jul 8, 2026
88774c8
[diffs] Layout thrash experiments (#740)
amadeus Jul 8, 2026
f780df5
Fix flakey test bug
amadeus Jul 8, 2026
b3420d3
Merge remote-tracking branch 'origin/main' into beta-1.3
amadeus Jul 8, 2026
7c6b394
chore: update @pierre/diffs to `1.3.0-beta.8`
amadeus Jul 8, 2026
ed8b171
Updates to the /edit features list (#949)
mdo Jul 8, 2026
c67192c
Updated GH token flow (#930)
mdo Jul 8, 2026
b4e36a0
Merge remote-tracking branch 'origin/main' into beta-1.3
amadeus Jul 8, 2026
31d0f1c
phase 1: types and scaffolding.
amadeus Mar 31, 2026
c43a312
phase 2: normalization and piping data through
amadeus Mar 31, 2026
6d67c09
decorations checkpoint...
amadeus Apr 7, 2026
8304a4b
before ai belligerance
amadeus Apr 8, 2026
b71e3b8
sorting through ai belligerancy
amadeus Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
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
41 changes: 36 additions & 5 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 All @@ -36,28 +40,29 @@ interface CodeViewDraftCommentMetadata {

interface CodeViewDemoInstance {
instance: CodeView<CodeViewCommentMetadata>;
options: CodeViewOptions<CodeViewCommentMetadata>;
options: CodeViewOptions<CodeViewCommentMetadata, undefined>;
}

type CodeViewDemoAnnotation =
| DiffLineAnnotation<CodeViewCommentMetadata>
| LineAnnotation<CodeViewCommentMetadata>;

type CodeViewDiffStyle = NonNullable<
CodeViewOptions<CodeViewCommentMetadata>['diffStyle']
CodeViewOptions<CodeViewCommentMetadata, undefined>['diffStyle']
>;
type CodeViewOverflow = NonNullable<
CodeViewOptions<CodeViewCommentMetadata>['overflow']
CodeViewOptions<CodeViewCommentMetadata, undefined>['overflow']
>;
type CodeViewThemeType = NonNullable<
CodeViewOptions<CodeViewCommentMetadata>['themeType']
CodeViewOptions<CodeViewCommentMetadata, undefined>['themeType']
>;

interface RenderDemoCodeViewOptions {
diffStyle: CodeViewDiffStyle;
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> = {
const options: CodeViewOptions<CodeViewCommentMetadata, undefined> = {
// __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
Loading