diff --git a/web/package-lock.json b/web/package-lock.json index 7bae0ed0f..1dfe8280a 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -86,6 +86,7 @@ "react-infinite-scroll-component": "^6.1.0", "react-markdown": "^9.0.1", "react-pdf-highlighter": "^6.1.0", + "react-resizable-panels": "^3.0.6", "react-string-replace": "^1.1.1", "react-syntax-highlighter": "^15.5.0", "react18-json-view": "^0.2.8", @@ -30306,6 +30307,16 @@ } } }, + "node_modules/react-resizable-panels": { + "version": "3.0.6", + "resolved": "https://registry.npmmirror.com/react-resizable-panels/-/react-resizable-panels-3.0.6.tgz", + "integrity": "sha512-b3qKHQ3MLqOgSS+FRYKapNkJZf5EQzuf6+RLiq1/IlTHw99YrZ2NJZLk4hQIzTnnIkRg2LUqyVinu6YWWpUYew==", + "license": "MIT", + "peerDependencies": { + "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", + "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + } + }, "node_modules/react-rnd": { "version": "10.4.1", "resolved": "https://registry.npmmirror.com/react-rnd/-/react-rnd-10.4.1.tgz", diff --git a/web/package.json b/web/package.json index ab24212c5..7f5e3f8dd 100644 --- a/web/package.json +++ b/web/package.json @@ -99,6 +99,7 @@ "react-infinite-scroll-component": "^6.1.0", "react-markdown": "^9.0.1", "react-pdf-highlighter": "^6.1.0", + "react-resizable-panels": "^3.0.6", "react-string-replace": "^1.1.1", "react-syntax-highlighter": "^15.5.0", "react18-json-view": "^0.2.8", diff --git a/web/src/components/ui/resizable.tsx b/web/src/components/ui/resizable.tsx new file mode 100644 index 000000000..3ed9da677 --- /dev/null +++ b/web/src/components/ui/resizable.tsx @@ -0,0 +1,54 @@ +import { GripVerticalIcon } from 'lucide-react'; +import * as React from 'react'; +import * as ResizablePrimitive from 'react-resizable-panels'; + +import { cn } from '@/lib/utils'; + +function ResizablePanelGroup({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function ResizablePanel({ + ...props +}: React.ComponentProps) { + return ; +} + +function ResizableHandle({ + withHandle, + className, + ...props +}: React.ComponentProps & { + withHandle?: boolean; +}) { + return ( + div]:rotate-90', + className, + )} + {...props} + > + {withHandle && ( +
+ +
+ )} +
+ ); +} + +export { ResizableHandle, ResizablePanel, ResizablePanelGroup };