Skip to content

fix: resolve TipTap v3 compatibility issues and clean up Monaco edito…#15

Merged
rui-typelets merged 1 commit intomainfrom
perf/reduce-sync-latency
Sep 22, 2025
Merged

fix: resolve TipTap v3 compatibility issues and clean up Monaco edito…#15
rui-typelets merged 1 commit intomainfrom
perf/reduce-sync-latency

Conversation

@rui-typelets
Copy link
Copy Markdown
Collaborator

@rui-typelets rui-typelets commented Sep 22, 2025

Summary

  • Fixed TipTap v3 compatibility issues after package upgrade
  • Resolved TypeScript compilation errors with crypto APIs
  • Cleaned up Monaco editor sync logic for better maintainability
  • Fixed CSS import order warnings from PostCSS

Changes Made

TipTap v3 Migration

  • Import syntax: Changed from default imports to named imports (import { StarterKit } instead of import StarterKit)
  • StarterKit config: Removed history configuration (not available in TipTap v3)
  • setContent API: Updated calls to use new v3 signature with options object
  • Editor dependencies: Stabilized useEditor dependencies to only recreate on note ID changes

TypeScript & Build Fixes

  • Crypto API types: Added proper as ArrayBuffer casting for TypeScript 5.9 compatibility
  • CSS imports: Reordered Google Fonts imports before Tailwind to fix PostCSS warnings
  • Lint issues: Removed unused imports and refs to pass ESLint checks

Monaco Editor Improvements

  • Stable keys: Use position and language-based keys instead of random generation
  • Clean sync logic: Simplified real-time sync without complex workarounds
  • Better performance: Reduced unnecessary editor recreations

Files Changed

  • src/components/editor/config/editor-config.ts - TipTap v3 import fixes
  • src/components/editor/hooks/useEditorEffects.ts - Cleaned up sync logic
  • src/components/editor/index.tsx - Stabilized editor dependencies
  • src/components/editor/extensions/ExecutableCodeBlockNodeView.tsx - Monaco key improvements
  • src/lib/encryption/index.ts - Crypto API type fixes
  • src/index.css - CSS import order fix
  • public/manifest.json - Added missing PWA manifest

Breaking Changes

None - this is a compatibility update that maintains existing functionality.

Testing

  • TypeScript compilation passes
  • ESLint passes with zero warnings
  • Production build succeeds
  • Real-time sync functionality works
  • Monaco editors render correctly

…r sync

- Fix TipTap v3 import syntax (default vs named imports)
- Remove history configuration from StarterKit (not available in v3)
- Update setContent API calls for v3 compatibility
- Clean up Monaco editor sync logic and remove workarounds
@rui-typelets rui-typelets self-assigned this Sep 22, 2025
@rui-typelets rui-typelets merged commit 26eb2d2 into main Sep 22, 2025
3 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.18.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant