Skip to content
Merged

v2 #4

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
b480247
Merge remote-tracking branch 'origin/main' into v2
zbeyens Apr 18, 2026
af67904
v2
zbeyens Apr 22, 2026
46e3c6a
v2
zbeyens Apr 27, 2026
be28f88
v2
zbeyens Apr 27, 2026
b9c7737
v2
zbeyens Apr 27, 2026
2de4ca7
v2
zbeyens Apr 28, 2026
4772ff1
v2
zbeyens May 3, 2026
1b9432d
v2
zbeyens May 4, 2026
ce2bd6c
v2
zbeyens May 4, 2026
8a19fee
v2
zbeyens May 7, 2026
2338be3
fix
zbeyens May 7, 2026
4764d33
fix
zbeyens May 8, 2026
07d7963
v2
zbeyens May 10, 2026
763e647
v2
zbeyens May 10, 2026
677d33f
v2
zbeyens May 10, 2026
e039d80
v2
zbeyens May 11, 2026
0484cc9
v2
zbeyens May 12, 2026
3f78c24
v2
zbeyens May 12, 2026
264e319
v2
zbeyens May 13, 2026
d4e4f33
v2
zbeyens May 13, 2026
c0ea74a
v2
zbeyens May 13, 2026
b787550
v2
zbeyens May 14, 2026
0d9c794
v2
zbeyens May 14, 2026
c09fffd
v2
zbeyens May 14, 2026
cf36185
v2
zbeyens May 14, 2026
1c90c93
v2
zbeyens May 14, 2026
65ac605
v2
zbeyens May 14, 2026
2c8c24c
v2
zbeyens May 15, 2026
5f8be0b
v2
zbeyens May 16, 2026
b232149
v2
zbeyens May 16, 2026
c993e07
v2
zbeyens May 16, 2026
27bab9e
v2
zbeyens May 17, 2026
76af53b
v2
zbeyens May 17, 2026
64f4d83
v2
zbeyens May 17, 2026
39af046
v2
zbeyens May 17, 2026
f6dfd99
v2
zbeyens May 17, 2026
f6c7635
v2
zbeyens May 17, 2026
6eff1f0
v2
zbeyens May 18, 2026
1e903ba
v2
zbeyens May 18, 2026
43cf151
v2
zbeyens May 18, 2026
4060e83
v2
zbeyens May 18, 2026
622745c
v2
zbeyens May 18, 2026
430ad8b
v2
zbeyens May 18, 2026
9fe4706
v2
zbeyens May 18, 2026
d5e3807
v2
zbeyens May 19, 2026
9916d19
v2
zbeyens May 19, 2026
a7710dd
v2
zbeyens May 20, 2026
6a8b18a
v2
zbeyens May 20, 2026
e62c204
v2
zbeyens May 20, 2026
8a5f8d9
v2
zbeyens May 24, 2026
8e7d5cb
v2
zbeyens May 26, 2026
a4a7b13
v2
zbeyens May 26, 2026
ae1751f
v2
zbeyens May 27, 2026
5744439
v2
zbeyens May 27, 2026
1b5ea8c
v2
zbeyens May 27, 2026
3ca7f55
v2
zbeyens May 28, 2026
a4a4469
v2
zbeyens May 28, 2026
1d39a43
v2
zbeyens May 28, 2026
2f071d1
v2
zbeyens May 30, 2026
6aa32fe
v2
zbeyens May 31, 2026
0a07eec
v2
zbeyens May 31, 2026
c6b4ae7
feat(yjs): add collaboration package
felixfeng33 May 31, 2026
e66fa07
fix(yjs): align keyboard undo cursor state
felixfeng33 May 31, 2026
257935a
v2
zbeyens May 31, 2026
6c5b89f
Virtualized pagination keeps rows=800 char-burst responsive with page…
zbeyens Jun 1, 2026
4ed0bf7
Virtualized pagination keeps rows=800 char-burst correct with immedia…
zbeyens Jun 1, 2026
7eaafb9
v2
zbeyens Jun 1, 2026
896ca7e
fix(yjs): harden collaboration history replay
felixfeng33 Jun 2, 2026
a41e062
v2
zbeyens Jun 2, 2026
696790f
fix
zbeyens Jun 2, 2026
faa3b00
fix
zbeyens Jun 2, 2026
735aa17
v2
zbeyens Jun 3, 2026
dc6de81
v2
zbeyens Jun 3, 2026
8c62699
v2
zbeyens Jun 3, 2026
b202a3f
v2
zbeyens Jun 4, 2026
09f4206
v2
zbeyens Jun 4, 2026
dc31a7a
v2
zbeyens Jun 5, 2026
dd99999
v2
zbeyens Jun 5, 2026
45aa0e8
v2 huge doc keyboard
zbeyens Jun 5, 2026
f7b6791
v2 huge document selection
zbeyens Jun 7, 2026
079ce34
fix(yjs): repair structural paths and offline split undo convergence
felixfeng33 Jun 7, 2026
aa2c2a7
chore(autoresearch): track yjs-pr21 collaboration quality routing
felixfeng33 Jun 7, 2026
9b3ef78
v2 stabilize native selection repair
zbeyens Jun 7, 2026
04531ea
Harden Yjs collaboration stability
felixfeng33 Jun 9, 2026
e31d346
Merge origin/v2 into Yjs collaboration branch
felixfeng33 Jun 9, 2026
a278e2b
v2 stabilize native input repair
zbeyens Jun 10, 2026
3460a5f
stable
felixfeng33 Jun 11, 2026
9be6309
refactory
felixfeng33 Jun 11, 2026
9fa4909
v2
zbeyens Jun 11, 2026
c7a8e75
v2 stabilize huge document behavior
zbeyens Jun 12, 2026
2bd99fe
Improve Yjs collaboration stability
felixfeng33 Jun 13, 2026
ddd2e61
fix(yjs): harden collaboration edge cases
felixfeng33 Jun 14, 2026
3ee8054
v2
zbeyens Jun 14, 2026
b659830
v3
zbeyens Jun 14, 2026
9f43f85
fix(yjs): harden collaboration proof gates
felixfeng33 Jun 15, 2026
992bb00
v2
zbeyens Jun 15, 2026
ccc0bb6
v2
zbeyens Jun 15, 2026
24736a7
v2
zbeyens Jun 15, 2026
eb60c24
v2
zbeyens Jun 15, 2026
63f883c
v2
zbeyens Jun 15, 2026
1fca106
v2
zbeyens Jun 15, 2026
400eb58
v2
zbeyens Jun 15, 2026
98fcd60
Merge v2 into Yjs collaboration PR
felixfeng33 Jun 17, 2026
8213376
v2
zbeyens Jun 17, 2026
709c530
Merge latest v2 into Yjs collaboration PR
felixfeng33 Jun 17, 2026
f33726b
Merge pull request #21 from felixfeng33/codex/yjs-docs-on-v2
zbeyens Jun 17, 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
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"snapshot": {
"useCalculatedVersion": true
},
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"useCalculatedVersionForSnapshots": true,
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
5 changes: 5 additions & 0 deletions .changeset/fresh-ranges-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"slate-dom": patch
---

Fix DOM selection resolution after structural edits with stale rendered paths.
5 changes: 5 additions & 0 deletions .changeset/silent-placeholders-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"slate-react": patch
---

Render default placeholders inline so empty paragraphs keep valid HTML.
9 changes: 9 additions & 0 deletions .changeset/slate-browser-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"slate-browser": minor
---

Add the public Slate browser proof harness.

Use `slate-browser/playwright` for editor behavior tests, `slate-browser/core` for pure proof contracts and release-proof artifacts, `slate-browser/browser` for DOM selection snapshots, and `slate-browser/transports` for device/browser proof-scope descriptors. The package is test infrastructure, not runtime editor API, and its root module is intentionally unavailable.

Each public subpath ships typed ESM export conditions for consumer import and declaration resolution.
17 changes: 17 additions & 0 deletions .changeset/slate-dom-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"slate-dom": major
---

Replace the public DOM bridge install surface with the Slate v2 `dom()` extension and editor DOM APIs.

**Migration:**

- Use `dom()` instead of `withDOM`.
- Use `editor.api.dom` and `editor.api.clipboard` instead of importing `DOMEditor` as a public runtime object.
- Import public DOM helpers from the `slate-dom` package root; Slate 0.x deep imports from `slate-dom/lib/*` are not public.
- Use nullable `resolveSlatePoint` and `resolveSlateRange` through the editor DOM API, and use assert-style DOM APIs only when unresolved DOM targets should throw.
- Replace DOM coverage `selectionPolicy: 'boundary'` with `selectionPolicy: 'skip'`.
- Replace DOM coverage `selectionPolicy: 'model-backed'` with `selectionPolicy: 'model'`.
- Replace DOM coverage `copyPolicy: 'include-model'` with `copyPolicy: 'model'`.
- Replace DOM coverage `copyPolicy: 'summary-only'` with `copyPolicy: 'summary'`.
- Replace DOM coverage `findPolicy: 'not-native-until-mounted'` with `findPolicy: 'native'` or `findPolicy: 'custom'`.
7 changes: 7 additions & 0 deletions .changeset/slate-dom-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"slate-dom": minor
---

