import ipyreact from traitlets import List, Any import numpy as np class TldrawSineWidget(ipyreact.ReactWidget): points = List(List(Any())).tag(sync=True) _esm = """ import { TDShapeType, Tldraw } from "@tldraw/tldraw"; import * as React from "react"; export default function App({ points }) { const [app, setApp] = React.useState() const handleMount = React.useCallback((app: Tldraw) => { setApp(app) }, []); React.useEffect(() => { if (app) { app.createShapes({ type: "draw", id: "draw1", color: 'red', points: points, }); } }, [points, app]) return (