import { getShapeUtils } from 'state/shape-utils' import React from 'react' import { useSelector } from 'state' import tld from 'utils/tld' import { DotCircle, Handle } from './misc' import useShape from 'hooks/useShape' import useShapesToRender from 'hooks/useShapesToRender' import styled from 'styles' export default function Defs(): JSX.Element { const shapeIdsToRender = useShapesToRender() return ( {shapeIdsToRender.map((id) => ( ))} ) } function Def({ id }: { id: string }) { const shape = useShape(id) if (!shape) return null return getShapeUtils(shape).render(shape, { isEditing: false }) } function ExpandDef() { const zoom = useSelector((s) => tld.getCurrentCamera(s.data).zoom) return ( ) } function ShadowDef() { return ( ) } const StyledShadow = styled('feDropShadow', { floodColor: '$selected', })