This resolves console errors when items are deleted or during undo/redo operations.
Changes:
- Added getItemById utility function that returns null instead of throwing
- Updated all item hooks to return null when items don't exist
- Added null checks in components that use these hooks
- Components now gracefully handle missing items by returning null
- Fixed TypeScript export syntax in standaloneExports.ts
- Added MUI dependencies as externals in webpack config
This fixes the "Item with id not found" errors that were occurring when:
- Using undo/redo functionality
- Items were deleted but components were still rendering
- React was unmounting components that referenced deleted items
Migrates away from using a standalone renderer and mobx for plumbing. Previously there was a lot of manual syncing needed between the React UI and the Renderer, which added a lot of overhead and complexity.
Scene state is now held in a store (facilitated by Zustand). This acts as a single source of truth shared over the renderer and the UI, and both react to changes on the store.