Add DOM coverage, clipboard, hotkey, text-diff, environment, ShadowRoot, and DOM selection utilities for non-React Slate integrations.

Use `DOMCoverage` for hidden, staged, and virtualized same-root content; use `Hotkeys` and `isHotkey` for keyboard shortcut checks.
5 changes: 5 additions & 0 deletions .changeset/slate-dom-patch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"slate-dom": patch
---

Fix DOM selection, focus, clipboard, ShadowRoot, live path lookup, split-leaf offset, broad range, and void-ended copy handling for Slate v2 editors.
7 changes: 7 additions & 0 deletions .changeset/slate-history-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"slate-history": major
---

Replace `withHistory` and `HistoryEditor` with the Slate v2 `history()` extension.

**Migration:** Install `history()` in `createEditor({ extensions })`, read undo/redo stacks through `state.history`, write history commands through `tx.history`, use `editor.api.history` for batching controls, and import from the package root export.
7 changes: 7 additions & 0 deletions .changeset/slate-hyperscript-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"slate-hyperscript": major
---

Update hyperscript fixtures for the Slate v2 runtime and ESM package exports.

**Migration:** Import `jsx`, `createHyperscript`, `createEditor`, and `createText` from the root package export. Generated editors initialize through the v2 editor runtime, so fixture children, selections, marks, and custom tags follow the current Slate transaction model.
7 changes: 7 additions & 0 deletions .changeset/slate-layout-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"slate-layout": minor
---

Add experimental page-layout primitives for Slate documents.

Use `createSlateLayout` for derived page geometry, line fragments, page-break snapshots, Pretext-backed measurement, and mount plans. Use `slate-layout/react` for `PagedEditable` and React page-layout hooks.
15 changes: 15 additions & 0 deletions .changeset/slate-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"slate": major
---

Replace the mutable editor and `Transforms` surface with the Slate v2 runtime API.

**Migration:**

- Create editors with `createEditor({ initialValue })`.
- Read editor state through `editor.read(...)`.
- Mutate document, selection, marks, roots, state fields, and operations through `editor.update((tx) => ...)`.
- Replace `Transforms.*` calls and direct editor mutation with transaction groups such as `tx.nodes`, `tx.selection`, `tx.text`, `tx.value`, and `tx.roots`; write persistent state fields with `tx.setField(...)` and replay remote state changes with `tx.statePatches.replay(...)`.
- Replace helper value namespaces with `ElementApi`, `LocationApi`, `NodeApi`, `OperationApi`, `PathApi`, `PointApi`, `RangeApi`, `SpanApi`, and `TextApi`; keep model names such as `Element`, `Node`, `Range`, and `Text` as types.
- Move editor-root normalizers to `normalizers.editor`; keep non-root node normalizers in `normalizers.node`.
- Import through the package root export; `slate/internal` is the only supported internal subpath.
7 changes: 7 additions & 0 deletions .changeset/slate-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"slate": minor
---

Add the Slate v2 extension runtime for schema, state, command, transform, query, and commit integrations.

Use editor extensions to define element behavior, element properties, content roots, state fields, transaction groups, normalizers, middleware, operation guards, runtime ids, bookmarks, and transaction-aware commit metadata. `InitialValue` also accepts `{ children, roots, state }` for multi-root documents and serializable document state.
5 changes: 5 additions & 0 deletions .changeset/slate-patch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"slate": patch
---

Fix core editing behavior across text insertion, fragment insertion, expanded-selection paste, Backspace empty-block merges, selectable void navigation, runtime-id path lookup, transaction rollback, and shifted root-order updates.
16 changes: 16 additions & 0 deletions .changeset/slate-react-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"slate-react": major
---

