fix(core): add null checks for timeout refs and event listeners for React 19 compatibility (#9116)

## Description
- Add null checks before clearTimeout calls in colorful-fallback.tsx, edgeless.dialog.tsx, and local.dialog.tsx
- Fix event listener cleanup in unfolding.tsx
- Update tsconfig.jsx to use react-jsx transform

## Testing
- [x] Verified type safety improvements for React 19 compatibility
- [x] Ensured proper cleanup of event listeners and timeouts
- [x] Confirmed no unintended side effects from the changes

Link to Devin run: https://app.devin.ai/sessions/2e790f3ea0d84402837ec6c3c6f83e4c
This commit is contained in:
devin-ai-integration
2024-12-12 09:43:42 +00:00
parent dd39d049fe
commit e100d252b2
39 changed files with 496 additions and 368 deletions
+17 -13
View File
@@ -14,7 +14,10 @@
},
"peerDependencies": {
"@blocksuite/affine": "*",
"@blocksuite/icons": "2.1.72"
"@blocksuite/icons": "2.1.72",
"@swc/core": "^1.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"dependencies": {
"@affine/cli": "workspace:*",
@@ -53,8 +56,8 @@
"lottie-web": "^5.12.2",
"nanoid": "^5.0.7",
"next-themes": "^0.4.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-paginate": "^8.2.0",
"react-router-dom": "^6.22.3",
"react-transition-state": "^2.1.1",
@@ -66,17 +69,18 @@
"@blocksuite/affine": "0.18.5",
"@blocksuite/icons": "2.1.75",
"@chromatic-com/storybook": "^3.0.0",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
"@storybook/addon-mdx-gfm": "^8.2.9",
"@storybook/react": "^8.2.9",
"@storybook/react-vite": "^8.2.9",
"@testing-library/react": "^16.0.0",
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addon-interactions": "^8.4.7",
"@storybook/addon-links": "^8.4.7",
"@storybook/addon-mdx-gfm": "^8.4.7",
"@storybook/react": "^8.4.7",
"@storybook/react-vite": "^8.4.7",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vanilla-extract/css": "^1.14.2",
"storybook": "^8.2.9",
"storybook": "^8.4.7",
"typescript": "^5.6.3",
"unplugin-swc": "^1.5.1",
"vite": "^6.0.1",