{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "bounding-box-selector", "title": "Bounding Box Selector", "description": "Figma-style selection rectangle appears around any element.", "dependencies": [ "remotion" ], "files": [ { "path": "registry/remocn/bounding-box-selector/index.tsx", "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface BoundingBoxSelectorProps {\n children?: ReactNode;\n borderColor?: string;\n handleColor?: string;\n borderWidth?: number;\n appearAt?: number;\n background?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nfunction DefaultPlaceholder() {\n return (\n \n Selected element\n \n );\n}\n\nfunction Handle({\n color,\n style,\n}: {\n color: string;\n style: React.CSSProperties;\n}) {\n return (\n \n );\n}\n\nexport function BoundingBoxSelector({\n children,\n borderColor = \"#0ea5e9\",\n handleColor = \"#0ea5e9\",\n borderWidth = 2,\n appearAt = 15,\n background = \"#fafafa\",\n speed = 1,\n className,\n}: BoundingBoxSelectorProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const progress = spring({\n frame: frame - appearAt,\n fps,\n config: { damping: 16, stiffness: 140, mass: 0.7 },\n });\n\n const opacity = progress;\n const scale = 0.96 + progress * 0.04;\n\n const content = children ?? ;\n\n return (\n \n
\n {content}\n \n \n \n \n \n \n \n \n \n
\n \n \n );\n}\n", "type": "registry:component", "target": "components/remocn/bounding-box-selector.tsx" } ], "type": "registry:component" }