Replace the Slate 0.x React wrapper and renderer surface with the Slate v2 React runtime.

**Migration:**

- Create React editors with `useSlateEditor` or `createReactEditor`; use the `react()` extension for lower-level composition.
- Use `<Slate editor={editor}>` with the v2 `<Editable />`.
- Use React 19.2 or newer and import through the `slate-react` package root export.
- Replace `withReact`, old `ReactEditor` value imports, `DefaultElement`, `DefaultLeaf`, `DefaultText`, `useSlate`, `useSlateStatic`, `useSlateSelector`, `useSlateSelection`, `useSelected`, `useFocused`, `useReadOnly`, and `useComposing` with the v2 components and hooks exported from `slate-react`.
- Use `SlateElement`, `SlateText`, `SlateLeaf`, and `SlatePlaceholder` for custom renderer DOM attributes.
- Resolve element paths inside handlers with `editor.api.dom.resolvePath(element)` or `useElementPath()` instead of reading eager `path` and `index` render props.
- Replace `Editable` input rules with model-owned editor extensions or browser-specific `onDOMBeforeInput` handling.
- Use DOM coverage policy props with `selectionPolicy="materialize" | "skip" | "model"`, `copyPolicy="model" | "summary" | "exclude" | "materialize"`, and `findPolicy="native" | "custom"`.
7 changes: 7 additions & 0 deletions .changeset/slate-react-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"slate-react": minor
---

Add React APIs for Slate v2 annotations, widgets, decoration sources, root runtimes, content roots, DOM strategies, command callbacks, state fields, typed renderers, and virtualized editor surfaces.

Use `useSlateRuntime`, `useSlateRuntimeState`, `useSlateRootState`, `useSlateRootEditor`, `useSlateActiveEditor`, `useSlateCommandCallback`, `useSlateRootEffect`, `useSlateContentRoot`, `useSlateDecorationSource`, `useSlateRangeDecorationSource`, `useSlateAnnotationStore`, `useSlateWidgetStore`, `useSlateNodeRef`, `useElementPath`, and `useElementSelected` for advanced integrations.
5 changes: 5 additions & 0 deletions .changeset/slate-react-patch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"slate-react": patch
---

Fix React editor behavior across async decorations, custom placeholders, editable void content roots, multi-root focus/history restoration, read-only selection, hidden DOM coverage selection, rich paste, undo/redo DOM repair, repeated caret autoscroll, SSR hook snapshots, selector cleanup, virtualized rendering, paged editing, and double-mounted content roots.
5 changes: 5 additions & 0 deletions .changeset/slate-yjs-from-scratch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@slate/yjs": patch
---

Add the first-party Yjs collaboration package scaffold with operation-level text, node, remove, split, merge, move, set, replace-children, replace-fragment, insert-fragment, delete-fragment, wrap, unwrap, and lift collaboration support, plus selection relative-position conversion, split undo repair, and virtual merge/wrapper refs for concurrent remote edits. Pin the audited Yjs UndoManager stack contract and keep broad replace-fragment fallback traceable as an identity-risk path.
5 changes: 5 additions & 0 deletions .changeset/slate-yjs-history-redo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@slate/yjs": patch
---

Fix split history undo and redo preserving concurrent edits, right-side text, no-op replace fragments, and cursor repair.
5 changes: 5 additions & 0 deletions .changeset/slate-yjs-offline-split-undo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@slate/yjs": patch
---

Fix offline split undo/redo convergence and structural Yjs path repair for concurrent wrap, move, merge, unwrap, and reconnect edits.
5 changes: 5 additions & 0 deletions .changeset/steady-yjs-structures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@slate/yjs": patch
---

Fix structural collaboration edits that could crash or render nested paragraphs.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
* text=auto eol=lf

# Codex Autoresearch ledger files
autoresearch.jsonl text eol=lf
autoresearch.md text eol=lf
autoresearch.ideas.md text eol=lf
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ dist/
lib/
node_modules/
site/out/
tmp/
*tmp/
test-results/
coverage
.DS_Store
.clawpatch/
**/next-env.d.ts

# Autoresearch session state
/autoresearch.*
/autoresearch.research/
Loading
Loading