feat: masks, properties refactor, shaders, storage migrations, and more

This commit is contained in:
Maze Winther
2026-03-29 15:48:22 +02:00
parent 39ea298a9c
commit 8db3bead13
690 changed files with 35618 additions and 7337 deletions
+26
View File
@@ -0,0 +1,26 @@
import { useEffect } from "react";
export function useResizeObserver({
ref,
onResize,
}: {
ref: React.RefObject<HTMLElement | null>;
onResize: (entry: ResizeObserverEntry) => void;
}) {
useEffect(() => {
const element = ref.current;
if (!element) return;
const observer = new ResizeObserver((entries) => {
for (const entry of entries) {
onResize(entry);
}
});
observer.observe(element);
return () => {
observer.disconnect();
};
}, [ref, onResize]);
}