db9ed51e01
F2: findChangedRange only normalized the repeated-content INSERTION case (oldTo<start), leaving the symmetric DELETION case (newTo<start) to return a degenerate DocChange (newTo<from). Push BOTH ends forward by start-min(oldTo,newTo) so the range stays non-degenerate (from<=oldTo, from<=newTo), matching ProseMirror's diff bounds. The insertion case is byte-identical to before (min=oldTo → oldTo→start, newTo→newTo+delta); the deletion/both-below cases are fixed. Never spuriously arms the guard (arming needs oldTo>from AND newTo>from; normalization leaves exactly one end ==from). F1: add custom-typography.test.ts (15 tests) via the real Editor path (mirrors intentional-clear.test.ts): findChangedRange normalization (insertion + the fixed deletion), mapRangeThroughChange release/boundary/shift, and arming (local undo-replace arms; remote y-sync change-origin does NOT; ordinary edit does NOT). Adds test-only exports (undoGuardKey, findChangedRange, mapRangeThroughChange). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist